Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
General Scheduling Modeland
Algorithmg
Andrew KusiakIntelligent Systems Laboratory
2139 Seamans Center The University of Iowa
I Cit I 52242 1527
The University of Iowa Intelligent Systems Laboratory
Iowa City, Iowa 52242 - 1527Tel: 319 - 335 5934 Fax: 319 - 335 5669
[email protected]://www.icaen.uiowa.edu/~ankusiak
MPS
MRP
Balancing
MANUFACTURING SCHEDULING
n Jobs (Operations)Schedulingm Machines
+ other resources
Scheduling ScheduleSchedulingData
The University of Iowa Intelligent Systems Laboratory
SchedulingAlgorithm
DataNo of operationsProcessing timePrecedence constraintsDue time
2 4 1 3 6M1 5
Example
6 11 18 22 25 292 4 1 3 61 5
6 14 18 22 30
2 4 5M2
1 63
25118
2M3 Time16
34 5
The University of Iowa Intelligent Systems Laboratory
18 30248 35
What type of schedule is it -jobshop or flowshop?
Scheduling Model: m Machines and n Operations
n = number of partsm = number of machinesm number of machinesRi = set of pairs of operations [k, l] for part Pi, where operation k precedes
operation l, i = 1,..., nQi = set of pairs of operations [k, l] for part Pi, where k and l can be
performed in any order, i = 1,..., nIi = set of operations without precedence constraints, i = 1,...., n.Np = set of operations to be performed on machine p, p = 1,..., mni = number of operations in part Pi, i = 1,..., nil i i f i l f i l 1 i 1
The University of Iowa Intelligent Systems Laboratory
til = processing time of operation l of part Pi, l = 1,..., n , i = 1,..., nM = an arbitrary large positive number
xik = completion time of operation k of part Pi, k = 1,..., n , i = 1,..., nx[i] = completion time of the final operation of part Pi,
i = 1,..., n
1 if operation k precedes operation lykl = {
0 otherwise
for all [k, l] ∈ Qi, i = 1,..., n.
1 if operation k precedes operation lzkl = {
The University of Iowa Intelligent Systems Laboratory
zkl = {0, otherwisefor all [k, l] ∈Np, p = 1,..., m
Basic Notation
P t iPart i:Operations k, l,...Precedence constraints
k l
xik xilCompletion time
The University of Iowa Intelligent Systems Laboratory
Part j
The ModelnMin x[i] Min the total completion time
i =1subject to:
∑
xil - xik til for all [k, l] ∈ Ri, for all i
Operations k and l of part i are processed according to the precedence required
≥
k lP t i
The University of Iowa Intelligent Systems Laboratory
k lPart i
xik xilk l
til
TimeSchedule
xil - xik + M(1- ykl ) tilfor all [k, l] ∈ Qifor all i
xik - xil + Mykl tik≥
≥
Two operations of part i can not be processed at the same time
Part i k l l k
TWO POSSIBILITIES (Same part)
OR
The University of Iowa Intelligent Systems Laboratory
xik xilk l
till k
xil xikl k
tikTime
OR
xjl - xik + M(1- zkl ) tjl for all [k, l] ∈ Np for all p
xik - xjl + Mzkl tik i j
≥
≥ ≠
where Np = Set of operations to be performed on machine p A machine can not process more than one part at the same time
TWO POSSIBILITIES (Different parts)
Part i Part j Part j Part i
The University of Iowa Intelligent Systems Laboratory
Part i
xik xjlk l
til
xjl xikl k
tikTime
ORPart j Part j Part i
≥tik for [i, k ] ∈ Ii, i =1,..., n
xik {0 for all other i, k
ktik
xik
Part iTime For operations without
precedence constraints
The University of Iowa Intelligent Systems Laboratory
ykl = 0, 1 for all [k, l] ∈ Qi, for all i
zkl = 0, 1 for all [k, l] ∈Np, for all p
!!!!
Go over this model at least twice!
The University of Iowa Intelligent Systems Laboratory
Example Structure of Three PartsPart P
1, 1 1, 2 1, 3
1
Part P
2, 1 2, 2
2
Part P
3 1
3
The University of Iowa Intelligent Systems Laboratory
3, 1
3, 3
3, 2
Scheduling Data
______________________________________________P
______________________________________________Partnumber 1 2 3
______________________________________________Operationnumber 1 2 3 1 2 1 2 3
______________________________________________Machinenumber 1 1 2 1 2 2 1 2
The University of Iowa Intelligent Systems Laboratory
______________________________________________Processingtime 3 5 6 8 4 9 2 7______________________________________________
LINDO Input FileMIN X13+X21+X22+X33SUBJECT TOX12-X11 >= 5X13-X12 >= 6X33 X31 > 7
Operations of part i are processed according to the precedencerequired
Part P
1, 1 1, 2 1, 3
1
Part P 2X33-X31 >= 7X33-X32 >= 7
X21-X22+999Y1 >= 8X22-X21- 999Y1 >= -995X31-X32+999Y2 >= 9
xil - xik til
Two operations of the same part i can not be processed atthe same time
≥2, 1 2, 2
Part P
3, 1
3, 3
3
3, 2
The University of Iowa Intelligent Systems Laboratory
X32-X31- 999Y2 >= -997the same time
xik - xil + Mykl tikxil - xik + M(1- ykl) til
≥≥
X22-X21 + 999(1-Y1) >= 4
Derived from
______________________________________________Partnumber 1 2 3
______________________________________________Operationnumber 1 2 3 1 2 1 2 3
______________________________________________Machine
b 1 1 2 1 2 2 1 2
X11-X21+999Z1 >= 3X21-X11- 999Z1 >=-991X11-X32+999Z2 >= 3
A machine can not process more than one part at the same time
number 1 1 2 1 2 2 1 2____________________________ _________________
Processingtime 3 5 6 8 4 9 2 7______________________________________________
The University of Iowa Intelligent Systems Laboratory
X32-X11- 999Z2 >= -997X12-X21+999Z3 >= 5X21-X12- 999Z3 >= -991X12-X32+999Z4 >= 5X32-X12- 999Z4 >= -997
time
xik - xjl+ Mzkl tikxjl - xik + M(1- zkl) tjl
≥≥
X21 - X32 + 999Z5 >= 8X32 - X21 - 999Z5 >= -997
X13-X22+999Z6 >= 6X22-X13 -999Z6 >= -995X13-X31+999Z7 >= 6X31-X13-999Z7 >= -990
Partnumber 1 2 3
______________________________________________Operationnumber 1 2 3 1 2 1 2 3
______________________________________________Machine
b 1 1 2 1 2 2 1 2
A machine can not process more than one part at the same
X13-X33+999Z8 >= 6X33-X13-999Z8 >= -992X22-X31+999Z9 >= 4
number 1 1 2 1 2 2 1 2____________________________ _________________
Processingtime 3 5 6 8 4 9 2 7______________________________________________
The University of Iowa Intelligent Systems Laboratory
timexjl - xik + M(1- zkl) tjlxik - xjl+ Mzkl tik
≥≥
X22 X31+999Z9 > 4X31-X22-999Z9 >= -990X22-X33+999Z10 >= 4X33-X22-999Z10 >= -992
X11 >= 3X21 >= 8X22 >= 4
Operation finish time t ll th itX22 >= 4
X31 >= 9X32 >= 2END
not smaller than its processing time
The University of Iowa Intelligent Systems Laboratory
INTEGER Y1INTEGER Y2INTEGER Z1INTEGER Z2INTEGER Z2INTEGER Z3INTEGER Z4INTEGER Z5INTEGER Z6INTEGER Z7INTEGER Z8INTEGER Z9
The University of Iowa Intelligent Systems Laboratory
INTEGER Z10
The Optimal Schedule
x32 = 2 , x21 = 12, x11 = 15, x12 = 20, x22 = 4, x31 = 13, x33 = 20, and x13 = 26, , ,
2 12 15 20
M4
3,2 2,1 1,1 1,21
The University of Iowa Intelligent Systems Laboratory
4 13 20
M2 Time
262,2 3,1 3,3 1,3
0
m = number of resource types
rs = number of resources of type s, s = 1,..., m
Scheduling Model with Multiple Resources
d[i] = due date of part number i
Nq = set of operations using resource q , q = 1,..., rs , s = 1,..., mn
min x[i]i=1
bj
∑
The University of Iowa Intelligent Systems Laboratory
subject to:xil - xik til for all [k, l] ∈ Ri, for all i
xil - xik + M(1- ykl ) til for all [k, l] ∈ Qi
xik - xil + Mykl tik for all i
≥
≥
≥
xjl - xik + M(1- zkl ) tjl for all [k, l] ∈ Nq,for all q,
≥
xik - xjl + Mzkl tjl i j
x[i] d[i] for all i
tik for [i, k] ∈ Ii, i = 1,..., nxik {
0 for all other i, k
≥
≥
≤
≠
The University of Iowa Intelligent Systems Laboratory
ykl = 0, 1 for all [k, l] ∈ Qi, for all Izkl = 0, 1 for all [k, l] ∈ Nq, for all q
ExampleStructure of Three Parts
Part P
1, 1 1, 2
1
Part P
2, 1 2, 2
2
Part P 3
The University of Iowa Intelligent Systems Laboratory
3, 1
3, 3
3, 2
Scheduling Data___________________________________________
Partnumber 1 2 3u be 3
___________________________________________Operationnumber 1 2 1 2 1 2 3
___________________________________________Machinenumber 1 2 2 1 1 2 1
___________________________________________Processingtime 2 3 1 2 3 2 1
The University of Iowa Intelligent Systems Laboratory
___________________________________________Toolnumber 1 1 2 2 2 1 2
___________________________________________
The Optimal Schedule with Limited Number of Tools
(1) (2) (2) (2)
7
M
M2 Time
1, 1 2, 2 3, 3
2, 1 1, 2 3, 2
0
1
10
3, 1
1 2 5 9
(2) (1) (1)
The University of Iowa Intelligent Systems Laboratory
3C = 10
i, j(k)
Operation j of uses tools k
The Optimal Schedule with Unlimited Number of Tools
(1) (2) (2) (2)(1)M
M2 Time
1, 1 2, 2 3, 3
3, 1 1, 20
1
8
3, 2
3 6
(1) (2) (2) (2)
(2)
(1)
(1)
2, 1
The University of Iowa Intelligent Systems Laboratory
C' = 83
Two copies of tool 1 and 2 are needed.
General Scheduling Heuristic
Part P with6 operations
3 5
21 6
An operation is schedulable at time t if the following three conditions are satisfied:• No other operation that belongs to the same part is being processed at the time t
Definition4
The University of Iowa Intelligent Systems Laboratory
processed at the time t.• All operations preceding the operation considered have been completed before the time t.
• All resources (for example, machines, tools, fixtures) required for performing the operation are available at the time t.
Two Scheduling Scenarios
• No single operation is• No single operation is schedulable (a deadlock)
• Many operations are h d l bl
The University of Iowa Intelligent Systems Laboratory
schedulable
How to select the most promising operations?
PRIORITY RULES
The University of Iowa Intelligent Systems Laboratory
DefinitionsPart P with 6 operations
3 5
Operations 3, 4, 5, and 6 are successive operationsof operation 2
421 6
The University of Iowa Intelligent Systems Laboratory
Operations 3 and 4 are immediate successive operations of operation 2
General HeuristicStep 1. Initialize:• Current time• Set of schedulable operations• Set of completed operations
Step 2. From the set of schedulable operations, select an p poperation using the following priority rules:• P1: with the largest number of successive operations• P2: belonging to a part with the minimum number
of schedulable operations• P3: with the largest number of immediate successive
operations
The University of Iowa Intelligent Systems Laboratory
• P4: belonging to a part with the largest number of unprocessed operations
• P5: with the shortest processing time• P6: belonging to a part with the shortest slack time.
Step 3. Schedule the operation selected in step 2.Update:
• The resource status
• P7: arbitrary choice
• The set of schedulable operations
If the set of schedulable operations is empty, go to step 4; otherwise, go to step 2.
Step 4. Calculate the completion time of each operation scheduled but not completed at the current time.
The University of Iowa Intelligent Systems Laboratory
Set the current time equal to the completion time of the operation with the least remaining processing time. Add this operation (or operations in case of a tie) to the set of completed operations.
Update:• The resource status• The set of schedulable operations
If there is no unprocessed operations, stop; otherwise, go to step 5.
Step 5. If the set of schedulable operations is empty, go to step 4; h i 2
The University of Iowa Intelligent Systems Laboratory
otherwise go to step 2.
Heuristic Structure
Operation with no
Operation belongs to a part
Manufacturingresources
Determine Schedulable Set
with noprecedences being
not-processed
resources available
Use Priority Rules: P1 - P7
Schedule an operation
The University of Iowa Intelligent Systems Laboratory
UpdateCurrent time, machine status, part status
All operations are scheduledyes
Endno
Priority Rules: P1 - P7Schedulable Set
P1P2
>1 operations>1 operations
>1 tiP2P3
P4
P5P6
>1 operations>1 operations
>1 operations
>1 operations
>1 operations
The University of Iowa Intelligent Systems Laboratory
P7
One Operation Selected Arbitrary select 1 operation
Priority Rule P6: Min slack time
Part P
1 2
1
Part P
3
5
2
4
Part P
6 7 8
3
M
M
3 6 82 Time
1 47
93 6 2 8
0
1 5
12P3 P3
tP2 sP2dP2
The University of Iowa Intelligent Systems Laboratory
tP3dP3
sP3
Slack = Due time - Current time
ExamplePart P
1 2
1
Part P 2
Three Parts3
5
4
The University of Iowa Intelligent Systems Laboratory
Part P
6 7 8
3
___________________________________________Partnumber 1 2 3
Scheduling Data
Part P 1
__________________________________________Operationnumber 1 2 3 4 5 6 7 8
__________________________________________Machinenumber 1 2 2 1 1 2 1 2
__________________________________________Machiningtime 4 2 3 2 2 3 2 1
1 2
Part P
3
5
2
4
The University of Iowa Intelligent Systems Laboratory
__________________________________________Part P
6 7 8
3
Iterations of the Heuristic
Step 1. Initialize:• Current time t = 0• The set of schedulable operations S1 = {1 3 4 6 7}
• P1: with the largest number of successive operations• P2: belonging to a part with the minimum number
of schedulable operations• P3: with the largest number of immediate successive
operations• P4: belonging to a part with the largest number of
unprocessed operations• P5: with the shortest processing time• P6: belonging to a part with the corresponding
shortest slack time.
The set of schedulable operations S1 {1, 3, 4, 6, 7}• The set of completed operations F = Ø
Step 2. Using rule P1, operations 1, 3, 4, 7 have been selected. Priority rule P2 selects operation 1.
Step 3. Operation 1 is scheduled on machine 1.
Part P
1 2
1
Part P
3
2
The University of Iowa Intelligent Systems Laboratory
5
4
Part P
6 7 8
3
M1 1
Time0
Step 4. Operations status update
Scheduled operation
S hi
• P1: with the largest number of successive operations• P2: belonging to a part with the minimum number
of schedulable operations• P3: with the largest number of immediate successive
operations• P4: belonging to a part with the largest number of
unprocessed operations• P5: with the shortest processing time• P6: belonging to a part with the corresponding
shortest slack time.
1 2number
1 2 3Part number
1 2 3
number1 3Operation
Machine number
Machining
1 3 2 4 5 6 7 8
1 2 2 1 1 2 1 2
4 2 3 2 2 3 2 1
Same machineas operation 1
1
3
2
4
87
5
6
The University of Iowa Intelligent Systems Laboratory
gtime
4 2 3 2 2 3 2 1
The set of schedulable operations is updated to S1 = {3, 6}.Go to step 2.
Step 2. Rule P1 selects operation 3 from S1 = {3, 6}.
Step 3. Operation 3 is scheduled on machine 2.
M1 1
• P1: with the largest number of successive operations• P2: belonging to a part with the minimum number
of schedulable operations• P3: with the largest number of immediate successive
operations• P4: belonging to a part with the largest number of
M2 3
number 1 2 3Part number 1 2 3
number 1 2 3Operation numberMachine
1 3 2 4 5 6 7 8
1 2 2 1 1 2 1 2
1
3
2
5
g g p gunprocessed operations•
• P5: with the shortest processing time• P6: belonging to a part with the corresponding
shortest slack time.
The University of Iowa Intelligent Systems Laboratory
numberMachining time
1 2 2 1 1 2 1 2
4 2 3 2 2 3 2 1
The set of schedulable operations is updated to S1= Ø. Go to step 4.
4
876
Step 4. The completion time of operations 1 and 3 is 4 and 3, respectively, and current time is set to 3. Operation 3 is added to the set of completed operations F, F = {3}. Machine 2 becomes available and its status has been updated. The set of schedulable operations is updated to S1= {6}. Go to step 5.
Partnumber 1 2 3Partnumber 1 2 3
1
3
2
Step 5. Since the set of schedulable operations S1={6} Ø, go to Step 2.
Step 2. Operation 6 is selected.Step 3. Operation 6 is scheduled on machine 2.
≠
M1
M2
1
3 Time t=3
Partnumber 1 2 3OperationnumberMachinenumberMachiningtime
1 32 4 5 6 7 8
1 2 2 1 1 2 1 2
4 2 3 2 2 3 2 1
3
4
87
5
6
The University of Iowa Intelligent Systems Laboratory
M1
M2
1
3 6
Time t=4
number1 2 3Part
number1 2 3
number1 2 3Operation
numberMachine numberMachining
1 3 2 4 5 6 7 8
1 2 2 1 1 2 1 2
1
3
2
45M1 1
Time t=4
Machining time 4 2 3 2 2 3 2 1
The set of schedulable operations S1={4} Ø.
Step 2. Operation 4 is selected.
Step 3. Operation 4 is scheduled on machine 1.
≠
876M2 3 6
The University of Iowa Intelligent Systems Laboratory
p p
M1
M2
1
3 6
4
Time t=6
The Final Schedule Part number 1 2 3Part number 1 2 3Part number 1 2 3Operation numberMachine numberMachining
1 3 2 4 5 6 7 8
1 2 2 1 1 2 1 2
4 2 3 2 2 3 2 1g
time 4 2 3 2 2 3 2 1
M 1 741 5
The University of Iowa Intelligent Systems Laboratory
The makespan = 103 6 8
M2 Time
93 6 2 8
0 10