You are on page 1of 181

Simplex Method

1
ISE 303
OPERATIONS RESEARCH I

PLOs CLOs Chapter Assessment / Marks


Mid Q Assign HW CW Final Total

2.2 Formulate and solve problems using Linear 5 5 5 10 20


Formulate the problem objectives and integer programming Programming
constraints relative to production and
mechanical problems
2.3 Develop heuristic methods to solve Heuristics 5 5 5 10 20
Find the different solution alternatives for problems Methods
the production and design problems
2.4 Develop dynamic programming models Dynamic 5 5 5 10 20
Analyse the solution alternatives and choose the optimum for certain set of decision problems and Programming
one solve them
2.11 Develop solution procedure for nonlinear Non-Linear 5 5 5 10 20
Design the production systems, projects, product, programming models Programming
component, process or operation to meet desired needs
within realistic constraints such as economical,
environmental, social, political, ethical, health and safety
considerations.

2.13 Built nonlinear programming models for problems Non-Linear 5 5 5 10 20


Interpret Industrial Engineering problems in-depth and find Programming
innovative solutions based on a feasibility study of the
economic and applicability

3
Quality & Accreditation Terminologies

• Program Leaning Outcomes : PLOs


• Course Leaning Outcomes : CLOs
• Course Specification : CS
• Course Report : CR
• Teaching Strategy : TS
• Assessment Methods : AM
• Rubric Sheets : RS
• Aptitude Exam : APE
• Benchmark : BM

Correlation between all of them?!


4
Simplex Method

• For linear programming problems involving two variables, the graphical


solution
• For problems involving more than two variables or large numbers of
constraints, it is better to use methods that are adaptable to technology
• One such method is called the simplex method, developed by George
Dantzig in 1946
• Geometric method of solving linear programming problems
• It provides a systematic way of examining the vertices of the feasible
region to determine the optimal value of the objective function

5
Simplex Method

• 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

6
General Form of a Linear Programming Problem

A linear programming problem is in standard form if it seeks to maximize the objective


function:
z = c1x1 + c2x2 +……..+ cnxn z= objective Function
Subject to:
a11x1 + a12x2 +……..+ a1nxn ≤ b1 x1, x2,….. xn-1, xn = ‘n’ decision variables
a21x1 + a22x2 +……..+ a2nxn ≤ b2 b1, b2,….. bm-1, bm = Right hand side values of
‘m’ constraints
a13x1 + a32x2 +……..+ a3nxn ≤ b3

..
‘n’ decision variables and ‘m’ constraints LPP
am1x1 + am2x2 +……..+ amnxn ≤ bm

xi ≥ 0 and bi ≥ 0
7
A Standard Linear Programming Problem

A standard maximization problem is one in which


1. The objective function is to be maximized
2. All the variables involved in the problem are nonnegative
3. All other linear constraints may be written so that the expression involving
the variables is less than or equal to a nonnegative constant

8
Standard Form of Linear Programming Problem

A linear program in which


1. all the variables are non-negative
2. all the constraints are equalities and
3. Objective function is of Maximization type (optional)
is said to be in standard form.

9
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem
1. The objection function is to be maximized.
2. Each constraint is written using the ≤ inequality (excluding the nonnegative conditions).
3. The constants in the constraints to the right of ≤ are never negative (180, 100, and 40 in
the example).
4. The variables are restricted to nonnegative values (nonnegative conditions).

10
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem

11
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem
1. The objection function is to be maximized.

12
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem
1. The objection function is to be maximized.
2. Each constraint is written using the ≤ inequality (excluding the nonnegative conditions).

13
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem
1. The objection function is to be maximized.
2. Each constraint is written using the ≤ inequality (excluding the nonnegative conditions).
3. The constants in the constraints to the right of ≤ are never negative (180, 100, and 40 in
the example).

14
Example

Maximize the objection function z = 4x1 + 12x2


subject to the constraints 3x1  x2  180
x1  2 x2  100
2 x1  2 x2  40

and the nonnegative conditions x1 > 0 and x2 > 0.


This problem has the properties of a standard maximum problem
1. The objection function is to be maximized.
2. Each constraint is written using the ≤ inequality (excluding the nonnegative conditions).
3. The constants in the constraints to the right of ≤ are never negative (180, 100, and 40 in
the example).
4. The variables are restricted to nonnegative values (nonnegative conditions).

15
Setting Up the Initial Simplex Tableau

1. Transform the system of linear inequalities into a system of linear


equations by introducing slack variables
a11x1 + a12x2 +……..+ a1nxn + s1 ≤ b1
a21x1 + a22x2 +……..+ a2nxn + s2 ≤ b2
a13x1 + a32x2 +……..+ a3nxn + s3 ≤ b 3

..

am1x1 + am2x2 +……..+ amnxn + s m ≤ bm

2. Rewrite the objective function by including the slack variable


z = c1x1 + c2x2 +……..+ cnxn + 0s1 + 0s2 + 0s3 +................... + 0sm

3. Write the Simplex table using the new system of equations


16
Slack / Surplus / Artificial Variables

Inequality type Variable to be added


≤ + slack (S)
≥ − Surplus (S) + Artificial (A)
= + Artificial (A)

• Slack variable – represents the amount of an unused resource


• Surplus variable does have a physical meaning – it is the amount over
and above a required minimum level set on the right-hand side of a
greater-than-or-equal-to constraint
• Artificial variable is a variable that has no physical meaning in terms of a
real-world LP problem. It simply allows us to create a basic feasible
solution to start the simplex algorithm
17
Slack Variables

• Standard form requires that all constraints be in the form of equations


