Uploaded by Luyi Zeng

Session 4 - LP - Goal programming-sensitive analysis

advertisement
Session 4:
sensitive analysis and goal
programming
M’hammed SAHNOUN
E-mail:msahnoun@cesi.fr
lundi 29 janvier 2024
1
Sensitive analysis
lundi 29 janvier 2024
2
Warm up
• Castor Pottery Company
– Produce 2 types of pots (A and B);
– Profit of pot A ($40) and pot B ($50);
– Pot A uses 1h of worker 1 and 4 Kg of clay;
– Pot B uses 2h of worker 1 and 3 Kg of clay;
– Worker 1 works 40h per week;
– Raw material per week is 120 Kg of clay.
lundi 29 janvier 2024
3
Maximization
• Variables: x1 οƒ  Quantity of pot A
x2 οƒ  Quantity of pot B
• Objective
Max
z = 40x1 + 50x2
Subject to (ST)
1x1 + 2x2 < 40 (hours)
4x1 + 3x2 < 120 (kg)
x1, x2 > 0
lundi 29 janvier 2024
4
Graphic solution
X2
50 –
Iso-Profit
40 X1 + 50 X2 = 1 360
Inclination = -40/50 = -0.8
Nombre de pot B
40 – Constraint (material)
30 –
Optimal solution
X1 = 24, X2 = 8
Z = $1 360
20 –
–
10 –
–
|–
0
Constraint (Labor)
|
10
|
20
|
30
|
40
|
50
X1
Nombre de pot A
lundi 29 janvier 2024
5
Changing objective function
coefficients
• Variables: x1 οƒ  Quantity of pot A
x2 οƒ  Quantity of pot B
• Objective
Max
𝑴𝒂𝒙 z 𝒛= 40x
= 𝟏𝟎𝟎
× π’™2𝟏 + πŸ“πŸŽ × π’™πŸ
1 + 50x
Subject to (ST)
πŸπ’™πŸ + πŸπ’™πŸ ≤ πŸ’πŸŽ (hours)
πŸ’π’™πŸ + πŸ‘π’™πŸ ≤ 𝟏𝟐𝟎 (kg)
π’™πŸ, π’™πŸ ≥ 𝟎
lundi 29 janvier 2024
6
max
lundi 29 janvier 2024
7
Graphic solution
𝑴𝒂𝒙 𝒛 = 𝟏𝟎𝟎 × π’™πŸ + πŸ“πŸŽ × π’™πŸ
X2
50 –
Inclination = -100/50 = -2
Product 2
40 –
30 –
20 –
–
10 –
Optimal solution
X1 = 30, X2 = 0
–
|–
0
|
10
|
20
|
30
|
40
|
50
X1
Product 1
lundi 29 janvier 2024
8
Changing objective function
coefficients
• Variables: x1 οƒ  Quantity of pot A
x2 οƒ  Quantity of pot B
• Objective
Max
Max zz==40x1
40x1 + 100x2
50x2
Subject to (ST)
1x1 + 2x2 < 40 (hours)
4x1 + 3x2 < 120 (kg)
x1, x2 > 0
lundi 29 janvier 2024
9
Graphic solution
X2
50 –
Product 2
40 –
Optimal Solution
X1 = 0, X2 = 20
30 –
20 –
Inclination =- 20/50 = -0.4
–
10 –
–
|–
0
|
10
|
20
|
30
|
40
|
50
X1
Product 1
lundi 29 janvier 2024
10
Sensitivity Analysis
X2
50 –
Iso-Profit
40 X1 + 50 X2 = 1 360
Inclination = -40/50 = -0.8
Nombre de pot B
40 –
30 –
Optimal solution
X1 = 24, X2 = 8
Z = $1 360
20 –
–
10 –
–
|–
0
|
10
|
20
|
30
|
40
|
50
X1
Nombre de pot A
lundi 29 janvier 2024
11
Sensitivity Analysis
Product 1
Quantity
24
Objective
$
40.00
Labor
1
Raw Material
4
Product 2
8
$
50.00
2
3
Maximize
$ 1,360.00
40
120
lundi 29 janvier 2024
Comparison
<=
<=
Constraint
40
120
12
Sensitivity Analysis
Microsoft Excel 14.0 Sensitivity Report
Worksheet: [Workbook1.xlsx]Sheet1
Report Created: 10/18/2015 6:38:18 PM
Variable Cells
Cell
Name
$C$5 Quantity Product 1
$D$5 Quantity Product 2
Final Reduced Objective
Allowable Allowable
Value
Cost
Coefficient
Increase
Decrease
24
0
40 26.66666667
15
8
0
50
30
20
The allowable variation of cells C5 and D5 without changing the optimal solution
lundi 29 janvier 2024
13
Sensitivity Analysis
Objective
Max z = 40x1 + 50x2
z = 40x1 + 50x2
Microsoft Excel 14.0 Sensitivity Report
Worksheet: [Workbook1.xlsx]Sheet1
Report Created: 10/18/2015 6:38:18 PM
z = C1x1 + C2x2
25 ≤ C1 ≤ 66.67
30 ≤ C2 ≤ 80
Optimal solution:
x1 = 24
X2 = 8
Variable Cells
Cell
Name
$C$5 Quantity Product 1
$D$5 Quantity Product 2
Final Reduced Objective
Allowable Allowable
Value
Cost
Coefficient
Increase
Decrease
24
0
40 26.66666667
15
8
0
50
30
20
lundi 29 janvier 2024
14
Which resource to invest?
• Variables: x1 οƒ  Quantity of pot A
x2 οƒ  Quantity of pot B
• Objective
Max
z = 40x1 + 50x2
Subject to (ST)
1x
40 (hours)
(hours)
1x11 ++ 2x
2x22 << 60
4x1 + 3x2 < 120 (kg)
x1, x2 > 0
lundi 29 janvier 2024
15
Graphic solution
X2
50 –
Optimal solution (2)
X1 = 12 X2 = 24
Z2 = $1 680
Nombre de pot B
40 – Constraint (material)
30 –
Optimal solution (1)
X1 = 24, X2 = 8
Z1 = $1 360
20 –
–
10 –
–
|–
0
|
10
|
20
|
30
|
40
Nombre de pot A
lundi 29 janvier 2024
|
50
Constraint (Labor)
1x1 + 2x2 < 60 (hours)
X1
Constraint (Labor)
1x1 + 2x2 < 40 (hours)
16
Graphic solution
X2
50 –
Nombre de pot B
40 – Constraint (material)
30 –
20 –
–
10 –
–
|–
0
|
10
|
20
|
30
|
40
Nombre de pot A
lundi 29 janvier 2024
|
50
Constraint (Labor)
1x1 + 2x2 < 60 (hours)
X1
Constraint (Labor)
1x1 + 2x2 < 40 (hours)
17
Solver solution
Constraints
Final Shadow Constraint
Cell
Name
Value
Price
R.H. Side
$E$7 Labor Maximize
40
16
40
$E$8 Raw Material Maximize
120
6
120
1x1 + 2x2 < 30 (hours)
Allowable Allowable
Increase
Decrease
40
10
40
60
1x1 + 2x2 < 80 (hours)
1 increase of labor οƒ  $16 increase of profit
4x1 + 3x2 < 60 (Kg)
4x1 + 3x2 < 160 (Kg)
1 increase of raw material $6 increase of profit
lundi 29 janvier 2024
18
lundi 29 janvier 2024
19
goal programming
lundi 29 janvier 2024
21
Goal Programming
 Firms usually have more than one goal. For example,
