Sched Final Note Full 1
Sched Final Note Full 1
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 2 Job 1
Cmax = U – (1,1) – (1,3) – (1,2) – (4,2) – (3,2) – V = 28
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
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 𝑖 𝑖
Objective function
𝐿
Minimize ∑ 𝑌𝑖
𝑖