You are on page 1of 35

EM 602

MANAGEMENT SCIENCE

Lecture 2:
Linear Programming

The Simplex Method


 An algorithm will solve an LP if it:
a) demonstrates that there is a feasible solution
b) determines an optimal solution

 Unbounded feasible region: A feasible region that contains points for


which the value of at least one variable can assume arbitrarily large values.
x2
x2

Bounded Unbounded
Feasible Region Feasible Region

x1 x1

1
The Simplex Method (Cont’d)
The idea:
 Exploit the property of an LP: If there is a solution to an LP,
then it is always at a corner point solution or more precisely, the
solution always contains a vertex.
 Apply partial enumeration of feasible solutions.
 Start at an initial feasible solution.
 Keep searching adjacent vertices (solutions) until no
improvement of the objective function can be obtained.

Example Problem
A new company Wyndor Glass Company has:

3 plants
making 2 products.
 8' glass door : product 1 
Products =  
4  6' window : product 2 
Resources : Production Capacities in 3 plants are as follows:

Production Time, hrs/product Total Available Capacity


Plant Production Time per week, hrs
1 2

1 1 0 4
2 0 2 12
3 3 2 18

Unit Profit 3 5 Question : What is the Optimal Product Mix, a


($) combination of products 1 and 2, that
maximizes the profit of the company? 6

2
Graphical Solution
Consider the region formed by the constraints in form of
inequalities
x2
x1 = 4
(2,6)
(0,6) 2x2 = 12

(4,3)

3x1 + 2x2 = 18

x1
(4,0)

The shaded area is the permissible region of values of (x1, x2).

It is called the FEASIBLE solution set or FEASIBLE REGION.

The Simplex Method Example

Canonical Form:
Max. Z = 3x1 + 5x2 Max. 3x1 + 5x2 + 0s1 + 0s2 + 0s3 = Z
s.t. 1x1 + 0x2  4 s.t. 1x1 + 0x2 + 1s1 + 0s2 + 0s3 = 4
0x1 + 2x2  12 0x1 + 2x2 + 0s1 + 1s2 + 0s3 = 12
3x1 + 2x2  18 3x1 + 2x2 + 0s1 + 0s2 + 1s3 = 18
x1  0; x2  0 x1, x2, s1, s2, and s3  0

Total number of variables: n = 5


