and material handling carriers, and constraints, such as precedences, due dates etc. The KBSS works as follows. First the scheduling problem is defined in a ...
Math/ Comput. Modelling, Vol. 13, No. 3, pp. 37-55, 1990 Printed in Great Britain. All rights reserved
0895-7177/90 $3.00 + 0.00 Copyright 0 1990 Pergamon Press plc
KBSS: A KNOWLEDGE-BASED SYSTEM FOR SCHEDULING IN AUTOMATED MANUFACTURING A. Department
of Industrial
and Management
KUSIAK
Engineering,
University
of Iowa, Iowa City, IA 52242, U.S.A.
Abstract-In this paper a knowledge-based scheduling system (KBSS) designed for an automated manufacturing environment is presented. Frames and production rules have been applied to represent declarative and procedural scheduling knowledge. A heuristic algorithm is incorporated into the knowledge-based system. The KBSS allows us to consider basic and alternative process plans. Each process plan specifies manufacturing resources, such as machines, tools, fixtures and material handling carriers, as well as their sequence. The knowledge-based system is illustrated with a numerical example. The heuristic algorithm is the key component of the system. The system has been tested on a number of scheduling problems. Computational experience proves that the solutions generated are of a quality
acceptable in industry.
1. INTRODUCTION problem in manufacturing systems has been of interest to many practitioners and researchers. It is even more important in automated manufacturing systems due to the following:
The scheduling
l
l
Considerable capital investment, and therefore the need for high utilization of manufacturing resources such as machines, robots etc. Increased number of variables because of the introduction of new resources, such as fixtures, pallets, automated material carriers etc.
There are two basic approaches systems: 0 Optimization. l Knowledge-based
used for solving the scheduling problems in manufacturing
approach.
The optimization approach for solving scheduling problems has been explored in depth elsewhere [e.g. l-31. Some of the most recent references for solving scheduling problems using the optimization approach are listed in Table 1. The algorithms listed in Table 1 can be invoked by the knowledge-based scheduling system (KBSS), provided that a suitable application arises. The likelihood of using any of the above or other models published in the scheduling literature for solving problems in automated manufacturing systems is low, because of some of their features (discussed later in this paper). Due to the high computational complexity of scheduling problems, optimization methods often fail to solve them. Since the optimization approach has not been fully successful in solving many scheduling problems, an expert system approach has been suggested. To date, a number of prototype expert systems have been developed to solve the scheduling problems arising in manufacturing systems. Some of the more recently developed expert systems are listed in Table 2. Each of the expert systems listed in Table 2 has been developed using knowledge elicited from experts or designers. Based on the knowledge collected, the basic components of the expert system such as knowledge base and inference engine were coded. The difference between the various expert systems listed in Table 2 is in the domain knowledge and control strategy used by each inference engine. The approach used to develop the knowledge-based system presented in this paper is different from the approaches applied in the development of the systems in Table 2. The KBSS has the following features:
(1) It uses knowledge elicited from different sources, including human experts, a designer and the literature. It (2) is based on the tandem architecture presented in Ref. [24], which integrates the optimization and knowledge-based approach. 37
A. KUSAK
38 Table
I,
Sample scheduling
problems
and algorithms
Type of algorithm
Ref.
Optimal
[41
Optimal
(51
Parallel machine scheduling
Optimal
[61
Flow shop scheduling
Optimal
t71
Job shop scheduling
Heuristic Heuristic Optimal
[gl [91 WI
Optimal
[ill
Optimal
[I21
Optimal
[I31
Problem One-machine scheduling
problem
Manufacturing system with multiple identical production lines
Manufacturing scheduling
cell
(3) It has been developed for an automated manufacturing environment. The scheduling problem which is being solved can be classified as a job shop problem with a number of different resources, such as machines, tools, fixtures, grippers and material handling carriers, and constraints, such as precedences, due dates etc. The KBSS works as follows. First the scheduling problem is defined in a prescribed format, which is the system input. The input is processed by the system, which initially decides which of the pre-defined algorithms should be employed. One of the algorithms is a heuristic, presented in Section 2 of this paper; the others are taken from the scheduling literature. If the heuristic algorithm is activated, it attempts to find a solution, but if it has trouble it relinquishes control to the production rules, which seek a solution through inferencing. The structure of the knowledge-based system and several sample production rules are presented in Section 3. A numerical example illustrating the algorithm and the knowledge-based system is presented in Section 4. Computational results for a number of sample problems solved are presented in Section 5. Conclusions are drawn in Section 6. Table 2. Sample scheduling Problem
Job shop scheduling
Automated manufacturing system scheduling
problems
and expert systems Control strategy
Ref.
Constraint-based analysis Constraint-directed search Heuristic
[I41 WI [I61
Production rules Frames and production rules
Meta-rules Heuristic
u71 US1
Frames
Constraint-directed
Knowledge representation Production Frames Production
rules rules
Production
rules
Simulation
Production
rules
Forward
Project scheduling
Frames E-nets
and
Robot
Production
rules
search
u91 [201
chaining
[2ll
Heuristic
[221
Meta-rules
I231
KBSS: a knowledge-based
2.
THE
scheduling system in manufacturing
SCHEDULING
39
ALGORITHM
A process plan specifies the operations belonging to the part, processing times of all the operations, and the resources required such as machines, tools, pallets/fixtures etc. In many manufacturing systems, one associates with each part a basic process plan and one or more alternative process plans. For the purpose of this paper the basic process plan is the optimal process plan while the alternative process plan is a suboptimal process plan. The resources specified by the alternative process plan are at least partially different from the resources of the basic process plan. Before the heuristic algorithm is presented, the following notation and definitions are introduced: Z K ZPk L Q, dk h rt,
set of all operations; set of all parts; set of operations belonging to part Pk, k E K; set of all resource types; set of resources of type I, I EL; due date of part Pk, k E K; completion time of operation i, i E I; remaining processing time of operation i, i E I; number of successive operations of operation i in part Pk, i E Z, k E K; nSik nb, number of immediate (directly linked by precedence constraints) successive operations following operation i in part Pk, i E Z, k E K; number of unprocessed operations in part Pk corresponding to operation i, nPik iEZ, kEK; t current scheduling time; ‘14 resource q of type 1, q E Q,, 1 E L.
In particular, the following four types of resources are used: Machine (I = 1). Tool (I = 2). 0 Pallet/fixture (I = 3). l Material handling carrier (I = 4). l l
Resource r,q is available if it can be used without any delay, q E Q,, 1 EL. The status srq of such a resource equals 1, otherwise sr,, = 0. A process plan PP!$ of a part Pk is a vector of triplets, each containing: operation number, processing time and a set of resources to process the operation. It is denoted as follows: PPP) = [(a; tt); Rt)), . . . , (i; tj”); Rj”)), . . , , (6; tt); Rt))], where Z@’ = (+),q9r(V) 2q,. ,
. .,
$‘I,
4
E
Q,, 1 E -L
a, . . . , 1, . . . , b denote the operation number, v = 0 denotes the basic process plan, v=l,2,...
denotes an alternative process plan, tf”
denotes the processing time of operation i using process plan v.
For simplicity in further considerations,
two assumptions are made:
1. It is assumed that the number and type of operations in a basic process plan and the corresponding alternative process plan are identical. This assumption allows us to switch processing from the basic process plan to an alternative process plan, and the reverse after completion of the operation considered. 2. Without loss of generality, it is assumed that tj’) < ty), i E Z, which holds in practice. A process plan PPjJ’ for part Pk and the corresponding operations is available, if each element in PP5j” has been specified.
A. KUSIAK
40
Operation i is scheduleable at time t, if: (1) No other operation that belongs to the same part is being processed at time t. (2) All operations preceding operation i have been completed before time t. (3) All resources required by the basic process plan to process operation i are available at time t. Based on the above definitions, further notation is introduced: operation status, 0,
1, 2, 3, 4,
si = 1
operation i is nonscheduleable, operation i is scheduleable, operation i is being processed, operation i has been completed, operation i satisfies the first two conditions in the definition of scheduleability;
resource status,
1, resource rIq is available, “I4 = i 0, otherwise; S,
set of operations with si = j, j = 0, 1,2,3,4,
stk slack time of part Pk st, = noik
(
dk - t -
c ic.SouSl
i E I; tj’)
for i E IP,, k E K:
1
number of operations in S, n IP,, i E I, k E K.
In the process of schedule generation, an operation might not be processed according to the basic process plan, due to unavailability of the resources specified in the basic process plan. The scheduling heuristic presented in this section exits from Step 3 and Step 6, and enters the inference engine of the knowledge-based system. For the class of problems considered in this paper a number of priority rules have been tested. Based on performance, the following seven priority scheduling rules have been incorporated into the heuristic algorithm: Rule PI: selects an operation with the largest number of successive operations. Rule P2: selects an operation belonging to a part with the minimum number of scheduleable operations. Rule P3: selects an operation with the largest number of immediate successive operations. Rule P4: selects an operation belonging to a part with the largest number of unprocessed operations. Rule P5: selects an operation with the shortest processing time. Rule P6: selects an operation belonging to a part with the shortest slack time. Rule P7: selects an operation arbitrarily. Some of the terms used in the above priority rules are defined. Consider a part that has the structure shown in Fig. 1. As shown in Fig. 1, all operations but 1 and 6 have precedence constraints. Assume that the part is being scheduled and operation 1 has been completed. In this case the number of unprocessed operations is five (operations 2-6). One also notes in Fig. 1 that operation 2 is followed by three successive operations, 3-5, while operation 6 has zero successive operations. Operations 3 and 4 are the immediate successive operations of operation 2. A slack time of a part is the difference between its due date and completion time of its final operation. The Priority Rules Pl-P7 are used in Step 2 of the algorithm. If more than one operation is selected by a rule, the following rules perform further selection. Different sequences of the priority rules have been tested for various problems and the results are reported later in this paper.
KBSS: a knowledge-based scheduling system in manufacturing
41
0 6
Fig. 1. Sample part with 6 operations
Heuristic
Algorithm
Step 0. Set current time t = 0 and resource status or,, = 1, q E Q,, I E L. the following two sets: Step 1. Construct l the set S, of nonscheduleable operations (si = 0); l the set S, of scheduleable operations (s, = 1). i* based on the following operations S,, select an operation Step 2. In the set of scheduleable priority rules: Pl:
?rSi..k= ‘I”,“,”{nsik>, I
kEK;
P2:
nOi*.k= ml
{no,},
kEK;
P3:
nb,.,k = Ta;x{nb,p}, I
kEK;
P4:
np,*., = ‘;“,;x (n&4}, I
kEK;
P5:
ti*
= min {tl”‘}; rss,
P6:
st,.
= min
I
keK
dk - t ie.souS,
c
t’0’ . I 9 I
P7: break a tie arbitrarily. Step 3. Set: l operation status s,. = 2 for operation i* selected in Step 2; l operation status s, = 0 for all the unprocessed operations of the part corresponding to operation i*. Delete operation i* from S,. If S,uS, = 0, stop; otherwise, set: 0 remaining processing time rt. = tj?); l resource status SY,,,= 0, for r/4 E RI?‘, q E Q,, 1 E L. Update sets of scheduleable operations S, and nonscheduleable operations So. If S, # 0, go to Step 2. If S, = 12/ and no resource is available, go to Step 4; otherwise update set S,, enter the inference engine and return. set of operations being processed S,, and: Step 4. Construct 0 calculate completion time J = rti + t, i E S,; 0 set current time t = f;= :$I [A]; 2 0 set operation status ST= 3; l delete operation lfrom S,; l set resource status srlq = 1, Y,,E R$, q E Q,, 1 EL; 0 set remaining time rt, =A - t, i E S,. Update set of scheduleable operations S, and nonscheduleable operations So. Step 5. If S,uS, = 0, stop; otherwise, go to Step 6. Step 6. If set of scheduleable operations S, # 0, go to Step 2. If S, = fzl and no resource is available, go to Step 4; otherwise update set S,, enter the inference engine and return.
A.
42
KLJSIAK
The algorithm presented above solves scheduling problems with due dates. If the due date is not imposed for a part Pk, the corresponding value of dk is set at an arbitrary large number. The above algorithm is embedded into the knowledge-based system discussed in the previous section.
3. THE
KNOWLEDGE-BASED
SCHEDULING
SYSTEM
(KBSS)
Numerical algorithms have traditionally been used for solving scheduling problems. The approach presented in this paper involves not only algorithms but also declarative and procedural knowledge and an inference engine, all implemented as a KBSS. The KBSS performs the following two basic functions: l l
Selects an algorithm for the problem considered. Controls the schedule generation procedure of the algorithm selected.
The KBSS is built using the tandem architecture proposed Ref. [24]. The basic components of the KBSS are shown in Fig. 2. As shown in Fig. 2 the KBSS involves: Knowledge base. Algorithm base. l Data base. 0 Inference engine.
l
l
3.1. Knowledge
base
The knowledge in the KBSS has been acquired from two scheduling experts, a system designer and the scheduling literature. The knowledge was elicited using a protocol analysis. For details of protocol analysis applied to a manufacturing environment see Ref. [25]. Frames are used to represent declarative knowledge related to the description of scheduling problems, parts and operations, and the schedules generated. The procedural knowledge of the KBSS is in the form of production rules. To handle different problems the production rules are divided into the following three classes: Class 1: selects an appropriate algorithm to solve the problem considered. Class 2: controls the procedure of selecting alternative process plans and modifying the sequence of the priority rules in the heuristic algorithm. Class 3: evaluates the schedules obtained and performs rescheduling. Several sample production
rules in each class are presented below:
Class 1
Rule 11: IF the scheduling problem considered is a two-machine flow shop problem THEN
solve it using Johnson’s algorithm.
121
Rule 12: IF the scheduling problem involves less than 5 features AND the number of operations is less than 60 AND alternative process plans are not available THEN use the mixed integer linear programming formulation. (See the formulation presented in the Appendix.)
@@fi!g Fig. 2. Structure
of the KBSS.
KBSS: a knowledge-based scheduling system in manufacturing
43
Class 2
Rule 24:
Rule 25:
IF an alternative process plan is specified for an operation that is not scheduleahle due to unavailability of the resources listed in the basic process plan AND the required alternative resources for the operation are available AND the sum of the waiting and processing time for the operation in the basic process plan is longer than one in the alternative process plan THEN replace the basis process plan with the corresponding alternative process plan AND add the corresponding operations to the set of scheduleable operations. IF more than one operation has been added to the set of scheduleable operations using production rule 24 THEN select one operation with the alternative processing time closest to the value of the corresponding basic processing time.
Class 3
Rule 36:
Rule 37:
Rule 38:
IF a part in a partial (or final) schedule generated by the heuristic algorithm does not meet the required due date THEN schedule the part ensuring that the due date is satisfied AND reschedule other parts using the heuristic algorithm. IF the heuristic algorithm is used for rescheduling AND the starting time of an operation has been fixed for a machine AND there is an idle time between the first operation and the rescheduled operation THEN attempt to reduce the idle time by using production rule 39. IF all due dates have been met in the final schedule THEN accept the schedule.
3.2. Algorithm base
The algorithm base stores a number of algorithms discussed in the scheduling literature. Additional algorithms can be easily incorporated into the base. The heuristic algorithm presented in the previous section is the most likely to be used for solving scheduling problems in large-scale automated manufacturing systems. 3.3. Data base The data base contains parameters of the scheduling models as well as working areas used by the algorithms. 3.4. Inference engine
The inference engine in the KBSS controls the procedures of triggering rules in the knowledge base and the schedule generation of an algorithm. One of the greatest advantages of the tandem system architecture is the simplicity of the inference engine. The inference engine in the KBSS employs a forward-chaining control strategy. In a given class of rules it attempts to fire all the rules which are related to the context considered. If a rule is triggered, i.e. the conditions are true, then the actions of the rule triggered are carried out. Some rules stop the search of the inference engine and switch the control process to the algorithm. The inference engine maintains a list of the rules which have been fired. This list is called “explain.” The rules in “‘explain” are placed in the order that they were fired. The list forms a basis for building an explanation facility. In the next section, the heuristic algorithm and sample production rules are illustrated with a numerical example. 4.
Schedule 12 operations, It is assumed that: l l l
NUMERICAL
EXAMPLE
as shown in Fig. 3, on 3 machines.
Three different tools are available to process the operations. All other resources are unlimited. Due dates are not imposed.
A. KUSIAK
44
Fig. 3. Parts
with operations
and precedence
constraints.
The following notation is used for resources: rrq rzq
denotes machine (resource type l), q = 1,2,3; denotes tool (resource type 2), q = 1,2,3.
The machine and tool status are represented as follows: srlq denotes machine status, q = 1,2, 3; srzq denotes tool status, q = 1,2, 3; denotes the processing time tj’) of operation ti
i in the basic process plan.
The basic process plans of the four parts are shown below: PPjO’: [( 1; 4; 2,2), (2; 5; 1,3), (3; 2; 3,2)]; PP($‘: [(4; 6; 1, 3), (5; 3; 2,2), (6; 3; 3, l)]; PPj’:
[(7; 3; 3, l), (8; 3; 1,2), (9; 6; 3, l), (IO; 2; 1,3)];
PP:‘:
[(ll; 4; 3,2), (12; 3; 2,3)].
Note that for any triplet in the above process plans, the first element denotes the operation number, the second denotes the processing time and the third pair denotes the required machine number (resource type 1) and tool number (resource type 2). The alternative process plans for the four parts are: PP’,“:
[(l; 6; 3, l), (2; 6; 2,2), (3; 4; 1, l)],
PP\?
[(l; 7; 1,3), (2; 7; 1,2), (3; 5; 1,3)];
PP$“:
[(4; 6; 2,2), (5; 4; 3, l), (6; 5; 1,2)],
PPP’:
[(4; 8; 3, l), (5; 8; 1,3), (6; 5; 2,3)];
PP’:‘:
[7; 4; 3,2), (8; 5; 3,3), (9; 7; 2, l), (10; 2; 3,2)],
PPj2’: [(7; 4; 2,2), (8; 5,2, l), (9; 9; 1,3), (10; 4; 1,2)]; PPk”:
[(11;4; 1,3),(12;5;
1,2)],
PPV’:
[(ll; 4, 3, l), (12; 6; 3, 3)].
4.1. Solution procedure Step 0. Set current time t = 0 and sr,, = 1,1 = 1,2, q = 1,2,3. Step 1. Construct the following two sets: l So = {2,3,6, lo}; l S,={1,4,5,7,8,9,11,12}. Step 2. Using Priority Rule Pl, operation 1 is selected.
KBSS: a knowledge-based scheduling system in manufacturing
45
Step 3. Set: s, = 2, s2 = 0, S) = 0. Since &US, = (2,3,4,5,6,7,8,9, 10, 11, 12) # a, set: l rt, = t, = 4; 0 sr,2 = 0, srz2 = 0. Set of scheduleable operations S, = {4,7,9} # 0. Go to Step 2. Using Priority Rules Pl and P2, operation 4 is selected. Set: 0 s,=2; 0 ss =o, sfj = 0. Since SouS, = {2,3,5,6,7,8, 9, 10, 11, 12 } # 0, set: l rt, = t4 = 6; l sr ,, --0 , srz3 = 0. Set of scheduleable operations S, = {7,9} # 0. Go to Step 2. Using Priority Rule Pl, operation 9 is selected. Set: l s,=2; 0 s,=o, s* = 0, s,o = 0. Since &US, = (2,3,5,6,7,8, 10, 11, 12) # 0. set: l rt, = t, = 6; 0 sr,3 = 0, sr,, = 0. Set of scheduleable operations S, = 0. Since S, = 0 and no resource is available, go to Step 4. Construct S, = { 1,4,9}, and: l calculate completion time f, = 4, f4= 6, f9 = 6; l set current time t = f,= min{4,6,6} = 4; 0 set s, = 3; l delete operation 1 from S,; 0 set srlz = 1, sr22 = 1; l set remaining time rt, = 6 - 4 = 2, rt, = 6 - 4 = 2; Set of scheduleable operations S, = 0 (there is no operation with the status equal to 1). Since S,uS, = {2,3,5,6,7,8, 10, 11, 12) # 0, go to Step 6. Since S, = 0 and machine 2 and tool 2 are available, set S, = (2, 11, 12) and enter the inference engine. The inference engine activates Production Rule 24 in Class 2 to select an alternative process plan for operation 2. l
l
Step 2. Step 3.
Step 2. Step 3.
Step 4.
Step 5. Step 6.
Time
M31-
Time
(1)
I
Operation according
i uses tool to the basic
k and is processed process plan
Fig. 4. The final schedule.
Em
Operation according
j uses tool 1 and to the alternative
is processed process plan
Fig. 5. The modified schedule of Fig. 4.
Pl-P2-P3-P&Ps-P6 P2-PI-P3-P&P>P6 P3-P2mPILP4-P5-P6
24-3 24.3 24.3
25.5 25.5 25.5
PILP2ZP3-P4_PSP6 P2ZPlLP3-PkP5SP6 P3-P2ZPlLP&P5SP6
Problem 3 IO Machines I6 Parts I I6 Operations
0
0.99 0.99 0.99
5.34 5.21 5.28
6.47 6.54 6.75 6.47
0.98 0.99 0.98 0.99
27.5 27.3 27.5 27.3
Minimum Maximum flow Time: 27.0
30.0 28.5 30.0 28.5
6.63 6.52 6.56
0.99 0.99 0.99
27.3 27.3 21.3
9.44 9.51 9.78 9.29
0.99 0.99 0.99 0.99
28.5 28.5 28.5
0
9.95 9.37 9.43
0.99 0.99 0.99
k
24.2 24.3 24.2 24.3
24.3 24.3 24.3
F
CPU time
results for scheduling
25.5 25.5 25.5 25.5
25.5 25.5 25.5
F,,”
Table 3. Computational
P&P2SP3-PI-Ps-P6 PI-P3-P2-P&P%P6 P3-PI-P4-P2ZPSP6 PZZP3SPILP4-PS-P6 No. of precedence constraints
Problem 2 I2 Machines 18 Parts 132 Operations
Minimum Maximum flow Time: 24.0
PkP2ZP3SPl -P5-P6 PI-P3-PZ-P&P5-P6 P3-Pl-P4PZZPs-P6 P2-P3-PI-P4PSP6 No. of precedence constraints
Problem I I4 Machines 20 Parts 160Operations
Sequence of priority rules
24.5 25.0 24.5
30.0 29.0 28.5 30.0
29.0 30.0 29.0
26.5 27.0 26.0 26.5
27.0 26.5 26.5
F ma”
problems
24. I 24. I 24. I
21.5 21.3 27.2 27.5
27.3 27.5 27.3
24.4 24.5 24.4 24.1
24.5 24.1 24.5
F
36
48
0.99 0.99 0.99
0.98 0.99 0.99 0.98
0.99 0.98 0.99
0.99 0.98 0.98 0.97
0.98 0.97 0.98
ur
with basic process plans
4.91 4.90 4.94
6.16 6.05 6.21 6.05
5.95 6.00 5.99
8.46 8.56 8.31 8.03
8.44 1.92 8.36
CPU time
21.0 28.0 28.0
29.5 29.5 28.0 32.5
29.5 32.5 32.5
27.0 26.5 26.5 26.0
26.5 26.0 26.0
F nmr
24.8 25.3 25.3
27.8 21.7 21.5 28.5
27.7 28.5 28.5
25.4 25.5 25.5 24.8
25.5 24.8 24.8
F
II4
140
0.97 0.95 0.95
0.97 0.98 0.98 0.95
0.98 0.95 0.95
0.95 0.94 0.94 0.97
0.94 0.97 0.97
(i,
4.45 4.40 4.56
5.41 5.10 5.08 5.29
5.08 5.06 5.34
7.81 1.27 1.49 7.76
7.19 1.41 7.79
CPU time
PI-PZ-P3-P4-P5-P6 P2-PI&P3-PbPs-P6 P3-P2-Pl-P4Ps-P6
PlLP2mP3SP4PSP6 P2mPlLP3SP&P5SP6 P3SPZZP I mP4P5SP6
P4-P2-P3-Pl-P5-P6 PILP3SP2-P4P5-P6 P3-PILP4P2-PSP6 P2-P3SPlLP&P5SP6 No. of precedence constraints
Minimum Maximum Row Time: 27.0
Problem 5 6 Machines 9 Parts 66 Operations
Minimum Maximum Row Time: 19.0
P4-P2-P3-P I-P>P6 Pl-P3SP2-P4-P5-P6 P3~Pl-PkP2-PSP6 P2SP3mPILP&PSmP5 No. of precedence constraints
Problem 4 12 Machines 18 Parts 94 Operations
P4-PZ-P3-Pl-PSP6 Pl-P3-P2-P4-PI-P6 P3-Pl-P4P2-P5-P6 P2-P3-Pl-P4_P>P6 No. of precedence constraints
Minimum Maximum flow Time: 24.0
27.5 28.5 21.5 28.5
28.5 28.5 28.5
19.5 21.0 19.5 21.0
21.0 21.0 21.0
25.0 25.5 25.0 25.5
27. I 27.3 27. I 27.3
21.3 27.3 27.3
19.3 19.4 19.3 19.4
19.4 19.4 19.4
24.2 24.3 24.2 24.3
0
0
0
0.99 0.99 0.99 0.99
0.99 0.99 0.99
0.99 0.98 0.99 0.98
0.98 0.98 0.98
0.99 0.99 0.99 0.99
I .78 I .87 I .89 1.70
I .78 1.73 I .79
3.50 3.47 3.66 3.44
3.52 3.40 3.43
5.35 5.34 5.48 5.28
29.0 27.0 29.5 29.0
27.0 29.0 27.0
21.0 21.0 22.0 20.5
21.0 20.5 21.5
25.0 24.5 25.0 25.0
27.4 27.0 27.5 27.8
27.0 27.8 27.0
19.8 19.4 19.5 19.3
19.4 19.3 19.6
24. I 24. I 24.2 24. I
I9
24
28
0.99 1.00 0.98 0.97
I .oo 0.97 I .oo
0.96 0.98 0.97 0.99
0.98 0.99 0.97
0.99 0.99 0.99 0.99
I.61 1.74 1.75 1.54
I .70 I.51 1.71
3.08 3.06 3.17 3.13
2.98 3.13 3.01
4.83 4.96 4.99 4.95
31.0 29.0 30.5 31.0
29.0 31.0 31.0
22.0 21.5 21.5 21.5
21.5 21.5 21.5
28.0 27.0 21.5 28.0
28.6 27.4 28.2 28.6
27.4 28.6 28.6
20.3 19.7 20. I 20.0
19.7 20.0 20.0
24.9 24.8 25.0 25.3
57
76
100
0.95 0.99 0.96 9.95
0.99 0.95 0.95
0.94 0.97 0.95 0.95
0.96 0.95 0.95
0.96 0.97 0.96 0.95
I.51 I .45 I .47 I .42
1.41 1.35 I .42
2.92 2.76 2.77 3.03
2.74 2.92 3.04
4.59 4.42 4.46 4.56
A. KUSIAK
48
Rule 24:
SINCE the alternative process plan is specified for operation AND the alternative resources for operation 2 (r,2 and rt2) AND the sum of the waiting and processing time for operation plan (2 + 5 = 7) is longer than one in the
2, in S, are available 2 in the basic process alternative process
plan (6) THEN operation 2 is moved from S, to S, AND the basic process plan of operation 2 is is replaced with the corresponding alternative process plan (2,6,2,2).
After the basic process plan has been replaced with the alternative process plan, the inference engine transfers the information to the heuristic algorithm and operation 2 is scheduled by the algorithm. The Gantt chart of the final schedule obtained after seven iterations is shown in Fig. 4. Table 4. Computational
Problem NO.
NO. of machines
NO. of parts
results for scheduling
NO. of operations
problems
NO. of preced. constr.
with basic and alternative No. of alternative process plans bor each part
14
20
160
1
48 i
140 :
0
1
F
%I
CPU time
12 13 14 I’
137.0 I Il.5 109.0 106.7 III.5 118.6 132.5
83.2 82.9 84.1 86.5 86.2 90.5 89.9
0.97 0.99 0.98 0.97 0.98 0.95 0.95
13.08 12.46 12.91 12.57 12.63 12.40 13.33
0 I0 I’ 12 I’ 14 15
137.0 113.5 114.6 114.1 120.7 121.5 127.0
88.5 90. I 90.6 91.2 91.9 92.9 93.5
0.89 0.89 0.90 0.91 0.93 9.93 0.91
12.56 Il.94 12.20 12.07 12.19 12.44 12.26
0 I0 I’ I* 1’ 14 15
137.0 107.0 109.8 I I I.8 116.5 128.5 126.5
108.3 92.8 98.5 98.6 100.6 109.6 108.4
0.73 0.87 0.83 0.84 0.84 0.77 0.78
12.96 II.93 12.22 12.19 12.52 12.17 II.77
0 I” I’ 12 13 14 1s
263.5 163.0 162.0 178.0 163.4 174.1 184.6
106.2 107.9 107.2 109.4 114.6 114.1 118.2
0.95 0.93 0.96 0.95 0.93 0.95 0.94
15.31 13.82 13.73 14.36 14.56 14.27 14.15
0
263.5 162.5 180.5 176.0 186.3 176.5 175.0
116.3 I I I .8 113.3 117.9 121.1 122.5 124.6
0.86 0.90 0.90 0.88 0.85 0.87 0.87
14.13 13.16 13.64 14.00 13.68 13.74 13.92
263.5 153.0 153.5 163.5 160.0 168.0 174.0
177.1 126.6 127.4 130.6 135.0 137.1 143.7
0.59 0.80 0.82 0.81 0.80 0.79 0.77
13.29 12.28 12.88 12.92 13.17 13.24 13.01
;P
1: 2
20
14
160
48 1
12 13 14 15 0 ;:
140 1 ‘Alternative ‘Alternative *Alternative ‘Alternative 4Altemative ‘Alternative
processing processing processing processing processing processing
time time time time time time
is is is is is is
0% longer 10% longer 20% longer 40% longer 60% longer 80% longer
than than than than than than
the basic processing time. the basic processing time. the basic processing time. the basic processing time. the basic processing time. the basic processing time.
KBSS solution
F,,X
0
0
process plans
12 I’ 14 15
KBSS: a knowledge-based
scheduling
system in manufacturing
49
The scheduling problem in the above example was solved under the assumption that the due dates were not imposed. The KBSS allows us to solve scheduling problems with due dates. In the later case there is no guarantee that all due dates will be satisfied. The user might insist that particular due dates have to be satisfied. Using a backtracking mechanism the system attempts to satisfy the due dates violated. To illustrate the backtracking capability assume that the problem whose solution is illustrated in Fig. 4 involved a due date d4= 12 for part P4 (operation 12) and that the due date is violated. Production rules are activated and part P,, as well as other parts are rescheduled. The new schedule generated is shown in Fig. 5. In this schedule, dpe date for part P4 is satisfied. Note that in the above example, only machines and tools have been considered. The KBSS is general enough to consider other resources, such as pallets/fixtures, material handling carriers etc.
5.
COMPUTATIONAL
RESULTS
In this section, computational experience with the KBSS is presented. The heuristic algorithm discussed in Section 2 is the most likely algorithm to be used when solving industrial scheduling problems in automated manufacturing systems. The results generated by the KBSS can be improved by using other production rules. The degree of improvement depends upon the quality of the knowledge collected. In order to evaluate the quality of solutions generated by the KBSS, sample problems have been solved. Three measures of performance that are frequently used in industry and the scheduling literature were selected: (1) maximum
flow time (F,,,),
F,,,,, = max {F,}, r
(2) average
i=l
,...,N;
flow time (7),
where Fj is the flow time for machine i and N is the number (3) average machine utilization rate (V,,,),
U,,,= f
of machines;
U,iN,
r=l
where Vi=
1
tp'/F,,
ktzM(i)
tSJ’is the processing time of operation of operations processed on machine
k using process plan v and M(i) is the set i.
In order to evaluate the effect of the sequence of Priority Rules Pl-P6 on the solution quality, a number of scheduling problems have been solved for five different sequences of priority rules. It was assumed that all machines were operational in the scheduling horizon. The computational results for the five sample problems with basic process plans only are presented in Table 3. The impact of alternative process plans on three performance measures F,,,, F and U, is illustrated in Table 3 with the results obtained for two scheduling problems. For each problem three instances with 0, 48 and 160 constraints have been solved. For each instance, a scheduling problem with a basic process plan only, and a mixture of basic and alternative process plans were considered for five different values of processing times. All processing times in the alternative process plans were calculated as a percentage of the corresponding basic process plans, namely 0, 10, 20, 40, 60 and 80% longer than the basic process plans.
No. of operations
I60
132
No. of parts
20
I8
No. of machines
I4
12
Problem No.
I
2 6
7
problems
36
140
48
0
1
1
1
1
No. of preced. constr
results for scheduling
No. of machine breakdowns
Table 5. Computational
2.41 4.29 1.14 0.55 0.04 5.68
I .58 3.49 6.30 2.60 3.50 4.98
0.64 3.61 2.22 3.29 5.27 0.13
3.86 I .09 3.61 4.42 2.02 I .56 1.32
2.31 2.40 I .oo 4.56 2.75 1.16 0.09
I .70 5.81 I.31 5.13 2.28 4.69 5.07
Duration of machine breakdown
34.0
32.0
I
31.5
0
I
33.3
31.0
I
0
32.3
28.6
31.1
27.3
29.0
27.0
30.0
F,,,
0
I
0
I
0
I
0
No. of alternative process plans for each part
with machine breakdowns
29.2
30.9
29.2
29.5
28.4
28.9
25.8
27.3
25. I
25.5
26. I
26.4
F
0.93
0.88
0.93
0.92
0.95
0.94
0.93
0.88
0.96
0.95
0.92
0.92
4
KBSS solution
1.45
6.08
1.36
7.07
8.44
8.01
10.8
9.07
11.2
IO.1
12.0
II.7
CPU time
18
12
6
4
5
9
16
IO
3
66
94
116
3
6
5
57
19
0
76
24
100
28
0
1
1
-t
1
!
1
1
1.69
0
1.93
0
5.05 4.16
I
4.82
0.52
I
0
I
0
I
0
I
0
1.58
5.70
0.98
3.96
2.52
1.32
1.07
3.96
3.52
4.38
3.02
0.46
5.34
4.12
4.19
0.44
2.59
4.06
1.73
4.13
0.96
6.10
3.02
I.41
0.76
4.21
2.14
5.89
I.01
3.92
3.39
5.98
1.13
6.36
5.88
36.1
31.9
31.8
30.6
33.7
24.0
23.5
23.0
25.0
23.0
24.0
21.8
30.8
27.0
29.9
28.0
30.4
33.1
28.4
28.4
28.9
29.0
21.2
21.5
21.2
21.4
20.2
20.4
26.5
27.9
25.7
26.0
26.2
26.5
0.91
0.82
1.75
2.06
2.06
0.96 0.99
2.14
2.19
4.26
3.42
4.48
3.84
4.66
4.44
5.61
5.20
5.89
5.79
6.86
6.58
0.94
0.94
0.90
0.89
0.90
0.89
0.94
0.94
0.90
0.86
0.93
0.93
0.92
52
A. KUSIAK
The results in Table 4 show that the introduction of an alternative process plan decreases the makespan (F,,,,,) and average flow time (F). It should be noted that using alternative process plans with processing time values significantly higher (even as much as 80%) than the basic process plans reduces I;,,, and F. The gains in F,,, and F are typically at the expense of an increased utilization rate. The results presented in Table 4 are representative of a sample of 50 problems. To evaluate the impact of alternative process plans on the solution quality in the case when machine breakdowns occur, for the problems in Table 3, alternative process plans were generated and the new set of problems was resolved under the assumption that half of the total machines considered breakdown for a random time interval. It was assumed that for each part the values of the processing time for the basic and alternative process plans were identical. The resources specified by each of the two process plans were at least partially different. The durations of the machine breakdowns were uniformly distributed in the interval (0.0,7.0). For comparison the range of the processing times was (0.5, 5.0). The results are presented in Table 5. Since the computational results in Table 3 suggest that there is no sequence of priority rules which is dominant over other sequences, the sequence Pl-P2-P3-P4-P5-PbP7 was used. In all the problems presented in Tables 3-5 the number of resources, except machines, was assumed unlimited. The computational time reported in the three tables is in CPU for an AMDAL-5870 computer. The computational results presented in Tables 3-5 allow one to draw the following conclusions: (1) Schedules generated by the KBSS are of good quality considering the complexity of the scheduling problems in automated manufacturing systems. Extensive computational experience showed that for each of the two performance measures selected (min F,,,,,and F), the results generated by the KBSS are frequently only a few percent worse than the optima1 ones. (2) The results in Table 3 indicate that there is no sequence of priority rules that is dominant in terms of the solution quality. Most (frequently all) of the seven priority rules are involved in the selection of the operation to be scheduled next and that is the reason why their sequence does not significantly affect the solution quality. (3) The results in Table 5 show that the incorporation of alternative process plans, in the case when machine breakdowns occur, provided solutions of better quality in terms of all three performance measures than for the case with basic process plans only. (4) Using alternative process plans increases scheduling flexibility and this in turn increases the machine utilization rate and reduces the scheduling makespan. The results in Tables 3 and 4 indicate that the CPU time increases with the increasing problem size and decreases with an increase in the number of precedence constraints. The CPU time is also slightly affected by the sequence of priority rules. It is obvious that as the problem size grows the computation time increases. Adding more precedence constraints to a scheduling problem, reduces the size of the space of feasible solutions and this reduces the CPU time. (5) The CPU time requirement of the KBSS is modest. The KBSS has been designed for real time production scheduling in an automated environment. Selecting a suitable scheduling horizon (problem size) allows to use the system in a real time mode.
6. CONCLUSIONS In the paper a KBSS suitable for automated manufacturing was designed. The KBSS contains a heuristic algorithm, which we developed, and a number of other existing algorithms for solving
KBSS: a knowledge-based
scheduling
system in manufacturing
53
scheduling problems. While numerical calculations are performed by the algorithm selected, the KBSS performs the following functions: l
l
l
Selects an appropriate algorithm (including the heuristic algorithm)-the most suitable for the problem considered. Most of the scheduling algorithms available in the literature have a limited scope of application in manufacturing due to simplifying assumptions. The heuristic algorithm presented in Section 2 is the most likely to be used for solving scheduling problems in automated manufacturing systems. Selects alternative process plans to schedule operations. Alternative process plans increase the scheduling flexibility. Evaluates the generated schedules and performs rescheduling when required. Rescheduling is performed whenever a performance measure (e.g. makespan) associated with the schedule obtained is not satisfactory.
The testing effort has been concentrated on the heuristic algorithm and the production rules handling the alternative process plans. First, an attempt was made to identify the best possible sequence of priority rules. However, based on the computations performed, no conclusive results could be derived. For a selected sequence of priority rules, a number of sample problems with basic and alternative process plans typically resulted in solutions of better quality than problems with basic process plans only. This was especially visible in the case when machine breakdowns occurred. From the comparison of the optimal schedules and those generated by the KBSS, the following three conclusions can be drawn: (1) The schedules generated the optimal solutions. (2) Incorporating alternative in most cases, improves (3) Using alternative process the makespan.
by the KBSS are of a quality only slightly worse than process plans increases the scheduling flexibility and, the solution quality. plans increases the machine utilization rate and reduces
The optimization approach is suitable for solving problems with a high numerical computation requirement, while knowledge-based systems are suitable for qualitative problems. The integration of the two into the KBSS provides a powerful means for solving manufacturing scheduling problems. Since symbolic languages, such as LISP and Prolog, are not suitable for performing numerical computations, the heuristic algorithm was coded in FORTRAN-77. At present, the knowledge base is still under development. To facilitate interfacing of the algorithm and the knowledge base, the existing production rules have also been coded in FORTRAN and implemented on an AMDAHL5870 computer.
REFERENCES 1. K. R. Baker, Introduction to Sequencing and Scheduling. Wiley, New York (1974) 2. S. French, Sequencing and Scheduling: an Introduction 70 the Mathematics of the job-shop. Wiley, New York (1982). 3. R. E. Bellman, A. 0. Esosbue and I. Nabeshima. Mathematical Asaects of” Schedulinn and Aoolicarions. Peraamon Press. 1. Oxford (1982). 4. R. T. Nelson, R. K. Sarin, and R. L. Daniels, Scheduling with multiple performance measures: the one machine case. Mgmt Sci. 32(4), 464-479 (1986). 5. M. Pinedo and G. Weiss, Scheduling jobs with exponentially distributed processing time and intree precedence constraints on two parallel machines. Ops Res. 33(6), 1381-1388 (1985). 6. M. Dror, H. I. Stern and J. K. Lenstra, Parallel machine scheduling: processing rates dependent on number of jobs in operation. Mgmt Sci. 33(8), 1001-1009 (1987). 7. W. J. Selen and D. D. Hott, A mixed-integer goal-programming formulation of the standard flow-shop scheduling problem. J. Opl Res. Sot. 37(12), 1121-l 128 (1986). 8. P. Bunnag and S. B. Smith, A multifactor priority rule for job-shop scheduling using computer research. IIE Trans. 17(2), 141-146 (1985). 9. Y.-D. Kim, On the superiority of a backward approach in list scheduling algorithms for multi-machine makespan problems. Inr. J. Prod. Res. 25(12), 1751-1759 (1987). IO. J. Grabowski and A. Janiak, Job-shop scheduling with resource-time models of operations. Eur. J. opl Res. 2I3(I), 58-73 (1987).
A.
54
KLJSIAK
11. T. C. Hu, Y. S. Kuo and F. Ruskey, Some optimum algorithms for scheduling problems with changeover costs. Ops Res. 33(l), 94-99 (1987). 12. H. Emmons, Scheduling to a common due date on parallel uniform processors. NPU. Res. Logist. Q. 34(6), 803-810 (1987). 13. J. Surkis and A. Dogramaci, Minimizing the sum of weighted completion times of n-independent jobs where resource availability varies over time: performance of a simple priority rule. Nav. Res. Lo&r. Q. 35(l), 3547 (1988). 14. G. Bel, E. Bensana, D. Dubois, J. Erschler and P. Esquirol, A knowledge-based approach to industrial job-shop scheduling. In Knowledge-based Systems in Manufacturing (Edited by A. Kusiak), pp. 207-246. Taylor & Francis, London (1989). 15. M. S. Fox, Constraint-directed research: a case study of job-shop scheduling. Ph.D. Thesis, Carnegie-Mellon Univ., Pittsburgh, Pa (1983). 16. M. J. P. Shaw and A. B. Whinston, Application of artificial intelligence to planning and scheduling in flexible manufacturing. In Flexible Manufacturing Systems: Methods and Studies (Edited by A. Kusiak), pp. 223-242. North-Holland, Amsterdam (1986). 17. E. Bensana et al., An expert system approach in industrial job-shop scheduling. In Proc. 1986 IEEE Inc. Conf. on Robotics and Automation, San Francisco, Calif., pp. 1645-1650 (1986). 18. T. J. Grant, Lessons for O.R. form A.I.: a scheduling case study. J. Opl Res. Sot. 37(l), 41-57 (1986). 19. V. Chiodini, An expert system for dynamic manufacturing rescheduling. Presented at the Symp. on Real Time Optimization in Auromared Manufacturing Facilities, NBS, Gaithersburg, Md. (1986). 20. G. Bruno, A. Elia and P. Laface, A rule-based system to schedule production. IEEE Compur. 19(7), 3240 (1986). 21. R. M. Kerr and R. V. Ebsary, Implementation of an expert system for production scheduling. Eur. .I. opl Res. 33(l), 17-29 (1988).
22. T. E. Morton and T. L. Smunt, A planning and scheduling system for flexible manufacturing. In Flexible Manufacturing Systems: Methods and Studies (Edited by A. Kusiak), pp. 151-164. North-Holland, Amsterdam (1986). 23. A. Thesen and L. Lei, An expert system for scheduling robot in a flexible electroplating system with dynamically changing work loads. In Flexible Manufacruring Sysrems: Operation Research Models and Applications (Edited by K. E. Stecke and S. Suri), pp. 555-566. Elsevier, New York (1986). 24. A. Kusiak, Artificial intelligence and operations research in flexible manufacturing systems. Information Processing and Operational Research INFOR 25(l), 2-22 (1987).
25. C. Hayes, Automated process planning for prismatic parts. In Expert Systems: Srrategies and Solutions in Manufacturing Design and Planning (Edited by A. Kusiak), pp. 151-183. Society of Manufacturing Engineers, Dearborn, Mich. (1988).
APPENDIX Mixed Integer Linear Programming Model of the Manufacturing
Scheduling
Problem
One of the approaches to scheduling is to model the scheduling problem and then solve it using a commercial computer code or specialized algorithm. In this section a new mixed integer programming model for the problem of scheduling n operations with precedence constraints on m machines is presented. The scheduling problem considered is a generalization of the scheduling problem presented in Ref. [I]. To present the scheduling model the following notation is introduced: number of parts; number of machines; set of pairs of operations [k, I] for part P,, where k precedes I, i = 1, . . , n; set of pairs of operations [.4,I] for part P,, where k and lcan be performed in any order, i = 1, . , n; set of operations without precedence constraints, i = I, . , n; set of operations to be performed on machine p, p = 1, . , m; number of operations in part P,. i = 1,. , n; processing time of operation k of part P,, k = 1,. , n,, i = 1,. , n; an arbitrary large positive number; completion time of operation k of part P,, k = 1,. , n,, i = 1,. , n; completion time of the root operation of part P,, i = 1, , n; Yk/=
1, 1 0,
if operation k precedes operation I, otherwise, n;
V[k,I]oQ;,i=l,..., _Il? Zkl =
IO>
if operation k is processed before operation I, otherwise,
Vk,leNp,
p=l,...,m.
The objective of the scheduling model is to minimize the total completion time of all parts: ”
minC xc,)
(A.11
,=I
s.t. x,, - x,~ 2 r,,,
V[k,I]ER,,Vi;
64.2)
x,,-x,+M(l-y,,)at,,,
V[k, II E Q,, Vi;
64.3)
Yk, 4 E Q,, Vi;
64.4)
xik- x,( + MY~, 3
r, ,
KBSS: a knowledge-based
Fig. Al.
scheduling
Structure
system
in manufacturing
55
of three parts. Vk,IEN+,,Vp;
(A.51
x* - x,1 + MY,, a ‘,I >
i #j;
(A.61
x* 2
for i,k EI,, i=l,...,n, V other i, k;
(A.7)
x,/-
X,k +
MC1- Yk,)3 $3
t;r,
)i,=o,
1,
W,IlEQ,,Vi;
(A.81
%=o,
1,
Vk,IENp,Vp.
(A.91
and
Constraint (2) imposes that the operations of each part are (3) and (4) ensure that any two operations belonging to the (5) and (6) ensure that a machine cannot process more than nonnegativity and integrality, respectively. The application of the scheduling model is illustrated in
processed according to the precedences required. Constraints same part cannot be processed at the same time. Constraints one part at the same time. Constraints (7), (8) and (9) impose the following
example.
Example A 1 Schedule eight operations belonging in Table Al. Using scheduling model x13 = 20 is generated (see Fig. A2).
to three parts, as shown in Fig. Al, on two machines. The data required are given (l)-(9) to solve this problem, the optimal schedule xu = 26, x2, = 12, xl2 = 4 and
Table Al. Scheduling Part No. Operation No. Machine No. Processing time
0
4
I 123 112 356
13
Fig. A2. The optimal
data 2 12 12 84
1 2 9
20
schedule.
3 2
I
2
3 2 7
26