(equalities)
• A slack variable is added to a ≤ constraint to convert it to an equation (=)
• “A mathematical representation of unused or surplus resources”
• In real life problems, it’s 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 and contributes nothing to the
objective function value

18
Surplus Variable

• 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
• A surplus variable contributes nothing to the calculated value of the
objective function

19
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
3 x1  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
• However, generally we select slack variables as initial basic variables

20
Concept of Basic Solution and Basic Feasible Solution

Maximize z = 2x1 + 3x2


Standard Form of the Problem subject to:
Max z = 2x1 + 3x2 + 0s1 + 0s1 2x1 + x2 ≤ 4
subject to: x1 + 2x2 ≤ 5
2x1 + x2 + s1 = 4 x1, x2 ≥ 0
x1 + 2x2 + s1 = 5
x1, x2, s1, s1 ≥ 0

Number of variables = 4
Number of equation = 2
So, to get the solution we need to put How Many variables at the zero level?
Number of variables – Number of equations = 2
How many Solutions? 4C2 = 6
21
Concept of Basic Solution and Basic Feasible Solution

Max z = 2x1 + 3x2 + 0s1 + 0s1


Number of variables = 4 subject to:
Number of equation = 2 2x1 + x2 + s1 = 4
So, to get the solution we need to put any x1 + 2x2 + s1 = 5
two variable (variables – equations) at the zero level x1, x2, s1, s1 ≥ 0
The variables at the zero level, are non-basic
The variables at the non-zero level, are basic
Solution Basic variable Non-basic Variable
Solution Remarks
No (non-zero) (zero)
1 s 1 , s2 x1 , x 2 s1=4, s2=5, z=0 Basic Feasible
2 s 1 , x1 s2 , x 2 s1=−6, x1=5, z=10 Basic Infeasible
3 s1 , x 2 s2, x1 s1=1.5, x2=2.5, z=7.5 Basic Feasible
4 x1 , x 2 s1, s2 x1=1, x2=2, z=8 Basic Feasible
5 s 2 , x1 s 1 , x2 s2=3, x1=2, z=4 Basic Feasible
6 s2 , x 2 s1, x1 s2=−3, x2=4, z=12 Basic Infeasible
22
Concept of Basic Solution and Basic Feasible Solution

How many Solutions?


The solutions which we get by placing
(No of var – no. of eq) at the zero level is
4
C2 = 6
called as Basic Solution
The Basic Solution which also satisfy the
non-negativity conditions is called as Basic
Feasible Solution
Solution Basic variable Non-basic Variable
Solution Remarks
No (non-zero) (zero)
1 s 1 , s2 x1 , x 2 s1=4, s2=5, z=0 Basic Feasible
2 s 1 , x1 s2 , x 2 s1=−6, x1=5, z=10 Basic Infeasible
3 s1 , x 2 s2, x1 s1=1.5, x2=2.5, z=7.5 Basic Feasible
4 x1 , x 2 s1, s2 x1=1, x2=2, z=8 Basic Feasible
5 s 2 , x1 s 1 , x2 s2=3, x1=2, z=4 Basic Feasible
6 s2 , x 2 s1, x1 s2=−3, x2=4, z=12 Basic Infeasible
23
Graphical Representation of Basic Solution and Basic
Feasible Solution
Max z = 2x1 + 3x2 + 0s1 + 0s1
subject to:
2x1 + x2 + s1 = 4
x1 + 2x2 + s1 = 5
x1, x2, s1, s1 ≥ 0

Solution Basic variable Non-basic Variable


Solution Remarks
No (non-zero) (zero)
1 s 1 , s2 x1 , x 2 s1=4, s2=5, z=0 Basic Feasible
2 s 1 , x1 s2 , x 2 s1=−6, x1=5, z=10 Basic Infeasible
3 s1 , x 2 s2, x1 s1=1.5, x2=2.5, z=7.5 Basic Feasible
4 x1 , x 2 s1, s2 x1=1, x2=2, z=8 Basic Feasible
5 s 2 , x1 s 1 , x2 s2=3, x1=2, z=4 Basic Feasible
6 s2 , x 2 s1, x1 s2=−3, x2=4, z=12 Basic Infeasible
24
Important Observations

1. All basic sols are obtained by placing 2 variables


(No. of eq – No. of const) at zero levels
2. Basic feasible sol is one of the extreme point of
the feasible sol space
3. There is change of one variable when we move
from one extreme point to another. That is one
basic variable becomes non-basic, and one non-
basic variable becomes basic variable

Solution Basic variable Non-basic Variable


Solution Remarks
No (non-zero) (zero)
1 s 1 , s2 x1 , x 2 s1=4, s2=5, z=0 Basic Feasible
3 s1 , x 2 s2, x1 s1=1.5, x2=2.5, z=7.5 Basic Feasible
4 x1 , x 2 s1, s2 x1=1, x2=2, z=8 Basic Feasible
5 s 2 , x1 s 1 , x2 s2=3, x1=2, z=4 Basic Feasible

25
Simplex Algorithm for Standard Maximization Problems

1. Convert each inequality in the set of constraints to an equation by adding slack variables
2. Create the initial simplex tableau
3. Select the pivot column (Column with the “most +ve value” element in the Cj – Zj row)
4. Select the pivot row (Row with the smallest non-negative result in Ratio when the last
element in the row is divided by the corresponding in the pivot column)
5. Use elementary row operations calculate new values for the pivot row so that the pivot is
1 (Divide every number in the row by the pivot number)
6. Use elementary row operations to make all numbers in the pivot column equal to 0
except for the pivot number. If all entries in the bottom row are zero or negative, this the
final tableau. If not, go back to step 3
7. If you obtain a final tableau, then the linear programming problem has a maximum
solution, which is given by the entry in the lower-right corner of the tableau.

