ShowSimplex

Linear Optimization

© 2002 Inductive Solutions, Inc. All rights reserved.

Sample
Problem

You are allowed to use ShowSimplex 56 more times over a period of 45 more days.

Verify The Problem

Maximixe z = 4.00x1+ 6.00x2+ 7.00x3+ 8.00x4
Subject to
2.00x1+ 3.00x2+ 4.00x3+ 7.00x4 <= 4600.00  (Cons 1)
3.00x1+ 4.00x2+ 5.00x3+ 6.00x4 <= 5000.00  (Cons 2)
1.00x4 >= 400.00  (Cons 3)
1.00x1+ 1.00x2+ 1.00x3+ 1.00x4 = 950.00  (Cons 4)

The Solution

The Maximum z = 6650.00

Optimal Solution : Values of Non-Zero Variables

Var.Optimal Value
x2400.00000
x3150.00000
x4400.00000

The optimal solution maximizes the objective function and satisfies the given constraints and default contraints: all variables must be greater or equal to zero.  In this sample problem, ShowSimplex found the (x1, x2, x3, x4) that maximizes the objective function and satisfies the constraints Cons 1, Cons 2, Cons 3, Cons 4, (as well as the default constraints x1>=0, x2>=0, x3>= 0, x4>=0). The maximum (optimum) value of the objective function z is 6650; the values for (x1, x2, x3, x4) that maximizes the objective function and satisfies the constraints is x1=0, x2=400, x3=150, x4= 400. The non-zero variables x2, x3,x4 are called basic variables.

Reduced Cost for Non-Basic Variables

Var.Reduced Cost
x11.00000

The reduced costs are the objective function coefficients for the original variables at the optimum solution. It is an estimate of how much the objective function will change if you make a zero-valued variable (like x1) non-zero. Note that the objective function value will always decrease. The Reduced Cost is the amount by which the objective function coefficient for the variable needs to change before that variable becomes non-zero. Reduced costs are also called reduced gradients and opportunity costs.

The Reduced Costs = Change in optimal objective function value per unit increase of a corresponding variable currently at a value of zero.

In this sample problem, suppose we make a new Constraint 6:  x1 = 2.  This increases x1 from 0 to 2. When we re-solve the problem we expect that the objective function currently valued at 6650 will decrease (by 2*Reduced Cost = 2*1 = 2 ) to 6648.  In fact, in this case, the new optimal solution is x1=2, x2=396, x3=152, x4=400.

Slack Values for Constraints

ConstraintSlack Value
Cons 2250.00000

The slack variable is a variable that converts an inequality to an equality.  In this sample problem, note that the Constraint 1, Constraint 3, and Constraint 4 are satisfied exactly : For x1=0, x2=400, x3=150, x4=400 we see
2.00x1+ 3.00x2+ 4.00x3+ 7.00x4 = 4600.00  (Cons 1)
1.00x4 = 400.00  (Cons 3)
1.00x1+ 1.00x2+ 1.00x3+ 1.00x4 = 950.00  (Cons 4)

In these cases the slack variables for those constraints are zero.
Note that Constraint 2 is not satisfied exactly: For x1=0, x2=400, x3=150, x4=400 we see
3x1+ 4x2+ 5x3+ 6x4  = 4750 <= 5000  (Cons 2)

In this case the value of the slack variable is 250.

Shadow Prices for Constraints

ConstraintShadow Price
Cons 11.00000
Cons 3-2.00000
Cons 43.00000

The shadow prices are the objective function coefficients for the slack or surplus variables at the optimum solution. The rate that the objective changes if the Right Hand Side of a constraint is changed. Shadow prices are also called Lagrange multipliers. For each constraint, the shadow price tells how much the objective function will change if we change the Right Hand Side of the constraint within the Allowable Increase and Decrease limits.

The Shadow Price = Change in optimal objective function value per unit increase of a corresponding RHS coefficient.

In this sample problem,  if you change the RHS of Constraint 4 from 950 to 955 and re-solve the problem we expect that the objective function currently valued at 6650 to increase (by 5*Shadow Price = 5*3 =15) to 6665.  In fact, in this case, the new optimal solution is x1=0, x2=420, x3=135, x4=400.

Sensitivity: Constraint Constants (RHS)

Constraint# ALLOW inc ALLOW dec RHS (b)
Cons 1250.00000 150.00000 4600.00000
Cons 2 INF 250.00000 5000.00000
Cons 337.50000 125.00000 400.00000
Cons 450.00000 100.00000 950.00000

This table shows the range of the Right Hand Side (RHS) Coefficients that maintains the current basic solution variables: any RHS change that is greater or less than these values will change the non-zero (basic) variable set.  Note that the values of the basic variables will change. 

In this sample problem, suppose the coefficient of Constraint 4 changes from 950 to 955.  We expect the current basic solution set (x2, x3, x4) to be the same since the allowable interval is [950-100, 950+50].  When we re-solve the problem, the new optimal solution is x1=0, x2=420, x3=135, x4=400 -- the basic variable set is the same (x2, x3, x4). 

If the RHS of Constraint 4 changes from 950 to 1100,  expect the current basic solution set (x2, x3, x4) to be different since the to RHS is outside the allowable interval [950-100, 950+50].  When we re-solve the problem, the new optimal solution is x1=300, x2=400, x3=0, x4=400 -- the basic solution set is now (x1, x2,  x4). 

Sensitivity: Objective Coefficients (Costs)

Coefficient#ALLOW inc ALLOW dec Coef.(c)
c11.00000 INF 4.00000
c20.66667 0.50000 6.00000
c31.00000 0.50000 7.00000
c42.00000 INF 8.00000

This table shows the range of the Objective Function Coefficients that maintains the current value of the solution: any coefficient change that is greater or less than these values will change the value of the optimum solution variables .  Note that if the changes are outside of these ranges then we must re-solve the problem. 

In this sample problem, suppose the coefficient of variable 2 (c2) changes from 6 to 6.5.  We expect the current basic solution set (x2, x3, x4) and values to be the same since the allowable interval is [6-0.5, 6+.0667].  When we re-solve the problem, the new optimal solution is x1=0, x2=400, x3=150,  x4=400 -- the basic variable set and values are still the same.  Note that the value of the objective function changes due to the changed coefficient.

Suppose the coefficient of variable 2 (c2) changes from 6 to 7.  We expect the current basic solution set (x2, x3, x4) and values to be different since the allowable interval is [6-0.5, 6+.0667].  When we re-solve the problem, the new optimal solution is x1=0, x2=512, x3=0,  x4=437 -- the basic variable set and values are different, and the value of the objective function is changed from 6650 to 7087.50. 

Final Simplex Tableau

bSL4x1SL3SL1
z 6650.000 3.000 -1.000 -2.000 -1.000
x3 150.000 -3.000 1.000 -4.000 -1.000
SL2 250.000 -1.000 0.000 2.000 1.000
x4 400.000 0.000 0.000 1.000 0.000
x2 400.000 4.000 -2.000 3.000 1.000

This Tableau is used to represent the solution to the linear programming problem with the simplex method.  The first row corresponds to the objective function.  Other rows correspond to the values of basic (non-zero) and slack variables.