0% found this document useful (0 votes)
30 views45 pages

Forelæsning 3 Linear and Integer Programming II

nej tah haha

Uploaded by

Belal Faiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views45 pages

Forelæsning 3 Linear and Integer Programming II

nej tah haha

Uploaded by

Belal Faiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Lecture 3: Linear Programming

and Integer Programming


Sensitivity Analysis
 Optimal solutions to LP problems thus far have
been found under what are called deterministic
assumptions.
 This means that we assume complete certainty in
the data and relationships of a problem.
 But in the real world, conditions are dynamic and
changing.
 We can analyze how sensitive a deterministic
solution is to changes in the assumptions of the
model.
 This is called sensitivity analysis, postoptimality
analysis, parametric programming, or optimality
analysis.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-2


Sensitivity Analysis
 Sensitivity analysis often involves a series of
what-if? questions concerning constraints,
variable coefficients, and the objective function.
 One way to do this is the trial-and-error method
where values are changed and the entire model is
resolved.
 The preferred way is to use an analytic
postoptimality analysis.
 After a problem has been solved, we determine a
range of changes in problem parameters that will
not affect the optimal solution or change the
variables in the solution.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-3


High Note Sound Company
 The High Note Sound Company manufactures
quality CD players and stereo receivers.
 Products require a certain amount of skilled
artisanship which is in limited supply.
 The firm has formulated the following product mix
LP model.
Maximize profit = $50X1 + $120X2

s.t. 2X1+ 4X2≤ 80 (hours of electrician’s time available)

3X1+ 1X2≤ 60 (hours of audio technician’s time available)

X1, X2 ≥ 0
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-4
High Note Sound Company
The High Note Sound Company Graphical Solution
X2
(receivers)
Optimal Solution at Point a
60 –
X1 = 0 CD Players
X2 = 20 Receivers
– Profits = $2,400

40 –
Isoprofit Line: $2,400 = 50X1 + 120X2
a = (0, 20) –
b = (16, 12)
20 –

10 –
Figure 7.16
0– | | | | | |
10 20 30 40 50 60 X1
c = (20, 0) (CD players)
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-5
Changes in the
Objective Function Coefficient

 In real-life problems, contribution rates in the


objective functions fluctuate periodically.
 Graphically, this means that although the feasible
solution region remains exactly the same, the
slope of the isoprofit or isocost line will change.
 We can often make modest increases or
decreases in the objective function coefficient of
any variable without changing the current optimal
corner point.
 We need to know how much an objective function
coefficient can change before the optimal solution
would be at a different corner point.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-6


Changes in the
Objective Function Coefficient
Changes in the Receiver Contribution Coefficients
X2
40 –
Profit Line for 50X1 + 80X2
(Passes through Point b)
30 –
Old Profit Line for 50X1 + 120X2
(Passes through Point a)
20 –
b
a Profit Line for 50X1 + 150X2
(Passes through Point a)
10 –

c
0– | | | | | |
10 20 30 40 50 60 X1
Figure 7.17
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-7
Changes in the
Objective Function Coefficient

X2
40 –

30 –

20 –
b
a
10 –

0– | | c | | | |
10 20 30 40 50 60 X1
Figure 7.17
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-8
Changes in the
Objective Function Coefficient

X2
40 –

30 –

20 –
b
a
10 –

0– | | c | | | |
10 20 30 40 50 60 X1
Figure 7.17
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-9
Excel Solver and Changes in
Objective Function Coefficients
Excel 2010 Spreadsheet for High Note Sound Company

Program 7.6A

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-10


Excel Solver and Changes in Objective
Function Coefficients

Excel 2010 Solution and Solver Results Window for


High Note Sound Company

Figure 7.6B
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-11
Excel Solver and Changes in
Objective Function Coefficients
Excel 2010 Sensitivity Report for High Note Sound
Company

Program 7.6C

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-12


Changes in the
Technological Coefficients

 Changes in the technological coefficients often


reflect changes in the state of technology.
 If the amount of resources needed to produce a
product changes, coefficients in the constraint
equations will change.
 This does not change the objective function, but
it can produce a significant change in the shape
of the feasible region.
 This may cause a change in the optimal solution.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-13


Changes in the
Technological Coefficients
Change in the Technological Coefficients for the
High Note Sound Company

(a) Original Problem (b) Change in Circled (c) Change in Circled


Coefficient Coefficient
X2 X2 X2
60 – 60 – 60 –
Stereo Receivers

3X1 + 1X2 ≤ 60 2 X1 + 1X2 ≤ 60 3X1 + 1X2 ≤ 60


40 – 40 – 40 –
Optimal Still Optimal
Solution Optimal Solution
20 –a 20 –a 20 –
d
b 2X1 + 4X2 ≤ 80 2X1 + 4X2 ≤ 80 16 f g 2X1 + 5 X2 ≤ 80
– |c | | – | e | | | – |c | |
0 20 40 X1 0 20 30 40 X1 0 20 40 X1
CD Players
Figure 7.18

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-14


