Vous êtes sur la page 1sur 18

Simplex Method

We use an algebraic method called the simplex method, which


was developed by George B. DANTZIG in 1947 to solve the
problems contains more than two decision variables.
Slack Variables
A mathematical representation of surplus resources.
In real life problems, its unlikely that all resources
will be used completely, so there usually are unused
resources.
Slack variables represent the unused resources
between the left-hand side and right-hand side of
each inequality.
Basic and Nonbasic Variables
Basic variables are selected arbitrarily with the restriction that
there be as many basic variables as there are equations. The
remaining variables are non-basic variables.
x1 2 x2 s1 32
3x1 4 x2 s2 84

This system has two equations, we can select any two of the
four variables as basic variables. The remaining two variables
are then non-basic variables. A solution found by setting the
two non-basic variables equal to 0 and solving for the two
basic variables is a basic solution. If a basic solution has no
negative values, it is a basic feasible solution.
Simplex Method
Write the maximization problem in a standard form by
transforming all the constraints to equality by introducing
Step1 slack, surplus, and artificial variables.
Draw the initial simplex table

Find the PIVOT COLUMN by identifying the most negative


number in the last row of table
Find the PIVOT ROW from the minimum ratio obtained by
Step2 dividing RHS by the corresponding numbers in the pivot
column and set that number in the corresponding row of
smallest ratio is the pivot element.
Convert the Pivot element in to 1 and convert other
elements in the pivot column to 0 by suitable row
operations.
Step3 Do the iterations until all the elements in the last row
becomes 0 or positive values.
Optimal Solution Can be obtained.
Simplex Table

Basic X1 Xn S1 ... Sn Z RHS Ratio


variables

Constraints Coefficients

Objective function Coefficents


in different signs
EXAMPLE : Furniture Company

The furniture Company produces tables and chairs.


Each table takes four hours of labor from the
carpentry department and two hours of labor from
the finishing department. Each chair requires three
hours of carpentry and one hour of finishing. During
the current week, 240 hours of carpentry time are
available and 100 hours of finishing time. Each table
produced gives a profit of $70 and each chair a profit
of $50. How many chairs and tables should be made
in order to maximize the profit P?
Table
Resource Table s ( x1 ) Chairs ( x2 ) Constraints
Carpentry (hr) 4 3 240
Finishing (hr) 2 1 100
Unit Profit $70 $50

Objective Function P 70 x1 50 x2

Carpentry Constraint 4 x1 3x2 240

Finishing Constraint 2 x1 1x2 100

Non-negativity conditions x1, x2 0


The first step of the simplex method requires that each inequality
be converted into an equation. less than or equal to
inequalities are converted to equations by including slack
variables.
Suppose s1 carpentry hours and s2 finishing hours remain unused
in a week.,the constraints become

4 x1 3x2 s1 240 4 x1 3x2 s1 0s2 240


or
2 x1 x2 s2 100 2 x1 x2 0s1 s2 100

As unused hours result in no profit, the slack variables can be


included in the objective function with zero coefficients:
P 70 x1 50 x2 0s1 0s2
P 70 x1 50 x2 0s1 0s2 0
STEP -1

4 x1 3x2 s1 0s2 240


2 x1 x2 0s1 s2 100
P 70 x1 50 x2 0s1 0s2 0
STEP 2
Right
Basic
x1 x2 S1 S2 P Hand
Variables
Side
4 3 1 0 0 240
2 1 0 1 0 100
-70 -50 0 0 1 0

The table represents the initial solution;

x1 0, x2 0, s1 240, s2 100, P 0

The initial solution assumes that all avaliable hours are unused. i.e. The
slack variables take the largest possible values.
STEP 2
Select the pivot column (determine which variable to enter into
the solution mix). Choose the column with the most negative
element in the objective function(last) row.

Basic
x1 x2 S1 S2 P RHS
Variables

4 3 1 0 0 240
2 1 0 1 0 100
-70 -50 0 0 1 0

Pivot column
Select the pivot row (determine which variable to replace in the solution
mix). Divide the last element in each row (RHS) by the corresponding
element in the pivot column. The pivot row is the row with the smallest
non-negative result.
Enter

Right
Basic
x1 x2 S1 S2 P hand
Variables
side
4 3 1 0 0 240 240/ 4 60
2 1 0 1 0 100 100/ 2 50
-70 -50 0 0 1 0
Pivot row
Pivot column

Pivot number
Now calculate new values for the pivot row. Divide every number in the
row by the pivot number.

Right
Basic
x1 x2 S1 S2 P hand
Variables
side
4 3 1 0 0 240
R2
1 1/2 0 1/2 0 50 2
-70 -50 0 0 1 0
Use row operations to make all numbers in the pivot column equal to 0 except
for the pivot number which remains as 1.

Right
Basic
x1 x2 S1 S2 P hand
Variables
side
0 1 1 -2 0 40 4.R2 R1
1 1/2 0 1/2 0 50
0 -15 0 35 1 3500 70.R2 R3
Now repeat the steps until there are no negative numbers in the last row.

Select the new pivot column and Select the new pivot row.

Right
Basic
x1 x2 S1 S2 P hand
Variables
side New pivot row
0 1 1 -2 0 40 40/1 40
1 1/2 0 1/2 0 50 50/ 0,5 100
0 -15 0 35 1 3500

New pivot
column
Calculate new values for the pivot row. As the pivot number is
already 1, there is no need to calculate new values for the pivot
row.
Use row operations to make all numbers in the pivot column equal
to except for the pivot number.

Right
Basic
x1 x2 S1 S2 P hand
Variables
side
0 1 1 -2 0 40
1
1 0 -1/2 3/2 0 30 .R1 R2
2
0 0 15 5 1 4100 15.R1 R3

As the last row contains no negative numbers, this solution


gives the maximum value of P.
Solution:
This simplex table represents the optimal solution to the LP
problem and is interpreted as:
x1 30, x2 40, s1 0, s2 0

and profit or P=$4100

Optimal solution (maximum profit to be made)


30 tables and 40 chairs for a profit of $4100.
Exercise
Solve by Simplex method and find the optimal
solution.
Maximize Z = 2x + 1.5Y
Subjected to
0.75x + y 250
6x + 3Y 1200
X 0, Y 0
Solution: X= 120, Y=160 and Z = 480

Vous aimerez peut-être aussi