Sie sind auf Seite 1von 40

Graphical Solution of 2

Variable LP Problems

A.K.Singh, IMI, New Delhi

A.K.Singh, IMI, Delhi

Sign above and below a straight line

Show area for


4y+2x 12 ; &
4y+2x 12

A.K.Singh, IMI, Delhi

Example 1: A Simple Maximization


Problem
Max
s.t.
< 6

5x1 + 7x2
x1

Objective
Function
Regular
Constraints

2x1 + 3x2
< 19
x1 + x2
< 8
x1 > 0 and x2
>0
A.K.Singh, IMI, Delhi

Non-negativity
Constraints

Example 1: Graphical Solution


First Constraint Graphed

x2

8
x1 = 6

7
6
5
4
3

Shaded region
contains all
feasible points
for this constraint

(6, 0)

1
1

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical Solution


Second Constraint Graphed

x2

(0, 6.3)

7
6

2x1 + 3x2 =
19

5
4
3
2
1
1

Shaded
region contains
all feasible points
for this constraint
2

(9.5, 0)

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical Solution


Third Constraint Graphed
x2 (0, 8)
8
7
x1 + x2 = 8

6
5
4
3
2
1
1

Shaded
region contains
all feasible points
for this constraint
2

(8, 0)

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical Solution


Combined-Constraint Graph Showing Feasible Region

x2
x1 + x2 = 8

8
7

x1 = 6

6
5
4
3

2x1 + 3x2 = 19

Feasible
Region

2
1
1

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical
Solution
x2

Objective Function Line

8
7

(0, 5)

Objective Function
5x1 + 7x2 = 35

5
4
3
2

(7, 0)

1
1

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical Solution

Selected Objective Function


Linesx2
8
7

5x1 + 7x2 = 35

5x1 + 7x2 = 39

5
4

5x1 + 7x2 = 42

3
2
1
1

A.K.Singh, IMI, Delhi

x1

10

Example 1: Graphical Solution


Optimal Solution
x2
Maximum

Objective Function Line


5x1 + 7x2 = 46

8
7

Optimal Solution
(x1 = 5, x2 = 3)

6
5
4
3
2
1
1

A.K.Singh, IMI, Delhi

x1

10

Irregular Types Of Lnear Programmng


Problems
For some linear programming models, the general
rules do not apply.
Special types of problems include those with:
Redundancy
Infeasible solutions
Unbounded solutions
Multiple optimal solutions

A.K.Singh, IMI, New Delhi

Redundancy: A redundant constraint is a constraint that


does not affect the feasible region in any way.
Maximize Profit
= 2X + 3Y
subject to:
X + Y 20
2X + Y 30
X 25
X, Y 0

A.K.Singh, IMI, New Delhi

Infeasibility: A condition that arises when an LP problem


has no solution that satisfies all of its constraints.

X + 2Y 6
2X + Y 8
X 7

A.K.Singh, IMI, New Delhi

Unboundedness: Sometimes an LP model will not


have a finite solution

Maximize profit
= $3X + $5Y
subject to:
X 5
Y 10
X + 2Y 10
X, Y 0
A.K.Singh, IMI, New Delhi

Multple Optmal Solutons


An LP problem may have more than one optimal
solution.
Graphically, when the isoprofit (or isocost) line runs
parallel to a constraint in the problem which lies in
the direction in which isoprofit (or isocost) line is
located.
In other words, when they have the same slope.
A.K.Singh, IMI, New Delhi

Multple Optmal Solutons


Maximize profit =
3x + 2y
Subject to:
6X + 4Y 24
X 3
X, Y 0

A.K.Singh, IMI, New Delhi

Multple Optmal Solutons


At profit level of $12,
isoprofit line will rest
directly on top of
first constraint line.
This means that any
point along the line
between corner points
1 and 2 provides an
optimal X and Y
combination.
A.K.Singh, IMI, New Delhi

Home Exercise
Solve the following LP problem using
Graphical method
Maximize
Z = 3X1+ 5X2
Subject to
X1

4
2 X2 12

3X1 +2X2 18
X1 , X2 0
A.K.Singh, IMI, New Delhi

SLACK VARIABLES
Standard form requires that all constraints
be in the form of equations.
A slack variable is added to a constraint
to convert it to an equation (=).
A slack variable represents unused
resources.
A slack variable contributes nothing to the
objective function value.

A.K.Singh, IMI, Delhi

SURPLUS VARIABLES
A surplus variable is subtracted from a
constraint to convert it to an equation (=).
A surplus variable represents an excess
above a constraint requirement level.
Surplus variables contribute nothing to the
calculated value of the objective function.

A.K.Singh, IMI, Delhi

The Simplex Method


When decision variables are more than 2, it
is always advisable to use Simplex Method
to avoid lengthy graphical procedure.
The simplex method is not used to examine
all the feasible solutions.
It deals only with a small and unique set of
feasible solutions, the set of vertex points
(i.e., extreme points) of the convex feasible
space that contains the optimal solution.
A.K.Singh, IMI, Delhi

Simplex Method
The simplex technique involves generating a
series of solutions in tabular form, called
tableaus.
By inspecting the bottom row of each tableau,
one can immediately tell if it represents the
optimal solution.
Each tableau corresponds to a corner point of
the feasible solution space.
The first tableau corresponds to the origin.
Subsequent tableaus are developed by shifting
to an adjacent corner point in the direction that
yields the highest (smallest) rate of profit (cost).
This process continues as long as a positive
(negative) rate of profit
(cost) exists.
A.K.Singh, IMI, Delhi

Simplex algorithm

