You are on page 1of 5

Linear programming: Graphical method example

PHPSimplex
Home PHPSimplex Operations Research

EXAMPLE (Part 2): Graphical method


Theory Examples George Bernard Dantzig

Resolve using the Graphical Method the following problem: Maximize Z = f(x,y) = 3x + 2y subject to: 2x + y 18 2x + 3y 42 3x + y 24 x0,y0

1. Initially we draw the coordinate system correlating to an axis the variable x, and the other axis to variable y, as can see in the figure. 2. We mark in them a numerical scale adapted according to the journeys of variables relating to the restrictions of the problem. Next step is draw restrictions. Beginning with the first, we draw the straight line that is obtained when the restriction regard as equality. Appear represented like the segment that joins A with B and the region that this restriction delimits is indicated for the YELLOW color. This process is repeated in the same way with the second and further restrictions, and they delimit the BLUE andRED region respectively. The feasible region is the intersection of regions delimited by the restrictions and for the conditions of no negativeness of variables, that is, for the region of admissible values limited by both coordinated axes. The feasible region is represented for the convex polygon O-F-H-G-C, emergent of VIOLET color.

file:///C|/Documents%20and%20Settings/gpsenthilkumar/...near%20programming%20Graphical%20method%20example.htm (1 of 5)9/28/2011 11:40:28

Linear programming: Graphical method example

3. Due to the feasible region is not empty (feasible problem), we proceed to determine his extreme points, candidates to optimal solutions, that are the O-F-H-G-C points figure's. Finally, we evaluate the objective function ( 3x + 2y ) at those points, which result is picked up in the following board. As G point provides the bigger value to the objective Z, such point constitutes the optimal solution, we will indicate x = 3; y = 12, with optimal value Z = 33. Extreme point O C G H F Coordinates (x,y) (0,0) (0,14) (3,12) (6,6) (8,0) Objective value(Z) 0 28 33 30 24

COMPARING: GRAPHICAL METHOD VS. SIMPLEX METHOD The successive boards that we have built during the simplex method, provide us the value of the objective function at different vrtices,
file:///C|/Documents%20and%20Settings/gpsenthilkumar/...near%20programming%20Graphical%20method%20example.htm (2 of 5)9/28/2011 11:40:28

Linear programming: Graphical method example

fitting up, at the same time, the coefficients of initial and slack variables. In the first iteration (Board I) have remained all the equal coefficients, has been calculated the objective function value at the vertex (0,0) that is the value which belong to the basic variables, been 0 the result. Board I . 1st iteration 3 Base P3 P4 P5 Z Cb 0 0 0 P0 18 42 24 0 P1 2 2 3 -3 2 P2 1 3 1 -2 0 P3 1 0 0 0 0 P4 0 1 0 0 0 P5 0 0 1 0

Now, it moves through the edge (0,0) F, estimating the value of the Z function, until get to F. This step is translated like the second repetition in the Simplex Method, contributing the II Board, in which have been calculated the value corresponds to the vertex F(8,0): Z=f (8,0)=24. Board II . 2nd iteration 3 Base P3 P4 P1 Z Cb 0 0 3 P0 2 26 8 24 P1 0 0 1 0 2 P2 1/3 7/3 1/3 -1 0 P3 1 0 0 0 0 P4 0 1 0 0 0 P5 -2/3 -2/3 1/3 1

file:///C|/Documents%20and%20Settings/gpsenthilkumar/...near%20programming%20Graphical%20method%20example.htm (3 of 5)9/28/2011 11:40:28

Linear programming: Graphical method example

Keeps on for the FH edge, until arrive to H, where it stops and diplays the data from III Board. At this third iteration has been calculated the value that corresponds to the vertex H(6,6): Z=f(6,6)=30. Board III . 3rd iteration 3 Base P2 P4 P1 Z Cb 2 0 3 P0 6 12 6 30 P1 0 0 1 0 2 P2 1 0 0 0 0 P3 3 -7 -1 3 0 P4 0 1 0 0 0 P5 -2 4 1 -1

We keep on doing calculations trough the HG edge, until the G vertex. The data that is reflected belong to IV Board, concluding with the
file:///C|/Documents%20and%20Settings/gpsenthilkumar/...near%20programming%20Graphical%20method%20example.htm (4 of 5)9/28/2011 11:40:28

Linear programming: Graphical method example

same and warning that it has ended up (checking before that the solution does not get better when it moves around the GC edge). Board IV . 4th iteration 3 Base P2 P5 P1 Z Cb 2 0 3 P0 12 3 3 33 P1 0 0 1 0 2 P2 1 0 0 0 0 P3 -1/2 -7/4 -3/4 5/4 0 P4 0 0 0 0 0 P5 0 1 0 0

The maximum value for the objective function is 33, and corresponds to x = 3 and y = 12 (vertex G). Besides, it can be checked than the value of the function at vertex C (0,14), doesnt surpass 33.

Copyright PHPSimplex. All rights reserved.

file:///C|/Documents%20and%20Settings/gpsenthilkumar/...near%20programming%20Graphical%20method%20example.htm (5 of 5)9/28/2011 11:40:28

You might also like