Basic variables: m = 3 (# of variables equal to # of constraints)
Non-basic variables: n - m = 2 (variables set equal to a bound: 0)
Possible basic solutions (basis): C nn m= n!/[m!(n-m)!] = 5!/(3!2!) = 10
8

3
The Simplex Method Example (cont.)
x1 x2 s1 s2 s3 Z
1 0 0 4 12 18 0
Max. 3x1 + 5x2 + 0s1 + 0s2 + 0s3 = Z
2 0 - 0 - - Infeasible
3 0 6 4 0 6 I s.t. 1x1 + 0x2 + 1s1 + 0s2 + 0s3 = 4
4 0 9 4 -6 0 Infeasible
0x1 + 2x2 + 0s1 + 1s2 + 0s3 = 12
5 4 0 0 12 6 II
6 - 0 - 0 - Infeasible
3x1 + 2x2 + 0s1 + 0s2 + 1s3 = 18
7 6 0 -2 12 0 Infeasible x1, x2, s1, s2, and s3  0
8 4 6 0 0 -6 Infeasible
9 4 3 0 6 0 III
10 2 6 2 0 0 IV

The Simplex Method Idea


Reformulated:

 The idea is to move from one basis (basic feasible solution -


BFS) to another.

 The next basic feasible solution (BFS) should further


improve the objective value.

 Check objective value in each iteration.

10

10

4
Back to the Wyndor Example…
Algebraic Form (Solution)

Max. 3x1 + 5x2 + 0s1 + 0s2 + 0s3 = Z Initial BFS: x = (0, 0, 4, 12, 18)
s.t. 1x1 + 0x2 + 1s1 + 0s2 + 0s3 = 4 s1 = 4 – x1
0x1 + 2x2 + 0s1 + 1s2 + 0s3 = 12 s2 = 12 - 2x2
3x1 + 2x2 + 0s1 + 0s2 + 1s3 = 18 s3 = 18 - 3x1 - 2x2
x1, x2, s1, s2 and s3  0 Z = 3x1 + 5x2

Which variable to enter the basis? Select from x1 or x2.

x2 is the most logical (since it increases the Objective Function faster, 5 > 3)

11

11

The Simplex Method Example (cont.)


How big can x2 get?
Criterion for selecting the leaving variable.
s2  0 then 12 - 2x2  0 => x2  6
s3  0 then 18 – 3x1 - 2x2  0 => x2  9 (since x1 = 0)

New BFS: x = (0, 6,Thus


4, 0,x18)
2 = 6 and s2 is the leaving variable and its value is 0.

s1 = 4 – x1
x2 = (12 – s2)/2
s3 = 18 - 3x1 - 2x2
Z = 3x1 + 5x2 = 3x1 + 5(12 – s2)/2 = 3x1 + 30 – 2.5s2

Which variable to enter the basis? (Select either x1 or s2)


x1 is the most logical (since it increases the OF, and s2 coefficient is negative)
12

12

5
The Simplex Method Example (cont.)
How big can x1 get?
Criterion for selecting the leaving variable.
s1  0 then 4 - x1  0 => x1 4
s3  0 then 18 – 3x1 - 2x2  0 => x1  2 (since x2 = 6)
Thus x1 = 2 and s3 is the leaving variable.

New BFS: x = (2, 6, 2, 0, 0)


s1 = 4 – x1
x2 = (12 – s2)/2
x1 = (18 - 2x2 – s3)/3
Z = 3(18 - 2x2 – s3)/3 + 30 – 2.5s2 = 48 – 2x2 – 2.5s2 – s3

Which variable to enter the basis? (Select either s2 or s3)


All parameters are negative, thus it cannot improve Z anymore, stop!
Z* = 48 – 2(6) –2.5(0) – 0 = 36
13

13

The Simplex Method – Tableau Form


Maximize
Z = 3X1+ 5X2
Subject to
X1  4
2 X2  12
3X1 +2X2  18
X1 , X2  0

14

14

6
The Simplex Method – Tableau Form
 Steps:
1. Initialization:
a. transform all the constraints to equality by introducing
slack, surplus, and artificial variables as follows:

Constraint type Variable to be added

≤ + slack (s)

≥ - Surplus (s)

= + Artificial (A)

15

15

 To convert a ≤ constraint to an equality, define for each


constraint a slack variable si (si = slack variable for the ith
constraint). A slack variable is the amount of the resource
unused in the ith constraint.
 If a constraint i of an LP is a ≤ constraint, convert it to an
equality constraint by adding a slack variable si to the ith
constraint and adding the sign restriction si ≥ 0.

16

16

7
 To convert the ith ≥ constraint to an equality constraint,
define an excess variable (sometimes called a surplus
variable) ei (ei will always be the excess variable for the ith
≥ constraint.
 We define ei to be the amount by which ith constraint is
over satisfied.
 Subtracting the excess variable ei from the ith constraint
and adding the sign restriction ei ≥ 0 will convert the
constraint.
 If an LP has both ≤ and ≥ constraints, apply the previous
procedures to the individual constraints.

17

17

The Simplex Method – Tableau Form


Standard form
Maximize Z,
Subject to
Z - 3X1- 5X2 =0

X1 + S1 = 4
2 X2 + S2 = 12
3X1 +2X2 + S3 = 18
X 1 , X 2, S 1, S 2 , S 3  0

18

18

8
The Simplex Method – Tableau Form
b. Construct the initial simplex tableau
Basic RHS X1 … Xn S1 …... Sn
variable

Z Z value Objective function coefficient


In different signs
S b1
Coefficient of the constraints

A bm
19

19

The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0) Z 0 -3 -5 0 0 0
(1) s1 4 1 0 1 0 0
(2) s2 12 0 2 0 1 0
(3) s3 18 3 2 0 0 1

20

20

9
The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0) Z 0 -3 -5 0 0 0
(1) s1 4 1 0 1 0 0
(2) s2 12 0 2 0 1 0
(3) s3 18 3 2 0 0 1