οƒ˜ maximizing total profit,
οƒ˜ maximizing market share,
οƒ˜ maintaining full employment,
οƒ˜ providing quality ecological management,
οƒ˜ minimizing noise level in the neighborhood, and
οƒ˜ meeting numerous other non-economic goals.
 It is not possible for LP to have multiple goals unless they
are all measured in the same units (such as dollars),
οƒ˜ a highly unusual situation.
 An important technique that has been developed to
supplement LP is called goal programming.
lundi 29 janvier 2024
22
Goal Programming
(continued)
 Goal programming “satisfices,”
 as opposed to LP, which tries to “optimize.”
 Satisfice means coming as close as possible to reaching goals.
 The objective function is the main difference
between goal programming and LP.
 In goal programming, the purpose is to minimize
deviational variables,
 which are the only terms in the objective function.
 When the goal programming model is formulated,
the computational algorithm is almost the same as a
minimization problem solved by the simplex method.
lundi 29 janvier 2024
23
Goal Programming Versus Linear
Programming
 Multiple goals (instead of one goal)
 Deviational variables minimized (instead of
maximizing profit or minimizing cost of LP)
 “Satisficing” (instead of optimizing)
 Deviational variables are real (and replace slack
variables)
lundi 29 janvier 2024
26
Example of Goal Programming: Harrison
Electric Company Revisited
 If Harrison’s management had a single goal (profit
maximization), LP could be used to find the optimal solution
 Let’s assume that the firm is moving to a new location during a
