0% found this document useful (0 votes)
126 views

Chapter 2 Linear Programming Model

Linear programming models seek to optimize a linear objective function subject to linear constraints. They involve decision variables, an objective function, and constraints. Common applications include manufacturing, marketing, finance, and more. The simplex algorithm is an efficient technique for solving linear programming problems by iterating to find an optimal solution.

Uploaded by

abenezer BA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views

Chapter 2 Linear Programming Model

Linear programming models seek to optimize a linear objective function subject to linear constraints. They involve decision variables, an objective function, and constraints. Common applications include manufacturing, marketing, finance, and more. The simplex algorithm is an efficient technique for solving linear programming problems by iterating to find an optimal solution.

Uploaded by

abenezer BA
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 87

Linear Programming Models

1
Linear Programming model

• A Linear Programming model seeks to maximize or minimize a linear


function, subject to a set of linear constraints, limitations and
hurdles (obstacles).
• Common terminology for linear programming:
• linear programming models involve
• resources denoted by i, there are m resources
• activities denoted by j, there are n activities
• performance measure denoted by z

2
1 Introduction to Linear Programming
• The linear model consists of the following
components:
• A set of decision variables. (X1, X2, X3….)
• An objective function. (8X1+ 5X2+10X3
• A set of constraints.

Decision variables– Xj; Paramers cj, aij and bi 3


Introduction to Linear Programming
• The Importance of Linear Programming
• Many real world problems lend themselves to linear
programming modeling.
• Many real world problems can be approximated by linear
models.
• There are well-known successful applications in:
• Manufacturing
• Marketing
• Finance (investment)
• Advertising
• Agriculture

4
Introduction to Linear Programming
• The Importance of Linear Programming
• There are efficient solution techniques that solve linear
programming models.
• The output generated from linear programming packages
provides useful “what if” analysis.

5
Generalized LP Model

6
Variations in LP Model

• An LP model can have the following variations:


• Objective Function: minimization or maximization problem.

7
Terminologies
• Solution: any specification of values for the decision variables, xj, is
called a solution
• Infeasible Solution: a solution for which at least one constraint is violated.
• Feasible Solution: a solution for which all of the constraints are satisfied
• Corner - Point Feasible (CPF) solution: a solution that lies at the corner of the feasible
region.
• Optimal Solution: a feasible solution that has the most favorable value of the objective
function.

8
Assumptions

1. Proportionality:
• contribution of each activity to the objective function, z, is proportional to its
level. Cjxj
• contribution of each activity to each functional constraint is proportional to
its level. ai xj
2. Additivity:
• every function is the sum of the individual contribution of the respective
activities.

9
Assumptions (cont’d)

3. Divisibility:
- decision variables are allowed to have any
real values that satisfy the functional and
non-negativity constraints.
4. Certainty:
- the parameter values are assumed to be
known constants. 10
The Galaxy Industries Production Problem –
A Prototype Example

• Galaxy manufactures two toy models:


• Space Ray.
• Zapper.
• Resources are limited to
• 1000 pounds of special plastic.
• 40 hours of production time per week.

11
The Galaxy Industries Production Problem –
A Prototype Example
• Marketing requirement
• Total production cannot exceed 700 dozens.
• Number of dozens of Space Rays cannot exceed number of dozens of
Zappers by more than 350.

• Technological input
– Space Rays requires 2 pounds of plastic and
3 minutes of labor per dozen.
– Zappers requires 1 pound of plastic and
4 minutes of labor per dozen.
12
The Galaxy Industries Production Problem –
A Prototype Example
• The current production plan calls for:
• Producing as much as possible of the more profitable
product, Space Ray ($8 profit per dozen).
• Use resources left over to produce Zappers ($5 profit
per dozen), while remaining within the marketing
guidelines.
• The current production plan consists of:
Space Rays = 450 dozen 8(450) + 5(100)
Zapper = 100 dozen
Profit = $4100 per week
13
Management is seeking a
production schedule that will
increase the company’s profit.

14
A linear programming model
can provide an insight and an
intelligent solution to this problem.

15
The Galaxy Linear Programming Model

• Decisions variables:
• X1 = Weekly production level of Space Rays (in dozens)
• X2 = Weekly production level of Zappers (in dozens).

• Objective Function:
• Weekly profit, to be maximized

16
The Galaxy Linear Programming Model

Max 8X1 + 5X2 (Weekly profit)


subject to
2X1 + 1X2 £ 1000 (Plastic)
3X1 + 4X2 £ 2400 (Production Time)
X1 + X2 £ 700 (Total production)
X1 - X2 £ 350 (Mix)
Xj> = 0, j = 1,2 (Nonnegativity)

17
Solution

• Graphical- when we have two decision variables both for


maximization and minimization.
• Simplex- regardless of how many decision variables you have, you can
use simplex method.

18
2.3 The Graphical Analysis of Linear
Programming

The set of all points that satisfy all the


constraints of the model is called
a

FEASIBLE REGION

19
Using a graphical presentation
we can represent all the constraints,
the objective function, and the three
types of feasible points.

20
Graphical Analysis – the Feasible Region
X2

The non-negativity constraints

X1

21
Graphical Analysis – the Feasible Region
X2

1000 The Plastic constraint


2X1+X2 £ 1000
700 Total production constraint:
X1+X2 £ 700 (redundant)
500

Infeasible
Production Feasible
Time
3X1+4X2 £ 2400 X1
500 700

22
Graphical Analysis – the Feasible Region
X2
1000 The Plastic constraint
2X1+X2 £ 1000
700 Total production constraint:
X1+X2 £ 700 (redundant)
500
Infeasible
Production mix
constraint:
Production Feasible X1-X2 £ 350
Time
3X1+4X2£ 2400
X1
500 700
Interior points. Boundary points. Extreme points.
• There are three types of feasible points 23
The search for an optimal solution

X2 Start at some arbitrary profit, say profit = $2,000...


1000 Then increase the profit, if possible...
...and continue until it becomes infeasible

700 Profit =$4360


500

X1
24
500
Summary of the optimal solution
Space Rays = 320 dozen
Zappers = 360 dozen
Profit = $4360
• This solution utilizes all the plastic and all the production
hours.

• Total production is only 680 (not 700).

• Space Rays production exceeds Zappers production by only


40 dozens.

25
Extreme points and optimal solutions

• If a linear programming problem has an optimal solution, an extreme


point is optimal.

26
Multiple optimal solutions
• For multiple optimal solutions to exist, the objective
function must be parallel to one of the constraints

•Any weighted average of


optimal solutions is also an
optimal solution.

27
Simplex algorithm
• Write the equation in mathematical equation
• Converting the equations into standard form by adding slack variables,
or artificial variables or artificial variables and slack variables
• Construct the initial table
• Identify the entering variable-pivot column
• Identify the leaving variable- pivot row
• Conduct further iteration to that the value at the pivot cell is 1 and all
other numbers in the column are zero.
• Check for optimality ( for maximization models all values in the C-Z row
must be less than or equal to zero for the solution to be optimal. If
there is any positive value in the C-z row of the table that is an
indication that the solution is not optimal. Hence, there is a need to
iterate further by identifying the leaving variable and entering variable
using the techniques discussed above.

28
Example

Maximize Z = f(x,y) = 3x + 2y
Max Z=3x+2y+0S1+0S2+0S3

subject to: 2x + y ≤ 18 Subject to:

  2x + 3y ≤ 42 2X+y+S1=18

  3x + y ≤ 24
2X+3Y+S2=42

3X+Y+S3=24
  x≥0,y≥0

X,Y,S1,S2,S3≥0

Solution
 x = 3 and y = 12

29
Maximization with mixed constraints

• The simplex method requires that all the constraints be in standard


form.
• Constraints that are ≤ can be put in to standard form by adding a
slack variable in the constraint.
• Constraints with ≥or = sign are handled a bit differently.

30
Cont’d

• To change equality constraints to standard form add artificial


variables
• To covert greater than or equal to inequality to standard form
subtract surplus variable first and add artificial variable

31
Solve using simplex method

Max! 6X + 8Y
Subject to: Y≤4
X+Y=9
6X+ 2Y ≥ 24
X, Y ≥ 0

32
In standard form

Max! 6X + 8Y + 0S1 + 0S3 - MA1 – MA3


Subject to: Y+ S1 = 4
X+Y + A1 = 9
6X+ 2Y –S3 + A3 = 24
All variables ≥ 0

33
Initial table

BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M

S1 0 0 1 1 0 0 0 4
A2 -M 1 1 0 0 1 0 9
A3 -M 6 2 0 -1 0 1 24

Z -7M -3M 0 M -M -M -33M


C-Z 6+ 7M 8+3M 0 -M 0 0  

34
Second table

BV CBV X Y S1 S3 A2 A3 Quantity
6 8 0 0 -M -M

S1 0 0 1 1 0 0 0 4
A2 -M 0 2/3 0 1/6 1 0 5
X 6 1 1/3 0 -1/6 0 1 4

Z 6 2-2M/3 0 -1M/6 -1 -M -M 24 - 5M
C-Z 0 6+2M/3 0 1+ M/6 0 0  

35
Third table

BV CBV X Y S1 S3 A2 Quantity

6 8 0 0 -M

Y 0 0 1 1 0 0 4
A2 -M 7/3
X 6 0 0 -2/3 1/6 1 8/3

1 0 -1/3 -1/6 0

Z 6 8 6 + 2M/3 -M/6 -1 -M 48 -7M/3


36

C-Z 0 0 -6-2M/3 1+ M/6 0  


Fourth table

BV CBV X Y S1 S3 Quantity

6 8 0 0

Y 8 0 1 1 0 4
S3 0 14
X 6 0 0 -4 1 5

1 0 -1 0 37
Minimization problems

• Manual solution of minimization problems using simplex method are


handled in the same fashion as maximization problem with mixed
constraints.
• The two key exceptions are:
• M coefficients in the objective function must be assigned a large positive
number.
• Selection of variables to enter the solution is based on the largest negative
value in row C-Z

38
Example

Minimize Z= 7X + 9Y
Subject to: 3X + 6Y ≥ 36
8X + 4Y ≥ 64
X, Y ≥ 0

39
In standard form

Minimize Z= 7X + 9Y + 0S1 + 0S2+MA1+MA2


Subject to: 3X + 6Y –S1 +A1 = 36
8X + 4Y –S2 + A2 = 64
All variables ≥ 0

40
Initial table

BV CBV X Y S1 S2 A1 A2  
7 9 0 0 M M

A1 M 3 6 -1 0 1 0 36
A2 M 8 4 0 -1 0 1 64

Z 11M 10M -M -M M M 100M


C-Z 7-11M 9-10M M M 0 0  

41
2nd table

BV CBV X Y S1 S2 A1 A2  
7 9 0 0 M M

A1 M 0 9/2 -1 3/8 1 0 12
X 7 1 1/2 0 -1/8 0 1/8 8

Z 7 7/2+9M/2 - M 3M/8 -7/8 M 7/8 56 + 12M


C-Z 0 11/2- 9M/2 M -3M/8 + 7/8 0 M-7/8  

42
3rd Table

BV CBV X Y S1 S2  

7 9 0 0

Y 9 0 1 -2/9 1/12 8/3


X 7 1 0 1/9 -1/6 20/3

Z 7 9 -11/9 -5/12 212/3


C-Z 0 0 11/9 5/12  

43
Shadow price

• Shadow prices are values in the Z row of the final (optimal) simplex
table.
• It is a marginal value.
• It shows the impact that a one unit change in the amount of
constraint would have on the value of the objective function

44
Shadow prices
Negative of Shadow
prices 45
• From the above table one can clearly see that:
• If resource one is increased by one unit, there would be no effect on the
profit.
• If the second resource is increased by one unit, profit will increase by ten
birr and
• If the third resource is increased by one unit, profit will increase by 40/3
birr.
• shadow prices do not tell us by how much the level of scarce
resources can be increased and still have the same impact per unit

46
• resources with positive shadow prices as scarce goods (binding
constraints) and resources with zero shadow prices are free goods
(surplus resource).
• At some point, the ability to use additional resources will disappear
because of the fixed amounts of the other constraints.
• We need to determine the range over which we can change the
right hand side quantities and still have the same shadow prices.
• This is called range of feasibility/ right hand range

47
The Role of Sensitivity Analysis of
the Optimal Solution
• Is the optimal solution sensitive to changes in input parameters?

• Possible reasons for asking this question:


• Parameter values used were only best estimates.
• Dynamic environment may cause changes.
• “What-if” analysis may provide economical and operational information.

48
Sensitivity Analysis of
Objective Function Coefficients.

• Range of Optimality
• The range of optimality for each objective function coefficient
provides the range of values over which the current solution will
remain optimal.
• The optimal solution will remain unchanged as long as
• An objective function coefficient lies within its range of optimality
• There are no changes in any other input parameters.

49
Cont’d

• Managerial attention should be focused on those objective function


coefficients that have a narrow range of optimality and coefficients
near the end points of the range.
• With these coefficients, a small change can necessitate modifying the
optimal solution

50
Example

Consider:
Max! X1+ 2X2
Subject to: 2X1 + 3X2≤ 12
5X1 + 2X2 ≤ 15
X1, X2 ≥ 0
Solve using simplex method.

51
Optimal solution

  1 2 0 0  
BV CB X1 X2 S1 S2 RHS
V

X2 2 2/3 1 1/3 0 4 
S2 0 11/3 0 -2/3 1 7 
 Z 4/3 2 2/3 0 8 
C-Z  -1/3 0 -2/3 0  

52
Cont’d

• For all non-basic variables range of insignificance will be given by -∞≤


Cj ≤ Z.
• The non-basic variable will remain non-basic so long as Cj ≤ Zj.
• Hence, the range of insignicance for X1 is -∞≤ Cj ≤ 4/3

53
For basic variable

• For variables which are in the solution, the


determination of range of optimality requires
different approach.
• The value in C-Z row must be divided by the
corresponding row values of the variable in
question.
• The smallest positive ratio will indicate the
allowable increase and the smallest negative ratio
(absolute value) indicates the allowable decrease.
• If there is no positive ratio there is no upper limit in
variables objective function coefficient
54
Cont’d

• Therefore ratios calculated for the row are:


-1/2
0
-2 Allowable decrease
0/0
No positive ratio; hence there is no
upper limit

55
Cont’d

• As you can see, the smallest negative ration (in terms of absolute
value) is -1/2 and there is no positive ratio.
• Hence, the coefficient of X2 can be reduced by 0.5 and increased
indefinitely without making it non basic.

56
Cont’d

Therefore, the range of optimality for X2 is:


(2-0.5) ≤ C2 ≤∞ = 1.5 ≤ C2 ≤ ∞

57
Sensitivity Analysis of
Right-Hand Side Values
• a change in the right-hand side for a constraint may
affect the feasible region and perhaps cause a change
in the optimal solution to the problem
• In sensitivity analysis of right-hand sides of constraints
we are interested in the following questions:
• Keeping all other factors the same, how much would the
optimal value of the objective function (for example, the
profit) change if the right-hand side of a constraint changed
by one unit?
• For how many additional or fewer units will this per unit
change be valid?
58
Sensitivity Analysis of
Right-Hand Side Values
• Any change to the right hand side of a binding constraint will change
the optimal solution.

• Any change to the right-hand side of a non-binding constraint that is


less than its slack or surplus, will cause no change in the optimal
solution.

59
Cont’d

• To find range of feasibility for the right hand side, divide the entries in
associated the quantity column by slack column by the values.
• The smallest positive ratio indicates the allowable decrease and
negative ratio closest to zero indicates allowable increase

60
Cont’d

• For the previous example:


For the first variable
4/ (1/3) = 12 Allowable decrease
7/ (-2/3) = -21/2
• There are only two ratios one positive and the other negative.
• Hence, the first resource can be reduced by 12 and increased by
Allowable Increase
21/2.

61
Cont’d

• Hence, range of feasibility for resource one is:


0 ≤ b1≤ 45/2
Construct the range of feasibility for resource two.

62
For second constraint

4/0=undefined
7/1=7
Hence, 15-7≤b2≤∞
8 ≤b2≤∞ Allowable decrease

63
Models Without Unique Optimal
Solutions

• Infeasibility: Occurs when a model has no feasible point.


• Unboundness: Occurs when the objective can become
infinitely large (max), or infinitely small (min).
• Alternate solution: Occurs when more than one point
optimizes the objective function

64
Infeasible Model

No point, simultaneously,
lies both above line 1 and
below lines 2 and 3
2
.

3 1
65
Solve the following using simplex method

• Maximize z=X1+2X2+X3
s.t. X1+(1/2)X2+(1/2)X3≤1
(3/2)X1+2X2+X3≥8
X1,X2,X3 ≥0
You arrive at an optimal solution while an artificial variable is still in the
basis.

66
Unbounded solution
the Ma
Ob x im
je ctiv ize
Th e Fu
reg e fea n ctio
ion sib n
le

67
Solve the following

• Maximize 2x1 +x2


Subject to:
x1 −x2 ≤ 10
2x1 −x2 ≤ 40
x1, x2 ≥ 0 .
There is exists a table which is not optimal, but identification of leaving
variable is impossible (because all rations are negative)

68
Duality

• Economic theory indicates that scarce (limited)


resources have value. In LP models, limited
resources are allocated, so they should be, valued.
•  Whenever we solve an LP problem, we implicitly
solve two problems: the primal resource allocation
problem, and the dual resource valuation problem.
•  Here we cover the resource valuation, or as it is
commonly called, the Dual LP

69
Duality
• Every linear programming model can have two forms.
• The original formulation of the problem is referred to primal form.
• The other form is called the dual.
• The dual is the mirror image of the primal.
• Solution of the primal problem contains solution of the dual and
vice versa

70
Primal
Max c Xj
j j

s.t. a Xj
ij j  bi for all i

Xj  0 for all j

Dual
Min U b
i
i i

s.t. U a
i
i ij  c j for all j
Ui  0 for all i

71
Primal Dual Pair and Their Units
Primal
Max c X
j
j j

s.t. a X
j
ij j  bi for all i

X j  0 for all j
where x is the variable and equals units sold

max sum (per unit profits) * (units sold)


s.t. sum (per unit res. use)*(units sold) < res on hand
72
Primal Dual Pair and Their Units

Dual
Min U b
i
i i

s.t. U a
i
i ij  c j for all j
Ui  0 for all i
U is the variable and equals per unit resource value

min sum (per unit res value) * (res on hand)


s.t. sum (per unit res value) * (per unit res use)
> per unit profits
73
Formulating the Dual
• The dual of maximization problem is minimization and vice versa
• If the constraints of the primal are greater than or equal to that of
dual will be less than or equal to or vice versa
• Right hand side of the primal becomes the objective function of the
dual and vice versa
• Number of decision variables become number of constraints and
vice versa

74
Primal and dual

Primal Dual
•  • 

75
In matrix notation

Primal Dual
Max Z= CX Min Z= yb
S.t: AX≤ b S.t: Ay≥C
x≥ 0 y≥0

76
• Formulate a dual of:
Minimize 40X1 + 44X2 + 48X3
Subject to
X1+ 2X2+ 3X3 ≥ 20
4X1+4X2+4X3 ≥ 30
X1, X2, X3 ≥ 0

77
Maximize 20y1+30y2
Subject to:
1Y1+4Y2 ≤ 40
2y1+ 4Y2 ≤ 44
3Y1+ 4Y2 ≤ 48
Y1, Y2 ≥ 0

78
• Formulate the dual of:
Maximize 50X1 + 80X2
Subject to
3X1+ 5X2≤ 45
4X1+ 2X2≥ 16
6X1+ 6X2=30

6X1+6x2<=30
6X1+6X2>=30

79
Minimize 45y1-16y2+30y3-30y4
Subject to
3y1-4y2+6y3-6y4≥ 50
5y1-2y2+6y3-6y4≥ 80
y1, y2, y3, y4 ≥ 0

80
Primal and dual relationships

81
Comparing primal and dual simplex solution

• The solution quantities of the dual are equal to shadow prices of the
primal
• The values of the solution quantities of the primal can be found in
the bottom row of the dual.

82
Solve one of the models and read the solution
of the other form that.

83
• A firm, that assembles computers and
computer equipment, is about to start
production of two new micro computers. Each
type of microcomputer will require assembly
time inspection time and storage space. The
amount of each of these resources that can be
devoted to the production of the micro
computers is limited. The manager of the firm
would like to determine the quantity of each of
the microcomputers to produce in order to
maximize the profit generated by sales of these
microcomputers. The following additional
information is provided.
84
Type 1 Type 2
• Profit per unit 60 50
• Assembly time/unit 4hrs 10hrs
• Inspection time/unit 2hrs 1hrs
• Storage space/ unit 3 cubic feet 3 cubic feet
• Resources available
• Assembly time 100hrs
• Inspection time 22 hrs
• Storage space 39 cubic feet

85
Required
• Formulate the problem as Linear Programming model
• Solve using graphical method
• Solve using simplex method
• Find duality of the problem
• Compare the primal and dual
• Construct the range of optimality and feasibility for the objective
function coefficient and right hand side values.
• Interpret the shadow prices.

86
Cont’d

• Assume that the profit of type one product is 100 birr and that of
type two product is 50 birr per unit. Will the optimal solution
change?
• What if the profit contribution of type one and type are 50 and 50
birr each.

87

You might also like