12
A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana Borrego Dpto. Lenguajes y Sistemas Inform´aticos, Universidad de Sevilla, Spain {irenebr,carmelo,dianabn}@us.es Abstract. This paper proposes a constraint-based model for the Job Shop Scheduling Problem to be solved using local search techniques. The model can be used to represent a multiple software process planning problem when the different (activities of) projects compete for limited staff. The main aspects of the model are: the use of integer variables which represent the relative order of the operations to be scheduled, and two global constraints, alldifferent and increasing, for ensuring feasibility. An interesting property of the model is that cycle detection in the sched- ules is implicit in the satisfaction of the constraints. In order to test the proposed model, a parameterized local search algorithm has been used, with a neighborhood similar to the Nowicki and Smutnicki one, which has been adapted in order to be suitable for the proposed model. Key words: job shop scheduling, local search, constraint satisfaction problems, software development processes 1 Introduction Software development has been modelled using a wide range of approaches. They vary according to the focus of the analysis and they address successfully the whole development process depending on how it is carried out. Many of the software management tools use temporal information and ignore in some ways the resources to be used, considering them unlimited, since they are based on PERT and CPM analysis. These may not be adequate in different situations, for example when smaller multiple projects are developed and project compete for limited staff [10]. A job shop approach, traditional in manufacturing, may represent an important aid since it can manage the interactions between projects and resources in a natural way and enables to consider minimizing different goals, as development time (makespan) and cost, while satisfying all the temporal and resource constraints. With this aim, a job shop scheduling model is presented in this paper, so that it can represent a multiple software project to be planned. The equivalence of terms used from both areas is in such a way that jobs correspond to single soft- ware projects, and resources can represent each person or software development team working in the projects. Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009 ISSN 1988–3455 SISTEDES, 2009 1

A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

A Constraint-based Job-Shop Scheduling Modelfor Software Development Planning

Irene Barba, Carmelo Del Valle, and Diana Borrego

Dpto. Lenguajes y Sistemas Informaticos,Universidad de Sevilla, Spain

{irenebr,carmelo,dianabn}@us.es

Abstract. This paper proposes a constraint-based model for the JobShop Scheduling Problem to be solved using local search techniques.The model can be used to represent a multiple software process planningproblem when the different (activities of) projects compete for limitedstaff. The main aspects of the model are: the use of integer variableswhich represent the relative order of the operations to be scheduled, andtwo global constraints, alldifferent and increasing, for ensuring feasibility.An interesting property of the model is that cycle detection in the sched-ules is implicit in the satisfaction of the constraints. In order to test theproposed model, a parameterized local search algorithm has been used,with a neighborhood similar to the Nowicki and Smutnicki one, whichhas been adapted in order to be suitable for the proposed model.

Key words: job shop scheduling, local search, constraint satisfactionproblems, software development processes

1 Introduction

Software development has been modelled using a wide range of approaches. Theyvary according to the focus of the analysis and they address successfully thewhole development process depending on how it is carried out. Many of thesoftware management tools use temporal information and ignore in some waysthe resources to be used, considering them unlimited, since they are based onPERT and CPM analysis. These may not be adequate in different situations,for example when smaller multiple projects are developed and project competefor limited staff [10]. A job shop approach, traditional in manufacturing, mayrepresent an important aid since it can manage the interactions between projectsand resources in a natural way and enables to consider minimizing different goals,as development time (makespan) and cost, while satisfying all the temporal andresource constraints.

With this aim, a job shop scheduling model is presented in this paper, so thatit can represent a multiple software project to be planned. The equivalence ofterms used from both areas is in such a way that jobs correspond to single soft-ware projects, and resources can represent each person or software developmentteam working in the projects.

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 1

Page 2: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

2 Barba, Del Valle, Borrego

Constraint Programming (CP) has evolved in the last decade to a mature fielddue to, among others, the use of different generic and interchangeable proceduresfor inference and search, which can be used for solving different types of problems[2, 12]. Although a separation of models and algorithms is desirable for reusabilityissues, there is an influence between them that must be taken into account whena good behavior of the whole resulting method is pursued. Most models thathave been used in CP have been tested using complete algorithms, and they arenot equally suitable for other algorithmic approaches such as local search [16].

