Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Scheduling & Sequencing. Noted by Mỹ Dung. Ref: Dr.

PNKPhuc

For machine 1, the sequence is (1,1) – (1,3) – (1,2) , 𝐿𝑚𝑎𝑥 (1) = 6 2.3: Leave of next job
CHAP 5: SHIFTING BOTTLENECK (25pts)
For machine 2, the sequence is (2,2) – (2,3) – (2,1) , 𝐿𝑚𝑎𝑥 (2) = 5 First machine:
(Machine, Job)
For machine 3, the sequence is (3,2) – (3,1) , 𝐿𝑚𝑎𝑥 (3) = 4 = MAX (leave time + next job PT, Leave time (next))
Given the following job shop problem
For machine 4, the sequence is (4,2) – (4,3) , 𝐿𝑚𝑎𝑥 (4) = 0 Middle machines:
Job Sequence Processing Time
Focus on machine with largest bottle neck. Machine 1 is selected to be = MAX (leave of next job (previous) + next job PT, Leave time (next))
1 1,2,3 𝑝11 = 10, 𝑝21 = 8, 𝑝31 = 4
included in M0 Last machine:
2 2,1,4,3 𝑝22 = 8, 𝑝12 = 3, 𝑝42 = 5, 𝑝32 = 6
3 1,2,4 𝑝13 = 4, 𝑝23 = 7, 𝑝43 = 3 Step 3: Draw the graph after the first iteration = leave time + Next job PT
Visualization
Step 1: Draw the initial graph of this problem Machine 1 Job 1 Job 2 Job 2 finished but cannot leave

Machine 2 Job 1

Machine 1 Job 1 Job 2

Machine 2 Job 1
Cmax = U – (1,1) – (1,3) – (1,2) – (4,2) – (3,2) – V = 28

Leave Next job is


Total processing time of job 1: 10 + 8 + 4 = 22 CHAP 6: PROFILE FITTING HEURISTIC (20pts) Job Leave of next job Loss
time 2
Total processing time of job 2: 8 + 3 + 5 + 6 = 22 Job 1 2 3 Machine 1 0 1 = max (0+1, 0) = 1
Total processing time of job 3: 4 + 7 + 3 = 14 Machine 1 0 1 0 Machine 2 0 0 = max (1+0, 1) = 1
Machine 2 0 0 0 Machine 3 1 0 = max (1+0, 2) = 2
𝐶𝑚𝑎𝑥 = 𝟐𝟐
Machine 3 1 0 1 Machine 4 2 1 =2+1=3
Step 2: Apply the 1st iteration to find the sequence Machine 4 1 1 0 Total
Job 1,1 2,1 3,1 2,2 1,2 4,2 3,2 1,3 2,3 4,3
P 10 8 4 8 3 5 6 4 7 3 Step 1: Find the first job in the sequence 2.4. Last column = Leave of next job – Next job PT – Leave time
ES 0 10 18 0 8 11 16 0 4 11
Select the job with the longest total processing time as the initial job. Leave Next job Leave of
EC 10 18 22 8 11 16 22 4 11 14 Job Loss
LS 0 10 18 0 8 11 16 8 12 19 Job 1 2 3 time is 2 next job
LC 10 18 22 8 11 16 22 12 19 22 Machine 1 0 1 0 Machine 1 0 1 1 =1-1-0=0
Sla 0 0 0 0 0 0 0 8 8 8 Machine 2 0 0 0 Machine 2 0 0 1 =1-0-0=1
Machine 3 1 0 1 Machine 3 1 0 2 =2-0-1=1
Earliest Machine 4 1 1 0 Machine 4 2 1 3 =3-1-2=0
Machine 1 1,1 1,2 1,3
Release Day Total 2 2 1 Total 2
Processing T 10 3 4
First
Release (ES) 0 8 0 Job 1 is selected as the initial job.
J1 – J3 – J2 Doing similarly for other jobs that has not yet been scheduled
Due date (LC) 10 11 12
Begin 0 14 10 Step 2: Find the second job in the sequence Next
Begin Ji = max Leave
Finish 10 17 14 Job job is Leave of next job Loss
(Finish Ji-1, Release Ji) 2.1: First column = cumulative processing time of Initial job time
Lateness 0 6 2 3
2.2: Second column = Processing Time (J2) Machine 1 0 0 =max(0+0, 0) = 0 0
Lateness = max (0, Finish – Due date)
Leave Next Leave of Machine 2 0 0 =max(0+0, 1) = 1 1
Job Loss
M2 2,1 2,2 2,3 M3 3,1 3,2 M4 4,2 4,3 time job is 2 next job Machine 3 1 1 =max(1+1, 2) = 2 0
P 8 8 7 P 4 6 P 5 3 Machine 1 =0+0=0 1 Machine 4 2 0 =2+0 = 2 0
R 10 0 9 R 18 16 R 11 11 Machine 2 =0+0=0 0 Total 1
D 18 8 19 D 22 22 D 16 22 Machine 3 =0+1=1 0
B 15 0 8 B 22 16 B 11 16 Machine 4 =1+1=2 1 2.5 Conclusion
F 23 8 15 F 26 22 F 16 19 Total
Since the loss regarding to job 3 is the smallest, so job 3 is the next job.
L 5 0 0 L 4 0 L 0 0
Scheduling & Sequencing. Noted by Mỹ Dung. Ref: Dr. PNKPhuc

