You are on page 1of 30

Model Formulation

• A company desires to blend a new alloy of 50 percent aluminum, 30 percent copper, and
20 percent magnesium from several available alloys (1-5) having the following properties:

Property 1 2 3 4 5
Percentage aluminum 50 30 30 10 55
Percentage copper 10 10 50 40 35
Percentage magnesium 40 60 20 50 10
Cost ($/lb) 25 15 30 10 20

• The objective is to determine the proportions of these alloys that should be blended to
produce the new alloy at a minimum cost. Formulate the linear programming model for
this problem.
Simplex Method
Example
• Maximize Z = 3x1 + 5x2
• Constraints:
x1 ≤ 4
2x2 ≤ 12
3x1 + 2x2 ≤ 18
• Non- negativity constraints:
x1 ≥ 0
x2 ≥ 0
Graphical Solution
Graphical Solution
Terminologies
• Corner-point solutions
• Corner point feasible solutions (CPF solutions)
• Corner point infeasible solution

CPF Solution Its Adjacent CPF Solution


(0,0) (0,6), (4,0)
(0,6) (2,6), (0,0)
(2,6) (4,3), (0,6)
(4,3) (4,0), (2,6)
(4,0) (0,0), (4,3)
Solving the Example
• Optimality Test:
• If a CPF solution has no adjacent CPF solutions that are better (as
measured by Z), then it must be an optimal solution.
Solving the Example
• Initialization: Choose (0,0) as the initial CPF solution to examine. (Its just a convenient
choice as no calculations are involved).
• Optimality test: Check if any adjacent CPF solutions are better.
• Iteration 1:
• Consider two edges of the feasible region that emanate from (0,0), choose to lead
up to the edge which increases Z at a faster rate . Here, choose to move along x2
axis. ( The objective function is Z=3x1
+5x2. therefore, Z will increase at a faster rate along x2 than x1).
• Stop at the first new constraint boundary. In this example, 2x2 = 12. (Moving
farther leaves the feasible region.)
• Solve the intersection of the new set of constraint boundaries. In this example,
(0,6). (Solve for the two constraint boundaries, x1=0 and 2x2=12).
Solving the Example
• Iteration 2:
• Consider two edges of the feasible region that emanate from (0,6),
choose to lead up to the edge which increases Z at a faster rate .Here,
choose to move along x1 axis.
• Stop at the first new constraint boundary. In this example, 3x1+2x2 =18.
(Moving farther leaves the feasible region. )
• Solve the intersection of the new set of constraint boundaries. In this
example, (2,6). ( Solve for the two constraint boundaries, 2x2=12 and
3x1+2x2 =18 ).
• Conclude that (2,6) is the optimal solution.
Key Solution Concepts
1. The simplex method focuses only on the CPF solutions.
2. The simplex method is iterative algorithm
3. Whenever possible, the initialization of the simplex method chooses
origin
4. Each time simplex moves to next iteration, it always chooses a CPF
solution adjacent to the current one.
5. Simplex method identifies the rate of improvement in Z and decides the
next edge. Among the edges with positive rate of improvement in Z, it
chooses to move along the one with largest rate of improvement in Z.
6. A positive rate of improvement in Z implies that the adjacent CPF
solution is better than the current one.
Slack Variables
• Binding Constraint: constraint that is satisfied as an equality at the
optimal solution
• Slack variables are added to the formulation to represent slack or idle
capacity
• Standard form of a linear program is expressed as equalities.
Setting up the simplex method
• Convert the functional inequality constraints into equivalent equality constraints
(except the non-negativity constraints).
Augmented
Form
Maximize Z = 3x1 + 5x2 Maximize Z = 3x1 + 5x2
x1 ≤ 4 x1 +x3 =4
2x2 ≤ 12 2x2 +x4 = 12
3x1 + 2x2 ≤ 18 3x1+ 2x2 + x5 = 18

x1 ≥ 0, x2 ≥ 0 x1 ≥ 0, x2 ≥ 0
Slack Variables
• If slack variable = 0, the solution lies on the constraint boundary for
that constraint
• If slack variable > 0, the solution lies on the feasible side
• If slack variable < 0, the solution lies on the infeasible side
Setting up the simplex method
• In the augmented form,
• System of constraints has 5 variables and 3 equations
• Any two variables can be set equal to any arbitrary value to solve the 3
equations for the remaining three equations. Simplex method uses zero
as the arbitrary value.
• The other three variables are known as basic variable and this solution is
known as basic solution.
Setting up the simplex method
• Properties of basic solutions
• Each variable is either basic or non-basic variable
• Number of basic variables equals the number of constraints/ equations .
Remaining are non-basic variables
• Non-basic variables are set equal to zero
• Values of basic variables are obtained as the simultaneous solution of the
system of equations (set of basic variables is referred to as basis)
• If basic variables satisfy the non-negativity constraints, the basic solution is
basic-feasible solution
Algebra of the Simplex Method
• Step 1: Initialization
• Choose x1 and x2 as non-basic variables

• Solution is (0,0,4,12,18) – initial basic feasible solution


• Z=0
Algebra of the Simplex Method
• Optimality Test
• Step 1:
• (0,0,4,12,18) is not optimal. The rates of improvement are 3 and 5 along x1
and x2.
• Bring x1 or x2 in basis
• Z = 3x1 + 5x2
• Rate of improvement is higher along x2.
• Entering basic variable is x2
Algebra of the Simplex Method
• Step 2: Where to stop

• For feasibility all variables should be non-negative. So we need to check how far
x2 can be increased without violating the non-negativity constraints for the basic
variables
Algebra of the Simplex Method

• So x2 can be increased up to 6 when x4 drops to 0.


• These calculations are referred as minimum ratio test.
• It determines which variable drops to zero as the entering basic variable
increase.
• The variable which drops to zero is called the leaving basic variable.
Algebra of the Simplex Method
• New basic feasible solution:
• x1=0, x4 = 0,x2 = 6

• x2 has replaced x4 as the basic variable


• Perform elementary algebraic operations to re- produce the current pattern of
coefficients of x4 (0,0,1,0)
• multiply/divide an equation by a non-zero constant
• add/subtract a multiple of one equation to/from another equation
Algebra of the Simplex Method
• The coefficients of x2 are -5,0,2,2
• These should be 0,0,1,0

• New BF solution (0,6,4,0,6)


Algebra of the Simplex Method

• Only x1 has positive coefficient so x1 is the new entering basic variable.


Algebra of the Simplex Method
• Minimum ratio test indicates that x5 is the leaving variable
Simplex in Tabular Form
Example 2
Maximize Z = 2X1 + 2X2
subject to
X2 ≤ 8
2X1 + 5X2 ≤ 60
X1 + X2 ≤ 20
and
X1 ≥ 0, X2 ≥ 0
Special Cases
• Tie for the entering basic variable
• Two or more non-basic variables have same negative coefficient
• For Example, Z – 3x1 – 3x2 = 0
• The selection between the two can be done arbitrarily
Special Cases
• Tie for the leaving basic variable- Degeneracy
• Same minimum ratio
• Break the tie arbitrarily
• All the tied basic variables reach zero simultaneously, as the entering
basic variable is increased
• Basic variables with a value of zero are called degenerate
Special Cases
• No Leaving basic variable- Unbounded zero
• Not possible in real life
• The problem is mis formulated or
• Computational error
Special Cases
• Multiple optimal solutions
• At least one of the non-basic variables has a coefficient of zero in the final
‘z’ row.
• Increasing any such variable will not change the value of z.

You might also like