26
Pivot

• Pivot Column: The column of the tableau representing the variable to be


entered into the solution mix
• Pivot Row: The row of the tableau representing the variable to be
replaced in the solution mix
• Pivot Number: The element in both the pivot column and the pivot row

27
Example 1

Maximise P = 7X1 + 5X2


Subject to 2X1 + 1X2 ≤ 100
4X1 + 3X2 ≤ 240
X1 ≥ 0; X2 ≥ 0
Step 1: Convert all inequalities to equality by introducing Slack Variable
2X1 + 1X2 + S1 = 100 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + S2 = 240 4X1 + 3X2 + 0 S1 + S2 = 240

P = 7X1 + 5X2 + 0S1 + 0S2

28
Practice

29
Practice

• Explain why the linear programming problem is not in standard form as


given

30
Optimal & Feasible Solution

Optimality Feasibility
Condition Condition
Problem Type
Cj – Z j Solution Value

Maximization ≤0 ≥0

Minimization ≥0 ≥0

31
Example 1

Maximise P = 7X1 + 5X2


Subject to 2X1 + 1X2 ≤ 100
4X1 + 3X2 ≤ 240
X1 ≥ 0; X2 ≥ 0
Step 1: Convert all inequalities to equality by introducing Slack Variable
2X1 + 1X2 + S1 = 100
4X1 + 3X2 + S1 = 240

P = 7X1 + 5X1 + 0S1 + 0S1


2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

32
P = 7X1 + 5X1 + 0S1 + 0S1
Example 1 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

Step 2: Construct initial Simplex Tableau


Cj
CB Basic X1 X2 S1 S2 b Ratio
S1
S2
Zj
Cj − Zj

33
P = 7X1 + 5X1 + 0S1 + 0S1
Example 1 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
S1
S2
Zj
Cj − Zj

34
P = 7X1 + 5X1 + 0S1 + 0S1
Example 1 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2
Zj
Cj − Zj

35
P = 7X1 + 5X1 + 0S1 + 0S1
Example 1 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj
Cj − Zj

36
P = 7X1 + 5X1 + 0S1 + 0S1
Example 1 2X1 + 1X2 + S1 + 0S2 = 100
4X1 + 3X2 + 0 S1 + S2 = 240

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj
Cj − Zj

37
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj 0 0 0 0 0
Cj − Zj

CB × aij
0×2+0×2
38
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

Cj - Zj

39
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

If all Cj − Zj values are ≤ 0, Optimal solution is reached.

If not find the maximum Cj − Zj value. This column will be the Entering Variable
40
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

Entering
Variable

41
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100
0 S2 4 3 0 1 240
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

Find
  the Ratio for each Cell in the last Column

42
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
= 100/2
0 S1 2 1 1 0 100 = 50
= 240/4
0 S2 4 3 0 1 240 = 60
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

Find
  the Ratio for each Cell in the last Column

43
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100 50
0 S2 4 3 0 1 240 80
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0

Among the Ratios select the lowest positive value row

This will be the Leaving Variable


44
Example 1

Step 2: Construct initial Simplex Tableau


Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
0 S1 2 1 1 0 100 50
0 S2 4 3 0 1 240 80
Zj 0 0 0 0 0
Cj − Zj 7 5 0 0
The intersection of Entering variable and Leaving Variable will be the Pivot
Element

We are going to make this Pivot Element equal to 1

To make Pivot Element equal to 1, divide all elements in that row by 2 45


Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 4 3 0 1 240
Zj
Cj − Zj

Entering variable corresponds to X1, while Leaving Variable


corresponds to S1. Therefore, X1 will replace S1

46
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 4 3 0 1 240
Zj
Cj − Zj

Now we have to make all other elements in the Pivot Column equal to
ZERO. We will calculate new values for S2
New Value = Old Value – (New value in Pivot Row)  Corresponding Value in Pivot Col
47
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 0 1 -2 1 40
Zj 7 7/2 7/2 0 350
Cj − Zj

Find new values for Zj CB × aij

48
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 0 1 -2 1 40
Zj 7 7/2 7/2 0 350
Cj − Zj 0 3/2 -7/2 0

Find new values for Cj − Zj

49
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 0 1 -2 1 40
Zj 7 7/2 7/2 0 350
Cj − Zj 0 3/2 -7/2 0

Entering
Variable
Find largest values for Cj − Zj, this will be the Entering variable
50
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50
0 S2 0 1 -2 1 40
Zj 7 7/2 7/2 0 350
Cj − Zj 0 3/2 -7/2 0

To find Leaving variable we need to find Ratios for each row


51
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
= 50/(1/2)
7 X1 1 1/2 1/2 0 50 = 100
= 40/1
0 S2 0 1 -2 1 40 = 40
Zj
Cj − Zj

To find Leaving variable we need to find Ratios for each row by


dividing each b by the element in the Pivot Column 52
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50 100
0 S2 0 1 -2 1 40 40
Zj
Cj − Zj

Lowest Ratio value will correspond to the Pivot Row


X2 will therefore replace S2
53
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50 100
5 X2 0 1 -2 1 40 40
Zj
Cj − Zj

Lowest Ratio value will correspond to the Pivot Row


X2 will therefore replace S2
54
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 1/2 1/2 0 50 100
5 X2 0 1 -2 1 40 40
Zj
Cj − Zj