CHAP 9: TIME INTERVAL Step 3: Assign the first job with the highest priority then write down 2. Graph coloring (20pts)

1. Multiple machines (25pts) the table of the update resources and possible resource usage Activities 1 2 3 4 5 6 7
Highest priority = Smallest Index value Gary 1 0 0 1 1 0 1
Job 1 2 3 4
Hamilton 1 1 1 0 0 0 0
𝑤𝑗 3 2 2 1 3.1: Use1, Use2, R1, R2 are the same as previous
Izak 0 0 1 0 1 1 0
𝑝𝑗 2 3 1 1 3.2: 𝐽𝑗 𝑅𝑘 : loss of machine 𝑘 if job 𝑗 start at time 𝑡 (from ES to LS) Reha 1 0 1 1 1 0 0
𝑟𝑗 0 2 1 2 𝑡+𝑝−1
𝑚𝑗𝑘
𝑑𝑗 5 7 6 6 ∑ ∗ 𝑈𝑠𝑒𝑘
𝑅𝑘 Step 1: Find the conflict matrix and degree of each job
Machine 1 2 0 1 1 𝑡
3.3: Total Job 1 2 3 4 5 6 7
Machine 2 1 2 0 1
The number of machine type 1 and 2 are 2. 3.4: Assign: choose the time slot with the smallest value 1 - 1 1 1 1 0 1
Time 0 1 2 3 4 5 6 2 1 - 1 0 0 0 0
Step 1: Calculate the priority of each job 3 1 1 - 1 1 1 0
Use1 2 3 4 4 4 2 0
𝑚𝑗𝑘 Use2 1 1 4 4 4 3 2 4 1 0 1 - 1 0 1
(∑𝐾𝑘=1 ) × 𝑝𝑗
𝑁𝑘 5 1 0 1 1 - 1 1
𝐼𝑗 = R1 2 2 2 2 2 2 2
𝑤𝑗 6 0 0 1 0 1 - 0
R2 2 2 2 2 2 2 2
𝑚𝑘 : the number of resource type 𝑘 which is required by job 𝑗 J3R1 1.5 2 2 2 1 7 1 0 0 1 1 0 -
𝑁𝑘 : the maximum numer of resource type 𝑘 Assign X Degree 5 2 5 4 5 2 3

