Linear Programming Graphical Method Example

5

Click here to load reader

Transcript of Linear Programming Graphical Method Example

Page 1: Linear Programming Graphical Method Example

Linear programming: Graphical method example

PHPSimplex

Home

PHPSimplex

Operations Research

Theory Examples

George Bernard Dantzig

EXAMPLE (Part 2): Graphical method

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

x ≥ 0 , y ≥ 0

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

Page 2: Linear Programming Graphical Method Example

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 Coordinates (x,y) Objective value(Z)

O (0,0) 0

C (0,14) 28

G (3,12) 33

H (6,6) 30

F (8,0) 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 vértices,

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

Page 3: Linear Programming Graphical Method Example

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 2 0 0 0

Base Cb P0 P1 P2 P3 P4 P5

P3 0 18 2 1 1 0 0

P4 0 42 2 3 0 1 0

P5 0 24 3 1 0 0 1

Z 0 -3 -2 0 0 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 2 0 0 0

Base Cb P0 P1 P2 P3 P4 P5

P3 0 2 0 1/3 1 0 -2/3

P4 0 26 0 7/3 0 1 -2/3

P1 3 8 1 1/3 0 0 1/3

Z 24 0 -1 0 0 1

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

Page 4: Linear Programming Graphical Method Example

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 2 0 0 0

Base Cb P0 P1 P2 P3 P4 P5

P2 2 6 0 1 3 0 -2

P4 0 12 0 0 -7 1 4

P1 3 6 1 0 -1 0 1

Z 30 0 0 3 0 -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

Page 5: Linear Programming Graphical Method Example

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 2 0 0 0

Base Cb P0 P1 P2 P3 P4 P5

P2 2 12 0 1 -1/2 0 0

P5 0 3 0 0 -7/4 0 1

P1 3 3 1 0 -3/4 0 0

Z 33 0 0 5/4 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), doesn’t 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