Now we have to make all other elements in the Pivot Column equal to
ZERO. We will calculate new values for X1
New Value = Old Value – (New value in Pivot Row)  Corresponding Value in Pivot Col
55
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 0 3/2 -1/2 30
5 X2 0 1 -2 1 40
Zj
Cj − Zj

56
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 0 3/2 -1/2 30
5 X2 0 1 -2 1 40
Zj 7 5 1/2 3/2 410
Cj − Zj

Find new values for Zj CB × aij

57
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 0 3/2 -1/2 30
5 X2 0 1 -2 1 40
Zj 7 5 1/2 3/2 410
Cj − Zj 0 0 -1/2 -3/2

Find new values for Cj − Zj

58
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 0 3/2 -1/2 30
5 X2 0 1 -2 1 40
Zj 7 5 1/2 3/2 410
Cj − Zj 0 0 -1/2 -3/2

59
Example 1

Cj 7 5 0 0
CB Basic X1 X2 S1 S2 b Ratio
7 X1 1 0 3/2 -1/2 30
5 X2 0 1 -2 1 40
Zj 7 5 1/2 3/2 410
Cj − Zj 0 0 -1/2 -3/2

As all values for Cj − Zj in last row are ≤ 0, therefore OPTIMAL


SOLUTION reached
The values for variables will therefore be:
X1 = 30; X2 = 40; S1 = 0 ; S2 = 0; Z = 410 60
Simplex Algorithm for Standard Minimization Problems

1. Convert each inequality in the set of constraints to an equation by adding slack variables
2. Create the initial simplex tableau
3. Select the pivot column (Column with the “most -ve value” element in the Cj – Zj row)
4. Select the pivot row (Row with the smallest non-negative result in Ratio when the last
element in the row is divided by the corresponding in the pivot column)
5. Use elementary row operations calculate new values for the pivot row so that the pivot is
1 (Divide every number in the row by the pivot number)
6. Use elementary row operations to make all numbers in the pivot column equal to 0
except for the pivot number. If all entries in the bottom row are zero or positive, this the
final tableau. If not, go back to step 3
7. If you obtain a final tableau, then the linear programming problem has a maximum
solution, which is given by the entry in the lower-right corner of the tableau.

61
Minimisation Example 1

Minimize Z = –2x – 3y
subject to 5x + 4y ≤ 32
x + 2y ≤ 10
x; y ≥ 0

Standard Form
5x + 4y + S1 = 32
x + 2y + S2 = 10
Z = –2x – 3y + 0S1 + 0S2

62
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj
CB Basic X Y S1 S2 b Ratio
S1
S2
Zj
Cj − Zj

63
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 5 4 1 0 32
0 S2 1 2 0 1 10
Zj
Cj − Zj

64
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 5 4 1 0 32
0 S2 1 2 0 1 10
Zj 0 0 0 0 0
Cj − Zj -2 -3 0 0

65
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 5 4 1 0 32
0 S2 1 2 0 1 10
Zj 0 0 0 0 0
Cj − Zj -2 -3 0 0

66
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 5 4 1 0 32 8
0 S2 1 2 0 1 10 5
Zj 0 0 0 0 0
Cj − Zj -2 -3 0 0

67
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 5 4 1 0 32 8
0 S2 1 2 0 1 10 5
Zj 0 0 0 0 0
Cj − Zj -2 -3 0 0

68
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1
-3 Y
Zj
Cj − Zj

69
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1
-3 Y ½ 1 0 ½ 5
Zj
Cj − Zj

70
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12
-3 Y ½ 1 0 ½ 5
Zj
Cj − Zj

71
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12
-3 Y ½ 1 0 ½ 5
Zj -3/2 3 0 -3/2 -15
Cj − Zj

72
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12
-3 Y ½ 1 0 ½ 5
Zj -3/2 3 0 -3/2 -15
Cj − Zj -1/2 0 0 3/2

73
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12
-3 Y ½ 1 0 ½ 5
Zj -3/2 3 0 -3/2 -15
Cj − Zj -1/2 0 0 3/2

74
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12 4
-3 Y ½ 1 0 ½ 5 10
Zj -3/2 3 0 -3/2 -15
Cj − Zj -1/2 0 0 3/2

75
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 0 1 -2 12 4
-3 Y ½ 1 0 ½ 5 10
Zj -3/2 3 0 -3/2 -15
Cj − Zj -1/2 0 0 3/2

76
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X
-3 Y
Zj
Cj − Zj

77
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X 1 0 1/3 -2/3 4
-3 Y
Zj
Cj − Zj

78
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X 1 0 1/3 -2/3 4
-3 Y 0 1 -1/6 5/6 3
Zj
Cj − Zj

79
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X 1 0 1/3 -2/3 4
-3 Y 0 1 -1/6 5/6 3
Zj -2 -3 -1/6 -7/6 -17
Cj − Zj

80
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X 1 0 1/3 -2/3 4
-3 Y 0 1 -1/6 5/6 3
Zj -2 -3 -1/6 -7/6 -17
Cj − Zj 0 0 1/6 7/6

81
Z = –2x – 3y + 0S1 + 0S2
5x + 4y + S1 = 32
Minimisation Example 1 x + 2y + S2 =
10

Cj -2 -3 0 0
CB Basic X Y S1 S2 b Ratio
-2 X 1 0 1/3 -2/3 4
-3 Y 0 1 -1/6 5/6 3
Zj -2 -3 -1/6 -7/6 -17
Cj − Zj 0 0 1/6 7/6

All Cj − Zj are ≥ 0, therefore OPTIMAL solution reached


X = 4; Y = 3; S1 = 0; S2 = 0
Z = -17

82
The Dual Problem: Minimization with problem
constraints of the form ≥

