0% found this document useful (0 votes)
27 views8 pages

Chapter 4

The document discusses project planning and scheduling with precedence constraints. It describes two formats for representing precedence constraints in a graph and mentions some advantages of one format over the other. It also provides an example problem and mathematical model for project scheduling.
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)
27 views8 pages

Chapter 4

The document discusses project planning and scheduling with precedence constraints. It describes two formats for representing precedence constraints in a graph and mentions some advantages of one format over the other. It also provides an example problem and mathematical model for project scheduling.
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/ 8

Ho Chi Minh City International University Scheduling

Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

1 Introduction

This chapter focuses on the planning and scheduling of jobs that are subject to precedence constraints.
Chapter 4: Project Planning and Scheduling The fact that the jobs are subject to precedence constraints implies that a job can start only when all its
predecessors have been completed.
The objective is to minimize the makespan while adhering to the precedence constraints.
Phan Nguyen Ky Phuc The representation of the precedence constraints as a graph may follow either one of two formats: "job-
on-arc" format and "job-on-node" format.
February 28, 2022 In the job-on-arc format, the arcs represent the jobs and the nodes represent the milestones or epochs
In the job-on-node format, the nodes represent the jobs, and the connecting arcs represents precedence
relationships between the jobs.
Contents Although in practice the first format is more widely used than the second, the second has a number of
advantages.
1 Introduction 2 A disadvantage of the job-on-arc format is a necessity for so-called dummy jobs that are needed to enforce
precedence constraints that otherwise would not have been enforcable.
2 Mathematical Model 2

2.1 Cplex Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Critical Path Method (CPM) 4

3.1 Example of Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Program Evaluation and Review Technique (PERT) 6

5 Time Cost Trade Offs: Linear Costs 6

5.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

5.2 Mathematical Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Figure 1: Formats of precedence Graphs


5.3 Cplex Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5.4 Heuristic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Example 1


Consider the problem of setting up a manufacturing facility for a new product. The project consists of eight
5.5 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
jobs. The job descriptions and the time requirements are as follows:

6 Project Scheduling with Workforce Constraints 11 No. Job Description of Job Duration (in week) Immediate Predecessor(s)
1 Design production tooling 4 _
6.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2 Prepare manufacturing drawings 6 _
6.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3 Prepare production facility for new tools and parts 10 _
4 Procure tooling 12 1
6.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 5 Manual testing of software 10 2
6 Kit parts 2 3,4,5
6.3.1 File(*.xlsx). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 7 Orientation of new personnel 4 3,4
6.3.2 File(*.mod) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 8 System testing 2 6,7

6.3.3 File *.dat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Assignment 14 2 Mathematical Model

Parameters
pi be the processing time of job i
Bij = 1 if job i is the immediate predecessor of job j, i.e. i is immediately before job j., otherwise; Bij = 0

1 Chapter 4: Project Planning and Scheduling Page 2


Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

9 s e t o f ( p r e ) B={ <1 ,4 > , <2 ,5 > , <3 ,6 > , <4 ,6 > , <5 ,6 > , <3 ,7 > , <4 ,7 > , <6 ,8 > , <7 ,8 >};
10 dvar f l o a t+ ES [ Nodes ] ;
11 dvar f l o a t+ EC[ Nodes ] ;
12 dvar f l o a t+ LS [ Nodes ] ;
13 dvar f l o a t+ LC [ Nodes ] ;
14 dvar f l o a t+ S l a [ Nodes ] ;
15 dvar f l o a t+ Cmax ;
16 dexpr f l o a t z1=Cmax ;
17 dexpr f l o a t z2=−sum ( i i n Nodes ) S l a [ i ] ;
18 m i n i m i z e s t a t i c L e x ( z1 , z2 ) ;
19 s u b j e c t to {
Figure 2: Example Precedence Graphs 20 f o r a l l ( i i n Nodes ) {
21 Cmax>=EC[ i ] ;
22 EC[ i ]==ES [ i ]+ Pro [ i ] ;
BigM a very big number 23 LC [ i ]==LS [ i ]+ Pro [ i ] ;
Decision Variables 24 S l a [ i ]==LS [ i ]−ES [ i ] ;
ESi be the earliest starting time of job i 25 }
26 f o r a l l (< i , j > i n B) {
ECi be the earliest completion time of job i
27 EC [ i ]<=ES [ j ] ;
LSi be the latest starting time of job i 28 LC [ i ]<=LS [ j ] ;
LCi be the latest completion time of job i 29 }
slai slack of job i 30 EC[8]==LC [ 8 ] ;
31 }
Cmax be the makespane of the whole project
Mathematical Model
min Cmax 3 Critical Path Method (CPM)
Constraints
The algorithm that yields a schedule with a minimum makespan is relatively simple and can be described
Cmax constraint:
in words as follows:
Cmax ≥ ECi , ∀i
• Start at time zero with the processing of all jobs that have no predecessors.
Processing time relation:
• Every time a job completes its processing, start processing those jobs of which all the predecessors
ECi = ESi + pi , ∀i
have been completed.
LCi = LSi + pi , ∀i
Let ECj denote the earliest possible completion time of job j
Precedence constraints:
Let ESj denote the earliest possible starting time of job j.
ECi ≤ ESj , ∀Bij = 1 Clearly,ECj = ESj + pj .
Let the set {all k → j} denote all jobs that are predecessors of job j. This implies that if job k is a predecessor
LCi ≤ LSj , ∀Bij = 1
of job j, job k has to be completed before job j can be started. [!ht] Let LCj denote the latest possible
Last job constraint:
Algorithm 1 Forward Procedure
LCf inalJob = ECf inalJob
Input:
Slack constraint: Given a precedence graph G of job
slai = LSi − ESi , ∀i Process:
1: Step 1
2: Set time t = 0
2.1 Cplex Code 3: Set ESj = 0 and ECj = pj for each job j has no predecessors
4: Step 2
1 i n t numNode=8;
5: Compute inductively for each job j: ESj = max ECk
2 r a n g e Nodes = 1 . . numNode ; all k→j
3 tuple pre { Compute: ECj = ESj + pj
6:
4 i n t node1 ; Step 3
7:
5 i n t node2 ; The makespan is Cmax = max (EC1 , EC2 , ...ECn )
8:
6 } STOP
7 i n t Pro [ Nodes ] = [ 4 , 6 , 1 0 , 1 2 , 1 0 , 2 , 4 , 2 ] ;
8 i n t BigM=10000; completion time of job j

Chapter 4: Project Planning and Scheduling Page 3 Chapter 4: Project Planning and Scheduling Page 4
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Let LSj denote the latest possible starting time of job j. Table 3: The latest completion time LCj of Example 2
Let the set {j → all k} denote all jobs that are successor of job j.
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
LCj 5 12 14 24 30 26 34 36 36 43 43 51 51 56
Algorithm 2 Backward Procedure
Input: So the critical path is
Given a precedence graph G of job
1 → 3 → 6 → 9 → 11 → 12 → 14
Process:
1: Step 1
2: Set time t = Cmax
3: Set LCj = Cmax and LSj = Cmax − pj for each job j has no successors 4 Program Evaluation and Review Technique (PERT)
4: Step 2
5: Compute inductively for each job j: LCj = min LSk
j→all k In contrast to the setting in the previous section, the processing times of the n jobs are now random variables.
Compute: LSj = LCj − pj
6:
The mean µj and the variance σj2 of each of these random variables are either known or can be estimated.
Step 3
7:
Verify that min (LS1 , LS2 , ...LSn ) = 0
8: Three pieces of data with regard the processing time of each job are given as:
STOP
• paj = the optimistic processing time of job j,

• pm
j = the most likely processing time of job j,

3.1 Example of Algorithm • pbj = the pessimistic processing time of job j.

Example 2
Using these three pieces of data the expected processing time of job j is typically estimated by setting
Consider 14 jobs. The processing times are given below.
paj + 4pm b
j + pj
µ̂j =
Table 1: Table Example 2 6

If Jcp denotes the set of jobs on a critical path, then an estimate for the expected makespan is
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
pj 5 6 9 12 7 12 10 6 10 9 7 8 7 5 X
Ê(Cmax ) = µ̂j
j∈Jcp