This paper proposes a Constraint Satisfaction Problem (CSP) model for theJob Shop Scheduling Problem (JSSP) to be solved using local search techniques,that is, it defines the variables which determine a solution, the related constraintsof the problem involving those variables, and some possible neighborhoods. Theproblem has been solved by different authors using local search [8, 11, 15], butthe novelty consist of the proposed model, based on including the ordering of theoperations directly in the variables and constraints of the CSP, so that furtherdefinitions and developments of the main components of local search algorithmswould take advantage of this representation.

For such techniques, a very important issue is the defined neighborhood, thatis, the set of candidates to which the walk may continue from the current solution.For JSSP, one of the best methods was proposed by Nowicki and Smutnicki [11],whose neighborhood was more constrained than other previous approaches. Anadaptation and an extension of this neighborhood are proposed in this work, inorder to be suitable for the defined CSP model.

The rest of the paper is organized as follows. Section 2 presents a formula-tion of the JSSP. Section 3 includes the main ideas of local search algorithms.Section 4 describes the proposed model. Next, experimental results are shownand analyzed. Finally, Section 6 presents some conclusions and future work.

2 Problem Definition

The Job Shop Scheduling Problem [1, 8] may be formulated as follows. We aregiven a set of n jobs J1, ..., Jn and a set of m machines M1, ...,Mm. Each job Ji

consists of a sequence of ni operations opi1, ..., opi,ni, which must be processed

in this order. Each operation opij must be processed for pij time units, withoutpreemption, on machine µij ∈ {M1, ..., Mm}. Each machine can only processone operation at a time. So, two types of constraints are defined, the precedenceconstraints among the operations of each job, and the resource constraints whichforce to select a permutation order of the operations that use each machine.These last constraints are the source of the NP-hard complexity of JSSP [4].

The typical objective, used in this work, is to find a feasible solution, mini-mizing the makespan, Cmax = maxi=1..n{Ci}, where Ci is the completion timeof job Ji, i.e. the completion time of opi,ni .

Figure 1 shows the disjunctive graph representation for a simple example ofthe problem, with n = 3 and ni = 3, ∀i. In a disjunctive graph G = (V, C, D),we have a set V of nodes which correspond to the operations of the job-shop,

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 2

drg
Stamp
Page 3: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

Title Suppressed Due to Excessive Length 3

a set C of directed arcs corresponding to the precedence constraints, and a setD of undirected arcs which connect the operations that use the same machine.A solution to the problem consists of fixing a direction for the undirected arcs,being feasible if there are no cycles.

op 11 op 12 op 13

op 23 op 22

op 33 op 32

op 21

op 31

Fig. 1. A disjunctive graph for a job shop problem.

3 Constraint-Based Local Search

Most solving algorithms for CSPs proposed in the CP area are complete, andlastly local search is being considered as promising for solving large instances ofcomplex problems [16], where complete algorithms fail. The constraints from theCSP model may be used for guarantying feasibility of the solutions explored, oreven using their possible (degree of) violation as a guide for the search. Most ofideas associated to local search algorithms in other areas can be used for solvingCSPs, or in our case, a Constraint Optimization Problem (COP).

Local search algorithms move iteratively through the set of feasible solutions.For those movements, a neighborhood for the current solution is determined ineach iteration as a set of the solutions that can be selected as the next solution,and that can be obtained from the current solution with small changes. Depend-ing on the method of choosing the next solution from neighborhood and thecriteria for stopping the iterative sequence of movements, different algorithmscan be defined [6]. In order to test the proposed model, we have used a basictabu search algorithm [5] containing the main components that have been proveduseful in local search, as described in Section 4.4.

4 Our Proposal

4.1 The CSP Model

A CSP is defined by a set of variables V , a set of domains of values for each vari-able D and a set of constraints that involve the variables C. Typical CSP modelsfor the JSSP state the start times stij of the operations opij as the variables of theCSP [3], and the constraints are divided in two groups, precedence constraints

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 3

drg
Stamp
Page 4: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

4 Barba, Del Valle, Borrego

(stij +pij ≤ sti,j+1) and resource constraints (stij +pij ≤ stkl∨stkl +pkl ≤ stij ,opij and opkl using the same machine). Our proposed CSP model is based onusing the CSP variables to establish the execution orden of the operations of theJSSP, resulting in a simple model.

Let ΠJ be a JSSP with a set J of n jobs, a set M of m machines, and a setO of #ops operations. The proposed model has the following components:

– Each operation opij is represented as an integer variable of the CSP vij ,therefore the set of variables is V = {vij , 1 ≤ i ≤ n, 1 ≤ j ≤ ni}.

– The domain of each variable vij is D(vij) = [1..#ops],∀vij ∈ V .– The set C of constraints contains two types of items:

1. Precedence Constraints: The value of each variable vij has to be lessthan the value of all the variables corresponding to the following oper-ations in the same job: vij < vik,∀vij , vik such that j < k. In order toimprove the efficiency and to obtain a clearer model, a new constraint(increasing) has been used between the operations of each job. It is de-fined on a sequence of variables {v1, v2, . . . , vn} and it is equivalent tothe satisfaction of the conditions v1 < v2 < . . . < vn.

2. Resource Constraints: In order to satisfy that each machine can pro-cess only one operation at the same time, all the variable values areforced to be different from the others (alldifferent constraint is used),i.e., each solution is a permutation of the set {1, 2, . . . , #ops}.

An interesting property of the model, using the increasing and alldifferentconstraints, is that cycle detection in the disjunctive graph is implicit in thesatisfaction of the constraints, so no solution of the CSP will contain cycles.

A solution for the constrained problem, in which a value for each CSP vari-able is given, is a permutation of 1..#ops variables and can be represented by anordered sequence of operations S. With this sequence we associate an ”earlieststart schedule” by planning the operations in the order induced by the sequence,resulting in a JSSP solution. We denote S(m) as the ordered sequence of oper-ations that are executed on the machine m in the order fixed by the solutionrepresented by S. Figure 2 shows a solution for the problem of Fig. 1. First,the value for each variable is shown and below is the corresponding solution S,where the position a in the sequence represents the value of the variable S[a](vij = a ≡ S[a] = opij). Also, the ordered sequences corresponding to eachmachine are shown. Finally, Fig. 2 shows a JSSP solution where all the arcs inthe graph are directed according to the fixed order in S. Notice that there canbe several solutions of the CSP problem that lead to the same schedule, for ex-ample the solution S = {op21, op31, op32, op11, op12, op13, op22, op33, op23} for theproblem of Fig. 1 leads to the same schedule that the solution shown in Fig. 2.

From now, we will use PM(v) and SM(v) to refer to the predecessor andsuccessor variables of v on its machine, and similarly PJ(v) and SJ(v) on its job.PM(PM(v)) is denoted by PM2(v) (the same for SM(v)) and so on. Moreover,we denote m(v) as the machine in which the operation corresponding to thevariable v has to be executed.

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 4

drg
Stamp
Page 5: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

Title Suppressed Due to Excessive Length 5

op 11

op 12

op 13

op 31

op 32

op 33

op 21

op 22

op 23

2 1 8 9 7 6 5 4 3

S

v 11

= 2 v 21 = 4 v 31 = 1

v 12

= 6 v 22 = 5 v 32 = 3

v 13 = 8 v 23 = 9 v

33 = 7

S(m 1 ) op 31 op 11 op 22

S(m 2 ) op

21 op

12 op

33

S(m 3 ) op 32 op 13 op 23

op 11

op 23 op 22

op 12

op 21

op 13

op 33 op 32 op 31

Fig. 2. Example of a feasible solution

4.2 Cycle Detection

A solution for the problem consists of establishing directions for the undirectedarcs in the disjunctive graph (Section 2), being feasible if there not exists anycycle. A cycle for a solution in the disjunctive graph is a closed directed (simple)path, with no repeated vertices other than the starting and ending vertices.

We can see a cycle as a sequence of operations that contains two types ofedges:

– Precedence edges: are fixed by the problem.– Resource edges: are given by the decisions made to solve the problem.

op 1i

op 1j

op 2k

op 2l

...

...

op ab op cd v

ab < v

cd

op 1i

op 1j

op 2k

op 2l

means

Fig. 3. A cycle in a disjunctive graph

All the possible cycles that can be formed in the graph involve, at least, twomachines and four operations, two belonging to one job, and two belonging toanother job, such as it is shown in the figure 3. In this figure it is possible to seea cycle formed by four operations, two belonging to J1 (op1i and op1j) and twobelonging to J2 (op2k and op2l). In the sequence of operations appears, at least,

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 5

drg
Stamp
Page 6: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

6 Barba, Del Valle, Borrego

two precedences edges, that connect operations using different machines. All theoperations that appear in the figure can be executed on different machines, sothe machines involved in this cycle can be between 2 and 4. It is important toclarify that op1,j and op2,k do not have to be executed in the same machine (thesame for op1,i and op2,l).

It can be proven that any solution of the CSP, with the proposed model, willcontain no cycles.

4.3 Neighborhoods

For JSSP, most of the successful approaches use neighborhood based on reversingcritical operations (increasing their durations imply a larger makespan) thatmust be processed on the same machine. One of the best methods was proposedby Nowicki and Smutnicki [11], whose neighborhood was more constrained thanother previous approaches. The movements allowed were to reverse two adjacentcritical operations belonging to the same critical block (a sequence of criticaloperations on the same machine) so that one of them is not an internal operationin the block, excluding the swap between the first two operations of the first blockwhen the second one is internal, and the swap between the last two operationsof the last block when the first is internal.

We define a family of neighborhoods for the proposed model in which thebasic idea is to make a swap between the values of two variables correspondingto operations of the same machine, i.e., between the relative order of thoseoperations in a solution, trying to change the order of operations belonging toa critical path of a solution S (CP (S) from now), based on the Nowicki andSmutnicki (NS from now) neighborhood.

For a variable v, σ(v) is defined as the set of the variables w satisfying the fol-lowing condition: the swap between v and w in S (denoted as swap(v, w, S))causes a swap between v and PM(v) on m(v) and this is the only swapcaused on m(v). The variables w that meet this condition are those betweenPM2(v) (not included) and PM(v) (included) in S. We can see that the swapsbetween v and variables that appear before PJ(v) in S lead to unsatisfiablesolutions. Then, σ(v), when v is not the first in its job and has, at least, twopredecessors on its machine, is defined as:

σ(v) = {w ∈ V | max(PJ(v), PM2(v)) < w ≤ PM(v)}

If PJ(v) and PM2(v) do not exist, the outer lower bound is 0. On the otherhand, if only one of them exists, the outer lower bound is established by it.Lastly, all the variables which have the smallest value on their machine (i.e.,which are executed first) do not have any possible swaps (σ = ∅).

In Fig. 4 different cases of possible swaps are shown. In Fig. 4.a, PJ(v)appears before PM2(v), then the outer lower bound of the range of possibilitiesis established by PM2(v). In Fig. 4.b, PM2(v) is before PJ(v), then it is givenby PJ(v). In Fig. 4.c, PJ(v) is after PM(v), so no swap for v can be realized.

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 6

drg
Stamp
Page 7: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

Title Suppressed Due to Excessive Length 7

v PM(v) PM 2 (v) PJ(v) ... ... ... ... ...

a) Possible swap(v) when PJ(v) <

b) Possible swap(v) when < PJ(v)

...

c) Any possible swap(v) when PM(v) < PJ(v)

v PM(v) PJ(v) PM 2 (v) ... ... ... ... ...

...

v PJ(v) PM(v) ... ... ... ... ... ...

S

S

S

...

Fig. 4. Possible swaps for a variable v

In order to reduce and set a maximum number of neighbors for a solution, wedefine a parameter δ, as the maximum number of possible swaps for a variable v,from PM(v) toward variables appearing before it in S. It must be noticed thatδ has to be greater than 1 so that the algorithm can reach any possible solution,taking into account the proposed model. According to this parameter, the set ofconsidered swaps for a variable, is defined as:

σδ(v) = {w ∈ V | max(PM(v)− δ, PJ(v), PM2(v)) < w ∧ w ≤ PM(v)}A family of neighborhoods, N δ

1λ, depending on the possible variables to swap,has been defined. For λ = 0, the idea is to swap variables that are at thebeginning or at the end of a critical block (CB from now, CB(v) for the CBof a variable v), except the beginning of the first CB or the end of the last CB,similar to NS neighborhood. These variables are given by the set V0(S):

V0(S) = {v ∈ CP (S) | v = SM(first(CB(v))) ∨ v = last(CB(v))}where first(CB(v)) and last(CB(v)) are the first and the last operations of

CB(v), respectively. V0(S) contains the possible variables to be swapped in N δ10

(Nδ10 = {swap(v, w, S) | v ∈ V0(S) ∧ w ∈ σδ(v)}).Due to the proposed model and the tabu search, it is possible to reach a