• Linear programming problems exist in pairs. That is in linear programming


problem, every maximization problem is associated with a minimization
problem
• Conversely, associated with every minimization problem is a
maximization problem. Once we have a problem with its objective function
as maximization, we can write by using duality relationship of linear
programming problems, its minimization version
• The original linear programming problem is known as primal problem, and
the derived problem is known as dual problem

83
Minimisation Example 2

Minimize Z = –2x + 3y Maximize C = 2x – 3y


subject to 3x + 4y ≤ 24
7x – 4y ≤ 16
x; y ≥ 0

Standard Form
3x + 4y + S1 = 24
7x – 4y + S2 = 16
C = 2x - 3y + 0S1 + 0S2

84
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj
CB Basic X Y S1 S2 b Ratio
S1
S2
Zj
Cj − Zj

85
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 4 1 0 24
0 S2 7 -4 0 1 16
Zj
Cj − Zj

86
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 4 1 0 24
0 S2 7 -4 0 1 16
Zj 0 0 0 0 0
Cj − Zj 2 -3 0 0

87
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 4 1 0 24
0 S2 7 -4 0 1 16
Zj 0 0 0 0 0
Cj − Zj 2 -3 0 0

88
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 4 1 0 24 8
0 S2 7 -4 0 1 16 16/7
Zj 0 0 0 0 0
Cj − Zj 2 -3 0 0

89
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 3 4 1 0 24 8
0 S2 7 -4 0 1 16 16/7
Zj 0 0 0 0 0
Cj − Zj 2 -3 0 0

90
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1
2 X
Zj
Cj − Zj

91
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1
2 X 1 -4/7 0 1/7 16/7
Zj
Cj − Zj

92
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 0 40/7 1 -3/7 120/7
2 X 1 -4/7 0 1/7 16/7
Zj
Cj − Zj

93
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 0 40/7 1 -3/7 120/7
2 X 1 -4/7 0 1/7 16/7
Zj 2 -8/7 0 2/7 32/7
Cj − Zj

94
C = 2x - 3y + 0S1 + 0S2
3x + 4y + S1 = 24
Minimisation Example 2 7x – 4y + S2 = 16

Cj 2 -3 0 0
CB Basic X Y S1 S2 b Ratio
0 S1 0 40/7 1 -3/7 120/7
2 X 1 -4/7 0 1/7 16/7
Zj 2 -8/7 0 2/7 32/7
Cj − Zj 0 -13/7 0 -2/7

All Cj − Zj are ≤ 0, therefore OPTIMAL solution reached. However,


this solution is for MAXIMIZATION of OBJ FUNCTION. We will
therefore multiply the value of C by -1
X = 16/7; Y = 0; S1 = 120/7; S2 = 0
Z = -32/7
95
Mixed Constraints

• Constraint Types
– ≤ → Less than or equal to
– ≥ → Greater than or equal to
– = → Equal to
• ≤ → Add Slack variable in equation (+S)
• ≥ → Subtract Surplus variable (-S)
&
Add Artificial Variable (+A)
• = → Add Artificial Variable (+A)

96
Artificial and Surplus Variables

• Constraints in linear programming problems are seldom all of the “less-


than-or-equal-to” (≤) variety seen in the examples thus far
• Just as common are “greater-than-or-equal-to” (≥) constraints and
equalities
• To use the simplex method, each of these also must be converted to a
special form
• If they are not, the simplex technique is unable to set an initial feasible
solution in the first tableau

97
Artificial and Surplus Variables

• 25X1 + 30X2 = 900


To convert an equality, we simply add an “artificial” variable ( A1) to the
equation
25X1 + 30X2 + A1 = 900
• 5X1 + 13X2 + 8X3 ≥ 2,100
To handle ≥ constraints, a “surplus” variable (S1) is first subtracted and
then an artificial variable (A2) is added to form a new equation
5X1 + 13X2 + 8X3 – S1 + A2 = 2,100

98
Mixed Constraints

• For maximization problem we will assign the Objective Function


co-efficient of –M for Artificial variable

• For minimisation problem we will assign the Objective Function


co-efficient of +M for Artificial variable

• M is a very large number

99
Example

The Memphis Chemical Corp. must produce 1,000 lb of a special mixture of


phosphate and potassium for a customer. Phosphate costs $5/lb and
potassium costs $6/lb. No more than 300 lb of phosphate can be used, and at
least 150 lb of potassium must be used.
We wish to formulate this as a linear programming problem and to convert the
constraints and objective function into the form needed for the simplex
algorithm. Let
X1 = number of pounds of phosphate in the mixture
X2 = number of pounds of potassium in the mixture

100
Example – Maximisation

• Objective Function
Maximise Profit = 5X1 + 6X2
• 1st constraint: 1X1 + 1X2 = 1,000
• 2nd constraint: 1X1 ≤ 300
• 3rd constraint: 1X2 ≥ 150

Simplex Form
• 1st constraint: 1X1 + 1X2 + 1A1 = 1,000
• 2nd constraint: 1X1 + 1S1 ≤ 300
• 3rd constraint: 1X2 – 1 S2 + 1A2 = 150
• Simplex form of Objective Function
Minimise Cost = 5X1 + 6X2 + 0S1 + 0S2 – MA1 – MA2
101
Example – Minimisation

• Objective Function
Minimise Cost = 5X1 + 6X2
• 1st constraint: 1X1 + 1X2 = 1,000
• 2nd constraint: 1X1 ≤ 300
• 3rd constraint: 1X2 ≥ 150
Simplex Form
• 1st constraint: 1X1 + 1X2 + 1A1 = 1,000
• 2nd constraint: 1X1 + 1S1 ≤ 300
• 3rd constraint: 1X2 – 1 S2 + 1A2 = 150
• Simplex form of Objective Function
Minimise Cost = 5X1 + 6X2 + 0S1 + 0S2 + MA1 + MA2
102
Problem

Minimise Z = 7X1 + 15X2 + 20X3


Subject to:-
2X1 + 4X2 + 6X3 ≥ 24
3X1 + 9X2 + 6X3 ≥ 30
X1, X2, X3 ≥ 0

Standard Form
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2

103
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
A1

A2

ZJ

CJ – ZJ

104
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
A1

A2

ZJ

CJ – ZJ

105
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24

M A2 3 9 6 0 -1 0 1 30

ZJ

CJ – ZJ

106
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24

M A2 3 9 6 0 -1 0 1 30

ZJ 5M 13M 12M -M -M M M 54M

CJ – ZJ

107
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24

M A2 3 9 6 0 -1 0 1 30

ZJ 5M 13M 12M -M -M M M 54M

CJ – ZJ 7-5M 15-13M 20-12M M M 0 0

108
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24

M A2 3 9 6 0 -1 0 1 30

ZJ 5M 13M 12M -M -M M M 54M

CJ – ZJ 7-5M 15-13M 20-12M M M 0 0

109
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24 6

M A2 3 9 6 0 -1 0 1 30 10/3

ZJ 5M 13M 12M -M -M M M 54M

CJ – ZJ 7-5M 15-13M 20-12M M M 0 0

110
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2 4 6 -1 0 1 0 24 6

M A2 3 9 6 0 -1 0 1 30 10/3

ZJ 5M 13M 12M -M -M M M 54M

CJ – ZJ 7-5M 15-13M 20-12M M M 0 0

111
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1

15 X2

ZJ

CJ – ZJ

112
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3

ZJ

CJ – ZJ

113
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2/3 0 10/3 -1 4/9 1 -4/9 32/3

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3

ZJ

CJ – ZJ

114
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2/3 0 10/3 -1 4/9 1 -4/9 32/3

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3

ZJ 10+10/ -5/3+ 5/3- 50+32/


5+2/3M 15 -M M
3M 4/9M 4M/9 3M
CJ – ZJ

115
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2/3 0 10/3 -1 4/9 1 -4/9 32/3

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3

ZJ 10+10/ -5/3+ 5/3- 50+32/


5+2/3M 15 -M M
3M 4/9M 4M/9 3M

CJ – ZJ 10- 5/3- -5/3


2-2/3M 0 M 0
10/3M 4/9M +13M/9

116
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2/3 0 10/3 -1 4/9 1 -4/9 32/3 16/5

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3 5

ZJ 10+10/ -5/3+ 5/3- 50+32/


5+2/3M 15 -M M
3M 4/9M 4M/9 3M

CJ – ZJ 10- 5/3- -5/3


2-2/3M 0 M 0
10/3M 4/9M +13M/9

117
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
M A1 2/3 0 10/3 -1 4/9 1 -4/9 32/3 16/5

15 X2 1/3 1 2/3 0 -1/9 0 1/9 10/3 5

ZJ 10+10/ -5/3+ 5/3- 50+32/


5+2/3M 15 -M M
3M 4/9M 4M/9 3M

CJ – ZJ 10- 5/3- -5/3


2-2/3M 0 M 0
10/3M 4/9M +13M/9

118
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
20 X3

15 X2

ZJ

CJ – ZJ

119
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
20 X3 1/5 0 1 -3/10 2/15 3/10 -2/15 16/5

15 X2

ZJ

CJ – ZJ

120
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
20 X3 1/5 0 1 -3/10 2/15 3/10 -2/15 16/5

15 X2 1/5 1 0 1/5 -1/5 -1/5 1/5 6/5

ZJ

CJ – ZJ

121
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
20 X3 1/5 0 1 -3/10 2/15 3/10 -2/15 16/5

15 X2 1/5 1 0 1/5 -1/5 -1/5 1/5 6/5

ZJ 7 15 20 -3 -1/3 3 1/3 82

CJ – ZJ

122
Z = 7X1 + 15X2 + 20X3 + 0S1 + 0S2 + MA1 + MA2
2X1 + 4X2 + 6X3 – S1 + A1 ≥ 24
Solution 3X1 + 9X2 + 6X3 – S2 + A2 ≥ 30

CJ 7 15 20 0 0 M M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
20 X3 1/5 0 1 -3/10 2/15 3/10 -2/15 16/5

15 X2 1/5 1 0 1/5 -1/5 -1/5 1/5 6/5

ZJ 7 15 20 -3 -1/3 3 1/3 82

CJ – ZJ 0 0 0 3 1/3 -3+M -1/3+M

All CJ – ZJ values ≥ , therefore OPTIMAL solution reached

X1 = 0; X2 = 6/5; X3 = 16/5; S1 = 0; S2 = 0; S3 = 0
Z = 82
123
Problem

Maximise P = X1 - X2 + 3X3
Subject to:-
X1 + X2 + ≤ 20
X1 + X3 = 5
X2 + X3 ≥ 10
X1, X2, X3 ≥ 0

Standard Form
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 + S2 + 0A1 + A2 = 10

P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2


124
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
S1

A1

A2

ZJ

CJ – ZJ

125
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1

-M A1

-M A2

ZJ

CJ – ZJ

126
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

-M A1 1 0 1 0 0 1 0 5

-M A2 0 1 1 0 -1 0 1 10

ZJ

CJ – ZJ

127
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

-M A1 1 0 1 0 0 1 0 5

-M A2 0 1 1 0 -1 0 1 10

ZJ -M -M -2M 0 M -M -M -15M

CJ – ZJ

128
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

-M A1 1 0 1 0 0 1 0 5

-M A2 0 1 1 0 -1 0 1 10

ZJ -M -M -2M 0 M -M -M -15M

CJ – ZJ 1+M -1+M 3+2M 0 -M 0 0

129
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

-M A1 1 0 1 0 0 1 0 5

-M A2 0 1 1 0 -1 0 1 10

ZJ -M -M -2M 0 M -M -M -15M

CJ – ZJ 1+M -1+M 3+2M 0 -M 0 0

130
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20 0

-M A1 1 0 1 0 0 1 0 5 5

-M A2 0 1 1 0 -1 0 1 10 10

ZJ -M -M -2M 0 M -M -M -15M

CJ – ZJ 1+M -1+M 3+2M 0 -M 0 0

131
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20 0

-M A1 1 0 1 0 0 1 0 5 5

-M A2 0 1 1 0 -1 0 1 10 10

ZJ -M -M -2M 0 M -M -M -15M

CJ – ZJ 1+M -1+M 3+2M 0 -M 0 0

132
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1

3 X3

-M A2

ZJ

CJ – ZJ

133
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1

3 X3 1 0 1 0 0 1 0 5

-M A2

ZJ

CJ – ZJ

134
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

3 X3 1 0 1 0 0 1 0 5

-M A2 -1 1 0 0 -1 -1 1 5

ZJ

CJ – ZJ

135
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

3 X3 1 0 1 0 0 1 0 5

-M A2 -1 1 0 0 -1 -1 1 5

ZJ 3+M -M 3 0 M 3+M -M 15-5M

CJ – ZJ

136
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

3 X3 1 0 1 0 0 1 0 5

-M A2 -1 1 0 0 -1 -1 1 5

ZJ 3+M -M 3 0 M 3+M -M 15-5M

CJ – ZJ -2-M -1+M -3 0 -M -3-2M 0

137
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20

3 X3 1 0 1 0 0 1 0 5

-M A2 -1 1 0 0 -1 -1 1 5

ZJ 3+M -M 3 0 M 3+M -M 15-5M

CJ – ZJ -2-M -1+M -3 0 -M -3-2M 0

138
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20 20

3 X3 1 0 1 0 0 1 0 5 -----

-M A2 -1 1 0 0 -1 -1 1 5 5

ZJ 3+M -M 3 0 M 3+M -M 15-5M

CJ – ZJ -2-M -1+M -3 0 -M -3-2M 0

139
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 1 1 0 1 0 0 0 20 20

3 X3 1 0 1 0 0 1 0 5 ----

-M A2 -1 1 0 0 -1 -1 1 5 5

ZJ 3+M -M 3 0 M 3+M -M 15-5M

CJ – ZJ -2-M -1+M -3 0 -M -3-2M 0

140
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1

3 X3

-1 X2

ZJ

CJ – ZJ

141
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1

3 X3

-1 X2 -1 1 0 0 -1 -1 1 5

ZJ

CJ – ZJ

142
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 2 0 0 1 1 1 -1 15

3 X3 1 0 1 0 0 1 0 5

-1 X2 -1 1 0 0 -1 -1 1 5

ZJ

CJ – ZJ

143
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 2 0 0 1 1 1 -1 15

3 X3 1 0 1 0 0 1 0 5

-1 X2 -1 1 0 0 -1 -1 1 5

ZJ 4 -1 3 0 1 4 -1 10

CJ – ZJ -3 0 0 0 -1 -4-M 1-M

144
P = X1 – X2 + 3X3 + 0S1 + 0S2 – MA1 – MA2
X1 + X2 + 0X3 + S1 + 0S2 + 0A1 + 0A2 = 20
Solution X1 + 0X2 + X3 + 0S1 + 0S2 + A1 + 0A2 = 5
0X1 + X2 + X3 + 0S1 - S2 + 0A1 + A2 = 10

CJ 1 -1 3 0 0 -M -M

CB Basic X1 X2 X3 S1 S2 A1 A2 b Ratio
0 S1 2 0 0 1 1 1 -1 15

3 X3 1 0 1 0 0 1 0 5

-1 X2 -1 1 0 0 -1 -1 1 5

ZJ 4 -1 3 0 1 4 -1 10

CJ – ZJ -3 0 0 0 -1 -4-M 1-M

All CJ – ZJ values ≤ , therefore OPTIMAL solution reached

X1 = 0; X2 = 5; X3 = 5; S1 = 15; S2 = 0; S3 = 0
P = 10
145
Special Cases in Simplex Method

1. Tie for Pivot Column


2. Degeneracy
3. Multiple Optimal Solutions
4. Unbounded solution
5. Non-existing (infeasible) solution

146
Tie for Pivot Column

• Sometimes when selecting the pivot column, you may notice that the
greatest positive Cj – Zj row values are the same; thus, there is a tie for
the pivot column
• When this happens, one of the two tied columns should be selected
arbitrarily
• Even though one choice may require fewer subsequent iterations than the
other, there is no way of knowing this beforehand

147
Degeneracy

• Degeneracy (no improvement in objective or goal value)


• It typically occurs in a simplex iteration when in the minimum ratio test, more
than one basic variable gets equal value.
• The tie is broken arbitrarily.
• This is in itself not a problem, but making simplex iterations from a degenerate
solution may give rise to cycling, meaning that after a certain number of
iterations without improvement in objective value the method may turn back to
the point where it started
• One or more of the constraints are redundant

148
Degeneracy

149
Degeneracy

two tableaus represent two


