Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Linear Programming(LP)
The Simplex Method
A. Primal Simplex Method
Overall Idea of Simplex Method
Simplex Method translates the geometricdefinition of the extreme point into analgebraic definition
Initial Step: all the constraints are put in astandard form
In standard form: all the constraints areexpressed as equations by augmentingslack and surplus variables as necessary
Overall Idea
The conversion of inequality to equationnormally results in a set of simultaneousequations in which the number of variablesexceeds the number of equations
The Equation might yield an infinitenumber of solution points
Extreme Points ↔ Basic Solutions
Overall Idea
Linear Algebra Theory:A basic solution is obtained
by setting to zero as many variable as differencebetween the total number of variables and thetotal number of equation
solving for the remaining variable
resulting in a unique solution
Standard LP Form
To develop a general solution method, LPproblem should be put in a commonformat
Development of the SimplexMethod
Two types of Simplex Method
Primal Simplex Method
Dual Simplex Method
Basically, the difference between the twomethod lies on the method of choosing theinitial setup
Standard LP Form
The Properties of Standard LP Form
All constraints are equations (Primal SimplexMethod requires a non-negative right-handside)
All the variables are non-negative
The Objective Function may be maximizationor minimization
Standard LP Form:Constraints
A constraint of type () is converted toequation by adding a slack variable to theleft side of the constraint
For example:
x1 + 2x2 6
x1 + 2x2 + s1 = 6, s1 0
Standard LP Form:Constraints
A constraint of type () is converted toequation by subtracting a surplus variableform the left side of the constraint
For example:
3x1 + 2x2 – 3x3 5
3x1 + 2x2 – 3x3 – s2 = 5, s2 0
Standard LP FormConstraints
The right side of an equation can alwaysbe made non-negative by multiplying bothsides by –1
For example:
2x1 + 3x2 – 7x3 = –5
–2x1 – 3x2 +7x3 = +5
Standard LP FormConstraints
The direction of an inequality is reversedwhen both sides are multiplied by –1
For example:
2x1 – x2 –5 = –2x1 + x2 5
Standard LP FormVariables
Unrestricted variable xi can be expressedin terms of two non-negative variables
xi = xi’ – xi”, where xi’, xi” 0
xi’ > 0, xi” = 0, and vice versa
Slack ↔Surplus
Standard LP FormObjective Function
Maximization or Minimization
Maximization = Minimization of thenegative of the function
For example:
Maximize z = 5x1 + 2x2 + 3X3 equivalent toMinimize (–z) = – 5x1 – 2x2 – 3X3
Standard LP FormExample
Write the following LP Model in standardform:
Minimize z = 2x1 + 3X2
Subject to (with constraints): x1 + x2 = 10
–2 x1 +3 x2 –5
7 x1 – 2 x2 6
x1 unrestricted
x2 0
Basic Solution
For m: number of equations And n: number of unknowns (variables) Basic solution is determined
by setting n – m (number of) variables equal to zero The n – m variables are called the non-basic
variables solving the m remaining variables The m remaining variables are called the basic
variable resulting a unique solution
Basic SolutionExample
2x1 + x2 + 4x3 + x4 = 2
x1 + 2x2 + 2x3 + x4 = 3
m = 4
n = 2
Basic solution is associated with m – n
(= 4 – 2 = 2) zero variables
Number of possible basic solution = mCn=
4C2 =4!/2!2! = 6
Basic SolutionExample
2x1 + x2 + 4x3 + x4 = 2
x1 + 2x2 + 2x3 + x4 = 3
Set x2 = 0 and x4 = 0
2x1 + 4x3 = 2
x1 + 2x3 = 3inconsistent
Basic SolutionExample 2x1 + x2 + 4x3 + x4 = 2
x1 + 2x2 + 2x3 + x4 = 3
Set x3 = 0 and x4 = 0 (non-basic variables)
x1 and x2 are basic variables
2x1 + x2 = 2
x1 + 2x2 = 3
x1 = 1/3
x2 = 4/3
Basic feasible solution: x1 = 1/3, x2 = 4/3, x3 = 0 and x4 = 0
Basic SolutionExample 2x1 + x2 + 4x3 + x4 = 2
x1 + 2x2 + 2x3 + x4 = 3
Set x1 = 0 and x2 = 0
x3 and x4
4x3 + x4 = 2
2x3 + x4 = 3
x3 = – 1/2
x2 = 4/3infeasible
Basic Feasible Solution
A basic solution is said to be feasible if allits solution values are non-negative
Else: infeasible basic solution
Primal and Dual Simplex
All iterations in Primal Simplex Methodare always associated to feasible basicsolutions only
Primal Simplex Method deals with feasibleextreme points only
Primal and Dual Simplex
Iterations in Dual Simplex Method endonly if the last iteration is infeasible
Both methods yield feasible basic solutionas stipulated by the non-negativitycondition of the LP model
Primal Simplex MethodThe Reddy Mikks Company XE: tons produced daily of exterior paint
XI: tons produced daily of interior paint
Objective Function to be satisfy:
Maximize z = 3XE + 2XI
Subject to these constraints:
XE + 2XI 6
2XE + XI 8
– XE + XI 1
XI 2
XE, XI 0
Primal Simplex MethodThe Reddy Mikks Company
Set the constraints to equations
xE + 2xI 6 xE + 2xI + sI = 6
2xE + xI 8 2xE + xI + s2 = 8
– xE + xI 1 – xE + xI + s3 = 1
xI 2 xI + s4= 2
xI, xE, sI, s2, s3, s4 0
m = 4
n = 2
Primal Simplex MethodThe Reddy Mikks Company
Basic Solution
m = 4
n = 2 (xE and xI)
If xE and xI = 0 then
xE + 2xI + sI = 6 sI = 6
2xE + xI + s2 = 8 s2 = 8
– xE + xI + s3 = 1 s3 = 1
xI + s4= 2 s4= 2
BasicFeasibleSolution
Primal Simplex MethodThe Reddy Mikks Company Convert the Objective Function
Maximize z = 3xE + 2xI
z – 3xE – 2xI = 0
Include the slack variables
Maximize
z – 3xE – 2xI + 0sI + 0s2 + 0s3 + 0s4 = 0
Primal Simplex MethodThe Reddy Mikks Company Maximize
z – 3xE – 2xI + 0sI + 0s2 + 0s3 + 0s4 = 0
Later (in the next sub-chapters), the slack andthe substitute variables are written as commonvariables
Maximize
z – 3xE – 2xI + 0x1 + 0x2 + 0x3 + 0x4 = 0
Primal Simplex MethodThe Reddy Mikks Company Incorporate the objective function with the
basic feasible solution
xE and xI : entering variables
sI, s2, s3 ,and s4 : leaving variables
Start the iterations with the values of sI, s2,s3 ,and s4 = zero
Final Result of the iterations the values ofxE and xI in z = zero
Primal Simplex MethodEasiness (a commentary)
Each equation has a slack variable
The right hand of all constraints are non-negative
Entering Variables inMaximization and Minimization
Optimality Condition
The entering variable in Maximization isthe non-basic variable with the mostnegative coefficient in the z-equation
The optimum of Maximization is reachedwhen all the non-basic coefficients arenon-negative (or zero)
A Tie may be broken arbitrarily
Entering Variables inMaximization and Minimization
Optimality Condition
The entering variable in Minimization is thenon-basic variable with the most positivecoefficient in the z-equation
The optimum of Minimization is reachedwhen all the non-basic coefficients arenon-positive (Zero)
A Tie may be broken arbitrarily
Leaving Variables inMaximization and Minimization
Feasibility Condition
For both Maximization and Minimization,the leaving variable is the current basicvariable having the smallest intercept(minimum ratio with strictly positivedenominator) in the direction of the enteringvariable
A Tie may be broken arbitrarily
Primal Simplex Method:The Formal Iterative Steps
Step 0: Using the standard form with allnon-negative right hand sides, determinea starting feasible solution
Step 1: Select an entering variable fromamong the current non-basic variablesusing the optimality condition
Primal Simplex Method:The Formal Iterative Steps
Step 2: Select the leaving variable fromthe current basic variables using thefeasibility condition
Step 3: Determine the value of the newbasic variables by making the enteringand the leaving variable non basic
Stop if the optimum solution is achieved;else Go to Step 1
Primal Simplex MethodThe Reddy Mikks Company Incorporate the objective function with the
basic feasible solution
xE and xI : entering variables
sI, s2, s3 ,and s4 : leaving variables
Start the iterations with the values of sI, s2,s3 ,and s4 = zero
Final Result of the iterations the values ofxE and xI in z = zero
Primal Simplex MethodThe Reddy Mikks Company
Maximize
z – 3XE – 2XI + 0sI + 0s2 + 0s3 + 0s4 = 0
xE + 2xI + sI = 6 Raw Material A
2xE + xI + s2 = 8 Raw Material B
– xE + xI + s3 = 1 Demand x1 #1
xI + s4= 2 Demand x1 #2
Put all the equation in the Table (Tableau)
Use Gauss-Jordan Method (Swapping)
Primal Simplex Method:The Tableau
21000100s4
101001-10s3
80010120s2
60001210s1
00000-2-31z
Inter-
cept
solutions4s3s2s1xIxEzBasic
This column can be omitted
-2100010s4
-101001-1s3
48001012s2
66000121s1
00000-2-3z
Inter-
cept
solutions4s3s2s1xIxEBasic
Entering Column
Pivot
Equa-tion(PE)
Pivot ElementLeaving Variable
Gauss – Jordan
1. Pivot Equation
New Pivot Equation (NPE)= Old PivotEquation : Pivot Element
2. All other equations, including z
New Equation = (Old Equation) – (itsentering column coefficient NPE)
s4
s3
4001/201/21xE
s1
z
solutions4s3s2s1xIxEBasic
Pivot Element = 2
NPE
4001/201/21NPE
00000-2-3Z
(OLD)
Coefficient xE for z = -3
-1200-3/20-3/2-3-3NPE
-1200-3/20-3/2-33NPE
12003/20-1/20Z
(NEW)
z
s4
s3
4001/201/21xE
s1
12003/20-1/20z
solutions4s3s2s1xIxEBasic
4001/201/21NPE
Coefficient xE for s1 = 1
4001/201/211NPE
s1
6000121s1 (OLD)
4001/201/211NPE
200-1/213/20s1
(NEW)
4
2
12
solution
s4
s3
001/201/21xE
00-1/213/20s1
003/20-1/20z
s4s3s2s1xIxEBasic
4001/201/21NPE
Coefficient xE for S3 = -1
-400-1/20-1/2-1-1NPE
s3
5011/203/20s3
(NEW)
101001-1s3(OLD)
-400-1/20-1/2-1-1NPE
5
4
2
12
solution
s4
011/203/20s3
001/201/21xE
00-1/213/20s1
003/20-1/20z
s4s3s2s1xIxEBasic
4001/201/21NPE
Coefficient xE for S4 = 0
00000000NPE
s4
2010010s4
(NEW)
2100010s4
00000000NPE
2
5
4
2
12
solution
010010s4
011/203/20s3
001/201/21xE
00-1/213/20s1
003/20-1/20z
s4s3s2s1xIxEBasic
Result of Iteration 1
22010010s4
10/35011/203/20s3
84001/201/21XE
4/3200-1/213/20s1
12003/20-1/20z
Inter-
cept
solutions4s3s2s1xIxEBasic
Entering Column
Pivot
Equa-tion(PE)
Pivot ElementLeaving Variable
s4
s3
xE
4/300-1/32/310xi
z
solutions4s3s2s1xIxEBasic
Pivot Element = 3/2
NPE
4/300-1/32/310NPE
12003/20-1/20Z
(OLD)
Coefficient xI for z = -1/2
-2/3001/6-1/3-1/20-1/2NPE
12 2/3004/31/300Z
(NEW)
z
-2/3001/6-1/3-1/20-1/2NPE
s4
s3
xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
4/300-1/32/310NPE
4001/201/21xE
(OLD)
Coefficient xi for x3 = 1/2
-2/300-1/61/31/201/2NPE
10/3002/3-1/301xE
(NEW)
xE
-2/300-1/61/31/201/2NPE
s4
s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 +2/3004/31/300z
solutions4s3s2s1xIxEBasic
4/300-1/32/310NPE
5011/203/20s3
(OLD)
Coefficient xi for s3 = 3/2
200-1/213/203/2NPE
3011-100s3
(NEW)
s3
200-1/213/203/2NPE
s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
4/300-1/32/310NPE
2010010s4
(OLD)
Coefficient xi for s4 = 1
4/300-1/32/3101NPE
2/3011/3-2/300s4
(NEW)
s4
4/300-1/32/3101NPE
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
Result of Iteration 2 = END
Interpretation of the SimplexTableau
Information from the tableau Optimum Solution
Status of Resources
Dual Prices (Unit worth of resources) and ReducedCost
Sensitivity of the optimum solution to the changes ofin availability of resources
marginal profit/cost (objective function coefficients)
The usage of the resources by the model activities
Interpretation of the SimplexTableau: Optimum Solution
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
Interpretation of the SimplexTableau: Optimum Solution
The Reddy Mikks Company
Optimum Solution x1 = 4/3
x2 = 10/3
Objective Function:
Maximize z = 3XE + 2XI
z = 3(4/3) + 2(10/3) = 12 2/3
Interpretation of the SimplexTableau: Status of Resources
abundants > 0
scarces = 0
Status of ResourceSlack Variable
Interpretation of the SimplexTableau: Status of Resources
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
Interpretation of the SimplexTableau: Status of Resources
abundantLimit of demand forinterior paint
s4 = 2/3
scarceRaw material Bs2 = 0
scarceRaw material As1 = 0
s3 = 3
SlackVariable
abundantLimit of excess ofinterior over exteriorpaint
Status ofResource
Resource
Interpretation of the SimplexTableau: Status of Resources
Which of the scarce resources should begiven priority in the allocation of additionalfunds to improve profit mostadvantageously?
Compare the dual price of the scarceresources
Interpretation of the SimplexTableau: Dual Price
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
Dual Price
y4 = 0Limit of demandfor interior paint
s4 = 0
y2 =4/3 thousanddollars per ton ofmaterial B
Raw material Bs2 = 4/3
y1 = 1/3 thousanddollars per ton ofmaterial A
Raw material As1 = 1/3
s3 = 0
SlackVariable
y3 = 0Limit of excess ofinterior overexterior paint
Dual Price function(y)
Resource
Interpretation of the SimplexTableau: Maximum Change inResource Availability
Maximum Change in Resource Availabilityof Resource i = Di
Two Cases:
Di > 0
Di < 0
4/326xi
12 2/3120z
2
(Optimum)10
10/348xE
Right-Side Element (Solution) inIteration
Equation
2/322s4
351s3
4/326xi (raw material A)
12 2/3120z
2
(Optimum)10
10/348xE (raw material B)
Right-Side Element(Solution) in Iteration
Equation
2/322s4 (Demand xI #2)
351s3 (Demand xI #1)
4/3 + ?2 + D16 + D11 (raw material A)
12 2/3 + ?120z
2
(Optimum)10
10/3 + ?482 (raw material B)
Right-Side Element(Solution) in Iteration
Equation
2/3 + ?224 (Demand xI #2)
3 + ?513 (Demand xI #1)
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
Coefficients for D1
Right-Side Element (Solution)in Iteration
Equation
4/3 + 2/3 D12/31 (raw material A)
12 2/3 + 1/3 D11/3z
2
(Optimum)s1
10/3 – 1/3 D1-1/32 (raw material B)
2/3 – 2/3D1-2/34 (Demand xI #2)
3 - 1D1-13 (Demand xI #1)
D1 -2D1 1Overall
SatisfiedD1 12/3 – 2/3D1 0
Case
D1 < 0D1 > 0
D1 3
D1 10
Satisfied
-2 D1 1
3 - 1D1 0
10/3 – 1/3 D1 0
4/3 + 2/3 D1 0
Satisfied
Satisfied
D1 -2
-2 D1 1
Any change outside this range (i.e.decreasing raw material A by more than 2tons or increasing raw material A by morethan 1 ton) will lead to infeasibility and a newset of basic variables (Chapter of SensitivityAnalysis)
Maximum Change in ResourceAvailability
-2 D1 1 feasible solution
Any change outside this range (i.e. decreasingraw material A by more than 2 tons or increasingraw material A by more than 1 ton) will lead toinfeasibility and a new set of basic variables(See Chapter of Sensitivity Analysis)
Max and Min of raw material A with dual price y1
= 1/3 when Max = 6 + 1 = 7 and Min = 6 – 2 = 4
Interpretation of the SimplexTableau: Maximum Change inMarginal Profit/Cost Changing the coefficients in z-row Case 1: in accordance with basic variables
Case 2: in accordance with non-basicvariables
Maximum change in marginal profit/cost =di
For exampled1 : Maximum change profit in
accordance with xE
Interpretation of the SimplexTableau: Maximum Change inMarginal Profit/Cost
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3004/31/300z
solutions4s3s2s1xIxEBasic
2/3011/3-2/300s4
3011-100s3
10/3002/3-1/301xE
4/300-1/32/310xi
12 2/3+10/3 d1004/3+2/3 d11/3 - 1/3d100z
solutions4s3s2s1xIxEBasic
Case 1 : Basic Variables
Objective Function: z = 3xE – 2xI
Objective Function: z = 3xE – 2xI
Coefficient xE = cE =31/3 – 1/3 d1 0 d1 1
4/3 + 2/3 d1 0 d1 –2
– 2 d1 1 3 – 2 cE 1 + 1 1 cE 4
1 cE 4
Current optimum remains unchanged for the rangeof cE [1. 4]
The value of z will change according to theexpression: 12 2/3+10/3 d1, – 2 d1 1
Case 2: Non - Basic Variables
Changes in their original objectivecoefficients can only affect only their z-equation coefficient and nothing else
Corresponding column is not pivoted
In general, the change di of the originalobjective of a non-basic variable alwaysresults in decreasing the objectivecoefficient in the optimum tableau by thesame amount
Maximize z = 5xE + 2xI
Objective Function
Maximize z = 5xE + 2xI
cI = 2 cI = 2 + d2
Coefficient xI
1/2 – d2 0 d2 1/2
cI 2 + 1/2
cI 5/3
2100010s4
5011/203/20s3
4001/201/21xE
200-1/213/20s1
20005/201/20z
solutions4s3s2s1xIxEBasic
Maximize z = 5xE + 2xI OptimumSolution
ReducedCost
Interpretation of the SimplexTableau: Reduced Cost
Reduced Cost = the optimum objectivecoefficients of the non-basic variables
Reduced Cost = net rate of decrease inthe optimum objective value resulting fromincreasing of the associated non-basicvariable
Interpretation of the SimplexTableau: Reduced Cost
Reduced Cost = cost of resources toproduce per unit (xi) input – its revenueper unit output
Reduced Cost > 0 cost > revenue
No economic advantage in producing theoutput
Reduced cost < 0 cost < revenuecandidate for becoming positive in theoptimum solution
Interpretation of the SimplexTableau: Reduced Cost
2100010s4
5011/203/20s3
4001/201/21xE
200-1/213/20s1
20005/201/20z
solutions4s3s2s1xIxEBasic
Maximize z = 5xE + 2xI
OptimumSolution
ReducedCost
Interpretation of the SimplexTableau: Reduced Cost
Optimum objective function
z + 1/2 xI + 5/2 s1 = 20
z = 20 – 1/2 xI – 5/2 s1
Interpretation of the SimplexTableau: Reduced Cost
Reduced Cost = the optimum objectivecoefficients of the non-basic variables
Reduced Cost = net rate of decrease inthe optimum objective value resulting fromincreasing of the associated non-basicvariable
Interpretation of the SimplexTableau: Reduced Cost
Reduced Cost = cost of resources toproduce per unit (xi) input – its revenueper unit output
Reduced Cost > 0 cost > revenue
No economic advantage in producing theoutput
Reduced cost < 0 cost < revenuecandidate for becoming positive in theoptimum solution
Interpretation of the SimplexTableau: Reduced Cost
2100010s4
5011/203/20s3
4001/201/21xE
200-1/213/20s1
20005/201/20z
solutions4s3s2s1xIxEBasic
Maximize z = 5xE + 2xI
OptimumSolution
ReducedCost
Interpretation of the SimplexTableau: Reduced Cost
Optimum objective function
z + 1/2 xI + 5/2 s1 = 20
z = 20 – 1/2 xI – 5/2 s1
Interpretation of the SimplexTableau: Reduced Cost Unused economic activity = non-basic variable
can become economically viable in two ways:(Logically)
#1 by decreasing its per unit use of the resource
#2 by increasing its per unit revenue (throughprice increase)
Combination of the two ways
#1 is more viable than #2 since #1 is inaccordance with efficiency
while #2 is related to market condition in whichother factors influence
The End
This is the end of Chapter 3A