particular production period and feels that maximizing profit is
not a realistic goal
 Management sets a profit level, which would be satisfactory
during the adjustment period, of $30
 We now have a goal programming problem in which we want
to find the production mix that achieves this goal as closely as
possible, given the production time constraints.
Direction générale
lundi 29 janvier 2024
27
Example of Goal Programming: Harrison
Electric Company Revisited
 To illustrate the formulation of a goal programming problem,
let’s look back at the Harrison Electric Company case presented
earlier in this chapter as an integer programming problem. That
problem’s LP formulation, you recall, is:
Where :
X1 = number of chandeliers produced
X2= number of ceiling fans produced
Direction générale
lundi 29 janvier 2024
28
Example of Goal Programming: Harrison
Electric Company Revisited
 We first define two deviational variables:
 Harrison Electric problem as a single-goal
programming model :
minimize the profit target d1- + d1+
subject to :
Direction générale
lundi 29 janvier 2024
29
Example of Goal Programming
Harrison Electric Revisited
Goals Harrison’s management wants to achieve, each equal in
priority:
 Goal 1: to produce as much profit above $30 as possible during
the production period.
 Goal 2: to fully utilize the available wiring department hours.
 Goal 3: to avoid overtime in the assembly department.
 Goal 4: to meet a contract requirement to produce at least seven