21

21

The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0) Z 0 -3 -5 0 0 0 -
(1) s1 4 1 0 1 0 0 4/0 = 
(2) s2 12 0 2 0 1 0 12/2 = 6
(3) s3 18 3 2 0 0 1 18/2 = 9

22

22

10
The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0) Z 0 -3 -5 0 0 0 -
(1) s1 4 1 0 1 0 0 4/0 = 
(2) s2 12 0 2 0 1 0 12/2 = 6
(3) s3 18 3 2 0 0 1 18/2 = 9

is called a pivot number

The “Key” for “pivoting”:


(0’) = (2)*(1/2)*5 + (0) or (2’)*(5) + (0)
(1’) = (1)
(2’) = (2)*(1/2)
(3’) = (2’)*(-2) + (3)
23

23

The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0’) Z 30 -3 0 0 5/2 0 -
(1’) s1 4 1 0 1 0 0 4/1 = 4
(2’) x2 6 0 1 0 1/2 0 6/0 = ?
(3’) s3 6 3 0 0 -1 1 6/3 =2

Pivoting:
(0”) = (3’) + (0’)
(1”) = (3’) * (1/3)*(-1) + (1’) or (3”)*(-1) + (1’)
(2”) = (2’)
(3”) = (3’) *(1/ 3)

24

24

11
The Simplex Method – Tableau Form

Row Basic Var. RHS x1 x2 s1 s2 s3 Ratio (Test)


(0’’) Z 36 0 0 0 3/2 1 All  0
(1’’) s1 2 0 0 1 1/3 -1/3
(2’’) x2 6 0 1 0 1/2 0
(3’’) x1 2 1 0 0 -1/3 1/3

Reached Optimal!
x = (2, 6, 2, 0, 0) Z* = 36

25

25

Simplex Algorithm
(Maximization Problem)
Step 0.
 Convert LP to Standard Form.
Step 1.
 Find initial Basic Feasible Solution (BFS).
Step 2.
 If all non-basic variables have non-negative coefficients in row 0,
the current BFS is optimal. Stop.
 If any non-basic variable in row 0 has a negative coefficient, choose
the variable with the most negative coefficient to enter the basis.
(Why most negative?) We call this variable an entering variable.

26

26

12
Simplex Algorithm
(Maximization Problem)
Step 3.
 Determine the leaving basic variable by the minimum ratio test.
𝑅𝑒𝑑𝑢𝑐𝑒𝑑 𝑅𝐻𝑆
Ratio =
𝑎
Issues:
1. Ties! (equal minimal ratio values in two or more rows)
 Ties may be broken arbitrary
2. Non-positive coefficient in each constraint 𝑎 < 0
 Unbounded solution
3. Degeneracy! (a basic variable equal to zero)
 Simplex may not work (cycling)! Need to be modified.
27

27

Simplex Algorithm
(Maximization Problem)
Step 4.
 Determine the new BFS by pivoting. (This will result in +1 in one
row, zeros elsewhere in the column of +1).
 Go to Step 2.

28

28

13
Simplex Algorithm
(Maximization Problem)

Note that when using Simplex algorithm to solve a problem,


there should never be a constraint with a negative RHS. A
constraint with a negative RHS is usually the result of an error in
the ratio test or in performing EROs. If there is a constraint with a
negative RHS, there is no longer a BFS, and the rule of Simplex
method may not lead to a better BFS.

29

29

Simplex method in case of Artificial Variables


“Big M method”

 Solve the following linear programming problem by using the


simplex method:
 Min Z =2 X1 + 3 X2
s.t.
½ X1 + ¼ X2 ≤ 4
X1 + 3X2  20
X1 + X2 = 10
X1, X2  0

30

14
 Solution
Step 1: standard form
Min Z,
s.t.
Z – 2 X1 – 3 X2 =0
½ X1 + ¼ X2 + s1 =4
X1 + 3X2 - e2 = 20
X1 + X2 = 10
X1, X2 ,s1, e2  0

31

31

Big M method
M, a very large number, is used to ensure that the values of a1 and a2, …, and an will be zero in the final
(optimal) tableau as follows:

1. If the objective function is Minimization, then a1, a2, …, and an must be added to the RHS of the
objective function multiplied by a very large number (M).

Example: if the objective function is Min Z = X1+2X2, then the obj. function should be

Min Z = X1 + X2+ Ma1 + Ma2+ …+ Man


OR
Z – X1 - X2- Ma1 - Ma2- …- Man = 0

2. If the objective function is Maximization, then a1, a2, …, and an must be subtracted from the RHS of the
objective function multiplied by a very large number (M).

Example: if the objective function is Max Z = X1+2X2, then the obj. function should be

Max Z = X1 + X2- Ma1 - Ma2- …- Man


OR
Z - X1 - X2+ Ma1 + Ma2+ …+ Man = 0

When the Z is transformed to a zero equation, the signs are changed

32

15
Big M method
 Solution
Step 1: standard form
Min Z,
s.t.
Z – 2 X1 – 3 X2 - M a1 -M a2 =0
½ X1 + ¼ X2 + s1 =4
X1 + 3X2 - e2 + a2 = 20
X1 + X2 + a3 = 10
X1, X2 ,s1, s2, a1, a2  0
Where: M is a very large number

33

Big M method
 Step 2: Initial tableau

Basic X1 X2 s1 e2 a2 a3 RHS
variables
Z -2 -3 0 0 -M -M 0
S1 ½ ¼ 1 0 0 0 4
a1 1 3 0 -1 1 0 20
a2 1 1 0 0 0 1 10

Note that one of the simplex rules is violated, which is the basic variables a2, and a3
have a non zero value in the z row; therefore, this violation must be corrected before
proceeding in the simplex algorithm as follows.

34

16
Big M method
 To correct this violation before starting the simplex algorithm, the
elementary row operations are used as follows:
New (Z row) = old (z row) ± M (a1 row) ± M (a2 row)
In our case, it will be positive since M is negative in the Z row, as
following:
Old (Z row): -2 -3 0 0 -M -M 0
M (row 2): M 3M 0 -M M 0 20M
M (row 3): M M 0 0 0 M 10M
New (Z row):2M-2 4M-3 0 -M 0 0 30M

35

Big M method
 The initial tableau will be:

Basic X1 X2 S1 e2 a2 a3 RHS

variables
Z 2M-2 4M-3 0 -M 0 0 30M

S1 1/2 1/4 1 0 0 0 4

a2 1 3 0 -1 1 0 20

a3 A2 1 0 0 0 1 10

• Since there is a positive value in the z row, this solution is not optimal
• The entering variable is X2 (it has the most positive value in the last row)
• The leaving variable is a2 (it has the smallest ratio)

36

17
Big M method
 First iteration
Basic X1 X2 S1 S2 a2 a3 RHS
variables

Z 2/3M-1 0 0 1/3M-1 1-4/3M 0 20+10/3M

S1 5/12 0 1 1/12 -1/12 0 7/3

X2 1/3 1 0 -1/3 1/3 0 20/3

a3 2/3 0 0 1/3 -1/3 1 10/3

• Since there is a positive value in the 0 row, this solution is not optimal
• The entering variable is X1 (it has the most positive value in the last row)
• The leaving variable is a3 (it has the smallest ratio)

37

Big M method
 Second iteration

Basic X1 X2 S1 S2 A1 A2 RHS
variables

Z 0 0 0 -1/2 ½-M 3/2-M 25

S1 0 0 1 -1/8 1/8 -5/8 1/4

X2 0 1 0 -1/2 1/2 -1/2 5

X1 1 0 0 1/2 -1/2 3/2 5

This solution is optimal, since there is no positive value in the last row. The optimal
solution is:
X1 = 5, X2 = 5, S1 = ¼
a2 = a3 = 0 and Z = 25

38

18
Note for the Big M method
 In the final tableau, if one or more artificial variables (a1, a2,
…) still basic and has a nonzero value, then the problem has
an infeasible solution.
 All other notes are still valid in the Big M method.

39

LINDO Software
 Model Input

! OUR WYNDOR PROBLEM