To obtain some feeling for the distribution of the makespan in the original problem, one proceeds as follows.
Compute an estimate for the variance of the processing time of job j by taking
!2
pbj − paj
σ̂j2 =
6

the variance of the total processing time of all jobs on the critical path can be estimated by taking
X
V̂ (Cmax ) = σ̂j2
j∈Jcp

Figure 3: Precedence Graph of Example 2 5 Time Cost Trade Offs: Linear Costs
The corresponding ECj and LCj are given as:
5.1 Problem Statement

Table 2: The earliest completion time ECj of Example 2 There is a project which includes several activities and precedence constraints
There is an overhead cost associate with the makespane of the project. The overhead cost is calculated as
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
c0 × Cmax , where c0 is the overhead cost per unit time. This cost can be interpreted as:
ECj 5 11 14 23 21 26 33 32 36 42 43 51 50 56

• Renting Machine Cost

Chapter 4: Project Planning and Scheduling Page 5 Chapter 4: Project Planning and Scheduling Page 6
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

• Renting Land Cost Precedence constraints:

• Labor Cost ... ECi ≤ ESj , ∀Bij = 1


LCi ≤ LSj , ∀Bij = 1
Each activity also has its own cost. By increasing the cost for an activity its processing time can be reduced.
The processing time pj of job j must vary in the range of [pmin
j ; pmax
j ] Processing time constraints:
At pmin
j the cost is caj , at pmax
j the cost is cbj . Clearly, caj ≥ cbj .
Let αj denote the marginal cost of reducing the processing time of job j by one time unit, i.e., pmin
i ≤ pi , ∀i
pi ≤ pmax
i , ∀i
caj − cbj cbj − cj
αj = max min
= − max
pj − pj p j − pj The last job constraint:
LCf inalJob = ECf inalJob
So the cost of processing job j in pj time units, where pmin
j ≤ pj ≤ pmax
j is
Slack constraint
cbj + αj pmax slai = LCi − ESi − pi ∀i

j − pj
Pn b
In this model since j cj is constant, this term can be eliminated from the objective function.
5.2 Mathematical Models

Index
5.3 Cplex Code
j index of job j = 1...J 1 i n t numJob = . . . ;
Parameters 2 r a n g e j o b = 1 . . numJob ;
c0 overhead cost per unit time 3 i n t pre [ job ] [ job ] = . . . ;
4 i n t pmax [ j o b ] = . . . ;
αj marginal cost of reducing the processing time of job j by one time unit,
5 i n t pmin [ j o b ] = . . . ;
pmin
j minimum processing time of job j 6 i n t alpha [ job ] = . . . ;
pmax
j maximum processing time of job j 7 i n t c0 = . . . ;
caj cost of job j at pmax 8 dvar i n t+ Cmax ;
j
9 dvar i n t+ ES [ j o b ] ;
cbj cost of job j at pmin
j 10 dvar i n t+ EC[ j o b ] ;
Bij = 1 if job i is the immediate predecessor of job j, i.e. i is immediately before job j., otherwise; Bij = 0 11 dvar i n t+ LS [ j o b ] ;
BigM a very big number 12 dvar i n t+ LC [ j o b ] ;
13 dvar i n t+ s l a [ j o b ] ;
Decision Variables
14 dvar i n t+ p [ j o b ] ;
pj be the processing time of job j 15 m i n i m i z e c0 ∗Cmax+sum ( i i n j o b ) a l p h a [ i ] ∗ ( pmax [ i ]−p [ i ] ) ;
ESj be the earliest starting time of job j 16 s u b j e c t to {
ECj be the earliest completion time of job j 17 f o r a l l ( i in job ) {
18 Cmax>=EF [ i ] ;
LSj be the latest starting time of job j
19 }
LCj be the latest completion time of job i 20 f o r a l l ( i in job ) {
slaj slack of job j 21 EC [ i ]==EC[ i ]+p [ i ] ;
Cmax be the makespane of the whole project 22 LC [ i ]==LC [ i ]+p [ i ] ;
23 }
Z the total cost of whole project
24 f o r a l l ( i i n job , j i n j o b : B [ i ] [ j ]==1) {
Mathematical Model 25 ES [ j ]>=EC[ i ] ;
n
X
cbj + αj pmax

min Z = c0 Cmax + − pj 26 LS [ j ]>=LC [ i ] ;
j
j=1 27 }
28 f o r a l l ( i in job ) {
Cm ax constraint: 29 pmin [ i ]<=p [ i ] ;
Cmax ≥ ECi , ∀i 30 p [ i ]<=pmax [ i ] ;
31 }
Processing time relation: 32 f o r a l l ( i in job ) {
33 s l a [ i ]==LS [ i ]−ES [ i ] ;
ECi = ESi + pi , ∀i 34 }
35
LCi = LSi + pi , ∀i
36 LC [ numJob]==Cmax ;
37 }