Initialization: setup to start


iterations, including
finding
an initial CPF solution
Optimality test: Is the current CPF
solution
optimal?
if no
if yes
stop

Next Iteration: Perform an iteration to


A.K.Singh, IMI, Delhi

The simplex method in tabular


form
Steps 1: Initialization
Transform all the constraints to equality by
introducing slack, surplus, and artificial
variables as follows:
Constraint type

Variable to be added
+ slack (s)

- Surplus (s) + artificial (A)

+ Artificial (A)

Simplex method in tabular form


Step 2: Construct the initial simplex tableau

Basic X1
variable

Xn S1

... Sn A1 . An

RHS
b1

Coefficient of the constraints


A
Z

bm
Objective function coefficient
In different signs

Z
value

Simplex method in tabular form


Step 3: Test for optimality
Case 1: Maximization problem
The current solution is optimal if
every coefficient in the objective
function row is nonnegative
Case 2: Minimization problem
The current solution is optimal if
every coefficient in the objective
function row is nonpositive
A.K.Singh, IMI, Delhi

Simplex method in tabular


form

Step 4: Selecting Entering Variable


Determine the entering basic variable
by selecting the variable
(automatically a nonbasic variable)
with the most negative value (in case
of maximization) or with the most
positive (in case of minimization) in
the last row (Z-row). Put a box around
the column below this variable, and
call it the pivot column
A.K.Singh, IMI, Delhi

Simplex method in tabular form


Step 6: Selecting the leaving basic variable
Pick out each coefficient in the pivot column
that is strictly positive (>0)
Divide each of these coefficients into the
right hand side entry for the same row
Identify the row that has the smallest of
these ratios
The basic variable for that row is the leaving
variable, so replace that variable by the
entering variable in the basic variable column
of the next simplex tableau. Put a box around
this row and call it the pivot row
A.K.Singh, IMI, Delhi

Simplex method in tabular


form
Step 7: Solve for the new BF solution
By using elementary row operations
(multiply or divide a row by a nonzero
constant; add or subtract a multiple of
one row to another row) to construct a
new simplex tableau, and then return to
the optimality test.

A.K.Singh, IMI, Delhi

Simplex method
Solve the following problem using the
simplex method
Maximize
Z = 3X1+ 5X2
Subject to
X1

4
2 X2 12

3X1 +2X2 18
X1 , X2 0
A.K.Singh, IMI, Delhi

Simplex method
Initialization
Standard form
Maximize Z,
Subject to
Z - 3X1- 5X2

= 0 Sometimes it is

called the
augmented form of
X1
+ S1
= the
4 problem because
the12
original form has
2 X2
+ S2
=
been augmented by
3X1 +2X2
+ S3 =some
18 supplementary
X1 , X2, S1, S2, S3 0
variables needed to
apply the simplex
A.K.Singh, IMI, Delhi
method

Initial tableau
Entering
variable

2. Initial tableau
Basic
variable

X1

X2

S1

S2

S3

RHS

S1

S2

12

S3

18

-3

-5

Leavin
g
variabl
e

Pivot column

Pivot row
Pivot
numbe
r

Iteration 1
Determine the entering variable by
selecting the variable with the most
negative in the last row.
From the initial tableau, in the last row (Z
row), the coefficient of X1 is -3 and the
coefficient of X2 is -5; therefore, the most
negative is -5. consequently, X2 is the
entering variable.
X2 is surrounded by a box and it is called
the pivot column
A.K.Singh, IMI, Delhi

Iteration 1
Determining the leaving variable by using the
minimum ratio test as following:
Basic
variable

Entering
variable X2
(1)

RHS

Ratio

(2)

(2)(1)

S1

None

S2
Leaving
S3

12

6
Smallest ratio

18

Iteration 1
Solving for the new solution by using the eliminatory
row operations as following:
New pivot row = old pivot row pivot number

Basic
variable
S1

X1

X2

S1

S2

S3

RHS

X2

1/2

S3
Z
Note that X2 becomes in the
basic variables list instead of S2

Optimality Test & Iteration 2


This solution is not optimal, since there is a
negative numbers in the last row

Basic
variable
S1

X1

X2

S1

S2

S3

RHS

X2

1/2

S3

-1

-3

5/2

30

The most negative


value; therefore, X1
is the entering

The smallest ratio is


6/3 =2; therefore, S3
is the leaving
variable

Iteration
Apply the same rules we will obtain this
solution:
Basic
X1
X2
S1
S2
S3
RHS
variable
S1
0
0
1
1/3
-1/3
2
X2

1/2

X1

-1/3

1/3

3/2

36

This solution is optimal; since there is no negative value


in the last row: basic variables are X1 = 2, X2 = 6 and S1 =
2; the nonbasic variables are S2 = S3 = 0, Z = 36. S2 & S3
are called scarce resources however, S1 would be a

Class Problem
Max Z = 5x1+4x2
Subject to
6x1+4x2 <= 24
x1+ 2x2 <=6
-x1+x2 <= 1
x2<= 2
x1,x2 >= 0

x1 = 3, x2 =
3/2
A.K.Singh, IMI, Delhi

Special cases
In the final tableau, if one or more artificial
variables (A1, A2, ) still basic and has a nonzero
value, then the problem has an infeasible solution
If there is a zero under one or more nonbasic
variables in the last tableau (optimal solution
tableau), then there is a multiple optimal solution.
When determining the leaving variable of any
tableau, if there is no positive ratio (all the entries
in the pivot column are negative and zeroes),
then the solution is unbounded.

A.K.Singh, IMI, Delhi

Das könnte Ihnen auch gefallen