! XJ AMOUNT OF PRODUCT J, WHERE 1 IS DOOR, AND 2 IS WINDOW

MAX 3X1+5X2

SUBJECT TO

X1<=4
2X2<=12
3X1+2X2<=18 The symbol is used to tell
LINDO compiler to ignore
END the text that follows behind
the exclamation sign.

40

40

19
LINDO Software Output (Results)
LP OPTIMUM FOUND AT STEP 2

OBJECTIVE FUNCTION VALUE

1) 36.00000

VARIABLE VALUE REDUCED COST


X1 2.000000 0.000000
X2 6.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 2.000000 0.000000
3) 0.000000 1.500000
4) 0.000000 1.000000

NO. ITERATIONS= 2

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 3.000000 4.500000 3.000000
X2 5.000000 INFINITY 3.000000

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 4.000000 INFINITY 2.000000
3 12.000000 6.000000 6.000000
4 18.000000 6.000000 6.000000 41

41

LINDO Example
Winco Products
- Winco sells four types of products
- The resources needed to produce one unit of each and the sales prices are given in
Table 1.
Table 1.

Resources Product 1 Product 2 Product 3 Product 4


Raw material 2 3 4 7
Hours of labor 3 4 5 6
Sales price ($) 4 6 7 8

- Currently, 4600 units of raw material and 5000 labor hours are available
- To meet the customer demand, exactly 950 total units must be produced
- Customers also demand that at least 400 units of product 4 be produced.
- Objective is to maximize Winco’s sales revenue.

42

42

20
LINDO Example (cont’d)
Solution:
Let xi be the number of units of product i produced by Winco.

max 𝑍 4𝑥1 6𝑥2 7𝑥3 8𝑥4


𝑠. 𝑡.
𝑋1 𝑋2 𝑋3 𝑋4 950
𝑋4 400
2𝑋1 3𝑋2 4𝑋3 7𝑋4 4600
3𝑋1 4𝑋2 5𝑋3 6𝑋4 5000
𝑋1 , 𝑋2 , 𝑋3 , 𝑋4 0

43

43

LINDO Example (cont’d)


 Lindo Formulation:

MAX 4x1+6x2+7x3+8x4

SUBJECT TO

x1+x2+x3+x4=950
x4>=400
2x1+3x2+4x3+7x4<=4600
3x1+4x2+5x3+6x4<=5000

END

44

44

21
LINDO Example (cont’d)
LP OPTIMUM FOUND AT STEP 4

OBJECTIVE FUNCTION VALUE

1) 6650.000

VARIABLE VALUE REDUCED COST


X1 0.000000 1.000000
X2 400.000000 0.000000
X3 150.000000 0.000000
X4 400.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 3.000000
3) 0.000000 -2.000000
4) 0.000000 1.000000
5) 250.000000 0.000000

NO. ITERATIONS= 4
45

45

LINDO Example (cont’d)


RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 4.000000 1.000000 INFINITY
X2 6.000000 0.666667 0.500000
X3 7.000000 1.000000 0.500000
X4 8.000000 2.000000 INFINITY

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 950.000000 50.000000 100.000000
3 400.000000 37.500000 125.000000
4 4600.000000 250.000000 150.000000
5 5000.000000 INFINITY 250.000000

46

46

22
LINDO Example (cont’d)
Q: Suppose Winco raises the price of product 2 by 50 cents. What is the new optimal
solution to the LP?

A: Because the AI for c2 is $0.66667, and we are increasing c2 by only $0.5 the current
basis remains optimal. The optimal values remain unchanged.
New optimal z-value = 4(0)  6.5(400)  7(150)  8(400)  $6850
Another way to see optimal z-value is:
Each unit of product 2 brings in 50 cents more in revenue. This, total revenue should
increase by 400(0.5) = $200
New z-value=original z-value + $200=$6850

Q: Suppose the sales price of product 1 is increased by 60 cents per unit. What is the new
optimal solution to the LP?

A: The AI for c1 is 1, so the current basis remains optimal, and the optimal value of the
decision variable remain unchanged. Because the value of x1 in the optimal solution is 0,
the change in the sales price for product 1 will not change the optimal z-value.

47

47

LINDO Example (cont’d)


Q: Suppose the sales price of product 3 is decreased by 60
cents. What is the new optimal solution to the LP?

A: For c3, AD=0.5, so the current basis is no longer optimal.


Problem needs to be resolved again by hand or by computer in
order to determine the new optimal solution

48

48

23
Production Planning Example

49

49

Production Planning Example (cont’d)

50

50

24
LINDO Output for the Production
Planning Example (handouts)
LP OPTIMUM FOUND AT STEP 3

OBJECTIVE FUNCTION VALUE

1) 6186.461

VARIABLE VALUE REDUCED COST


XA 100.000000 0.000000
XB 330.153839 0.000000
XC 0.000000 2.732308
XD 242.307693 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 9.230769
3) 21.004616 0.000000
4) 24.927692 0.000000
5) 0.000000 2.030769
6) 0.000000 -5.520000

NO. ITERATIONS= 3
51

51

LINDO Output for the Production


Planning
RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
XA 4.800000 5.520000 INFINITY
XB 12.000000 3.882353 3.000000
XC 6.000000 2.732308 INFINITY
XD 7.200000 2.400000 1.760000

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 400.000000 51.520756 107.299995
3 480.000000 INFINITY 21.004616
4 220.000000 INFINITY 24.927692
5 1500.000000 102.116684 210.000000
6 100.000000 284.615387 100.000000
52

52

25
Questions Raised at the Meeting
1. The sales manager believes that it would be possible to increase the profitability of
product C from $6 to $8 per unit. What happens to the optimal solution?
2. The purchase manager can acquire an extra 100 units of raw material from another
supplier. However, the quoted price of this supplier is $1.50 per unit higher than the
unit price of the current supplier. It is not possible to obtain any more of raw material
from the current source. What is your advice?
3. The customer to which a given supply of 100 units of product A has been agreed is
willing to cancel the order against a compensation of $575. What is your advice to
the sales manager?
4. The production manager thinks that 14 production hours can be diverted from
finishing to assembly. The cost of the diversion is $140. What is your comment?
5. The marketing manager suggests making a new product, E. The profit contribution of
this product is $7 per unit. Each unit of the new product requires 0.40 hour for
processing, 0.50 hour for finishing, and 0.20 hour for packaging, and 2 units of raw
material. What is your comment?
53

53

Answers to the Questions Raised


1. Product C is not produced in the current optimal production plan. The reduced cost
of product C tells you that the unit price of this product should be increased by at
least $2.73 before product C could become profitable. Hence the optimal
production plan remains unchanged when the unit price of product C would be
increased by $2.
2. The raw material constraint #4 is binding at the optimal solution, so it may be worth
to buy extra raw material. The shadow price on the raw-material constraint is 2.031
and the right-hand-side range indicates that this shadow price remains valid for
increases in the amount of raw material of up to 1,602.117–1,500 = 102.117 units.
The proposed increase is 100 units. Hence the optimal objective value increases by
100×$2.031 = $203.10. This increase is more than the additional costs of $150, so
your advice is to buy the extra 100 units of raw material. To find the new optimal
production plan, you have to resolve the new LP model. The new optimal
production plan is to produce 100 units of product A, 277.846 units of product B,
nothing of product C, and 357.692 units of product D.

54

54

26
Answers to the Questions (cont’d)
3. The minimum requirement constraint xA ≥ 100 is binding at the optimal solution
and has a shadow price of -5.52. Hence the optimal objective value will increase
when this constraint is loosened. The right-hand-side range of the constraint 5 tells
you that the shadow price of -5.52 remains valid for decreases in the constraint's
right-hand side of up to 100–0 = 100 units. Consequently, the optimal objective
value would increase by 100×$5.52 = $552 when the order of 100 units of product
A would be canceled. However, the canceling cost is higher than the increase in
profit. Your advice is not to cancel the order.

55

55

Answers to the Questions (cont’d)