ceiling fans.
lundi 29 janvier 2024
30
Example of Goal Programming
Harrison Electric Revisited
Need a clear definition of deviational variables, such as :
d1– = underachievement of the profit target
d1+ = overachievement of the profit target
d2– = idle time in the wiring dept. (underused)
d2+ = overtime in the wiring dept. (overused)
d3– = idle time in the assembly dept. (underused)
d3+ = overtime in the wiring dept. (overused)
d4– = underachievement of the ceiling fan goal
d4+ = overachievement of the ceiling fan goal
lundi 29 janvier 2024
31
Analysis of First and
Second Goals
lundi 29 janvier 2024
32
Analysis of All Four
Priority Goals
Management is unconcerned about whether there
is overachievement of the profit goal, overtime in
the wiring department, idle time in the assembly
department, or more than seven ceiling
fans are produced: hence, d1+, d2+ , d3- and d4+
may be omitted from the objective function. The
new objective function and constraints are
lundi 29 janvier 2024
33
Ranking Goals with Priority Levels
A key idea in goal programming is
that one goal is more important than
another. Priorities are assigned to
each deviational variable.
Priority 1 is infinitely more important than Priority 2,
which is infinitely more important than the next goal, and
so on.
The constraints remain identical to the previous ones.
lundi 29 janvier 2024
34
Analysis of First Goal
Direction générale
lundi 29 janvier 2024
35
Analysis of First and Second Goals
Direction générale
lundi 29 janvier 2024
36
Analysis of All Four Priority Goals
Direction générale
lundi 29 janvier 2024
37
Goal Programming with Weighted Goals
Priority levels  any goal in the top priority level is infinitely more
important than the goals in lower priority levels.
• However, there may be times when one goal is more important
than another goal, but it may be only two or three times as
important.
Weighted Goals  Instead of placing these goals in different priority
levels, they would be placed in the same priority level but with
different weights.
• The coefficients in the objective function for the deviational
variables include both the priority level and the weight.
• If all goals are in the same priority level, then simply using the
weights as objective function coefficients is sufficient.
Direction générale
lundi 29 janvier 2024
38
Exercise 1
Consider the Harrison Electric example, in which the least important goal is goal 4
(produce at least seven ceiling fans).
Suppose Harrison decides to add another goal of producing at least two chandeliers.
The goal of seven ceiling fans is considered twice as important as this goal, so both of
these should be in the same priority level.
The goal of 2 chandeliers is assigned a weight of 1, while the 7 ceiling fan goal will be
given a weight of 2. Both of these will be in priority level 4.
A new constraint (goal) would be added:
The new objective function value would be:
Direction générale
lundi 29 janvier 2024
39
Exercise 2
Use the Excel solver to find the optimal solution
lundi 29 janvier 2024
40
Exercise 3
Graphically solve the following problem:
(a) What is the optimal solution?
(b) Change the right-hand side of constraint 1 to 11 (instead of 10) and resolve
the problem. How much did the profit increase as a result of this?
(c) Change the right-hand side of constraint 1 to 6 (instead of 10) and resolve the
problem. How much did the profit decrease as a result of this?
Looking at the graph, what would happen if the right-hand-side value were to go
below 6?
(d) Change the right-hand-side value of constraint 1 to 5 (instead of 10) and
resolve the problem. How much did the profit decrease from the original profit as
a result of this?
(e) Using the computer output on this page, what is the dual price of constraint 1?
What is the lower bound on this?
(f) What conclusions can you draw from this regarding the bounds of the righthand-side values and the dual price?
lundi 29 janvier 2024
41
lundi 29 janvier 2024
42
lundi 29 janvier 2024
43
lundi 29 janvier 2024
44
Network analysis
lundi 29 janvier 2024
45
lundi 29 janvier 2024
46
Network elements
Nodes
A
Link, arcs, edges or branches
B
Direct arc
From A to C
Path between nodes: A-C-D
C
Indirect arc
From C to D / From D to C
lundi 29 janvier 2024
D
47
Terminology of Networks
Indirected path between nodes: A-B-E or E-B-A
A
B
C
D
lundi 29 janvier 2024
E
48
Terminology of Networks
Transshipment node:
Flow in = flow out
A
Arc capacity
10
B
E
Tree:
Connected network with no cycle
C
Supply node:
Flow out
D
Demand node:
Flow in
lundi 29 janvier 2024
49
Example
• The road system for Entertaining Park
– Location O: park entrance
– Location T: a scenic wonder
– Trams transport sightseers from park
entrance to location T and back
lundi 29 janvier 2024
50
Example
• Park management faces three problems
– Determine the route with the smallest total
distance between two nodes (fastest,
cheapest, etc.)
• A shortest-path problem
– Determine where telephone lines should be
laid
• A minimum spanning tree problem
– Determine how to route tram to maximize
number of people transported during peak
season
• A maximum flow problem
lundi 29 janvier 2024
51
Minimum spanning tree
• Similar to shortest path problem, however a little bit less
complex.
• Shortest patch problem should consider the distance since
the origin;
• Minimum spanning tree considers the minimum distance
between two nodes;
• A shortest route that can connect all the nodes in the network,
but not necesarely;
• Important in several situations, such as telecomunication
network, water pipelines, transportation network to minimize
the cost;
lundi 29 janvier 2024
52
Minimum spanning tree
• Algorithm:
1. Select any starting node (conventionally, node 1 is selected).
2. Select the node closest to the starting node to join the
spanning tree.
3. Select the closest node not currently in the spanning tree.
4. Repeat step 3 until all nodes have joined the spanning tree.
lundi 29 janvier 2024
53
Minimum spanning tree
A
T
B
O
D
E
C
lundi 29 janvier 2024
54
Shortest-path problem
• What is the shortest path between O and E?
• What is the shortest path between O and T?
lundi 29 janvier 2024
55
Shortest-path problem
• Algorithm
1. Iteration process
2. Select the node of origin;
3. Include it in the permanent node set;
4. Identify the adjacent nodes that are linked to the
permanent set of nodes;
5. Select the node with the shortest accumulated path among
the previous node set;
6. Include the selected node into the permanent node set
7. Repeat the 4 to 6 until the destination node is included in
the permanent set;
lundi 29 janvier 2024
56
Shortest-path problem
2
A
B
O
C
lundi 29 janvier 2024
57
Shortest-path problem
2
A
13
O
4
8
B
D
T
E
C
7
4
lundi 29 janvier 2024
58
Shortest-path problem
Summary
Path
1
2
3
4
5
6
Shortest path
O-C
O-A
O-A-B
O-A-B-E
O-A-B-E-D
O-A-B-E-D-T
lundi 29 janvier 2024
Distance
4
2
4
7
8
13
59
Shortest-path problem
How to transform the algorithm into OR algebric form?
Reformulate the shortest path problem οƒ  What are the links that
should be considered to create the shortest patch between two
nodes?
lundi 29 janvier 2024
60
Shortest-path problem
• Variables:
– Links between each nodes
{ XOA; XOB; XOC; XAB; XAD; XBE; XBD; XCB; XCE; XED; XET; XDT }
• Objective:
–
Minimize the distance;
Z= 2XOA+5XOB+4XOC+2XAB+7XAD+3XBE+4XBD+1XCB+4XCE+1XED+7XET+5XDT
• Subject to:
– Flow conservation (initial flow, end flow, flow in = flow out);
– Assume that the flow is in one direction;
– Integers (1 or 0)
lundi 29 janvier 2024
61
Shortest-path problem
Subject to:
XOA+ XOB+ XOC = 1 (flow conservation – Begin)
XOA = XAB + XAD (flow conservation οƒ  flow in should be = flow out)
XOA-XAB-XAD = 0
XOB+ XAB+ XCB- XBE- XBD=0
XOC- XCB- XCE=0
XAD+ XBD+ XED- XDT=0
XBE+ XCE- XED- XET=0
XDT + XET=1
lundi 29 janvier 2024
62
Excel Solver
variables
=B3+B5+B9-B7-B8
XOB+ XAB+ XCB- XBE- XBD=0
=B2+B3+B4
XOA+ XOB+ XOC = 1
=SUMPRODUCT(B2:B13,G2:G13)
lundi 29 janvier 2024
63
Maximum flow problem
General problem description
• All flow through a directed, connected network originates at a
source, and terminates at a sink
• Remaining nodes are transshipment nodes
• Flow through an arc is allowed in only one direction (indicated
by the arrowhead)
• Maximum flow is given by arc capacity
• Objective: maximize total flow from source to sink
Application:
• Maximum flow of cars in the road system,
• Maximum flow in the water pipe,
• Distribution network from manufacture to customer
lundi 29 janvier 2024
64
Maximum flow problem
• Algorithm:
1. Arbitrarily select any path in the network from origin to
destination.
2. Adjust the capacities at each node by subtracting the
maximal flow for the path selected in step 1.
3. Add the maximal flow along the path in the opposite
direction at each node.
4. Repeat steps 1, 2, and 3 until there are no more paths with
available flow capacity.
lundi 29 janvier 2024
65
Maximum flow problem
A
3
1
5
7
O
B
4
4
D
5
1
T
9
1
C
O
5
2
E
4
B
O
lundi 29 janvier 2024
6
5
2
B
66
Maximum flow problem
A
1
25
O
30
73
3
4
0
4
4
2
1 +
14 Max Total
B
04
T
D
5
1
C
26
9
1
E
40
62
3
4
4
2
1
• Iteration 4: Path: O-B-E-T: 2
• Iteration 5: Path: O-A-B-E-D-T: 1
lundi 29 janvier 2024
67
Maximum flow problem
A
3
1
5
7
O
B
1
4
9
4
T
D
5
1
C
E
6
4
How to transform the algorithm into OR algebric form?
Reformulate the maximum flow problem οƒ  What are the
maximum flows of each arc that should considered to create the
total maximum flow between the origin (source) to the end (sink)?
lundi 29 janvier 2024
68
Maximum flow problem
• Variables:
– Links between each nodes
{ XOA; XOB; XOC; XAB; XAD; XBE; XBD; XCB; XCE; XED; XET; XDT ; XTO }
• Objective:
–
Maximize the flow;
Z = XTO
• Subject to:3
A
– Flow conservation (initial flow, end flow, flow in = flow out);
1that the flow is in one direction;
5
– Assume
– Integers
9
7
4
O
B
4
1
T
D
5
1
C
4
E
lundi 29 janvier 2024
6
69
Maximum flow problem
Subject to:
XTO-XOA- XOB- XOC = 0 (flow conservation)
XOA = XAB + XAD (flow conservation οƒ  flow in should be = flow out)
XOA-XAB-XAD = 0
XOB+ XAB- XCB- XBE- XBD=0
XOC+XBC- XCE=0
XAD+ XBD+ XED- XDT=0
XOA ≤ 5; XOB ≤ 7; XOC ≤ 4; XAB ≤ 1;
XBE+ XCE- XED- XET=0
XAD ≤ 3; XBE ≤ 5; XBD ≤ 4; XBC ≤ 1;
XDT + XET-XTO=0
XCE ≤ 4; XED ≤ 1; XET ≤ 6
3
A
1
5
7
O
4
B
4
D
5
1
9
T
1
C2024
lundi 29 janvier
4
E
6
70
Excel Solver
variables
=B4+B9-B10
XOC+XOB-XCE = 0
=B14 (XTO)
=B14-B2-B3-B4
XTO-XOA- XOB+ XOC =0
=B6
XAD <= 3
lundi 29 janvier 2024
71
Minimum vertex cover
How to transform the algorithm into OR algebric form?
Reformulate the minimum vertex cover problem οƒ  What is the
minimum number of vertices required to cover the whole graph
with an edge from the chosen set of vertices?
lundi 29 janvier 2024
72
Minimum vertex cover
• Variables:
– Nodes
{ XA; XB; XC; XD; XE; XO; XT}
• Objective:
–
Minimize the number of chosen nodes
• Subject to:
– Each node is touched by at least one node in the chosen set
– Integers
A
O
B
C
lundi 29 janvier 2024
D
E
T
73
Minimum vertex cover
Minimize
෍
𝒙𝒗
𝒗∈𝑡𝒐𝒅𝒆𝒔
Subject to:
Xv+Xu≥ 1 for all (u,v) ∈ Edges
Xu∈ {0,1} for all u ∈ Nodes
3
A
1
5
7
O
4
B
4
D
5
1
9
T
1
C2024
lundi 29 janvier
4
E
6
74
Exercises
One of Shanghai Airlines’ flights is about to take off from Shanghai for a nonstop
flight to Paris. There is some flexibility in choosing the precise route to be taken,
depending upon weather conditions. The following network depicts the possible
routes under consideration, where SH and PR are Shanghai and Paris,
respectively, and the other nodes represent various intermediate locations.
The winds along each arc greatly affect the
flying time (and so the fuel consumption).
Based on current meteorological reports, the
flying times (in hours) for this particular flight
are shown next to the arcs. Because the fuel
consumed is so expensive, the management of
Shanghai Airlines has established a policy of
choosing the route that minimizes the total
flight time.
lundi 29 janvier 2024
75
Exercises
A
4.6
3.5
3.4
D
3.4
3.6
SH
4.7
3.2
B
E
3.3
4.2
3.6
PR
3.8
3.5
C
3.4
F
• Which is the shortes path?
• Solve graphically and then through solver
lundi 29 janvier 2024
76
Exercises
For the network shown below, find the flow pattern giving the
maximum flow from the source to the sink, given that the arc
capacity from node i to node j is the number nearest node i along the
arc between these nodes.
Solve it graphically and then through Solver
lundi 29 janvier 2024
77
lundi 29 janvier 2024
78
Download