Job 1 2 3 4 Assign job 3 to time slot 5. 𝒎𝟑𝟏 = 𝟏 𝒑𝟑 = 𝟏 Step 2: Apply the graph coloring algorithm to find the schedule
𝐼𝑗 1 1.5 0.25 1 𝑚31
× 𝑈𝑠𝑒1 (1) hoặc 𝑚31 [
𝑈𝑠𝑒1 (1)
]
𝑅1 (1) 𝑅1 (1) Job 1 2 3 4 5 6 7
3.5: Update
Degree 5 2 5 4 5 2 3
2 1 0 2 From when to when the job occupies in the possible resource usage?
( + )×2 ( + )×3
𝐼1 = 2 2 =1 𝐼2 = 2 2 = 1.5 How many resource of each type that the job uses, at which time slot?
3 2 Select job with the highest degree
Time 0 1 2 3 4 5 6 Update the new degree
Step 2: Write down the summary table of possible resource usage
Use1 2 2 3 3 3 1 0 Job 1 2 3 4 5 6 7
when no job is assigned Use2 1 1 4 4 4 3 2 Degree C1 1 4 3 4 2 2
For machine 1 R1 2 2 2 2 2 1 2
R2 2 2 2 2 2 2 2 Job 1 2 3 4 5 6 7
Time 0 1 2 3 4 5 6
Degree C1 0 C2 2 3 1 2
J1 2 2 2 2 2
Step 4: Assign the 2nd job with the second high priority then write
J2 Job 1 2 3 4 5 6 7
J3 1 1 1 1 1 down the table of the update resources and possible resource usage
Degree C1 0 C2 1 C3 0 1
J4 1 1 1 1 Time 0 1 2 3 4 5 6
Use1 2 3 4 4 4 2 0 Use1 2 2 3 3 3 1 0 Job 1 2 3 4 5 6 7
Use2 1 1 4 4 4 3 2 Degree C1 0 C2 C4 C3 0 0
For machine 2 R1 2 2 2 2 2 1 2
Time 0 1 2 3 4 5 6 R2 2 2 2 2 2 2 2 Possible solutions
J1 1 1 1 1 1 J1R1 4 5 6 6 1 3 5 4
J2 2 2 2 2 2 J1R2 1 2.5 4 4 2 x x
J3 Total 5 7.5 10 10 6 x x
J4 1 1 1 1 Assign X 7 x
Use2 1 1 4 4 4 3 2 𝒎𝟏𝟐 = 𝟐 𝒑𝟏 = 𝟐 One of the solutions
𝑚11 𝑚11 𝑈𝑠𝑒1 (0) 𝑈𝑠𝑒1 (1)
× 𝑈𝑠𝑒1 (0) + × 𝑈𝑠𝑒1 (1) ℎ𝑜ặ𝑐 𝑚11 [ + ]
Summary Update
𝑅1 (0) 𝑅1 (1) 𝑅1 (0) 𝑅1 (1) 1 3 5 4
Time 0 1 2 3 4 5 6 6 7 2
Time 0 1 2 3 4 5 6
Use1 2 3 4 4 4 2 0 Time slot 1: Job 1 & 6
Use1 0 0 1 1 1 1 0
Use2 1 1 4 4 4 3 2 Use2 0 0 3 3 3 3 2 Time slot 2: Job 3 & 7
R1 2 2 2 2 2 2 2 R1 0 0 2 2 2 1 2 Time slot 3: Job 5 & 2
R2 2 2 2 2 2 2 2 R2 1 1 2 2 2 2 2 Time slot 4: Job 4
Scheduling & Sequencing. Noted by Mỹ Dung. Ref: Dr. PNKPhuc

CHAP 13: WORKFORCE SCHEDULING (10pts) Subject to Shifting bottle neck


Days-off Scheduling C1: Demand has to be served, including 1 supervisor
Job Sequence Processing Time
- There are 7 days and each day has two shifts, ie. Night Shift and Day 𝐿
1 1,2,3 𝑝1,1 = 2, 𝑝2,1 = 3, 𝑝3,1 = 4
∑ 𝑋𝐷𝑖𝑑 ≥ 𝐷𝑑 + 1 ∀𝑑
Shift. 2 1,3,2 𝑝1,2 = 5, 𝑝3,2 = 4, 𝑝2,2 = 3
𝑖
- Demands of Day Shift and Night Shift on day d are denoted as Dd and 𝐿
3 2,1,3 𝑝2,3 = 6, 𝑝1,3 = 3, 𝑝3,3 = 5