4. The assembly constraint 1 is binding and the finishing constraint 2 is nonbinding at
the optimal solution. Hence it may be profitable to divert production hours from
finishing to assembly. Since simultaneous changes are involved, the 100% rule is
used. For the assembly constraint 1 and the finishing constraint 2, the ratios of the
actual change in the right-hand-side coefficient to the maximum allowable change
are given by r1 = 14/51.5 = 0.272 and r2 = 14/21 = 0.667. The sum r1+r2 = 0.939
does not exceed 1. Thus, since the shadow prices of the constraints 1 and 2 are
9.231 and 0, the optimal objective value would increase by 14×$9.231+14×$0 =
$129.23 when 14 production hours would be diverted from finishing to assembly.
This increase in profit is smaller than the diversion costs of $140. Your advice is
not to divert 14 production hours from finishing to assembly.
5. Using the shadow prices of the resources involved, the underlying economic cost of
the new product E is computed as 0.40×$9.231+0.50×$0+0.20×$0+2×$2.031–
0×$5.52 = $7.75 per unit. The economic cost of the new product is more than its
profit. Your comment is that the new product is not worth further consideration.

56

56

27
Unrestricted in Sign Variables
Baking (Bread) example:
 A loaf of bread requires 5oz of flour and 1 package of yeast;
it sells for 30 cents.
 30 oz of flour available; 5 packages of yeast.
 The baker can purchase additional (or sell leftover) flour at
4cents/oz.

57

57

Unrestricted in Sign Variables (cont.)


 x1 = number of loaves of bread baked
 x2 = number of ounces by which the flour supply is increased
by cash transactions
 x2>0 means that x2 oz are purchased
 x2<0 means that x2 oz are sold

Max Z = 30x1 – 4x2


S.t. 5x1 ≤ 30 + x2
x1 ≤ 5
x1 ≥ 0; x2 urs
58

58

28
Unrestricted in Sign Variables (cont.)
 Substitute (x2’– x2”) for x2;
 The problem becomes:

Max Z = 30x1 – 4x2’ + 4x2”

S.t. 5x1 ≤ 30 + x2’ – x2”

x1 ≤ 5

x1, x2’, x2” ≥ 0

59

59

LINDO Bread Problem Formulation


! X2 is allowed to be unrestricted in sign.
Max 30 X1 – 4 X'2 + X"2
Subject to
5X1 – X'2 + X"2 <= 30
X1 <= 5
End

Note that all variables


are on the left-hand
side of the inequality!

60

60

29
LINDO Bread Problem Result
LP OPTIMUM FOUND AT STEP 0

OBJECTIVE FUNCTION VALUE

1) 170.0000

VARIABLE VALUE REDUCED COST


X1 5.000000 0.000000
X'2 0.000000 0.000000
X"2 5.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 4.000000
3) 0.000000 10.000000

NO. ITERATIONS= 0

RANGES IN WHICH THE BASIS IS UNCHANGED:

OBJ COEFFICIENT RANGES


VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 30.000000 INFINITY 10.000000
X'2 -4.000000 0.000000 INFINITY
X"2 4.000000 0.000000 4.000000

RIGHTHAND SIDE RANGES


ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 30.000000 INFINITY 5.000000
3 5.000000 1.000000 5.000000
61

61

Goal Programming
 A decision maker faces multiple objectives

 There may be no point in the feasible region that satisfies all


objectives.

 How does the decision maker choose a satisfactory


decision?

 Best understood via an example.

62

62

30
Goal Programming
Leo Burnitt Ad Agency

 Auto Company ads should


be seen by at least 40 M Millions of Viewers
high-income men (HIM)
Cost
Ad HIM LIP HIW
($)
 At least 60M low-income
people (LIP)
Football 7 10 5 100K

 At least 35M high-income


women (HIW) Soap 3 5 4 60K

 Budget $600K

63

63

Goal Programming (cont.)


Leo Burnitt Ad Agency

Let:

 x1 = number of minutes of ads showing during football games

 x2 = number of minutes of ads showing during soap operas

64

64

31
Goal Programming (cont.)
Leo Burnitt Ad Agency

Min (or Max) z = 0*X1 + 0*X2