Chapter 4: Project Planning and Scheduling Page 7 Chapter 4: Project Planning and Scheduling Page 8
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

PJ
In the 1st round, the code is run to find c0 Cmax + αj pmax

j=1 j − pj . Record the values of Cmax and pj
In the 2nd round, set Cmax and pi at the values found in the 1st round. After that change the objective
function as maximize the total slack to find, ES, EC, LS, EC and sla

5.4 Heuristic Algorithm

Algorithm 3 Time/Cost Trade-Off Heuristic


Input:
Given processing time parameters
Precedence constraints
Process:
1: Step 1
2: Set all processing times at their maximum.
Figure 4: Trade Off Metaheuristic Example
3: Determine all critical path(s) with these processing times
4: Construct the subgraph Gcp of the critical paths
Job on critical paths have slack time equal to zero.The critical path is 1 → 3 → 6 → 9 → 11 → 12 → 14
5: Step 2
6: Determine all minimum cut sets in the current Gcp . Table 6: The latest starting times and their slack
7: Consider only those minimum cut sets of which all processing times are strictly larger than their mini-
mum. Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
8: If there is no such set STOP, otherwise go to Step 3. ESj 0 5 5 11 14 14 23 26 26 33 36 43 43 51
9: Step 3 LSj 0 6 5 12 19 14 24 30 26 34 36 43 44 51
10: For each minimum cut set compute the cost of reducing all its processing times by one time unit Slackj 0 1 0 1 5 0 1 4 0 1 0 0 1 0
11: Take the minimum cut set with the lowest cost.
12: If this lowest cost is less than the overhead cost c0 per unit time go to Step 4, otherwise STOP
13: Step 4 So the total project time, i.e., the makespan at the maximum processing times, is equal to 56. So the total
14: Reduce all the processing times in the minimum cut set by one time unit. overhead cost over the maximal duration of the project is c0 × 56 = 336
15: Determine the new set of critical paths. Enumerate all minimal cut sets: {1},{3}, {6},{9},{11},{12},{14}. Among these sets find the best candidate:
16: Revise graph Gcp accordingly and go to Step 2.
11, 12.
Since reduce one processing time of 11 or 12 will incur a cost of 2 but saving a overhead cost of 6. This leads
to a total saving 4.
5.5 Example Assume that the job 11 is adopted and its processing time is reduce from 7 to 6 then the critical path is
updated as
Consider the following graph. The fixed overhead cost per unit time, co is 6. Other parameters are given as:
Then there are two critical paths:
Step 1
Table 7: Calculation when processing time of job 11 reduce from 7 to 6
Table 4: The parameter table
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14 pj 5 6 9 12 7 12 10 6 10 9 6 8 7 5
pmax
j 5 6 9 12 7 12 10 6 10 9 7 8 7 5 ECj 5 11 14 23 21 26 33 32 36 42 42 50 49 55
pmin
j 3 5 7 9 5 9 8 3 7 6 4 5 5 2 ESj 0 5 5 11 14 14 23 26 26 33 36 42 42 50
caj 20 25 20 15 30 40 35 25 30 20 25 35 20 10 LSj 0 5 5 11 19 14 23 30 26 33 36 42 43 50
αj 7 2 4 3 4 3 4 4 4 5 2 2 4 8 Slackj 0 0 0 0 5 0 0 4 0 0 0 0 1 0

Find the critical path at their maximum processing times. 1 → 2 → 4 → 7 → 10 → 12 → 14