Changes in Resources or
Right-Hand-Side Values
 The right-hand-side values of the
constraints often represent resources
available to the firm.
 If additional resources were available, a
higher total profit could be realized.
 Sensitivity analysis about resources will
help answer questions about how much
should be paid for additional resources
and how much more of a resource would
be useful.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-15


Changes in Resources or
Right-Hand-Side Values
 If the right-hand side of a constraint is changed, the
feasible region will change (unless the constraint is
redundant).
 Often the optimal solution will change.
 The amount of change in the objective function value
that results from a unit change in one of the resources
available (Right Hand Side) is called the shadow price
 The shadow price for a constraint is the change in the
objective function value that results from a one-unit
increase in the right-hand side of the constraint.
 Reduced cost is the shadow price of nonnegative
constraints, objective function changes by this
amount (reduced cost) when forcing optimal zero
value to one unit.
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-16
Changes in Resources or
Right-Hand-Side Values
 However, the amount of possible increase in the
right-hand side of a resource is limited.
 If the number of hours increased beyond the
upper bound, then the objective function would no
longer increase by the shadow price.
 There would simply be excess (slack) hours of a
resource or the objective function may change by
an amount different from the shadow price.
 The shadow price is relevant only within limits.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-17


Changes in the Electricians’ Time Resource
for the High Note Sound Company
Maximize profit = $50X1 + $120X2
X2 s.t. 2X1+ 4X2≤ 80 (electrician’s time available)
60 – 3X1+ 1X2≤ 60 (technician’s time available)
X1, X2 ≥ 0

40 –
Constraint Representing 60 Hours of
Audio Technician’s Time Resource
a
20 – Constraint Representing 80 Hours of
b Electrician’s Time Resource

– c| | | |
0 20 40 50 60 X1

Figure 7.19
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-18
Changes in the Electricians’ Time Resource
for the High Note Sound Company
(a)  The optimal extreme point is still a (with new coordinate
X2 values, (0,25))
 Profit increases by 120*(25-20)=600