Subject to
7*X1 + 3*X2 ≥ 40 (HIM constraint)
10*X1 + 5*X2 ≥ 60 (LIP constraint)
5*X1 + 4*X2 ≥ 35 (HIW constraint)
100*X1 + 60*X2 ≤ 600 (Budget constraint)
X1, X2 ≥ 0

65

65

Goal Programming (cont.)


Leo Burnitt Ad Agency

 Each million exposures by which Auto Company falls short of


the HIM goal costs the company $200,000 penalty because of
lost sales.
 The penalty is $100,000 for LIP
 The penalty is $50,000 for HIW
 Define the following deviational variables:
 s+i = amount by which we numerically exceed the i-th goal
 s-i = amount by which we numerically underachieve the i-th goal

66

66

32
Goal Programming (cont.)
Leo Burnitt Ad Agency

Min Z = 200*s-1 + 100*s-2 + 50*s-3


Subject to
7*X1 + 3*X2 + s-1 – s+1 = 40 (HIM constraint)
10*X1 + 5*X2 + s-2 – s+2 = 60 (LIP constraint)
5*X1 + 4*X2 + s-3 – s+3 = 35 (HIW constraint)
100*X1 + 60*X2 ≤ 600 (Budget constraint)
All variables ≥ 0

67

67

Goal Programming
Leo Burnitt Ad Agency – LINDO Formulation

Min 200 SL1 + 100 SL2 + 50 SL3


Subject to
7*X1 + 3*X2 + SL1 – SU1 = 40 !(HIM constraint)
10*X1 + 5*X2 + SL2 – SU2 = 60 !(LIP constraint)
5*X1 + 4*X2 + SL3 – SU3 = 35 !(HIW constraint)
100*X1 + 60*X2 ≤ 600 !(Budget constraint)
End
Note the streamlined
notation to avoid confusion
in the LINDO compiler.
68

68

33
Goal Programming
Leo Burnitt Ad Agency – LINDO Output (Solution)
LP OPTIMUM FOUND AT STEP 5

OBJECTIVE FUNCTION VALUE

1) 250.0000

VARIABLE VALUE REDUCED COST


SL1 0.000000 200.000000
SL2 0.000000 0.000000
SL3 5.000000 0.000000
X1 6.000000 0.000000
X2 0.000000 50.000000
SU1 2.000000 0.000000
SU2 0.000000 100.000000
SU3 0.000000 50.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 0.000000
3) 0.000000 -100.000000
4) 0.000000 -50.000000
5) 0.000000 12.500000 69

69

Goal Programming
Leo Burnitt Ad Agency – LINDO Formulation w/ Budget
Restriction

Min 200 SL1 + 100 SL2 + 50 SL3 + SU4


Subject to
7*X1 + 3*X2 + SL1 – SU1 = 40 !(HIM constraint)
10*X1 + 5*X2 + SL2 – SU2 = 60 !(LIP constraint)
5*X1 + 4*X2 + SL3 – SU3 = 35 !(HIW constraint)
100*X1 + 60*X2 + SL4 – SU4 ≤ 600 !(Budget restriction GOAL)
End
70

70

34
Goal Programming
Leo Burnitt Ad Agency – LINDO Formulation w/ Budget
Restriction
LP OPTIMUM FOUND AT STEP 2

OBJECTIVE FUNCTION VALUE


We can meet all three goals by going
1) 33.33333 over the budget by $33.33K
VARIABLE VALUE REDUCED COST
SL1 0.000000 200.000000
SL2 0.000000 93.333336
SL3 0.000000 43.333332
SU4 33.333332 0.000000
X1 4.333333 0.000000
X2 3.333333 0.000000
SU1 0.333333 0.000000
SU2 0.000000 6.666667
SU3 0.000000 6.666667
SL4 0.000000 1.000000

ROW SLACK OR SURPLUS DUAL PRICES


2) 0.000000 0.000000
3) 0.000000 -6.666667
4) 0.000000 -6.666667
5) 0.000000 1.000000

NO. ITERATIONS= 2
71

71

Pre-emptive Goal Programming


 Assume that we know the priority ordering of the
goals – we do not need to know the weights

 P1 >> P2 >> P3

 We can solve the problem interactively, one problem


at a time.

72

72

35

You might also like