The soonest completion and starting times of jobs at their maximum processing time is given by the following 1 → 3 → 6 → 9 → 11 → 12 → 14
table. Enumerate all minimal cut sets:{1}, {12},{14}, {2, 3},{2, 6}, {2, 9},{2, 11}, {4, 3},{4, 6}, {4, 9},{4, 9}, {4, 11},
Backtrack to calculate the latest starting times and their slacks at job maximum processing times {7, 3},{7, 6},{7, 9},{7, 11}, {10, 3},{10, 6},{10, 9},{10, 11}
Among these sets, choose the best candidate {12}. Since the cost for reducing one unit of time in this cut
Table 5: The soonest completion and starting times
set only 2. If the cut set for example {2, 6} is chosen, the cost for reducing one unit of time in this cut set
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14 is 2 + 3 = 5
pmax
j 5 6 9 12 7 12 10 6 10 9 7 8 7 5 Assume that the processing time of job 12 is reduced by 1
ESj 0 5 5 11 14 14 23 26 26 33 36 43 43 51
The process will continue until it meets the STOP condition.
ECj 5 11 14 23 21 26 33 32 36 42 43 51 51 56

Chapter 4: Project Planning and Scheduling Page 9 Chapter 4: Project Planning and Scheduling Page 10
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 8: Calculation when processing time of job 12 is 7 respectively Constraints


Precedence and Processing Time Constraints
Job 1 2 3 4 5 6 7 8 9 10 11 12 13 14
pj 5 6 9 12 7 12 10 6 10 9 6 7 7 5
0 Cmax ≥ Si + pi − 1, ∀i
ECj 5 11 14 23 21 26 33 32 36 42 42 49 49 54
0
ESj 0 5 5 11 14 14 23 26 26 33 36 42 42 49 Si + pi ≤ Sj , ∀Bij = 1
00
LSj 0 5 5 11 19 14 23 30 26 33 36 42 42 49 Sj ≥ 0, ∀j
Slackj 0 0 0 0 5 0 0 4 0 0 0 0 0 0
Constraints for Ujt and Vjt
6 Project Scheduling with Workforce Constraints
t ≥ Sj − BigM × (1 − Ujt ), ∀j, t
t ≤ Sj − 1 + BigM × Ujt , ∀j, t
6.1 Problem Statement
t ≤ Sj + pj − 1 + BigM × (1 − Vjt ), ∀j, t
• Each activity requires several kind of operators t ≥ Sj + pj − BigM × Vjt , ∀j, t
• The number of each kind of operators is limited Constraints for Rjt

Rjt ≤ Ujt , ∀j, t


Rjt ≤ Vjt , ∀j, t
Rjt ≥ Vjt + Ujt − 1, ∀j, t

Workforce constraints
J
X
Rjt Wlj ≤ Nl ∀t, l
j=1

Figure 5: Processing Time as Integer


6.3 Example

6.2 Mathematical Model Example Consider the following instance with five jobs and two types of operators. There are four of type
1 and eight of type 2. The processing times and workforce requirements, and the immediate Predecessors
Index are presented in the tables below.
j index of jobs j = 1...J Cplex Code
l index of operator types l = 1...L
PI (a) Processing Time and Operator Parameters
t index of time t = 0... i=1 pi (b) Immediate Predecessors
Job 1 2 3 4 5
Parameters
pj 8 4 6 4 4 Job Predecessor 1 2 3 4 5
Bij represent the precedence constraints between job i and j. W1j 2 1 3 1 2 Job _ _ _ 1 2,3
Bij = 1 if job i is the immediate predecessor of job j, i.e. i is immediately before job j., otherwise; Bij = 0 W2j 3 0 4 0 3
pj be the processing time of job i
BigM a very big number
Wlj denote the number of operators type l needs for job j.
Nl denote the number of operators type l 6.3.1 File(*.xlsx).
Decision Variables
Sj be the starting time of job j 6.3.2 File(*.mod)
Cj be the completion time of job j
1 i n t numJob = . . . ;
Cmax be the completion time of the whole project
2 i n t numType = . . . ;
Rjt be the binary variable, Rjt = 1 if Sj ≤ t ≤ Sj + pj − 1 ,otherwise Rjt = 0. 3 i n t numTime = . . . ;
Ujt be the binary variable, Ujt = 0 if t ≤ Sj − 1, otherwise, Ujt = 1 4 i n t BigM=10000;
r a n g e Job = 1 . . numJob ;
Vjt be the binary variable, Vjt = 0 if t ≥ Sj + pj , otherwise, Vjt = 1 5