60 –  RHS is increased by 100-80=20
 Profit value increase per unit RHS is 600/20=30 (shadow
price of RHS for electrician.

40 –
Constraint Representing 60 Hours of
Audio Technician’s Time Resource
a
25 –
20 – b Changed Constraint Representing 100 Hours
of Electrician’s Time Resource

– | c | | |
0 20 40 50 60 X1

Figure 7.19
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-19
Changes in the Electricians’ Time Resource
for the High Note Sound Company

X2 (b)
60 –

40 –
Constraint Representing 60 Hours of
Audio Technician’s Time Resource

20 – Changed Constraint Representing 60 Hours


a of Electrician’s Time Resource
15 –
b

– c | | | |
0 20 30 40 60 X1
Figure 7.19

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-20


Changes in the Electricians’ Time Resource
for the High Note Sound Company
(c) Changed Constraint Representing 240 Hours
X2 of Electrician’s Time Resource
60 –

40 –

Constraint
Representing
20 – 60 Hours of Audio
Technician’s
Time Resource

– | | | | | |
0 20 40 60 80 100 120
X1
Figure 7.19

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-21


Excel Solver and Changes in
Right-Hand-Side Values
Excel 2010 Sensitivity Analysis for High Note Sound
Company

Program 7.6C

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-22


Minimization Problem

 Min z=2x1+x2
s.t. A: x1+x2>=6
B: x1+4x2>=12
C: x1+2x2<=10
x1>=0, x2>=0

 The constraint lines intersect at three


points (2,4), (4,2), and (8,1)

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-23


Changing RHS in Minimization Problem

X2
Constraint A

6–
Optimal extreme point (2,4) Optimal value=8

4–

Constraint C

2– Constraint B
(not binding)

– | | | | | |
0 2 4 6 8 10 12
X1

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-24


Changing RHS in Minimization Problem

X2
Constraint A

6–
Previous Optimal extreme point

New 4–
Constraint
C with
increased
RHS
2–

– | | | | | |
0 2 4 6 8 10 12
X1

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-25


Changing RHS in Minimization Problem

X2
Constraint A
New Optimal extreme point with lower
optimal value (negative shadow price)
6–
Previous Optimal extreme point

New 4–
Constraint
C with
increased
RHS
2–

– | | | | | |
0 2 4 6 8 10 12
X1
Optimal value decreases (negative
shadow price for constraint C)
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-26
Changing RHS in Minimization Problem

X2
Constraint A

6–
Optimal extreme point (2,4) Optimal value=8

4–

Constraint C

2–
Constraint B

– | | | | | |
0 2 4 6 8 10 12
X1

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-27


Changing RHS in Minimization Problem

X2
New RHS of A goes up
Constraint A
with 6–
increased
RHS Previous Optimal extreme point

4–

2–

– | | | | | |
0 2 4 6 8 10 12
X1

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-28


Changing RHS in Minimization Problem

X2
New
Constraint A RHS of A goes up
with 6–
increased
RHS Previous Optimal
extreme point

4– New Optimal
extreme point

2–

– | | | | | |
0 2 4 6 8 10 12
X1
Optimal value increases (positive shadow price for constraint A)
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-29
Introduction to Integer Programming

 Not every problem faced by businesses can easily


fit into a neat linear programming context.
 A large number of business problems can be
solved only if variables have integer values.
 Linear programming requires linear models, and
nonlinear programming allows objectives and
constraints to be nonlinear.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-30


Integer Programming
 An integer programming model is one where one
or more of the decision variables has to take on
an integer value in the final solution.
 There are three types of integer programming
problems:
1. Pure integer programming where all variables
have integer values .
2. Mixed-integer programming where some but
not all of the variables will have integer
values.
3. Zero-one integer programming are special
cases in which all the decision variables must
have integer solution values of 0 or 1.
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-31
Harrison Electric Company Example of
Integer Programming
 The Company produces two products popular
with home renovators, old-fashioned chandeliers
and ceiling fans.
 Both the chandeliers and fans require a two-step
production process involving wiring and
assembly.
 It takes about 2 hours to wire each chandelier and
3 hours to wire a ceiling fan.
 Final assembly of the chandeliers and fans
requires 6 and 5 hours, respectively.
 The production capability is such that only 12
hours of wiring time and 30 hours of assembly
time are available.
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-32
Harrison Electric Company Example of
Integer Programming
 Each chandelier produced nets the firm $7 and
each fan $6.
 Harrison’s production mix decision can be
formulated using LP as follows:

Maximize profit = $7X1 + $6X2


subject to 2X1 + 3X2 ≤ 12 (wiring hours)
6X1 + 5X2 ≤ 30 (assembly hours)
X1, X2 ≥ 0 (nonnegativity)
where
X1 = number of chandeliers produced
X2 = number of ceiling fans produced

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-33


Harrison Electric Problem

Figure 10.1

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-34


Harrison Electric Company

 The production planner recognizes this is an


integer problem.
 His first attempt at solving it is to round the
values to X1 = 4 and X2 = 2.
 However, this is not feasible.
 Rounding X2 down to 1 gives a feasible solution,
but it may not be optimal.
 This could be solved using the enumeration
method, but enumeration is generally not
possible for large problems.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-35


Integer Solutions to the Harrison
Electric Company Problem
CHANDELIERS (X1) CEILING FANS (X2) PROFIT ($7X1 + $6X2)
0 0 $0
1 0 7
2 0 14
3 0 21
4 0 28
5 0 35 Optimal solution to
0 1 6 integer programming
1 1 13 problem
2 1 20
3 1 27
4 1 34 Solution if
0 2 12 rounding is used
1 2 19
2 2 26
3 2 33
0 3 18
Table 10.1
1 3 25
0 4 24
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-36
Harrison Electric Company

 The rounding solution of X1 = 4, X2 = 1


gives a profit of $34.
 The optimal solution of X1 = 5, X2 = 0 gives
a profit of $35.
 The optimal integer solution is less than
the optimal LP solution.
 An integer solution can never be better
than the LP solution and is usually a
lesser solution.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-37


Using Software to Solve the Harrison
Integer Programming Problem
Excel 2010 Solver Solution for Harrison Electric
Problem

Program 10.2

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-38


Modeling With 0-1 (Binary) Variables

 We can demonstrate how 0-1 variables


can be used to model several diverse
situations.
 Typically a 0-1 variable is assigned a value
of 0 if a certain condition is not met and a
1 if the condition is met.
 This is also called a binary variable.

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 10-39


Assignment Problem (Binary Model)
 There are five operators available. The table below tells us
how many units each operator can produce when placed at
machines A-D.

 The objective is to maximize the number of units produced


per day
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-40
Assignment Problem (Binary Model)

 We define binary decision variables:


xij=1 if operator i is placed at machine j. Otherwise xij=0
where i=1,…,5 and j=A,..,D.
 The objective function is

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-41


Assignment Problem (Binary Model)

 First set of constraints is given by that each


machine needs one and only one operator

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-42


Assignment Problem (Binary Model)

 Second set of constraints says that an


operator can be either assigned or not to a
machine

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-43


Assignment Problem (Binary Model)

 The last set of constraints requires all


variables are binary variables
 This can be done by requiring decision
variables to be binary in solver

Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-44


Copyright

All rights reserved. No part of this publication may be


reproduced, stored in a retrieval system, or transmitted, in
any form or by any means, electronic, mechanical,
photocopying, recording, or otherwise, without the prior
written permission of the publisher. Printed in the United
States of America.
Copyright ©2012 Pearson Education, Inc. publishing as Prentice Hall 7-45

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy