Docsity

Atelier Robotise recherche, Assignments of Operational Research

Toggle sidebar
bg1
DISCRETE
APPLIED
MATHEMATICS
ELSEVIER Discrete Applied Mathematics 65 (1996) 285 3 1 X
On a scheduling problem in a robotized analytical system
Alain Hertz*, Yves Mottet, Yves Rochat
.4bstract
We consider a robotized analytical system in which a chemical treatment has to be pcrformcd
on a set of n identical samples. The same predetermined ordered set of tasks has to be performed
on each sample. A unique robot has to transport the samples between the resources. The time
spent by a sample in a resource is bounded by given minimal and maximal values. No-wait
constraints and additional requirements such as blocking resources or limited capacities ha\c
to be taken into account. The objective is to perform the chemical trcatmcnt on the whole SCI 01
II samples in the shortest possible time. while satisfying all the constraints.
We describe a fast heuristic scheduling algorithm for solving this problem and apply it to
a robotized sample preparation of membrane fatty acid esters for the identification of baclcriil.
The proposed algorithm was implemented in practice and has proven to bc satisfactor).
h’e_~~~~~d.s: Scheduling problems; No-wait constraints: Robotired system: Heuristic method\
1. Introduction
This article considers the problem of scheduling the chemical treatment of II identical
samples in a robotized analytical system. It is motivated by a real life application: the
robotized sample preparation of membrane fatty acid esters for the identification of
bacteria.
The same predetermined ordered set of tasks has to be performed on each sample.
Each task can be viewed as an amount of time (not necessarily fixed in advance) that
a sample should spend in a resource of a given type. The samples may have to visit
several times the same resource. The resources (e.g. a rotator or a bath) may ha\,c
a capacity larger than one. This means that more than one sample can be treated
simultaneously in a same resource.
*Corresponding author.
0166&218X.!96iS15.00 (‘ 1996-Elsevier Science B.V. All rights reserved
SSDI 01 66-2 18X(95300039-9
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Atelier Robotise recherche and more Assignments Operational Research in PDF only on Docsity!

DISCRETE

APPLIED

MATHEMATICS

ELSEVIER (^) Discrete Applied Mathematics 65 (1996) 285 3 1X

On a scheduling problem in a robotized analytical system

Alain Hertz*, Yves Mottet, Yves Rochat

.4bstract

We consider a robotized analytical system in which a chemical treatment has to be pcrformcd on a set of n identical samples. The same predetermined ordered set of tasks has to be performed on each sample. A unique robot has to transport the samples between the resources. The time spent by a sample in a resource is bounded by given minimal and maximal values. No-wait constraints and additional requirements such as blocking resources or limited capacities ha\c to be taken into account. The objective is to perform the chemical trcatmcnt on the whole SCI 01 II samples in the shortest possible time. while satisfying all the constraints. We describe a fast heuristic scheduling algorithm for solving this problem and apply it to a robotized sample preparation of membrane fatty acid esters for the identification of baclcriil. The proposed algorithm was implemented in practice and has proven to bc satisfactor).

h’e_~~~~~d.s:Scheduling problems; No-wait constraints: Robotired system: Heuristic method\

  1. Introduction

This article considers the problem of scheduling the chemical treatment of II identical samples in a robotized analytical system. It is motivated by a real life application: the robotized sample preparation of membrane fatty acid esters for the identification of bacteria. The same predetermined ordered set of tasks has to be performed on each sample. Each task can be viewed as an amount of time (not necessarily fixed in advance) that a sample should spend in a resource of a given type. The samples may have to visit several times the same resource. The resources (e.g. a rotator or a bath) may ha,c a capacity larger than one. This means that more than one sample can be treated simultaneously in a same resource.

*Corresponding author.

0166&218X.!96iS15.00 (‘ 1996-Elsevier Science B.V. All rights reserved SSDI 01 66-2 18X(95300039-

286 A. Hertz et al. / Discrete Applied Mathematics 65 (1996) 285-

There is a unique robot in the laboratory. It has to place the samples into the resources, remove them from the resources and transport them between the resources. The robot can handle only one sample at a time. For some pairs (i,j) of tasks which have to be performed on each sample, it is imposed that the time between the end of i and the beginning of j (task j is not necessarily an immediate successor of i) cannot be larger than a given maximal value. For security reasons, no violation of such a constraint is allowed since unexpected chemical reactions could occur. Additional requirements such as blocking resources have to be taken into account. The chemical treatment should be performed in the shortest possible time. A number of survey papers and books have dealt with deterministic scheduling problems (e.g. [l, 4-6,9,12,22-251). Nowadays, the interest in no-wait scheduling problems is increasing (e.g. [lo, 11,15,20,29933]): these problems occur in a produc- tion environment in which a job (a sample) must be processed from its start to its finish, without any interruption either on or between machines (resources). In the problem that we consider, interruptions between machines are allowed but their duration is bounded by given maximal values. Longer interruptions would either inhibit chemical reactions or change characteristics of the sample such as the temper- ature or the viscosity. Flowshop problems with a robot or an AGV taking care of the transportation of the jobs between the machines have been studied by several authors. In the case of a two-machine robotized system producing a single part type, Sethi et al. [34] have described an optimal policy that maximizes the long-run average production rate over the class of all policies. For a three-machine robotic cell and a single part type, they have determined an optimal policy over the class of cyclic policies where each cycle produces only one part. The later problem has also been investigated by Hall et al. [15]. For many part types and two machines, Sethi et al. [34] show that the problem can be formulated as a solvable case of the traveling salesman problem. This problem has also been considered in [13,19,26,27]. An extensive review of the literature on the scheduling of parts and robot moves in robotized systems is given in [34]. More recent studies can be found in [13-15,171. It appears that our problem belongs to a class of scheduling problems which has not been treated in the classical literature. The most important differences are the following: ~ a part (or sample) may have to visit several times the same resource; _ (^) the duration of a task (i.e. its processing time) is not fixed in advance but bounded

by given minimal and maximal values; _ (^) the capacity of the resources may be larger than one. Hence, more than one sample

can be treated simultaneously in the same resource; ~ the waiting time between the end of a task and the beginning of another task may be bounded. In the next section, we describe the scheduling problem in more detail. A heuristic scheduling algorithm is presented and evaluated in Sections 3 and 4. Extensions are discussed in the last section.

288 A. Hertz et al. / Discrete Applied Mathematics 65 (1996) 285-

resource (if any). In this paper, we consider the case where there are no storage resources. This means that, if a sample should immediately be removed from a resource r(t), then the number of samples currently in r(t + 1) is strictly smaller than c,.(~+i). For some pairs (i,,j) of tasks, the time between the end of i on a sample and the beginning of j on the same sample cannot be larger than a given maximal value. Notice that j is not necessarily an immediate successor of i. The objective is to perform the chemical treatment on the whole set of IZsamples in the shortest possible time. All constraints have to be satisfied since a modification of the chemical process could create unexpected reactions. As already mentioned in the introduction, this problem belongs to a class of scheduling problems which has not been treated in the classical literature. Complexity results as those contained in [14,15,34] do not cover our problem. The flowshop problem in a robotic cell, with a single part type, is a special case of our scheduling problem where it is assumed that all resource capacities are equal to one, the duration of each task is fixed and no part (sample) has to visit several times the same resource. The complexity of this problem is open, even if it is assumed that there are only three resources. Sethi et al. [34] have shown that an optimal one-part cycle (i.e. a cycle that produces a single part) can be determined in polynomial time. It has however never been proved that the repetition of one-part cycles dominates all other policies. As pointed out by Goyal and Sriskandarajah [l 11, no-wait scheduling problems except for a few special cases belong to the class of NP-complete problems. On the one hand, our problem is more general than no-wait scheduling problems since no-wait constraints appear as a special case where it is imposed for each pair (i, i + 1) of consecutive tasks that task i + 1 should immediately follow task i. On the other hand, we have to solve a scheduling problem with a single part (sample) type since the same ordered set of tasks has to be performed on each sample. It follows that the input size of the problem does not depend on the number n of samples. Consider the simple problem represented in Fig. 1. Each sample r is initially staying in resource r(O) and has to be moved to resource r(l) where task 1 will be performed on it. Resource r(1) has an implicit activation. The duration d of task 1 must satisfy d < d < 2, where 4 and If are given bounds. Sample c( must then be moved to resource r(2). The travel times W,(i),r(j) (0 d i, j d 2) between resources r(i) and r(j) are symmetrical. There are II identical samples and the objective is to minimize the time at which the last sample enters resource r(2). This problem can be described with six numbers: ~1,4, d, w,(~), r,l), w,(i), r(2) and w,(~),~(~). To our knowledge, the complexity of this problem is open. We even do not know whether there exists any algorithm, polynomial in n, for solving this problem. In order to show that this problem is less trivial than might be apparent, assume first (as in the classical literature) that the capacity of resource r(l) is equal to 1. In that case, an optimal schedule would simply consist of completely treating the first sample, than the second, and so on. This best schedule S has the following makespan:

makespan = 4~.(~),~(~)+ d + ~,(~),~d + (n - 1)w,(~),~(~).

re5”LIrce r( 1)

Fig. I

As an example. if w~(o).~(I) = 2. v~‘~(I).,.(z)= 3, LV,(O).,.(I) = 4. n = 4 and r! = 10, we would get a schedule which makespan is equal to 72. Assume now that the capacity of r( 1) is larger or equal to II and that 4 = (1. Instead of waiting 4 time units at y(l), the robot can move additional samples to v( I). A first intuitive idea for constructing a schedule would consist of introducing the samples into r(l) as early as possible. Once a sample enters r(l), the robot has to move to r(O) and turn back to ~(1) for introducing an additional sample into r( 1). This takes ~IC~(O).~,I, time units. More- over, once a sample leaves r(l), the robot has to move to r(2) and turn back to I”(I) for removing an additional sample from J( 1). Hence, since the duration of task 1 is fixed, at least 21~~(1),~(2)time units should separate two placements of a sample into I’(1). In summary. the amount of time between two placements of a sample into r( 1) should at least be twice as large as the maximum value among M‘,(o),~(I)and N’~(I),~(~). By considering the same problem instance as above. a first sample is introduced into r(1) at time 2( = U.*(O).,.(I)).The second sample enters r(l) at time 8( = 7

  • ~LV,.,I).~(~)).Since sample 1 has to leave r(l) at time 12( = 2 + 4) , no additional sample can be introduced into r(l) at this stage. The robot will therefore wait at I’(I) during 4 time units and move samples I and 2 to r(2). The complete schedule for the II = 4 samples is represented in Fig. 2(a). Its makespan is equal to 46. It can be worthwhile to wait a little bit before introducing a sample into r(l). It is not difficult to prove that the best schedule for the problem instance studied above (where cr(r) > n and 4 = d = 10) consists of introducing sample 2 into r(l) at time 11 instead of 8. While 3 time units are wasted at this stage, the makespan of the complete schedule is equal to 43, as can be observed in Fig. 2(b). Since at least 9 time units separate two placements of a sample into r( 1). the robot has enough time to introduce a new sample into r(l) between two removals of a sample from r(l). Assume now that d < l while the capacity of r( 1) is still larger or equal to II. In this case, the duration of task 1 is not fixed exactly. For the same problem instance as above, consider the values 4 = 10 and CT= 15. The schedules represented in Figs. 2(a)

A. Hertz et al. i Discrete Applied Mathematic.v 65 /I 996) 2NS 3 18 ‘

and (b) are still feasible. However, the fact that task 1 may last more than 4 time units provides flexibility, and it turns out that a better schedule can be constructed in that case. Indeed, the schedule represented in Fig. 2(c) has a makespan equal to 36. It can be proved that it is optimal. As can be observed, the time spent by the samples l--4 in r( 1) are, respectively. equal to 10,13,15 and 12. Hence, three samples among four have spent more than 4 = 10 time units in r(l). Notice that the makespan of the schedule represented in Fig. 2(c) is twice as good as the schedule corresponding to the best solution of the classical problem studied in the literature. At this point, we assume that the reader is convinced that the considered scheduling problem is less trivial than might be apparent. The schedule consisting of completely treating the first sample, then the second, and so on, is not necessarily feasible since the stay of the samples in r(O) is eventually limited in time. We conjecture that finding a feasible schedule is an NP-hard problem. Therefore, we have developed a heuristic solution method which is described in the next section.

  1. The heuristic scheduling algorithm

3.1. Basic approach and notations

The general step of an iterative procedure consists of constructing from a current solution s a new solution s’ and in checking whether one should stop there or perform another step. Neighborhood search techniques (e.g. tabu search or simulated anneal- ing) are iterative procedures where a neighborhood N(s) is defined for each solution s and the next solution s’ is selected from the solutions in N(s) Such methods have successfully been applied to various scheduling problems (e.g. [2,8, 16,2 1,3X, 351). For adapting a neighborhood search technique to a specific combinatorial optim- ization problem. two basic ingredients must be defined: the set .(/ of solutions which will be explored during the search, and the neighborhood ,Y(s) of each solution s in .Y, In our case, we cannot define Y as the set of feasible schedules (i.e satisfying all the constraints) since finding a feasible schedule is possibly an NP-hard problem. Notice also that if .V is the set of feasible schedules and s any solution in .Y’, it is not trivial to define the set N(s) which should contain only feasible schedules. The set ,Y’ of solutions should therefore contain schedules which violate some constraints. For example, one could decide to relax the constraints on the duration 01 the active period of the tasks, each violation being penalized. Given an ordering of the tasks of the robot, it would then be difficult to decide how much time each task should last in order to minimize some measure of the violations. It turns out, that neighborhood search techniques can hardly be applied to OUI scheduling problem. For this reason, we have developed a heuristic scheduling algorithm which is based on an iterative constructive method.

292 A. Hertz et 01. 1 Discrete Applied Mathematics 65 (1996j 285-

At the beginning of the algorithm, all samples are staying in the initial resource r(0). At some intermediate step of the algorithm, a partial schedule, up to a time T, has been determined and all samples are at a certain stage of their chemical process. It is to be decided which task will be performed next. In other words, a partial schedule is characterized by the series of instructions that the robot has carried out thus far. The active periods of the already completed tasks are known. A partial schedule is augmented by an instruction to the robot to move a certain sample. All partial schedules will take into account the capacity constraints and the fact that some resources are blocking. Hence, if the robot is staying in a blocking resource where a sample c(has been introduced, then the robot has to wait, and its next task will necessarily consist of moving a to the next resource. Moreover, it will never be decided to move a sample to a resource r(i) if the number of samples currently treated in r(i) is equal to its capacity C,(i). Let S be a partial schedule. In the following, we shall denote ~ r(i) the resource in which task i has to be performed,

  • R(S) the resource in which the robot is currently staying, ~ W,(i),r(j) the time needed by the robot for moving from resource r(i) to resource r(j),
  • I,,i (resp 212,;) the time at which sample r enters (resp. leaves) resource r(i) , ~ b,, i (resp e,, i) the time at which the active period of task starts (resp. ends) on sample ‘x, ~ pi (resp. di) the minimal (resp. maximal) duration of the active period of task i (it is assumed that 4, = 0 and d, = co), ~ t,(S) the task currently performed on sample CI,
  • s(S) the sample that the robot moved last,
  • T(S) the time at which the robot is ready to move for performing a new task (this time is equal to .x,.~,(~) where cx= s(S)),
  • S, the solution obtained from S by moving sample a to resource r(tJS) + 1)

3.2. The constraints

Let S be a partial schedule and let us assume that it has been decided to move a sample a from resource r(t,(S)) to resource r(t,(S) + 1). In order to build the partial schedule of the next iteration, two moves of the robot have to be scheduled. We have to decide when the robot will leave R(S) for reaching r(t,(S)) , when it will remove a from r(t*(S)) and when it will introduce x into r(t,(S) + 1) Since the robot has to move from R(S) to r(ta(S)) before removing x, the time Y~,~,(~)has to be larger or equal to T(S) + wR(s), ,.Ct,Cs)).Denote ‘/ = s(S), i = t,(S) and .j = t,(S) Hence, the last task performed by the robot was the placement of sample y into r(i). This was done at time T(S) = xy, i and it has now been decided to remove sample r from r(j). We have Yn,j 2 J$,i + 'vr(i),r(j).

294 A.^ Hertz^ et al. 1 Discrete^ Applied^ Mathematics^ 65 (1996)^ 285-

which has not yet been introduced into the final resource r(p) and denote t = t,(S). We now compute the earliest and latest times at which x can leave r(t). According to constraints (2)-(4), we have

If the next instruction given to the robot is the removal of c( from r(t), the robot will first have to move to r(t). It follows that y,, f 3 T(S) + wRCsJ,rCtj.Therefore, the earliest time ha at which x can leave r(t) is defined as follows:

h, = max (x,.~ + dt, T(S) + w~(~),~(~)}.

Let i be any task such that i < t. According to constraints (l),(2) and (5), we have the following inequalities:

ecz,i + Li,t+l 3 ha,C+l 3 Xa,t+l 3 .Ya,t + wr(C).r(t+l).

Hence, we must have

J’a,t d T1 = yj: (G,i + Li,t+ 1) - W,(t).r(t+ 1).

According to constraints (2H4), we know that if r(t) has an implicit activation, then yz f < .x,,~ + d,. If the activation of r(t) is explicit, then the following inequalities follow from (4) and (5):

e,,, - d, 6 b,,, d e,,i + Li,f for all i < t,

Hence, by (1) and (2), we must have (see Fig. 3)

ys,t G x,.,+1 - Wr(t),ryr+l)

< b,,,+ 1 - wr(t),,(,+l)

< min i<t (e2.i + Li,t) + & + Lt,t+ i - Wf(t),,(t+ 1).

T------7---

ci

DOaO (^) I ,I^ Y(t),r(t+l)^ :----I ;____-_;---; Ir--- I I

Fig. 3.

.4. Hertz et al. i Discrete Applied Mathematic,s 65 (19961 285 3/N 2%

It follows that

.rg.f d 7-z = I

if r(r) has an explicit activation,

&.I + 4

I if r(t)^ has^ an^ implicit^ activation.

Therefore, the latest time g, at which sample r must leave v(t) is defined as follotvs:

&, = min(T,. T2).

In summary, we have the following inequalities:

h, d _l’l.[< il,. (^) (6)

Notice that if constraint (5) concerns pairs of consecutive tasks only. then 11, can he computed in an easier way:

I

CL-1 + L1.r + 6 + b.,,, - ‘(‘r(r).r(r*l,

J2, =I

i

if r(r) has an explicit

XX.I + &

activation,

1 if r(t) has an implicit activation.

At each step of the algorithm we shall only consider feasible partial schedules which satisfy the following constraint:

bl < h, for all cI = l,...,n. (^) (7) Let S be a feasible partial schedule which satisfies constraint (7). For moving from S to S,, we shall execute the following procedure, where t denotes task t,(S):

Procedure MOVE (z)

?‘&I+- 111 c,,~ +- min(h,,min(f2,.i + Li,,) + d;] i<f

In words: (i) sample r leaves resource r(t) as soon as possible (i.e. at time h,); (ii) in order to keep flexibility, the end e,,, of the active period of t is set as late as possible (given (i)). It will then be easier to extend the partial schedule while satisfying constraint (5);

sample 1 unloaded travels and waiting times of the robot sample 2

sample 1 unloaded travels and waiting times of the robot sample 2

(b)

sample 1 unloaded travels and waiting times of the robot sample 2

travels m waiting times

Fig. 4. (a) A schedule in 25 time units. (b) A partial solution that does not satisfy constraint (7). (c) A schedule in 16 time units.

298 A. Hertz et al. / Discrete Applied Mathematics 65 (I 996) 285-

It is well known (see [18] or [7, Ch. 2.51 for more details) that a system Ax 3 b of difference constraints and its associated constraint graph G satisfy the following properties: If G contains a circuit of positive length, then the system has no feasible solution. If G contains no circuit of positive length, then a solution of the system can be obtained by giving to each unknown .xi the value of the longest path from u. to Uiin G. Given an ordering of the tasks of the robot up to some iteration, deciding whether these tasks can be scheduled while satisfying constraints (l)-(5) and (7) is equivalent to testing whether a system of difference constraints has a feasible solution. The asso- ciated constraint graph G = (V, A) is described below. Let X, B, E and Y denote the following sets: X=(.~,,~:x=l,..., nandi-l,..., min{p,t,(S)+l}}, B = {b,,i: r = l,..., y1and i = 1,.... minjp - l,t,(S)}j, E = (Q: ct = 1, ,y1 and i = 1,.... min{p - l,t,(S)}}, Y = Cyz,i: CI= 1,... ,II and i = 0,... ,min(p - 1, t,(,S)}}.

The vertex set I/ of the graph G consists of the union of X, B, E and Y and an additional vertex a. There are four different types of arcs: Type 1: For each sample r, the following arcs represent the stay of CIin the initial resource:

arc(a, Y~,~) of length 0, arc( yil, o, a) of length - Jo. Tq’pe 2: For each sample a and each task i (1 d i < r,(S)) we have the following arcs which represent constraints (2)-(4) :

arc(x,,i, h,,i) of length 0, arc(h,,i, e,,i) of length Iii, arc(e,,i, b,,i) of length - Ji, arc(e%,i, ya,i) of length 0.

Moreover, if r(i) has an implicit activation, the following arcs impose that the active period of task i on sample c( is the whole interval [x,,~, yzJ:

arc(h,,i,x,,i) of length 0, arc( y%,i, e,.i) of length 0. T~;pe 3: For each sample E and for each pair (i,j) (0 < i <j < min{p, t,(S) + I}) of tasks such that Li,j < x, we have one of the following arcs representing constraint (5):

arc(h,,j, e,,i) of length - Li.j if i > 0 and ,j < min{p, t,(S) + 1 }, arc(& j, ex.i) of length^ -Li,j^ if i > 0 and^ j = min{p,t,(S)^ +^ l},

300 A. Hertz et al. / Discrete Applied Mathematics 65 (1996) 28.5-

f’ El 0 I h y2,1 EI I (^) P t ; .’^ ;

---- (^) arcS of type 1

arcs of type 2 -_--- (^) arcs of type 4 Fig. 5.

value of the longest path from a to the corresponding vertex. The numbers in the boxes represent these values.

3.4. A kind ~~.~?uck~ra~ki~g

We now have to describe what happens when a circuit of positive length is detected. In such a case, the partial ordering of the tasks of the robot must be changed. We have decided to remove all robot instructions involving a sample a (chosen with some rule).

In other words, all tasks performed on sample ~1are cancelled and the remainder of the ordering is not changed. The graph corresponding to this new ordering is dcnotcd (; - {c~i and is obtained from G by performing the following changes.

Construction of the reduced graph G - ( Updrrtr of‘ the I11oce.sof‘ the robot (a) Consider any path P of the following form (s + J’ denotes an arc (.Y,J,)):

where /j # x and d; # x. The path P is replaced by an arc -ycl.i-3 ~~~~~~of length ~t’,+).,.(~, (h) remove all arcs of type 4 invotving sample a (c) Let ,8 be the last sample not equal to 3: which was moved in S. In the partial schedule corresponding to the new ordering, the robot is staying in rcsourcc r(ta(S)). The next instruction which will be given to the robot may be the move of sample x between resources r(O) and ~(1). Hence, the following arcs must be added: arc (.Q.,,,~s,~J~.~~)of length ~~,(I,~(S)),,(o) ~~ arc (Ye.03 -yX.I) of length ~~‘r(o).v(1i Rmoral of the remmining arcs and xvticcs concernin~g samplr x (d) remove all arcs of type 2 and 3 involving sample x {e) remove vertices h,+ v1. c J%,i ( 1 < i d t,(S)) and s,. i (2 < i < min i p. t,(S) -+- I 1f

Consider the same example as in Fig. 4, with the only diff‘erence that %‘,,lI.p(_7)= 3 (instead of 3). Assume that the first three tasks of the robot are the move of samples 1 and 2 from resource v(O) to resource Y(1) and then the placement of sample 1 into the final resource r(2). The graph G corresponding to the partial ordering made of these three tasks is represented in Fig. 4(a). It contains a circuit of iength 2 represented in bold lines. By removing sample 2 from the partial ordering. we get the graph G ‘.- :2j of Fig. 6(b) which does not contain any circuit of positive length. The partial schedule Sc;__iz! can now be completed by calling MOVE(‘) twice.

Assume that the graph G corresponding to a partial ordering of the tasks of the robot contains a circuit of positive length. By removing all tasks concerning a sample 2, it may happen that the reduced graph G - [ZX~still contains a circuit of positive length. In such a case, an additional sample is removed, and this process is repeated until the reduced graph does not contain any circuit of positive length. The rule for choosing the sample to be removed will be defined later. We can now describe the scheduling algorithm.

703

Step 2: set c t L’+ 1; call MOVE(%) ; set S t S, and update hp and fi, for p = I,. ,. , 11; if S is a feasible partial schedule satisfying constraint (7) then go to step 7 Step 3: Let 0 be the partial ordering induced by S. Construct the constraint graph G associated with the ordering 0. Step 4: Use Bellman’s algorithm for either computing the longest path from IJ to all other vertices in G, or else for finding a circuit of positive length in G: If G contains no circuit of positive length then set S t S, and go to step 7: Srep 5: Based on some rule !XHz,choose a sample (j with t,](S) > 0: Srep 6: Set c t c’ - t,!(S) and G t G-[/j): go to step 4 Srt>p 7: If c = r1.p then STOP else go to step I

In order to complete the description of the algorithm, we now define rules !K, and !li>. Consider a partial schedule S. We first define a set A of samples (candidates to be moved at the next iteration) by taking into account the limited capacity of the resources and the fact that some resources are blocking. A resource is ,/i-c~r if the number of samples currently in it is strictly smaller than its capacity. If the resource R(S) in which the robot is currently staying is a blocking resource, then detine il = (s(S)) (because rule $93, has to choose sample s(S)). Otherwise, all blocking resources are free. Let cl7 (r,(S) < ql < p) denote the task such that every r(t) (t,(S) < f < yl) is a blocking resource and r(q,) is not blocking. In other words. if the robot removes sample a from resource r(r,(S)). it will then have to move r to resources f(r,(S) + 1 ),... , r(y,) before moving any other sample. We define A as the set of samples x such that resource u(q,) is free. If resource r(1) is free, then only one sample x with r,(S) = 0 (if any) is put into il (since all samples are equivalent). We now describe two additional ingredients. The first one provides. at each iteration, an upper bound on the number of samples which are candidates to be moved. First notice that the size of the set A increases with the number of samples which are not in the initial or the final resource. When iii is of large size, it becomes difficult to guess which move should be performed next in order to obtain a partial schedule which can be extended to a complete feasible solution. We have observed that steps 5 and 6 of the algorithm (which can be viewed as a kind of backtracking) arc frequently performed when too many samples are out of f(O) and r(p) at the same time. For this reason, an upper bound N is defined on the total number of samples which are not in the initial or the final resource. We only consider feasible partial schedules S which satisfy the following constraint:

I;%: O<f,(S)<f?jj GN. (8)

Hence, rule !R, has to choose a sample in a set of candidates of size at most N. In the case where 1[x: 0 < t,(S) < p> / = N and A contains a sample r with t,(S) = 0, then r is

304 A. Hertz et al. 1 Discrete Applied Mathematics 65 (1996) 2X5-

removed from A since performing task 1 on a would provide a partial schedule which violates constraint (8). The second ingredient prevents cycling to some extent. We define a matrix 34 of size n x p in which each element m,, i (1 d et < n; 0 d i < p) stores the last value assigned by the algorithm to L’l,i; initially rn,,i is set equal to a negative value. Let x be any sample of A. If there exists a sample /3 (1 < fi < n) such that mP,tsfsl = hn then x is removed from A. The reason is that ya,r,lSt would be set equal to _h, in S,, and the end of task r,(S) has already been scheduled at that time (possibly for a sample j3 # a) at an earlier stage of the algorithm. Now, if A is empty, then we stop the algorithm. Otherwise, let IXbe any sample of A. As already noticed, S, does not necessarily satisfy constraint (7). Let V, denote the set of samples for which constraint (7) is violated in S,. We select a subset B of A according to one of the following definitions: (a) B= [EEA: IV’,l=minIVI,j), pc-A (b) B = {ct E A: C r,(S) = min 1 t,JS)}, dEV, of.4 dtvn (c) B = {LXE A: C (& - &) = min c (_hd- ?&)), dtV, pt.4 <kV, (d) B = {E E A : C (h, -- &)/I 1/,1 = min 2: (id - &,)/I V, If 6tV, BG‘4 aev, (e) B = {one sample of A chosen at random).

In words, let r be any sample for B: ~ with (a), the number of samples violating constraint (7) in S, is minimized; _ (^) the idea behind definition (b) is that among all samples of I/,, we prefer to remove

the one that is the less advanced in its chemical process;

  • (^) the difference (ha - h,) for a sample 6 in V, is a measure of the violation of

constraint (7); this means that by using de~nition (c) (resp. (d)), we minimize the total (resp. average) amount of violation in S,. Now, if B contains more than one sample, we then select a subset C of B according to one of the following definitions:

(f) C = (a E B: T(S,) = min T(S,)j, BEB (g) C = (X E B: (~a,t,fS)- %w,R(S,) - T(S)) = min (&rotS) - wR(S),R(S,j)- r(s)))> PEE (h) C = (one sample of B chosen at random}. With (f}, we minimize the time at which the robot is ready again for performing the next task. The waiting time of the robot is minimized by using definition (g). Finally, if C contains more than one sample, then one of them is chosen at random. The variants for rule $93,which have been tested are definition (e) and all combinations of one definition in {(a),(b),(c),(d)) with one definition in {(f),(g), (h)}. According to the