solution which an empty neighborhood. In order to overcome this problem andget more diversification during the search, other more general neighborhoodsN δ

1λ, different from NS proposal, have been defined depending on a parameterλ. For λ > 0, it is allowed to swap internal variables of CBs, more internal as λis increasing. The set of possible variables to swap, is now given by:

Vλ(S) = {v ∈ CP (S) | (v = SMλ+1(first(CB(v))) ∨ v = PMλ(last(CB(v))))

∧ λ ≤ #CB(v)/2}Then, the neighborhood N δ

1λ is defined as Nδ1λ = {swap(v, w, S) | v ∈

Vλ(S) ∧ w ∈ σδ(v)}. In order to allow swaps between all the non-critical op-erations (belonging or not to CP), another neighborhood has been defined:N δ

2 = {swap(v, w, S) | v ∈ V ∧ w ∈ σδ(v)}.

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 7

drg
Stamp
Page 8: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

8 Barba, Del Valle, Borrego

S(m(v)) ... ... PM(v) v

S(m(w)) ... w SM(w) ... ...

... w ... SM(w) SM 2 (w) ... v ...

S'( m(v))

S'( m(w))

... v ... SM(w) ... w ...

S

S'

... ...

... ...

... ... v PM(v)

... w SM(w) ... ...

SM 2 (w)

SM ... (w)

SM ... (w)

SM ... (w) SM 2 (w)

SM ... (w) SM 2 (w)

S(m(v))

... w ... v

S'(m(v))

S ...

... ... v w

S' ... v ... w ...

... ... w v

a) Swap between variables corresponding to operations executed in the same machine

b) Swap between variables corresponding to operations executed in different machines

Fig. 5. Swap between variables

The swap between v and w has the following consequences:

1. Swap between the execution order of v and PM(v), executed on the samemachine, which does not depend on w (change in m(v)).

2. If w 6= PM(v), i.e. m(w) 6= m(v), other changes will be given. If SM(w) < v,then the execution orders of all the operations w′ satisfying m(w′) = m(w)and w < w′ < v will be changed. Specifically, the relative order of all theseoperations are moved forward on their machine (change in m(w)).

According to this, two types of movements can be given. First, the swapbetween variables corresponding to operations executed on the same machine,only one swap in S(m(v)) is given (Fig. 5.a). Secondly, the swap between vari-ables corresponding to operations executed on different machines, that leads toa swap in S(m(v)) and several swaps in S(m(w)), one for each direct or indirectsuccessor on the machine of w that is between w and v in S (Fig. 5.b). In Fig.5 the neighbor for S is referred as S′.

4.4 The Parameterized Algorithm

Considering the defined neighborhoods, a local search algorithm has been de-veloped (Alg. 1). Although any initial solution can be used, the choice of betterinitial solutions usually allows to obtain better results, as it is found for theNS method [9]. In this way, for the experiments of the next section, we have

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 8

drg
Stamp
Page 9: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

Title Suppressed Due to Excessive Length 9

Algorithm 1: The parameterized local search algorithmbegin

determine an initial solution S randomlybest := S;for it := 1 to NIterations do

if solution has not improved in last K iterations then

choose a neighbor S′ of best in Nδ2 randomly;

elseλ := 0;repeat

determine set Nδ1λ of non-tabu neighbors of S;

if Nδ1λ is not empty then

choose a best solution S′ in Nδ1λ;

elseλ := λ + 1;

until S′ has been selected or λ > maxBlockSize(S)/2 ;

if S′ has not been selected (all of Nδ1λ are empty) then

choose a neighbor S′ of S in Nδ2 randomly;

S := S′;if S improves best then

best := S;

end

used the INSA algorithm [11]. As indicated in Subsection 4.1, a schedule can berepresented by different solutions of the model. Thereby, for selecting the actualinitial solution a random procedure is used from the schedule obtained by theINSA algorithm.

According to the evolution of the search, different neighborhoods are used inorder to select the next movement, which will correspond to a feasible solution.In each iteration, a movement to the best neighbor of N δ

1,0 is attempted (λ = 0),but, if the neighborhood is empty or all their members are in the tabu list, amore extended neighborhood is searched, by increasing λ. If λ reaches the allowedmaximum value without finding a suitable next solution to visit, the more generalneighborhood N δ

2 is used, and now the neighbor is selected randomly. Nδ2 is also

