modelling with linear programming · modelling with linear programming jesper larsen ... cpm =...

32
1 Jesper Larsen Informatics and Mathematical Modelling / Operations Research Modelling with linear programming Jesper Larsen [email protected] Informatics and Mathematical Modeling Technical University of Denmark

Upload: doandang

Post on 13-Jul-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

1Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Modelling with linear programmingJesper Larsen

[email protected]

Informatics and Mathematical Modeling

Technical University of Denmark

2Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Decision models

Real world Model

interpretation

abstraction

A model is a carefully selected abstraction ofreality.

A model always simplifies reality.

3Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

ModellingYou incorporate enough detail into your modelso that

the result meets your needs,it is consistent with the data you haveavailable, andit can be analyzed in the time you have todevote to the process.

4Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Project ManagementProject Management is a set of techniques thathelps management manage large-scale projects;projects that typically require coordination ofnumerous tasks throughout the organisation.

PERT = Program Evaluation and ReviewTechnique

CPM = Critical Path Method

The methods where developed independently butare now often used interchangeably and arecombined in one acronym: PERT/CPM.

5Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

ExampleThe Reliable Construction Company has just madethe winning bid of a $ 5.4 million contract toconstruct a new plant.

There are the following constraints:

a penalty of $ 300,000, if Reliable has notcompleted construction by the deadline of 47weeks from now

a bonus for speedy construction of $ 150,000 tobe paid if the plant is ready within 40 weeks.

5Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

ExampleThe Reliable Construction Company has just madethe winning bid of a $ 5.4 million contract toconstruct a new plant.

There are the following constraints:

a penalty of $ 300,000, if Reliable has notcompleted construction by the deadline of 47weeks from now

a bonus for speedy construction of $ 150,000 tobe paid if the plant is ready within 40 weeks.

5Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

ExampleThe Reliable Construction Company has just madethe winning bid of a $ 5.4 million contract toconstruct a new plant.

There are the following constraints:

a penalty of $ 300,000, if Reliable has notcompleted construction by the deadline of 47weeks from now

a bonus for speedy construction of $ 150,000 tobe paid if the plant is ready within 40 weeks.

6Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

QuestionsHow can the project be displayed graphically tobetter visualize the flow of the activities?

What is the total time required to complete theproject if no delays occur?

When do the individual activities need to startand finish (at the latest) to meet this projectcompletion time?

When can the individual activities start andfinish (at the earliest) if no delays occur?

6Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

QuestionsHow can the project be displayed graphically tobetter visualize the flow of the activities?

What is the total time required to complete theproject if no delays occur?

When do the individual activities need to startand finish (at the latest) to meet this projectcompletion time?

When can the individual activities start andfinish (at the earliest) if no delays occur?

6Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

QuestionsHow can the project be displayed graphically tobetter visualize the flow of the activities?

What is the total time required to complete theproject if no delays occur?

When do the individual activities need to startand finish (at the latest) to meet this projectcompletion time?

When can the individual activities start andfinish (at the earliest) if no delays occur?

7Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

More questionsWhich are the critical bottlenect activities whereany delays must be avoided to prevent delayingproject completion?

For the other activities, how much delay can betolerated without delaying the projectcompletion?

If extra money is spent to expedite the project,what is the least expensive way of attempting tomeet the target completion time?

7Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

More questionsWhich are the critical bottlenect activities whereany delays must be avoided to prevent delayingproject completion?

For the other activities, how much delay can betolerated without delaying the projectcompletion?

If extra money is spent to expedite the project,what is the least expensive way of attempting tomeet the target completion time?

7Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

More questionsWhich are the critical bottlenect activities whereany delays must be avoided to prevent delayingproject completion?

For the other activities, how much delay can betolerated without delaying the projectcompletion?

If extra money is spent to expedite the project,what is the least expensive way of attempting tomeet the target completion time?

8Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Project NetworksProject networks consists of a number of nodes anda number of arcs. There are two alternatives forpresenting project networks.

Activity-on-arc (AOA): Each activity ispresented as a an arc. A node is used toseparate an activity from each of its immediatepredecessors.

Activity-on-node (AON): Each activity isrepresented by a node. The arcs are used toshow the precedence relationships.

9Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

AON vs. AOAAON are considerably easier to construct thanAOA.

AON are easier to understand than AOA forinexperienced users.

AON are easier to revise that AOA when thereare changes in the network.

10Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Critical pathA path through a project network is one of theroutes following the arcs from the START node tothe FINISH node. The length of a path is the sum ofthe (estimated) durations of the activities on thepath.St->A->B->C->D->G->H->M->Fi 40St->A->B->C->E->H->M->Fi 31St->A->B->C->E->F->J->K->N->Fi 43St->A->B->C->E->F->J->L->N->Fi 44St->A->B->C->I->J->K->N->Fi 41St->A->B->C->I->J->L->N->Fi 42

10Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Critical pathA path through a project network is one of theroutes following the arcs from the START node tothe FINISH node. The length of a path is the sum ofthe (estimated) durations of the activities on thepath.St->A->B->C->D->G->H->M->Fi 40St->A->B->C->E->H->M->Fi 31St->A->B->C->E->F->J->K->N->Fi 43St->A->B->C->E->F->J->L->N->Fi 44St->A->B->C->I->J->K->N->Fi 41St->A->B->C->I->J->L->N->Fi 42

10Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Critical pathA path through a project network is one of theroutes following the arcs from the START node tothe FINISH node. The length of a path is the sum ofthe (estimated) durations of the activities on thepath.St->A->B->C->D->G->H->M->Fi 40St->A->B->C->E->H->M->Fi 31St->A->B->C->E->F->J->K->N->Fi 43St->A->B->C->E->F->J->L->N->Fi 44St->A->B->C->I->J->K->N->Fi 41St->A->B->C->I->J->L->N->Fi 42

11Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Scheduling individual activitiesThe PERT/CPM scheduling procedure begins byaddressing when the activities need to start andfinish at the earliest if no delays occur?

Having no delays mean 1) actual duration equalsestimated duration and 2) each activity begins assoon as all its immediate predecessors are finished.

ES = Earliest start for a particular activity

EF = Earliest finish for a particular activity

where EF = ES + duration

11Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Scheduling individual activitiesThe PERT/CPM scheduling procedure begins byaddressing when the activities need to start andfinish at the earliest if no delays occur?Having no delays mean 1) actual duration equalsestimated duration and 2) each activity begins assoon as all its immediate predecessors are finished.

ES = Earliest start for a particular activity

EF = Earliest finish for a particular activity

where EF = ES + duration

11Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Scheduling individual activitiesThe PERT/CPM scheduling procedure begins byaddressing when the activities need to start andfinish at the earliest if no delays occur?Having no delays mean 1) actual duration equalsestimated duration and 2) each activity begins assoon as all its immediate predecessors are finished.

ES = Earliest start for a particular activity

EF = Earliest finish for a particular activity

where EF = ES + duration

12Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Earliest Start Time RuleThe earliest start time of an activity is equal to thelargest of the earliest finish times of its immediatepredecessors, or

ES = max { EF of immediate predecessors }

13Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Finding latest start and finish timesThe latest start time for an activity is the latestpossible time that it can start without delaying thecompletion of the project (so the finish node still isreached at its earliest finish time), assuming nosubsequent delays in the project. The latest finishtime has the corresponding definition with respectto finishing the activity.

LS = latest start time for a particular activity

LF = latest finish time for a particular activity

where LS = LF - duration

13Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Finding latest start and finish timesThe latest start time for an activity is the latestpossible time that it can start without delaying thecompletion of the project (so the finish node still isreached at its earliest finish time), assuming nosubsequent delays in the project. The latest finishtime has the corresponding definition with respectto finishing the activity.

LS = latest start time for a particular activity

LF = latest finish time for a particular activity

where LS = LF - duration

14Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Latest Finish Time RuleThe latest finish time of an activity is equal to thesmallest of the latest start times of its immediatesuccessors, or

LF = min { LS of the immediate successors }

15Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Identifying slackThe slack for an activity is the difference betweenits latest finish time and its earliest finish time.

Slack Activities0 A, B, C, E, F, J, L, Npos. D, G, H, I, K, M

Each activity with zero slack is on a critical paththrough the project network such that any delayalong this path will delay project completion.

16Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Crashing an activityCrashing an activity refers to taking (costly)measures to reduce the duration of an activitybelow its normal time. Crashing the project refersto crashing a number of activities in order to reducethe duration of the project below its normal value.

normal timecrash time

crash cost

normal cost

Normal

Crash

17Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Considering Time-Cost trade-offsWhat is the least expensive way of crashing someactivities to reduce the estimated project duration tothe specified level?

One way: look at marginal costs.

18Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Using LP to make crashing decisionsRestatement of the problem: Let Z be the total costof crashing activities. The problem then is tominimize Z, subject to the constraint that projectduration must be less than or equal to the timedesired by the project manager.

19Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Modelling using LPWhat are our decision variables? xj = reductionin the duration of activity j due to crashing thisactivity.

How will our objective function look like? Theobjective function is to minimize the total cost ofcrashing activities:min 100, 000xA + 50, 000xB + . . . + 60, 000xN .

To impose the constraint that the project mustbe finished in less than or equal to a certainnumber of weeks we impose another variable:yFi.

20Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Modelling using LP (cont)To help the LP assign the appropiate value toyF given the values of xA, xB, . . . it is convenientto introduce: yj = start time of activity j.

NOW since the start time of each activity isdirectly related to to the start time and durationof each of its immediate predecessors we get:

start time of this activity ≥ (start time -duration) for this immediate predecessor

21Jesper Larsen

Informatics and Mathematical Modelling / Operations Research

Putting it all together1. min 100, 000xA + 50, 000xB + . . . + 60, 000xN

2. Maxiumum reduction constraints:xA ≤ 1, xB ≤ 2, . . . , xN ≤ 3.

3. Nonnegativity constraints: xj ≥ 0, yj ≥ 0, yFi ≥ 0

4. Start time constraints: For each arc we get arelationship between the two end points:yC ≥ yB + 4− xB, yD ≥ yC + 10− xC etc.

5. Project duration constraints: yFi ≤ 40