Download WRL3684.tmp

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Example of rewriting as a transportation problem
The water of 3 rivers must be distributed over 4
cities. The costs per unit of water are in the table.
The cities have a minimum demand and a maximal
capacity.
Colombo River
Sacron River
Calorie River
min. demand
maximal cap.
Berdoo
16
14
19
30
50
Los Devils
13
13
20
70
70
San Go
22
19
23
0
30
Hollyglass
17
15
10

supply
50
60
50
First write the problem without minimal demand:
Colombo River
Sacron River
Calorie River
Dummy
demand
Berdoo
16
14
19
0
50
Los Devils
13
13
20
0
70
San Go
22
19
23
0
30
Hollyglass
17
15
M
0
60
Supply
50
60
50
50
The total supply is 160, so Hollyglass will get a
maximum of 160 – (30 + 70 + 0) = 60
Add a dummy river that supplies water to maximal
capacity.
Minimal demand can be satisfied by splitting
cities. The minimal part is not to be provided from
the dummy river.
Colombo R.
Sacron River
Calorie River
Dummy
demand
Berdoo
min
16
14
19
M
30
Berdoo
rest
16
14
19
0
20
Los
Devils
13
13
20
M
70
San Go
Hollyg.
22
19
23
0
30
17
15
M
0
60
50
60
50
50
210
Los Devils cannot have water from the dummy
river.
Hollyglass need not be split, because it will get a
minimum of 160 - (50 + 70 + 30) = 10.
Assignment problems (Ch 8.3)
Assignment problem:
Each of n origin nodes must be coupled 1-1 to
exactly one of n destination nodes. The cost of each
coupling is known. Find an assignment with minimal
total cost.
This is a special case of a transportation problem:
Supply = 1, demand = 1, number suppliers = number
buyers. Simplex on the relaxed problem will
automatically find a binary solution.
Example: Which machine on which location?
Costs
Location 
1
machine
1
13
2
15
3
5
2
16
7
3
12
20
10
4
11
13
6
Costs
Location 
1
machine
1
13
2
15
3
5
dummy1
0
2
16
M
7
0
3
12
20
10
0
4
11
13
6
0
Non-admissible assignments will get cost = big M.
If the numbers do not match: add dummies with cost
0. Those will not be assigned in the end.
Solution: 13, 24, 31, dummy12 Cost = 30.
Hungarian method (Ch 8.4)
The next algorithm (H.W. Kuhn, 1955) solves the
assignment problem for a square cost matrix with
costs  0:
1. Subtract from each element in a column the
smallest number from that column.
2. Subtract from each element in a row the
smallest number from that row.
3. Remove all zeros with a minimal number of
horizontal and/or vertical lines.
If number of lines = number of rows go to 5, else 4
4. Subtract the smallest number that is not
removed from each number that is not removed.
Add the number to each crossing of lines. Go to
3.
5. Assign each row to a column such that that
column has a 0 in that row, and such that each
column is assigned only once.
Subtraction a number from each number in a row
or column does not change the optimal solution:
n
x
i 1
ij
1
n
and
x
j 1
ij
1
This reduces the cost of each solution by the
same fixed number. The reduced costs stay  0. A
solutions with reduced cost = 0 must be optimal.
Subtracting the smallest non-removed number
from each column takes care that all non-removed
numbers stay non-negative, but the removed
zeros will become negative. To repair this, add the
same number to all removed rows and columns.
The effect is that the number is added to the
crossings.
Example:
13 16 12 11
15 M 20 13
5
7 10 6
0
0
0
0
Cost matrix
2
2
0
0
5
1
M-13 7
2
5
0
0
Step 3
0
0
1
0
0
0
0
0
0
0
Step 3: remove
Cannot be done with 3 lines
2 5 1 0
2 M-13 7 0
0 2 5 1
0 0 0 0
After step 1 and 2
2 4 0 0
2 M-14 6 0
0 1 4 1
1 0 0 1
Step 4
0
0
0 0
Step 5
Assignment: 13, 24, 31, 42.
0
0
Project Management
(Ch 9.8 + Ch 22 on CD-ROM)
CPM (Critical Path Method)
Activities with dependencies and fixed duration are
given.
CPM determines the minimal duration of the project.
PERT (Program Evaluation and Review Technique)
Cosiders uncertainties in duration.
Witt PERT probabilities for exceeding time limits
can be estimated.
Both methods were developed end 1950.
Representation of a project as a network can be
done as an
Activity On Arc (AOA) network
Each activity corresponds to an arc.
Activity On Node (AON) network
Each activity corresponds to a node.
Example: B after A, D after B, C after B, E after both
C and D, F after A, G after both C and F, H after E , G.
as AON
as AOA
A project network can be represented in both ways.
Dummy arcs (dotted) may be required to get the
correct dependencies.
AON is easier to create and understand than an
AOA. AOA was used traditionally.
Example: Reliable Construction Co. (8.9)
The table lists activities in a construction project,
with predecessors and estimated duration.
Project as an AON network (with durations)
CPM method
Forward sweep: Determine the Earliest Start Times
(ES) and Earliest Finish Times (EF) from Start to
Finish.
Backward sweep: Determine Latest Start Times (LS)
and Latest Finish Times (LF) from Finish to Start.
Result of the CPM algorithm:
Activities with ES = LS are op the critical path. Such
a path determines the minimal dutration of a project.
Activities on the critieke pad moeten op een vast
tijdstip beginnen en als zo’n activiteit uitloopt, loopt
het project uit.
Kritieke pad in dit voorbeeld: ABCEFJLN.
Een kritiek pad is een langste pad in het netwerk van
Start naar Finish en hoeft niet uniek te zijn.
Crashen van projecten
Neem aan dat de kosten van het versnellen van
projectonderdelen lineair is in de tijdsduur.
Alle mogelijke paden door het project
Het verkorten (crashen) van een taak met kosten
Verkorten van 44 naar 40 weken kan door per week
de goedkoopste taak in het kritieke pad te crashen:
Dus: J en F met 2 weken verkorten. Kosten: $140.000
Als je nóg een week wil verkorten moet je drie
kritieke paden verkorten: ABCDGHM, ABCEFJLN en
ABCIJLN.
Dit kan door één taak te verkorten: B is dan het
goedkoopst, kosten $50.000
Als crashen van B en C $100.000 zou kosten, dan
kun je B of C verkorten ($100.000), maar beter L en
(D of G) ($50.000 + $40.000). Het hoeft dus niet
optimaal te zijn om telkens één activiteit te crashen
Project na crashen van 2 weken J en 2 weken F,
nu met 3 kritieke paden (ABCDGHM, ABCEFJLN,
ABCIJLN).
Crashen met lineair programmeren
xj is de reductie in tijd van activiteit j.
yj is de starttijd van activiteit j.
F is de opvolger van E (F na E)
De duur van E na reductie met xE is 4 – xE.
F komt na E:
Maximale crashduur:
Project moet binnen 40 weken:
Niet-negativiteit:
yF  yE + (4 – xE)
xj  xj, max
yfinish  40
xj, yj  0
Minimaliseer de crashkosten:
Min Z = 100xA + 50xB + … + 60xN
Alle voorwaarden zijn lineair, dus dit is een LP
probleem.
De LP formulering levert als oplossing:
xF = xJ = 2,
rest = 0,
Z = $140.000
Nadeel van LP t.o.v. CPM is dat er één oplossing uit
komt en het langste pad niet gevonden wordt. Een
kritiek pad kun je vinden m.b.v. het duale probleem.
Voorbeeld:
5 activiteiten op de takken met benodigde tijd t12, t13,
t23, t24, t34. Tijdstippen waarop je in de knopen bent:
x1, x2, x3, x4
Min
z.d.d.
en
x4 – x1
x2 – x1  t12
x3 – x2  t23
x3 – x1  t13
x4 – x2  t24
x4 – x3  t34
xj  0
-1
0
-1
0
0
1
-1
0
-1
0
0
1
1
0
-1
0
0
0
1
1
Duale probleem (schaduwprijzen x12, x23, x13, x24, x34):
Max
z.d.d.
en
t12x12 + t23x23 + t13x13 + t24x24 + t34x34
– x12 – x13  –1
-1 0 -1
x12 – x23 – x34  0
1 -1 0
x23 + x13 – x34  0
0 1 1
x24 + x34  1
0 0 0
xij  0
0
-1
0
1
0
0
-1
1
Tel alle ongelijkheden op: 0  0. Dit betekent dat alle
ongelijkheden gelijkheden moeten zijn:
Max
z.d.d.
en
t12x12 + t23x23 + t13x13 + t24x24 + t34x34
– x12 – x13 = –1
x12 – x23 – x34 = 0
x23 + x13 – x34 = 0
x23 +x13 – x34 = 0
x24 + x34 = 1
xij  0
Dit is een netwerkstromingsprobleem in het
bovenstaande netwerk, waarbij xij over tak ij
stroomt, 1 eenheid in knoop 1 in gaat en bij knoop 4
eruit komt.
Vanwege de geheeltalligheidseigenschap is er een
optimale binaire oplossing: een pad van 1 naar 4.
Gemaximaliseerd wordt de totale tijdsduur langs dit
pad. De optimale oplossing is dus een langste pad.
De schaduwprijzen xij geven aan of tak ij in dit
langste pad zit (1) of niet (0).
Je vindt zo één mogelijk kritiek pad.
Voordeel van de LP aanpak is dat het altijd werkt en
je niet hoeft na te denken over hoe je moet crashen,
en dat je niet telkens alle langste paden hoeft te
bepalen.
CPM Methode met Excel Solver
PERT
Tijdsduren worden geschat met drie parameters:
o = optimistische (minimale) schatting voor tijdsduur
m = meest waarschijnlijke tijdsduur
p = pessimistische (maximale) schatting
Er wordt uitgegaan van een Betaverdeling:
Verwachtingswaarde:
Variantie:

o  4m  p
6
 po
2 

 6 
2
De verwachte tijdsduur is een gewogen gemiddelde
van m, o en p, waarin de meest waarschijnlijke
waarde m (top van de verdeling) het zwaarst telt.
Met de meest pessimistische schatting duurt het
project 69 weken, i.p.v. 44. Met de meest
optimistische schatting gaat het in 26 weken.
Aangenomen dat de activiteiten op het kritieke pad
onafhankelijk zijn kun je de variantie van de
doorlooptijd berekenen als som van de varianties
van de onderdelen.
Met de aanname dat de projectduur normaal
verdeeld is (wet van de “grote” aantallen) kun je de
kans schatten dat het project binnen de deadline van
47 weken blijft:
De afwijking is 1 standaarddeviatie.
De kans om hoogstens één standaarddeviatie boven
het gemiddelde te zitten is:
P(T  d) = P(standaard normaal   + 1) =
= 1 – P(standaard normaal >  + 1) =
= 1 – 0.1587 = 0.8413
Bandbreedte in de kosten tijdens het doorlopen van
het project als gevolg van taken die kunnen
schuiven