used when the algorithm has not found a better solution for a number K ofiterations. In this case, the algorithm returns to the best solution found so far.

Besides that, most of the computational cost of local search algorithms aredue to the evaluation of neighbors. In order to reduce its amount, several ap-proaches have been proposed, such as that of Taillard [14], which evaluates theneighbors using a lower bound estimation of the makespan in constant time,instead of calculating it exactly. In the proposed algorithm, the selection of can-didates is made in two steps. First, the best swap between two critical operationsis selected using the Taillard estimation of the expected makespan . After that,

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 9

drg
Stamp
Page 10: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

10 Barba, Del Valle, Borrego

a variable is selected from the δ possibilities, choosing the one with the greatestimprovement in its slack because of the change.

5 Experimental Results

ILOG JSolver [7] has been used for implementing the Algorithm 1, and for man-aging the constraints of the problem. As stated before, the algorithm has severalparameters, δ, K (maximum number of iterations without improving the solu-tion), and the tabu list size (TLS), that may affect its behavior, and its tuningrepresents a non-trivial problem. Since the main interest of this work is not thecompetitiveness of the algorithm proposed, but the CSP model which is defined,a scenario for some comparative results was chosen, in which the algorithm wouldbe executed for a fixed number of 10000 iterations and , which were selected ran-domly from the results of the INSA algorithm. For such situation, the value ofK was chosen to be 1000. For selecting δ and TLS, the algorithm was run on areduced set of instances for δ from 2 to 5 and from TLS from 5 to 10. The bestresults on the minimal and average makespan of the best solution after 10000iterations were found for δ = 2 and TLS = 6. The best results for δ = 2 can beexplained by the fact that for higher values of δ, there is more probability forfinding a variable w such that the swap between v and w will be feasible, whichwould enforce the diversification strategy too much.

Table 1 shows the results of the algorithm for a larger set of JSSP bench-marks, taken from the OR-library, and some harder instances from Taillard [13].For each JSSP instance, the table shows some statistics about the algorithm usedin this work: the relative error of the best solution from the 100 restarts (BRE%)with respect to the best known solution (UB, which is not proved optimal forthe values indicated by *), the mean relative error (MRE%) and the standarddeviation of relative error (SDRE%). Also, the mean computational time forrunning the algorithm is given (RT ). As reference, the results obtained by theNS algorithm is shown in two situations: in the original form, that takes intoaccount several factors, and after 10000 iterations. As expected, the algorithmis not fully competitive (as well as it has been developed in Java, many of itscomponents are not optimized) with that of Nowicki and Smutnicki, consideredas one of the best methods for solving the JSSP. Instead, the results shown mustbe taken as a reference for further improvements of the algorithm or for differentapproaches that can use the model.

6 Conclusions and Future Work

This paper proposes a CSP model for the Job Shop Scheduling Problem tobe solved using local search techniques. The model can be used to representa multiple software process planning problem when the different (activities of)projects compete for limited staff. The main aspects of the model are the useof integer variables which represent the relative order of the operations to bescheduled and two types of global constraints for ensuring feasibility. Also, a

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 10

drg
Stamp
Page 11: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

Title Suppressed Due to Excessive Length 11

Table 1. Results on a set of JSS instances

Proposed Model NS

Instance n m UB BRE% MRE% SDRE% RT BRE% RT BRE%104 RT104

FT10 10 10 930 2.25 3.95 0.96 8.72 0 0.68 0 0.25ABZ7 20 15 656 9.90 13.98 2.16 64.40 2.28 4.62 3.20 0.84LA02 10 5 655 0.45 3.80 1.83 3.02 0 0.10 0 0.11LA19 10 10 842 2.49 6.25 1.82 10.52 0.11 0.83 0.11 0.35LA21 15 10 1046 5.16 8.23 1.05 18.76 0.86 0.86 0.86 0.42LA24 15 10 935 3.85 6.56 1.13 18.72 1.39 1.33 1.50 0.45LA25 15 10 977 7.26 11.24 1.84 20.65 1.12 1.39 2.04 0.45LA27 20 10 1235 6.96 12.07 2.03 30.73 1.94 1.27 1.94 0.51LA29 20 10 1152 8.42 12.57 2.22 33.24 3.13 3.40 4.51 0.48LA36 15 15 1268 7.09 11.42 1.25 38.61 0.79 3.66 2.76 0.62LA37 15 15 1397 9.09 14.59 2.30 41.80 1.50 2.74 3.29 0.78LA38 15 15 1196 5.85 8.09 0.99 41.72 1.84 2.75 2.59 0.65LA39 15 15 1233 7.94 10.44 0.90 41.04 0.89 3.50 1.62 0.79LA40 15 15 1222 7.03 10.28 1.02 36.52 1.64 2.40 2.13 0.62TA02 15 15 1244 6.35 10.49 1.64 36.47 2.73 2.83 2.73 0.70TA18 20 15 1396* 12.60 15.25 1.32 57.82 3.65 4.64 5.73 0.97TA26 20 20 1645* 9.36 13.14 1.34 93.66 3.10 10.64 3.28 1.58TA32 30 15 1795* 14.20 17.84 1.30 116.93 3.12 18.36 6.85 1.44