6 r a n g e Time = 1 . . numTime ;
Mathematical Model 7 r a n g e Type = 1 . . numType ;
min Cmax 8 i n t B [ Job ] [ Job ] = . . . ;
9 i n t W[ Type ] [ Job ] = . . . ;

Chapter 4: Project Planning and Scheduling Page 11 Chapter 4: Project Planning and Scheduling Page 12
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

(b) “OneDim” Sheet 1 S h e e t C o n n e c t i o n MyData ( " WorkforceExample . x l s x " ) ;


A B C 2 numJob from SheetRead ( MyData , " S c a l a r ! B1" ) ;
(a) “Scalar” Sheet
3 numType from SheetRead ( MyData , " S c a l a r ! B2" ) ;
1 Job Processing Time N
A B 4 numTime from SheetRead ( MyData , " S c a l a r ! B3" ) ;
2 1 8 4
1 Number of Job 5 5 p from SheetRead ( MyData , "OneDim ! B2 : B6" ) ;
3 2 4 4
2 Number of Operator Type 2 6 N from SheetRead ( MyData , "OneDim ! C2 : C3" ) ;
4 3 6
3 Number of Time 26 7 B from SheetRead ( MyData , " B i j ! B2 : F6" ) ;
5 4 4
8 W from SheetRead ( MyData , " Wlj ! B2 : F3" ) ;
6 5 4
(d) "Bij” Sheet

(c) "Wlj” Sheet A B C D E F 7 Assignment


1 Bij 1 2 3 4 5
A B C D E F
2 1 0 0 0 1 0 Q1 Consider the setup of the production facility. The durations of the 8 jobs are tabulated below.
1 Wlj 1 2 3 4 5
3 2 0 0 0 0 1 (a) Compute the makespan and determine the critical path(s).
2 1 2 1 3 1 2
4 3 0 0 0 0 1
3 2 3 0 4 0 3
5 4 0 0 0 0 0 Table 11: Data for Question 1
6 5 0 0 0 0 0
(a) Processing Time (b) Immediate Predecessors