Nd. ∑ 𝑋𝑁𝑖𝑑 ≥ 𝑁𝑑 + 1 ∀𝑑
𝑖 Profile fitting heuristic
- Assumed that there are L labors.
C2: Each labor works only on shift per day Job 1 2 3 4
- Among them there are S labors who can work either as supervisor or as
𝑋𝐷𝑖𝑑 + 𝑋𝑁𝑖𝑑 + 𝑋𝑅𝑖𝑑 = 1 ∀𝑑, 𝑖 Machine 1 3 4 4 3
labor.
C3: Each labor cannot work 2 consecutive shifts Machine 2 7 5 5 3
Machine 3 5 3 4 5
𝑋𝑁𝑖𝑑 + 𝑋𝐷𝑖,𝑑+1 ≤ 1 ∀𝑑, 𝑖
Objective: Machine 4 5 6 3 4
C4: Each labor works 5 shifts in week
Minimize the total usage number of labors
𝐷
Multiple machines
Constraints: ∑ 𝑋𝑅𝑖𝑑 = 2 ∀𝑖
- Each labor works only one shift per day 𝑑 Job 1 2 3
C5: Each shift must have one supervisor 𝑤𝑗 4 4 2
- Each labor cannot work 2 consecutive shifts
𝑆 𝑝𝑗 1 2 2
- Each labor works 5 shifts in week 𝑟𝑗 0 2 3
∑ 𝑆𝐷𝑖𝑑 = 1 ∀𝑑
- Apart from the required demand, each shift must have one supervisor. 𝑖 𝑑𝑗 7 7 7
!When labor works as supervisors, he is not counted when computing Dd 𝑆
Machine 1 1 2 0
∑ 𝑆𝑁𝑖𝑑 = 1 ∀𝑑 Machine 2 1 1 2
or Nd.
𝑖

C6: If labor works as the supervisor, it is still considered that they work The number of machine type 1 and 2 are 4.
Set: in that shift
𝐿: set of labors 𝑆𝐷𝑖𝑑 − 𝑋𝐷𝑖𝑑 ≤ 0 ∀𝑑, 𝑖 Graph coloring
𝑆: set of labors who can work as supervisors 𝑆𝑁𝑖𝑑 − 𝑋𝑁𝑖𝑑 ≤ 0 ∀𝑑, 𝑖 Job 1 2 3 4 5 6 7 8
Parameters C7: Connect between 𝑌𝑖 and other variables Res 1 1 0 0 0 0 1 0 0
𝐷𝑑 : demand of day shift d 𝑌𝑖 ≥ 𝑋𝐷𝑖𝑑 ∀𝑑, 𝑖 Res 2 0 1 1 0 0 0 0 1
𝑁𝑑 : demand of night shift d Res 3 1 0 0 1 1 0 1 0
𝑌𝑖 ≥ 𝑋𝑁𝑖𝑑 ∀𝑑, 𝑖 Res 4 0 1 0 1 0 1 0 1
Variables
𝐿 𝐿 Res 5 0 1 1 0 1 0 0 1
𝑌𝑖 : binary variable, 𝑌𝑖 = 1 if labor 𝑖 is used
𝑌𝑖 ≤ ∑ 𝑋𝐷𝑖𝑑 + ∑ 𝑋𝑁𝑖𝑑 ∀𝑖
𝑋𝐷𝑖𝑑 : binary variable, 𝑋𝐷𝑖𝑑 = 1 if labor 𝑖 works on day shift 𝑑 as labor 𝑖 𝑖

𝑋𝑁𝑖𝑑 : binary variable, 𝑋𝑁𝑖𝑑 = 1 if labor 𝑖 works on night shift 𝑑 as labor


𝑋𝑅𝑖𝑑 : binary variable, 𝑋𝑅𝑖𝑑 = 1 if labor 𝑖 is off on day 𝑑
𝑆𝐷𝑖𝑑 : binary variable, 𝑖 ∈ 𝑆, 𝑆𝐷𝑖𝑑 = 1 if labor 𝑖 works on day shift 𝑑 as
supervisor
𝑆𝑁𝑖𝑑 : binary variable, 𝑖 ∈ 𝑆, 𝑆𝑁𝑖𝑑 = 1 if labor 𝑖 works on night shift 𝑑 as
supervisor

Objective function
𝐿

Minimize ∑ 𝑌𝑖
𝑖

You might also like