neighborhood for this model has been defined based on an adaptation of Nowickiand Smutnicki one. The main focus is not on the competitiveness of the algorithmwhich is proposed, but in the definition of the CSP model.

As future work, the algorithm and neighborhood should be improved forsolving more efficiently the JSSP. Also, we think that the proposed model canbe adapted for other similar sequencing problems in a direct way.

On the other hand, it is intended to extend the software development pro-cess to other (more generic or specific) models and to adapt the corresponding(planning and/or) scheduling models and solving algorithms.

Acknowledgments. This work has been partially supported by the SpanishMinisterio de Educacion y Ciencia through a coordinated research project(grantDIP2006-15476-C02-01) and Feder (ERDF).

References

1. P. Brucker and S. Hnust, Complex Scheduling, Springer, 2006.

2. R. Dechter, Constraint Processing, Morgan Kaufmann Publishers, 2003.

3. R. Dechter, I. Meiri, and J. Pearl, ‘Temporal constraint networks’, Artificial Intel-ligence, 49, 61–95, (1991).

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 11

drg
Stamp
Page 12: A Constraint-based Job-Shop Scheduling Model for Software ...A Constraint-based Job-Shop Scheduling Model for Software Development Planning Irene Barba, Carmelo Del Valle, and Diana

12 Barba, Del Valle, Borrego

4. M. R. Garey, D. S. Johnson, and R. Sethi, ‘The complexity of flowshop and jobshopscheduling’, Math. Oper. Res., 1(2), 117–129, (1976).

5. F. Glover and M. Laguna, Tabu Search, Blackwell Scientific Publishing, Oxford,England, 1993.

6. H. H. Hoos and T. Stutzle, Stochastic Local Search. Foundations and Applications,Morgan Kaufmann, 2005.

7. ILOG, ‘Ilog JSolver’, (2003).8. A. Jain and S. Meeran, ‘Deterministic job-shop scheduling: Past, present, and fu-

ture’, European Journal of Operational Research, 113 (2), 390–434, (1999).9. A. Jain, B. Rangaswamy, and S. Meeran, ‘New and Stronger Job-Shop Neighbour-

hoods: A Focus on the Method of Nowicki and Smutnicki (1996)’, Journal of Heuris-tics, 6, 457-480, (2000).

10. C. A. Leonhard, and J. S. Davis, ‘Job-Shop Development Model: A Case Study’,IEEE Software, 12 (2), 86-92, (1995).

11. E. Nowicki and C. Smutnicki, ‘A fast taboo search algorithm for the job-shopproblem’, Management Science, 42(6), 797813, (1996).

12. F. Rossi, P. van Beek, and T. Walsh, Handbook of Constraint Programming, Else-vier, 2006.

13. E. Taillard, ‘Benchmarks for basic scheduling problems’, European Journal of Op-erational Research, 64, 278-285, (1993).

14. E. Taillard, ‘Parallel Taboo Search Techniques for the Job-Shop Scheduling Prob-lem’, ORSA Journal on Computing, 16(2), 108-117, (1994).

15. R. Vaessens, E. Aarts, and J. Lenstra, ‘Job-shop scheduling by local search’, IN-FORMS Journal on Computing, 8, 302–317, (1994).

16. P. Van Hentenryck and L. Michel, Constraint-Based Local Search, The MIT Press,2005.

Actas de los Talleres de las Jornadas de Ingeniería del Software y Bases de Datos, Vol. 3, No. 1, 2009

ISSN 1988–3455 SISTEDES, 2009 12

drg
Stamp