different basic feasible
solutions corresponding to
two different sets of model
constraint equations
Optimal solution did not
change from the third to the
optimal simplex tableau

150
Multiple Optimal Solutions

To determine whether a problem has more than one optimal solution


1. Find an optimal solution by the usual simplex method
2. Look at zeros in the Cj – Zj row of the final tableau. If a zero appears in
the bottom row of a column for a nonbasic variable, there might be other
optimal solutions
3. To find another optimal solution, if any, use the column of a nonbasic
variable with a zero at the bottom as the pivot column. Find the pivot row
in the usual manner, and then pivot on the pivot element
4. If this new tableau gives the same optimal value of z at another point,
then multiple solutions exist
5. Given the two optimal solutions, all points on the line segment joining
them are also optimal solutions 151
Multiple Optimal Solutions

152
Unbounded Solutions

• In some problems the feasible solution area formed by the model constraints is
not closed. In these cases it is possible for the objective function to increase
indefinitely without ever reaching a maximum value because it never reaches the
boundary of the feasible solution area
• For maximization problems
– It occurs when the value of non-basic variable in z row is –ve (this means that non-
basic variable has to enter the solution). AND the values of constraints
under this variable are either –ve or 0 (this means no basic variable can
leave the solution)
• For minimization problems
– It occurs when the value of non-basic variable in z row is +ve (this means that non-
basic variable has to enter the solution). AND the values of constraints
under this variable are either –ve or 0 (this means no basic variable can
leave the solution)
153
Unbounded Solutions

154
No Feasible Solution

• When a simplex tableau has a negative entry in the last column and no
other entries in that row are negative, then there is no feasible solution to
the problem
• This occurs when in the optimal and feasible table, there exist Artificial
variable as a basic variable.
• This situation can never occur if all the constraints are of the type “≤” with
nonnegative RHS

155
No Feasible Solution

• Table has all zero or negative values in the Cj – Zj row, indicating that it is optimal.
• However, the solution is X2=4, A1=4 and A2=2. Because the existence of artificial
variables in the final solution makes the solution meaningless, this is not a real
solution
• Generally occur due to error in defining the problem or formulating the model

156
Using Computer to Solve Problems

• Microsoft Excel
• Lingo – can be downloaded from
https://www.lindo.com/index.php/products/lingo-and-optimization-modeling
• Excel QM

157
Microsoft Excel

• Technology can be used to solve a system of equations once the


constraints and objective function have been defined
• Excel has an add-in called the Solver which can be used to solve systems
of equations or inequalities

158
Microsoft Excel

Click on Data Tab


Click on Solver

159
Microsoft Excel

• Solver is not installed by default


• In case Solver option is not available, click on
File  Options  Add-ins  Go  Check Solver Add-in
• Once you click OK, Solver option will be available in the Data tab

160
Microsoft Excel

161
Microsoft Excel

162
Microsoft Excel

163
Microsoft Excel

164
Microsoft Excel

165
Solver Add-in

Type of Problem
Min / Max

Objective Function Cell, i.e., Z

By changing cells, i.e.,


Variables

Define Constraints
here
Type of Algorithm
Simplex or GRG
Nonlinear

Once problem has


been setup click on
Solve to get result
166
Solver Example

A corporation plans on building a maximum of 11 new stores in a large city.


They will build these stores in one of three sizes for each location – a
convenience store (open 24 hours), standard store, and an expanded
services store. The convenience store requires $4.125 million to build and 30
employees to operate. The standard store requires $8.25 million to build and
15 employees to operate. The expanded-services store requires $12.375
million to build and 45 employees to operate. The corporation can dedicate
$82.5 million in construction capital, and 300 employees to staff the stores.
On the average, the convenience store nets $1.2 million annually, the
standard store nets $2 million annually, and the expanded services store nets
$2.6 million annually. How many of each should they build to maximize
revenue?

167
Solver Example

• Type of problem: Maximization


• No of Variable: Three (i.e., convenience store, standard store, and
an expanded services store)
• Profits:
– Convenience Store: $ 1.2 mil annually
– Standard Store: $ 2 mil annually
– Expanded Services Store: $ 2.6 mil annually
• Constraints
– 11 new stores
– $ 82.5 mil capital
– 300 employees can be spared for the 11 stores

168
Solver Example

Let X1 = Convenience Stores


X2 = Standard Store
X3 = Expanded Services Store
Maximize Z = 1.2X1 + 2X2 + 2.6X3
s.t.
X1 + X2 + X3 ≤ 11
4.125X1 + 8.25X2 + 12.375X3 ≤ 82.5
30X1 + 15X2 + 45X3 ≤ 300

X1, X2, X3 ≥ 0

169
Excel Model

Variables

Objective
Function

Constraint
Values

170
Solver Setup

171
Solver Setup

172
Solver Setup

173
Solver Setup

174
Solver Setup

Once setup click on


Solve to find solution

Select this to make


variables non-negative

175
Solver Solution

Select these options


and Click OK

176
Solver Solution

177
Solver Solution

178
Lingo

• LINGO is a comprehensive tool designed to make building and solving


Linear, Nonlinear (convex & nonconvex/Global), Quadratic, Quadratically
Constrained, Second Order Cone, Stochastic, and Integer optimization
models faster, easier and more efficient
• LINGO provides a completely integrated package that includes a powerful
language for expressing optimization models, a full featured environment
for building and editing problems, and a set of fast built-in solvers
• Trial / Academic version available at:
https://www.lindo.com/index.php/products/lingo-and-optimization-
modeling

179
Lingo Modelling Window

180
Lingo Model

181
Lingo Solution

182

You might also like