Job 1 2 3 4 5 6 7 8 Job 1 2 3 4 5 6 7 8
10 i n t p [ Job ] = . . . ;
11 i n t N[ Type ] = . . . ;
Pi 4 6 10 12 10 2 4 2 Predecessor _ _ _ 1 2 3,4,5 3,4 6,7
12 dvar i n t+ S [ Job ] ;
13 dvar i n t+ C [ Job ] ; (b) Suppose that the duration of job 7 can be reduced by 3 weeks to 1 week. Compute the new makespan
14 dvar i n t+ Cmax ; and determine the new critical path(s).
15 dvar b o o l e a n Y[ Time ] [ Job ] ;
Q2. Consider a project with the information are described below.
16 dvar b o o l e a n U[ Time ] [ Job ] ;
17 dvar b o o l e a n V[ Time ] [ Job ] ;
Table 12: Data for Question 2.a
18 e x e c u t e PRE_PROCESS {
19 // c p l e x . epgap = 0 . 0 5 ; (a) Processing Time
20 cplex . t i l i m = 1200;
21 } Job 1 2 3 4 5 6 7 8 9 10 11
22 m i n i m i z e (Cmax) ; pi 8 5 6 3 2 5 2 4 7 4 9
23 s u b j e c t to { (b) Immediate Predecessors
24 f o r a l l ( j i n Job ) {
Job 1 2 3 4 5 6 7 8 9 10 11
25 Cmax >=C [ j ] ;
Predecessor _ 1 _ _ 3 4 4 5,6 5,6,1 2 7,8,9
26 C [ j ]==S [ j ]+p [ j ] ;
27 }
28 f o r a l l ( i i n Job , j i n Job : B [ i ] [ j ]==1) { (a) Compute the makespan and determine the critical path.
29 S [ j ]>=C [ i ] ; Suppose that each job can be shortened at a certain expense. The overhead cost is 6 per week (in tens of
30 }
thousands of dollars). The cost functions are linear. The minimum and maximum processing times as well
31 f o r a l l ( t i n Time , j i n Job ) {
32 t>=S [ j ]+p [ j ]−BigM∗V[ t ] [ j ] ;
as the marginal costs are tabulated below.
33 t<=S [ j ]+p [ j ]+BigM∗(1−V[ t ] [ j ] ) ;
34 }
35 f o r a l l ( t i n Time , j i n Job ) {
Table 13: Data for Question 2.b and 2.c
36 t<=S [ j ]−1+BigM∗U[ t ] [ j ] ;
Job 1 2 3 4 5 6 7 8 9 10 11
37 t>=S [ j ]−1−BigM∗(1−U[ t ] [ j ] ) ;
Pjmax 8 5 6 3 2 5 2 4 7 4 9
38 }
39 f o r a l l ( t i n Time , j i n Job ) {
Pjmin 5 3 4 2 2 3 2 3 5 3 7
40 Y[ t ] [ j ]<=U[ t ] [ j ] ; caj 30 25 20 15 30 40 35 25 30 20 30
41 Y[ t ] [ j ]<=V[ t ] [ j ] ; αj 7 2 2 1 2 3 4 4 4 5 4
42 Y[ t ] [ j ]>=U[ t ] [ j ]+V[ t ] [ j ] − 1 ;
43 }
(b) Apply Algorithm Time Cost Trade-off heuristic to this instance.
44 f o r a l l ( t i n Time , l i n Type ) {
45 sum ( j i n Job )Y[ t ] [ j ] ∗W[ l ] [ j ]<=N[ l ] ;
(c) Verify whether the solution obtained in (b) is optimal.
46 } Q3 Consider the project as table below. Suppose it is possible to add resources to the various jobs on the
47 } critical paths in order to reduce the makespan. The overhead cost co per unit time is 6. The costs are linear
and the marginal costs are tabulated below.
6.3.3 File *.dat

Chapter 4: Project Planning and Scheduling Page 13 Chapter 4: Project Planning and Scheduling Page 14
Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 14: Data for Question 3

(a) Processing Time

Job 1 2 3 4 5 6 7 8 (b) Immediate Predecessors


pmax
j 4 6 10 12 10 2 4 2
Job 1 2 3 4 5 6 7 8
pmin
j 2 5 7 10 8 1 2 1
Predecessor _ _ _ 1 2 3,4,5 3,4 6,7
caj 20 25 20 15 30 40 35 25
αj 4 3 4 2 3 2 4 4

(a) Determine the processing times and the makespan of the solution with the total minimum cost. Is the
solution unique?
(b) Plot the relationship between the total cost of the project and the makespan.
(c) Using CPLEX solve the problem.
Q4. Consider the following PERT version of a given system.
(a) Rank the paths according to the means of their total processing time.

Table 15: Data for Question 4

(a) Immediate Predecessors

Job 1 2 3 4 5 6 7 8 9 10 11
Predecessor _ 1 _ _ 3 4 4 5,6 5,6,1 2 7,8,9
(b) Processing Times

Job 1 2 3 4 5 6 7 8 9 10 11
paj 2 1 5 2 1 4 1 1 6 1 8
pmj 8 5 6 3 2 5 2 4 7 4 9
pbj 14 9 7 4 3 6 3 7 7 10

(b) Rank the paths according to the variance in their total processing times. Which path has the highest
variance? Which path has the lowest variance?
(c) Compute the probability that the makespan is larger than 27 following the standard PERT procedure.
(d) Compute the probability that the makespan is larger than 27 by considering only the path with the
largest variance.
Q5 Formulate the following project scheduling problem with workforce constraints as an integer program
then solve it by CPLEX. Both workforce pools have four operators. The precedence constraints are specified
below.

Table 16: Data for Question 5

(b) Processing Times


(a) Immediate Predecessors
Job 1 2 3
Job 1 2 3 pj 4 6 2
Predecessor _ _ 2 Wj1 2 3 1
Wj2 4 4 0

Chapter 4: Project Planning and Scheduling Page 15

You might also like