Production scheduling with alternative process plans

Production scheduling with alternative process plans

European Journal of Operational Research 217 (2012) 300–311 Contents lists available at SciVerse ScienceDirect European Journal of Operational Resea...

670KB Sizes 0 Downloads 50 Views

European Journal of Operational Research 217 (2012) 300–311

Contents lists available at SciVerse ScienceDirect

European Journal of Operational Research journal homepage: www.elsevier.com/locate/ejor

Production, Manufacturing and Logistics

Production scheduling with alternative process plans R. Cˇapek ⇑, P. Šu˚cha, Z. Hanzálek Department of Control Engineering, Faculty of Electrical Engineering, Czech Technical University, Karlovo námeˇstí. 13, 121 35 Prague 2, Czech Republic

a r t i c l e

i n f o

Article history: Received 24 March 2010 Accepted 11 September 2011 Available online 17 September 2011 Keywords: Scheduling Alternatives Petri nets Production Integer linear programming

a b s t r a c t This paper deals with a scheduling problem with alternative process plans that was motivated by a production of wire harnesses where certain parts can be processed manually or automatically by different types of machines. Only a subset of all the given activities will form the solution, so the decision whether the activity will appear in the final schedule has to be made during the scheduling process. The problem considered is an extension of the resource constrained project scheduling problem (RCPSP) with unary resources, positive and negative time-lags and sequence dependent setup times. We extend classic RCPSP problem by a definition of alternative branchings, represented by the Petri nets formalism allowing one to define alternatives and parallelism within one data structure. For this representation of the problem, an integer linear programming model is formulated and the reduction of the problem, using time symmetry mapping, is shown. Finally, a heuristic algorithm based on priority schedule construction with an unscheduling step is proposed for the nested version of the problem and it is used to solve the case study of the wire harnesses production.  2011 Elsevier B.V. All rights reserved.

1. Introduction 1.1. Motivation The motivation for our research is the scheduling of production processes which typically involve more than one way how to complete the product. Such alternative process plans occur in the proˇ , a cooperative society. duction of wire harnesses in Styl Plzen Operations to produce a wire harness can be performed in various ways, using fully automated machines, semiautomated machines or manually operated ones with special equipment. Not only are the resource requirements different, but the processing times, precedence relations and also the number of activities in each process plan can differ in general too. The process plan defines a set of activities such that their execution leads to the completion of a product. Each process plan is formed by a set of disjunctive activities where no activity can be included more than once in a process plan. On the other hand, an activity can be included in more process plans. We use the term alternative process plans since there are more process plans in the studied problem while only one of them has to be executed. Hence the goal of the scheduling is to choose a subset of all activities that forms one process plan and schedule them according to the given criterion. Traditional scheduling algorithms according to Blazewicz et al. (1996) assume exactly given set of activities to be scheduled, i.e. ⇑ Corresponding author. Tel.: +420 2 2435 5719; fax: +420 2 2435 5703. E-mail addresses: [email protected] (R. Cˇapek), [email protected] (P. Šu˚cha), [email protected] (Z. Hanzálek). 0377-2217/$ - see front matter  2011 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2011.09.018

only one process plan is defined. In this paper, the traditional scheduling approach is extended by a definition of alternative process plans, i.e. the traditional time scheduling and the decision which process plan will be executed are both integrated into one problem. The problem can be formalized as an extension of the PSjtemp, oijjCmax problem. Therefore, we deal with the resource constrained project scheduling problem with positive and negative time-lags, sequence dependent setup times and alternative process plans. In the paper, we will focus on the problem with unary dedicated resources and mono-resource activities. Sequence dependent setup times serve to cover the time needed to change the equipment or set up a machine between two different operations. Time-lags (also called generalized temporal constraints) are useful to specify the relative time position of two activities in general. They have been used for modeling production which involves chemical and thermal processes (Trautmann and Schwindt, 2007). Both setup times and time-lags are used to model the production of wire harnesses. The optimality criterion is to minimize the schedule length. Although the resource constrained project scheduling problem is a well-studied problem, there were only a few attempts to include the alternatives into the scheduling process. However, the alternative process plans can be found as a natural part of the production processes and therefore we have decided to extend the RCPSP problem by the definition of alternative process plans. The combination of generalized temporal constraints and logical constraints (in form of alternative process plans) makes the problem in finding the optimal solution even harder since we have to introduce new decision variables into the problem.

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

1.2. Related works The problem outlined in the previous subsection is addressed in the literature as scheduling with alternative (optional) activities (tasks) or problem with alternative process plans or scheduling with ˇ epek, 2007; Barták alternatives (Beck and Fox, 2000; Barták and C ˇ epek, 2008; Capacho and Pastor, 2006; Capacho and Pastor, and C 2008). To avoid any misunderstandings, let us assume that the notions activity, operation, task and Petri net transition have the same meaning and we will prefer to use the term activity in this article. To represent alternative process plans, some type of special graph is usually used in the existing works. Beck and Fox (2000) established the Modified Temporal Graph with so called XorNodes, AndNodes and ActivityNodes to model the possibility of choice among the process plans. All process plans are interconnected via the aforementioned nodes. Another approach to model the alternative process plans in scheduling, similar to the Modified Temporal Network methodology, was presented by Barták and Cˇepek (2007), Barták and Cˇepek (2008). They use a special type of graph called Temporal Network with Alternatives, which is a directed acyclic graph where the nodes represent activities and the arcs correspond to temporal constraints. Logical constraints are specified through the input and output labels of each node. If only the structure of the network is considered, i.e. temporal constraints are ignored, we obtain the Parallel/Alternative Graph (P/A Graph). The authors show that the assignment for the Nested P/A Graphs can be solved in polynomial time and hence it is tractable. Capacho and Pastor (2006), Capacho and Pastor (2008) and Capacho et al. (2009) studied an assembly line balancing problem with alternatives, where certain parts can be processed in several alternative modes and the goal is to balance the workload of the available resources. They evaluated a heuristic approach based on the schedule construction with various priority-rule methods. The direct application of this approach prohibits the possibility to change their order according to the information acquired from the partial schedule, which is not sufficient due to general temporal constraints in our case. Kis (2003) presented a genetic algorithm and a tabu search for the job-shop problem with processing alternatives using a special graph to represent the problem instance. The proposed methods show a good performance, although the proposed AJSP benchmarks form a very special case of the problem. Moreover, the instances correspond to the combination of job-shop and open-shop problems. The resource constrained project scheduling problem (RCPSP) is a well known problem with many real applications. Dorndorf et al. (2000) proposed an effective branch and bound method for the RCPSP problem denoted as PSjtempjCmax (see Blazewicz et al., 1996; Brucker et al., 1999a). The solution method is based on the constraint propagation that reduces the search space. Nonetheless, setup times are not considered and also the introduction of alternative process plans would not be straightforward. Brucker et al. (1999a) summarized the notation of the RCPSP including both single-mode and multi-mode problems with various resource environments and activity characteristics. With the proposed classification, the resource constrained project scheduling problem with positive and negative time-lags and sequence dependent setup times can be formulated as PSjtemp, oijjCmax. Since we focus on dedicated unary resources, the studied problem is an extension of the PSm, 1, 1jtemp, oijjCmax problem using the same notation. Hanzálek and Šu˚cha (2009) published a constructive algorithm for the PSjtemp, oijjCmax problem which is extended to solve the problem with alternative process plans in this paper. An extension of the RCPSP problem is the multi-mode resource constrained project scheduling problem (MMRCPSP) where each activity can be executed in one of several alternative modes with different processing times and resource demands (De Reyck and

301

Herroelen, 1999; Neumann et al., 2003). Moreover, multi-mode problem includes also the definition of non-renewable resources in general case. 1.3. Contribution and outline This paper presents the resource constrained project scheduling problem with alternative process plans motivated by the real production of wire harnesses. Section 2 contains the statement of the PSm, 1, 1jalt, temp, oijjCmax problem with the representation based on the Petri net formalism (see Murata, 1989). The model also considers sequence dependent setup times and general temporal constraints (positive and negative time-lags). Section 3 contains the mathematical formulation and the proof that the problem in finding the earliest start times is NP-hard for scheduling with time-lags and alternative process plans with an infinite number of resources. The time symmetry mapping for the proposed model is then discussed. In Section 4, a heuristic method, where the choice of process plan and traditional scheduling are executed simultaneously, is proposed for the nested version of the problem denoted as PSm, 1, 1jnestedAlt, temp, oijjCmax. Computational experiments are discussed in Section 5 and the case study of the wire harnesses production is presented in Section 6. Section 7 concludes the work. The main contributions of this paper are: (a) representation of the PSm, 1, 1jalt, temp, oijjCmax problem using Petri nets, (b) proof that the problem with relaxed resource constraints is NP-hard (Section 3.2), (c) an integer linear programming model for an exact solution of small instances, (d) a heuristic solution and its evaluation for large instances. 2. Problem statement 2.1. Basic definition Let the production consist of n indivisible operations performed on the specified machines according to the process plan. Consequently, there is a set of n + 2 non-preemptive activities T ¼ f0; . . . n þ 1g to be scheduled on a set of m dedicated resources R ¼ f1 . . . mg. Each activity i is characterized by the processing time pi and resource assignment hi. Activities 0 and n + 1 with p0 = pn+1 = 0 denote dummy activities such that activity 0 is a predecessor and activity n + 1 is a successor of all other activities. Precedence relations together with the definition of alternative process plans are specified via a Petri net. A Petri net (see Murata, 1989; David and Alla, 2005) is a directed bipartite graph where nodes are either transitions or places. In our case, transitions represent activities. Each directed arc of a Petri net goes either from a transition to a place or vice versa. General temporal constraints, also called time-lags, are determined by matrix L where lij 2 R for all i; j 2 T 2 represents the inequality in the form si + lij 6 sj; si is the start time of activity i in the schedule. The earliest start time ESi denotes the minimum time at which activity i can be scheduled with respect to the temporal constraints (resource constraints are not considered). We assume that lij P pi for all i; j 2 T 2 : transition Ti is a direct predecessor of transition Tj in the Petri net. All other lij values are arbitrary. If there is no a temporal constraint from i to j, then lij = 1. If activity ~, i has to be constrained by the release time ri and the deadline d i then l0i = ri and li0 ¼ d~i . Sequence dependent setup times oij are considered as an additional time needed between the activities scheduled consequently on the same resource. We presume that the setup times satisfy the triangular inequality oij + ojk P oik for

302

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

all fi; j; kg 2 T 3 (Brucker, 2007). The optimality criterion is the minimization of the schedule length. The described problem can be classified as PSm, 1, 1jalt, temp, oijjCmax using ajbjc notation (Blazewicz et al., 1996; Brucker et al., 1999a) where temp denotes the generalized temporal constraints and oij represents the setup times. According to the resource specification PSm, 1, 1, there are m resources with unary capacity and each activity requires, at most, 1 unit of the resource. We add the term alt to the field describing constraints of the problem to denote the presence of alternative process plans (see the following subsection). Since there are no additional resources, the problem can be addressed also as the machine scheduling problem. 2.2. Petri nets representation To represent the precedence and logical constraints for the problem with alternative process plans we use a Petri net (see Murata, 1989; David and Alla, 2005). A Petri net assumed in this paper is a 4-tuple PN ¼ ðP; T ; W; M 0 Þ where: T ¼ fT 0 . . . T nþ1 g is a set of n + 2 transitions corresponding to a set of activities; P ¼ fP1 . . . Pq g is a set of q places; W[q  n + 2] is an incidence matrix such that Wij = 1 if there is an arc from Tj to Pi, Wij = 1 if there is an arc from Pi to Tj and Wij = 0 otherwise; M0 is the initial marking. Petri net is a convenient formalism not only to model a flexible manufacturing system but also to verify its properties (see Kloetzer et al., 2010) and to simulate its performance (Julia et al., 2008). Deadlock-freeness, appropriate bounds for the queues, etc. must be often verified at a design phase. Related algorithms for discrete event dynamic systems may be efficiently used to verify correctness of the model and its properties (reachability, liveness, boundedness, etc.). Moreover, Petri nets (or their adaptations like Grafcet or Sequential Function Charts in IEC 61131-3 international standard) are often used as programming languages for real-time control systems. Therefore, Petri nets are applied in different tools throughout the specification, modeling, verification, performance estimation and implementation of the control system. It represents an important aid for integrating the whole system. Especially in the case of nonnested instances it is needed to verify them and to look upon their structural properties (given by so-called P-invariants and Tinvariants – see Hanzálek and Svádová (2001)) since an interleaving of parallel and alternative branching can easily lead to badly specified system. Petri nets have many applications in the modeling, analyzing and scheduling of manufacturing systems. Using the algorithms for Petri analysis, van der Aalst (1996) proposed the method to find redundant precedences for the job-shop problem and also the bounds for the schedule length can be investigated. Moreover, feasible schedules for the job-shop problem can be generated by searching the reachability graph. Reddy et al. (2001) investigated the utilization of Petri nets for the resource constrained project scheduling problems. Based on the Petri nets notation, authors propose a genetic algorithm to solve the MPSjprecjCmax problem. Finally, Mejfa and Poensgen (2007) shown the advantages of the Petri nets utilization for integrated modeling and scheduling of manufacturing problems. Authors propose a scheduling method using the Petri net model for the flexible job-shop problem. Experiments on the real system are then presented. In our case the Petri net is acyclic and has one source place P1 and one sink place Pq. M ¼ fM 0 . . . M X g is a set of all reachable markings of the Petri net, where M0(P1) = 1, M0(Pi) = 0 for all i 2 2 . . . q and MX is the marking such that MX(Pq) = 1, MX(Pi) = 0 for all i 2 1 . . . q  1. The firing sequence F is a string of transitions F = TiTj . . . Tk that can be fired from the given marking in the specified order. Let F be a firing sequence such that it transforms

F

marking of a Petri net Ma to marking Mb, then we write M a ! M b , where Ma ; M b 2 M. Let P begin 2 P be a place with more than one successive transition and P end 2 P be a place with more than one preceding transitions. Furthermore, let M begin 2 M be a marking such that Mbegin(Pbegin) = 1 and let Mend 2 M be a marking such that Mend(Pend) = 1. Let F be a F firing sequence such that M 0 ! M X . Then a part of the Petri net determined by Pbegin and Pend is called an alternative branching if for F1 F2 all F 1  F : M 0 ! M begin , there are F 2 # F; F 3  F : fM begin ! M end ; F3 Mend ! M X g such that F1F2F3 = F; and vice versa for all F3  F : F1 F2 F Mend ! M X , there is F 1  F; F 2 # F : fM0 ! M begin ; Mbegin ! M end g such 3 that F1F2F3 = F. The transitions in one firing sequence F2 form one alternative branch. The alternative branching (see places P2 and P10 in Fig. 1) is formed by several alternative branches from which at most one has to be chosen and executed. The parallel branching (see transitions T1 . . . T6 in Fig. 1) starts by a transition with more successive places and ends by a transition with more preceding places. Nested Petri net is a Petri net composed from either alternative or parallel branchings that can be arbitrarily nested in one another. No other interleaving between two branchings (either parallel or alternative) is allowed. Let us assume that the nested Petri net is extended by a dummy transition, such that there is an arc from the sink place to the dummy transition and an arc from the dummy transition to the source place. Such an extended Petri net is live, safe and each repetitive component (represented by T-invariant) corresponds to one process plan. Any dated firing sequence (i.e. start time is associated with each transition firing) is a schedule which is consistent with the constraints defined by the net. A transition Ti is live if there exists at least one firing sequence such that it contains Ti for each reachable marking of a Petri net. A Petri net is then called live if all its transitions are live. A Petri net is safe if there is at most one token in each place for each reachable marking. Finally, a repetitive component is a firing sequence (a set of transitions) such that its firing does not change the marking of a Petri net. In other words, firing of the T-invariant leads to the same marking. Such T-invariants can be found as an integer solution of the equation WT  x = 0 where W is the incidence matrix of a Petri net and x corresponds to all T-invariants. The main motivation of the utilization of Petri nets for the representation of the studied problem is the natural description of the production process. Precedence relations and alternative process plans are described within one data structure that can be defined by an incidence matrix. Beside the natural description of the alternative process plans and straightforward ILP formulation using an incidence matrix, the well-established Petri nets formalism offers a possibility of structural analysis of the problem. This fact can be used in the future research focused on more general problems like non-nested case of the alternative process plans. For the studied problem, we use Petri nets mainly to define the instance of the problem with alternative process plans. Resulting incidence matrix W is used in both ILP formulation and as an input for the heuristic algorithm. Beside of using Petri nets for the problem representation, we gain small benefits for the heuristic algorithm. Finding of open and close activities (see Section 4.1) is a search procedure using the PN incidence matrix. Moreover, we use the Petri nets to check the feasibility of the resulting schedule. We have used the T-invariant of a Petri net that is defined as a vector of transitions x such that WT  x = 0 (see Section 2.2). Each T-invariant of a Petri net corresponds to one process plan in the studied problem. Therefore, we can simply check whether the vector of selected activities (returned by the heuristic algorithm) forms one process plan. The instance of the PSm, 1, 1jalt, temp, oijjCmax problem is formed by an incidence matrix W of a Petri net, a vector of the processing

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

303

Fig. 1. Example of an instance.

times p, a vector with resource assignment h, a matrix of time-lags L and a matrix of setup times O (see Fig. 1). 3

Tn+1

T0

3. Mathematical model 3.1. ILP formulation In this section, the ILP model for the PSm, 1, 1jalt, temp, oijjCmax problem is formulated. For the simplicity of explanation and with respect to the heuristic algorithm (see Section 4), we will discus the case with unary resources and mono-resource activities. An extension of the proposed model for the problem with non-unary resources and multi-resource activities is formulated in Appendix A. More information can be found in Hanzálek and Šu˚cha (2009). The start time of activity i is determined by the variable si 2 Rþ 0. Furthermore, let vi be a binary decision variable denoting whether activity i is included in the schedule or not. If vi = 1, then activity i is present in the schedule and it is called a selected activity, otherwise it is not included in the schedule and called a rejected activity. Let i and j be activities assigned to the same resource, then let xij be a binary decision variable such that xij = 1 if activity i is followed by activity j (i.e. si+pi6sj) and xij = 0 otherwise. Furthermore, we use the parameter di such that di = 1 for the source place of a Petri net, di = 1 for the sink place of a Petri net and di = 0 otherwise. P Finally, UB is a positive parameter such that UB > 8i2T maxðpi þ max8j2T ðoij Þ; max8j2T ðlij ÞÞ. The inequality (1) in the ILP formulation represents the general temporal constraints. The start times are constrained by lij only if both i and j are selected activities. The inequalities (2) and (3) stand for the resource constraints for each pair of activities with the same dedication, i.e. hi = hj. Eq. (4) describes the propagation rule for selecting/rejecting activities. The number of activities with vi = 1 on the input of each place is the same as on its output, except the sink place and source place. The Cmax value is equal to the completion time of the last activity in the schedule, i.e. activity n + 1 with pn+1 = 0 and, therefore, the minimization of sn+1 is a criterion of the ILP model. An optimal solution of the example in Fig. 1 given by an ILP solver is depicted in Fig. 2. Activities in the Gantt chart form one process plan, all other activities are rejected.

2

T2

1

T1 0

T3

T

T4 5

10

T

11

6

T5 15

t

20

25

30

35

Fig. 2. Example solution.

min snþ1 subject to:

si þ lij 6 sj þ UB  ð2  v i  v j Þ 8ði; jÞ 2 T 2 sj þ pj þ oji 6 si þ UB  xij þ UB  ð2  v i  v j Þ 8ði; jÞ 2 T 2 : i < j; hi ¼ hj

ð1Þ ð2Þ

si þ pi þ oij 6 sj þ UB  ð1  xij Þ þ UB  ð2  v i  v j Þ 8ði; jÞ 2 T 2 : i < j; hi ¼ hj X X vj ¼ v k  d i 8i 2 P 8j2T :W ij >0

ð3Þ ð4Þ

8k2T :W ik <0

where:

si 2 Rþ0 ;

v i ; xij 2 f0; 1g

3.2. Proof of NP-hardness Let us focus on the complexity of the problem with alternative process plans. The problem PSm, 1, 1jtemp, oijjCmax, i.e. the case without alternative process plans, is NP-hard since it is a general~ jC max problem (see reduction of this problem ization of the 1jrj ; d j from a 3-partition problem in Lenstra et al. (1977)). If the resource constraints are omitted, we have a PS1jtempjCmax problem, which

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

304

can be solved in polynomial time (e.g. using linear programming while eliminating the resource constraints). On the other hand, the problem PS1jalt, tempjCmax, or even its subproblem PS1jnestedAlt, tempjCmax, is NP-hard, despite the resource constraints relaxation (see the following theorem). This leads to the observation that the computation of the earliest start times for all activities i 2 T is an NP-hard for the problem PSm, 1, 1jnestedAlt, temp, oijjCmax (and therefore also for PSm, 1, 1jalt, temp, oijjCmax). Theorem 1. PS1jnestedAlt, tempjCmax is an NP-hard problem.

Proof. Reduction from the MPS1jtempjCmax problem.The multimode project scheduling problem is an extension of the RCPSP problem such that each activity can be executed in one of more alternative execution modes which can differ in activity processing time and resource dedication. Neumann et al. (2003) proved that MPS1jtempjCmax is an NP-hard (see Theorem 2.15.3 in Neumann et al. (2003)). We show that this problem can be reduced to PS1jnestedAlt, tempjCmax in a polynomial time. For each activity i with k execution modes of the multi-mode problem we introduce an alternative branching consisting of k activities where each activity corresponds to one execution mode. By replacing each activity of the MPS1jtempjCmax problem by the corresponding alternative branching, we get an instance of the PS1jnestedAlt, tempjCmax problem. Therefore, the solution of the reduced problem is equal to the solution of the original problem. Consequently, we conclude that PS1jnestedAlt, tempjCmax in an NP-hard problem. h Corollary 1. The problem in finding the earliest start times of all activities with respect to alternative process plans and time-lags is NP-hard since the PS1jnestedAlt, tempjCmax problem is a subproblem of finding the earliest start times for all activities. 3.3. Time symmetry Using the following time symmetry mapping (an extension of Hanzálek and Šu˚cha (2009) for PSjtemp, oijjCmax) an instance of the PSm, 1, 1jalt, temp, oijjCmax problem can be transformed into another instance with an inverted time direction. Data transformed by the time symmetry mapping (TSM) forms a valid instance of the PSm, 1, 1jalt, temp, oijjCmax problem and can be solved using the same algorithms. TSM Let ðW; p; L; O; h; d; UB; s; v ; xÞ ! ðW 0 ; p0 ; L0 ; O0 ; h0 ; d0 ; UB0 ; s0 ; v 0 ; x0 Þ be the time symmetry mapping of the PSm, 1, 1jalt, temp, oijjCmax problem given by the following system of equalities:

W 0ij ¼ W ij p0i ¼ pi 0 lij

8i 2 P; 8j 2 T

8i 2 T

¼ lji þ pi  pj

d0i ¼ di

ð6Þ

8ði; jÞ 2 T

8ði; jÞ 2 T 2

o0ij ¼ oji h0i ¼ hi

ð5Þ

8i 2 T 8i 2 P

ð7Þ ð8Þ ð9Þ ð10Þ

UB0 ¼ UB

ð11Þ

s0i ¼ UB  si  pi v 0i ¼ v i 8i 2 T x0ij ¼ 1  xij

2

8i 2 T

ð12Þ ð13Þ

8ði; jÞ 2 T 2

ð14Þ

The main advantage of the proposed reduction is in the inverted point of view on the schedule. It could be an advantage for some instances when a constructive heuristic is used since it can lead to a better result. Moreover, both the original and the transformed instance can be solved by the same algorithm without modification of its code.

4. Heuristic algorithm Since PSm, 1, 1jalt, temp, oijjCmax is an NP-hard problem, the optimal solution can be obtained only for small instances. For large instances, we propose a heuristic algorithm that does not ensure finding an optimal solution, but it is able to handle instances with a significantly larger amount of activities. The idea of this algorithm, called Iterative Resource Scheduling with Alternatives (IRSA), is based on an IRS algorithm for PSjtemp, oijjCmax inspired by software pipelining and presented by Rau (1994) and extended by Hanzálek and Šu˚cha (2009) who focused on the acyclic scheduling problem and introduced so called take-give resources into the problem. It is a constructive method where activities are being added to the schedule according to their actual priority or being removed if the partial schedule is not feasible. The input of the algorithm is an instance of the PSm, 1, 1jnestedAlt, temp, oijjCmax problem, i.e. in the nested form, defined by a Petri net incidence matrix W, the processing times p, the resource assignment h, the setup times O and the time-lags L (see Fig. 1). The output of the algorithm is a schedule S determined by the selected activities and their start times, i.e. S = [s, v]. The main purpose of the proposed heuristic is to deal the problems where a feasible schedule cannot be found in polynomial time in general case. The optimization of the Cmax criterion is achieved by the gradual tightening of the constraint on the schedule length. 4.1. Initialization The algorithm (see Algorithm 1) starts with the estimation of the bounds for the schedule length. The upper bound is computed P as C UB (see Brucker max ¼ 8i2T maxðpi þ max8j2T ðoij Þ; max8j2T ðlij ÞÞ LB et al., 1999b). The lower bound is computed as C LB max ¼ snþ1 , i.e. the lower bound of the earliest start time of activity n + 1. For this purpose, let Gtemp be a directed graph with nodes VðGtemp Þ ¼ T and edges E(Gtemp) = {(i, j)2V(Gtemp)  V(Gtemp) : lij>1} with weights equal to lij. Furthermore, let Gprec be a directed graph with nodes V(Gprec) = V(Gtemp) and E(Gprec) = {(i, j) 2 E(Gtemp) : Ti is a direct predecessor of Tj in the Petri net}. Then the estimated C LB max is equal to the shortest path length between nodes 0 and n + 1 in Gprec computed by Dijkstra’s algorithm (Korte and Vygen, 2000). Algorithm 1. IRSA (budgetRatio, maxModifications, instance) UB compute C LB max and C max ; set initial priorities; budget = budgetRation; actualRestarts = 0; LB while C UB max P C max  S ¼ findSchedule C UB max ; priority; budget ;

if S is feasible s = shiftLeft(S); C UB max ¼ snþ1  1; else if actualModifications
In the original IRS algorithm, the priority of an activity is equal to its longest path length to the terminal activity n + 1. Due to

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

NP-hardness of the longest path lengths computation (resulting from Lemma 2) in our case, we use only the estimation retrieved from Gtemp, i.e. negative time-lags are omitted. Moreover, we have to distinguish priorities according to alternative process plans. Therefore, the priority of an activity increases with its estimated distance to the end of the schedule and decreases with the length of the alternative branch in which the activity is included. To compute priorities, we first set apriori = c1  ui,n+1c2  uopen,close for each activity i where ui,j is the longest path length between nodes i and j in Gtemp, the open and close are activities that start and terminate the minimal alternative branch containing activity i and c1 and c2 are constants. Minimal alternative branch for activity i is the alternative branch (see Section 2.2) containing activity i such that there is no other alternative branch containing activity i with the lower number of activities. In the example in Fig. 1, the open and close for activity 8 are activities 7 and 10 respectively. For activity 5, the open and close are activities 0 and n + 1. Based on the algorithm testing on various instances, the best performance is achieved when the longest path length to the end of the schedule is given higher influence on the priority value (we use c1/c2 = 5/3). Finally, the priority priorityi of each activity i is set to a value equal to the position of its apriori value in the ascending order of all aprior values. In other words, activity with the lowest aprior value will have priority equal to 1, next activity will have priority equal to 2 and the activity with the highest aprior value will have priority equal to n + 2. 4.2. Main loop In each iteration of the main loop, the function findSchedule tries to find the schedule with the given upper bound while the number of steps is limited by the parameter budget that is usually set as a number of activities multiplied by the parameter budgetRatio. If a feasible schedule is found, all activities are shifted to the left by the label-correcting algorithm (see Brucker and Kunst, 2006) so that the constraints and the order of activities in S are kept. A new upper bound of the schedule length is computed as C UB max ¼ snþ1  1 and the next iteration of the loop is performed. If a feasible schedule S is not found for the given schedule length, the algorithm modifies the priority according to the returned partial schedule. A general observation for heuristic algorithms is that more incorrect decisions are made at the beginning and, therefore, the priority of the earliest scheduled activities and activities that have been added to the schedule more often is decreased. The function findSchedule is then called for the same upper bound of Cmax using the modified priority. If the schedule was not found and the maximum number of priority modification steps determined by the parameter maxModifications is exhausted, the algorithm returns the best schedule. Algorithm 2. Inner loop of IRSA   findSchedule C UB max ; priority; budget scheduled = { }; nAddsi ¼ 0 8i 2 T ; si ¼ 0 8i 2 T ; v i ¼ 0 8i 2 T ; while budget P 0 priority = updatePriority(priority, nAdds, v); k = max"j2scheduled(priorityj); sLB k ¼ max8j2scheduled ðsj þ ljk Þ; UB sUB k ¼ C max  pk ;

½conflicts; sk  ¼ findSlot

305

(continued)

Algorithm 2. Inner loop of IRSA nAddsk = nAddsk+1; [s, scheduled] = insertActivity(k, sk,conflicts); v = findSelected(v, scheduled); if schedule is complete return S; end budget = budget1; end return S; end

4.3. Inner loop In the inner loop of the IRSA, priorities are updated in the function updatePriority (see Algorithm 2) such that the priority is increased for the activities marked as selected and proportionally decreased to the number of inclusions of the activity into the schedule. This update of priorities allows the heuristic to switch between alternative branches instead of stying in the same for the whole run of the algorithm. For each activity i, the priority is updated such that priorityi = priorityi + 0.5  vi  0.5  nAddsi where nAddsi denotes the number of inclusions of activity i to the schedule. Activity k with the highest priority is found amongthe set UB of not yet scheduled activities and a time window sLB where k ; sk activity k can be scheduled is computed. The lower bound for start time sLB k is calculated as the minimum time such that all temporal constraints sj + ljk 6 sk for all j 2 scheduled : ljk P 0 are satisfied, where scheduled is a set of activities that forms the current partial schedule. The start time upper bound sUB k is set to the maximal value such that the activity is completed before the given C UB max . The function findSlot tries to find the earliest time slot within the given time window with respect to the resource constraints. UB In other words, the time interval given by sLB k and sk is explored while searching for a time point where the given activity can be scheduled without violating any resource constraint. Sequence dependent setup times are also considered. If no feasible time position is found, then the time slot is set to sLB k if the activity is being added to the schedule for the first time. If the activity has been already included into the schedule in previous step, its time slot is set to sLB k þ 1 to avoid cycling of the algorithm. The function findSlot then returns all conflicting activities, i.e. activities that cannot be kept in the schedule without violating any resource or temporal constraint with respect to the last included activity. Activity k is then inserted into the partial schedule and all activities marked as conflicting are removed in order to keep the partial schedule feasible at any time. If an unscheduled activity is a member of some alternative branch, then all activities in the same alternative branch are also removed. The list of the selected/rejected activities is then updated; the scheduled activities are marked as selected, activities belonging to the same alternative branch are also marked as selected activities and all activities that cannot be added to the schedule without violating Eq. (4) are marked as rejected activities. The selection/rejection of other activities is not decided yet. If each activity is marked as scheduled or rejected, then the schedule S is complete. 4.4. Example of the run of the IRSA algorithm



UB k; scheduled; sLB k ; sk

 ;

Fig. 3 illustrates one iteration of the IRSA main loop for the instance depicted in Fig. 1. In the initialization, the algorithm sets

306

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

Fig. 3. Run of the IRSA algorithm.

5. Computational experiments In this section, the performance evaluation for the ILP model proposed in Section 3 and the heuristic algorithm IRSA is shown. Up to our knowledge, there are no standard benchmarks for the PSm, 1, 1jalt, temp, oijjCmax problem, hence randomly generated instances have been used. Moreover, the heuristic algorithm is tested on standard benchmarks of Boctor (1996) for the multi-mode resource constrained project scheduling problem. Experiments were performed on a PC with 2x Intel Core 2 Quad CPU at 2.83 GHz with 8 GB of RAM. To solve the ILP problems, the ILOG CPLEX 11.2 was used, the IRSA algorithm was implemented in Matlab R2008a.

5.1. Mathematical model complexity Each randomly generated instance contains a Petri net in the nested form with one source place and one sink place, where a ratio of alternative and parallel branchings can be specified. The maximum value of the activity processing time, the number and lengths of the positive and negative time-lags and the number of resources can be also set for each generated instance. The integer linear programming model was tested with the processing time chosen from a uniform distribution on the interval h 1,pmaxi where pmax = 15, the number of time-lags was set to jE(Gprec)j+n/3 for the positive values and n/5 for the negative values, where jE(Gprec)j is the number of edges in graph Gprec defined in

100

Number of solved instances [%]

priority = (13 10 8 9 7 5 3 4 6 1 2 12 11) and consequently it starts with the addition of activity T0 into the schedule. Then activity T11 is added to the schedule and its start time is set to its lower bound sLB 11 , i.e. s11 = 11 (step 1 in Fig. 3). After adding activity Tn+1 into the schedule, next not yet scheduled activity with the highest priority is T1. Its sLB 1 is equal to 0 and there is no other activity on the resource 1, so activity T1 is added to the schedule with s1 = 0. This addition violates temporal constraint l1 11 = 15 and therefore activity T11 is marked as conflicting in function findSlot and then removed from the schedule in function insertActivity (step 3). In the next step, activity T11 is scheduled with s11 = 15 so the temporal constraint is satisfied. The IRSA algorithm then schedules activities T2, T3, T4 and T5 without violating any constraint. Scheduling of activity T6 again violates temporal constraint, namely l6 n+1 = 6, so activity Tn+1 is unscheduled (step 9) and then scheduled again with modified start time (step 10). The schedule is complete, since each activity is marked as scheduled or rejected.

n=10 (1 resource) n=50 (5 resources) n=30

90

n=100

80 70 60

n=150 n=50

1 resource 5 resources

50 0

50

100

150

200

CPU time [s] Fig. 4. Ratio of solved instances for ILP model.

250

300

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

Section 4. Fig. 4 shows the number of solved instances in dependence on the solving time. 500 random instances have been generated for each number of activities n. We measured how many instances the ILP solver was able to solve within a given amount of time. As one can see, the larger instances can be solved with the increasing number of dedicated resources. This is obvious due to the smaller amount of resource constraints to be resolved. 5.2. Performance evaluation of IRSA algorithm We are not aware of any benchmark instances for the PSm, 1, 1jnestedAlt, temp, oijjCmax problem, i.e. the problem with alternative process plans, positive and negative time-lags and unary dedicated resources. Therefore, the IRSA algorithm was tested on 500 randomly generated feasible instances for each number of activities and resources. The parameters of the algorithm were set to budgetRatio = 6 and maxModifications = 2. The generator of the instances has default settings as in the evaluation of the ILP model. Fig. 5(a) shows the mean difference of the IRSA algorithm from the optimal value given by the ILP solver for feasible instances. Problems with the different number of resources and different maximum processing times are considered. Fig. 5(b) demonstrates the number of feasible instances (out of 500) that IRSA was not able to solve to feasibility. The number of resources does not have an important influence on the results obtained by scheduling with the IRSA algorithm. Instances with shorter processing times of activities lead to results with a bigger difference from the optimal value. On the other hand, the number of instances for which the IRSA was not able to find a solution is slightly lower in the case with shorter processing times.

307

The influence of the budgetRatio parameter on the results obtained by the IRSA is illustrated in Fig. 6(a) where the mean difference from the optimum and the solution time are depicted in dependence on the given budget for the algorithm. Data were measured on 500 instances with 20 activities and pmax = 15. Fig. 6(b) shows the influence of the maxModifications parameter using the same data sets as in the previous case. Table 1 shows the results for the IRSA algorithm with a time symmetry mapping (see Eqs. (5)–(14)). For each number of activities and resources, 500 feasible instances with pmax = 15 were generated and solved by IRSA (column ‘Original’). The value Dif denotes the mean difference from the optimum obtained by the ILP solver and the value NS denotes the number of instances that IRSA was not able to solve. These instances were then transformed by the time symmetry mapping and solved by IRSA (column ‘TSM’). As one can see, the results acquired by IRSA for the original instances are almost the same as for the cases with the transformed data. On the other hand, if both the original and the transformed data are passed to the heuristic algorithm for each instance and the better solution is kept (column ‘Best’), then the mean difference from the optimal value over 500 instances is decreased by 40% in reference to the case with the original data only. The number of instances without a solution is decreased to less than one half when both the original and the transformed instances are passed to the IRSA. The mean solving time for the IRSA algorithm with regard to the number of activities is shown in Table 2. For each number of activities, 20 feasible instances with pmax = 15 and the number of positive and negative time-lags same as in the ILP model evaluation were generated. The parameters of the algorithm were the

Fig. 5. Performance of IRSA algorithm.

Fig. 6. Influence of IRSA parameters.

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

308 Table 1 Time symmetry results. n

1 resource

5 resources

Original

10 15 20 25 30 35 40

TSM

Best

Original

TSM

Best

Dif[%]

NS

Dif[%]

NS

Dif[%]

NS

Dif[%]

NS

Dif[%]

NS

Dif[%]

NS

2.87 4.26 5.63 7.06 8.04 7.72 8.31

9 6 14 19 17 11 17

2.82 4.33 5.18 7.11 7.81 7.87 8.23

8 12 14 14 23 19 19

1.33 2.55 3.65 4.97 5.54 5.25 5.98

4 2 5 6 4 8 10

2.29 3.11 4.41 5.61 6.01 6.57 7.48

8 7 9 8 10 8 10

2.70 3.37 4.92 5.37 6.12 6.75 7.94

7 6 15 10 6 7 6

0.84 1.46 2.51 3.03 3.41 4.09 4.58

1 3 5 4 4 3 4

Table 2 Solving time for IRSA.

Table 3 Comparison with Boctor.

n

10

50

100

250

500

1000

2000

t [s]

0.04

0.25

0.56

2.64

8.23

33.76

187.34

same as in previous maxModifications = 2.

paragraphs,

i.e.

budgetRatio = 6

n

and

50 50 50 100 100 100

q

1 2 4 1 2 4

Boctor [% over CPL]

IRSA[% over CPL]

Min

Max

Mean

Min

Max

Mean

11.3 18.8 32.8 12.8 27.4 39.7

30.4 46 60.3 31.1 48.5 60.2

20.2 33.9 46.4 20.4 37.4 47.8

6.9 20.5 33.2 14.8 27.1 35.3

31.1 48.6 60.9 30.3 49.2 61.9

19.2 34.3 47.3 20.3 37.8 48.2

CPU time [s]

1.1 0.9 0.9 2.2 2.6 2.3

5.3. Evaluation on MPSjprecjCmax instances Furthermore, we have extended the IRSA algorithm in order to solve the instances of the MPSjprecjCmax problem proposed by Boctor (1996). These benchmark instances can be downloaded from the Project Scheduling Problem Library (PSPLIB) and consist of two data sets. The first data set contains 120 instances with 50 activities, the second data set contains 120 instances with 100 activities. The problem considered is the multi-mode resource constrained project scheduling with 1, 2 or 4 types of renewable resources where capacity of each resource type ranges from 1 to 7 units. Activities can require more than one resource type simultaneously to be executed and the number of execution modes ranges from 1 to 4 for each activity. Each mode is represented by the processing time of an activity and its resource demands. Percentage increase of the schedule length over the critical path length (CPL), computed using the shortest mode durations, is used to evaluate performance. To solve the instances described in the previous paragraph, we have modified the IRSA algorithm to be able to handle multiresource activities and resources with capacity P1. For each activity i being added into the schedule, another loop over all resources k:rik>0 is executed in function findSlot to find the time slot such that there is no violated resource constraint. This   loop is executed UB for each time point t within the interval sLB . For each resource k ; sk k:rik>0, we have to check whether there are enough available units in time interval ht, t + pii. The setup times are not considered and therefore there is no additional time space between two subsequent activities in the schedule. The remaining part of findSlot function is the same as described in Section 4.3. Multiple execution modes of an activity of the MPSjprecjCmax problem are represented by the alternative branching with number of activities corresponding to the number of execution modes in our problem. Since it is very easy to find a feasible solution for the considered MPSjprecjCmax problem, the parameters of the IRSA algorithm were set to budgetRatio = 1 and maxModifications = 1. Further increase of these parameters does not result in significantly shorter schedules. Comparison of our heuristic algorithm with the results proposed by Boctor is shown in Table 3 where n

denotes the number of activities, q denotes the number of resource types and ‘CPU’ denotes average computational time of the IRSA algorithm in seconds. Columns ‘Boctor’ and ‘IRSA’ show the minimum (Min), maximum (Max) and the average (Mean) percentage increase over the critical path length (CPL) for each combination of the number of activities and resource types. Each row represents 40 instances of the problem. The results show that the IRSA algorithm is competitive to the method proposed by Boctor for the MPSjprecjCmax problem. For each combination of the number of resources and activities, the mean percentage increase of Cmax found by the IRSA algorithm over the critical path length is at most 1% worse than the heuristic proposed by Boctor. For the instances with one type of resource, IRSA was able to find even better solutions in average. The total difference between both methods over all tested instances is equal to 0.1%. The main advantage of our heuristic algorithm is the ability to solve more general problems, namely those with generalized temporal constraints and alternative process plans (instead of alternative execution modes of each activity). 5.4. Evaluation on AJSP instances Finally, we have evaluated the IRSA algorithm on the instances of the job-shop scheduling problem with processing alternatives (AJSP) proposed by Kis (2003). We have decided to solve such instances since our problem is the generalized version of the AJSP problem. The results are depicted in Table 4 where columns GA, TABU and RAND contain the results found by algorithms proposed by Kis (2003) and column IRSA contains the results found by the IRSA algorithm, diff is the ratio of the schedule length found by the given algorithm over the lower bound estimated by the ILP solver and t is the average computational time in seconds. As we can see, the results found by the algorithms proposed by Kis (especially TABU algorithm) are superior than the results found by the IRSA algorithm. On the other hand, the increase in the computational time in dependence on the number of activities is more

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

309

Table 4 Comparison with Kis. Instances

a01–a03 a04–a06 a07–a09 a10–a12 a13–a15 a16–a18 a19–a21 a22–a24 a25–a27 a28–30 a31–a33 a34–a36 a37–a39

GA

TABU

RND

IRSA

diff

t [s]

diff

t [s]

diff

t [s]

diff

t [s]

1.025 1.042 1.042 1.042 1.020 1.051 1.068 1.072 1.123 1.145 1.152 1.157 1.151

3.812 17.04 40.52 78.67 27.55 67.57 124.8 60.31 147.8 274.3 100.5 243.6 457.7

1.021 1.011 1.012 1.005 1.014 1.012 1.015 1.042 1.058 1.025 1.083 1.060 1.036

2.331 11.38 30.76 67.68 71.29 49.27 97.14 43.23 131.4 274.1 82.76 253.8 327.6

1.023 1.024 1.095 1.093 1.098 1.135 1.149 1.136 1.203 1.212 1.249 1.261 1.232

3.308 16.78 42.98 87.04 29.92 77.41 153.1 72.02 191.6 386.3 130.8 347.7 709.5

1.062 1.096 1.077 1.137 1.251 1.263 1.235 1.299 1.364 1.259 1.341 1.381 1.258

1.331 3.232 7.901 12.33 2.805 5.798 12.91 6.612 22.16 18.69 16.56 37.33 48.12

crucial for algorithms proposed by Kis. The total computational time for each instance is also much lower in case of the IRSA algorithm, although the comparison is not straightforward since each of the algorithms were implemented in different environments and on different machines. The problem assumed in this paper is more general than the problem described by Kis. The main difference is that positive time-lags are restricted to be equal to processing times of activities and there are no negative time-lags at all in the AJSP instances. Moreover, we assume more general definition of alternative process plans where the alternative and parallel branchings can be arbitrary nested one in another. Furthermore, we do not focus on the particular situation where activities are joined in jobs with the specific precedence relations and resource assignment. Finally, there are no sequence dependent setup times in the AJSP problem. Note that the feasible solution of the AJSP instance can be found in a linear time. First, an arbitrary branch is chosen from each or-subgraph and second, all selected activities are scheduled according to the precedence relations in jobs. The number of edges in the AJSP instance cannot be higher than twice the number of activities. The problem in finding a feasible selection of activities requires to check each edge once in the worst case and the scheduling of selected activities requires to check each edge once as well. Therefore, a feasible schedule can be found in a linear time with respect to the number of activities. On the other hand, the problem in finding a feasible schedule for the PSm, 1, 1jnestedAlt, temp, oijjCmax instance is an NP-hard problem. Furthermore, as shown in Section 3.2, the PS1jnestedAlt, tempjCmax problem, i.e. the problem with relaxed resource constraints, is also NP-hard. On the other hand, if the resource constraints are relaxed in the AJSP problem, the optimal solution can be obtained in a linear time – an alternative branch with the smallest sum of processing time of activities is chosen from each orsubgraph and then all activities are scheduled sequentially in each job. The complexity is the same as for the problem in finding a feasible solution, i.e. linear with respect to the number of activities. To solve the AJSP instances, we have slightly modified function findSlot in the IRSA algorithm. Each job in the AJSP problem is a sequence of activities where at most one activity can be in process at each time but the order of activities in and-subgraphs is not specified. Therefore, the function findSlot has to check one more constraint during the search for the feasible time position, i.e. the feasible time position of an activity has to satisfy three type of constraints - temporal constraints, resource constraints and job constraints. If no feasible position is found, time slot is set to sLB k þ 1 all conflicting activities are returned and then unscheduled.

6. Case study A case study of production scheduling where we applied the IRSA algorithm is presented in this section. One type of wire harness made in Styl Plzenˇ is taken for illustration and its production process is transformed to an instance of the PSm, 1, 1jnestedAlt, temp, oijjCmax problem. Wires that will form the harness are marked, cut, stripped and furnished with a terminator. Operations can be performed either on universal machine or on specialized semiautomated machines or manually using additional equipment. Due to the various number of activities in each process plan we cannot use the multi-mode resource constrained project scheduling problem (see De Reyck and Herroelen, 1999). Salewski et al. (1997) presented an extension of the MPS problem where so called mode-identity is used to ensure that two jobs (or activities in our case) are executed in the same mode. Using this approach, one can model the presence of alternatives and parallelism by appropriate construction of jobs subsets and available modes. On the other hand, the model itself does not include the setup times, more precisely mode-dependent variant of the sequence dependent setup times. Moreover, the number of available modes for each activity is an exponential function of the number of alternative branchings in the worst case. This can lead to a situation where all activities have the same set of available modes corresponding to all feasible combinations of vi values, i.e. each mode represents one process plan. Therefore, this representation is not effective in the general case. Each operation can require more than one resource at a time, e.g. setting a terminator on a wire requires one machine and two applicator heads. Our IRSA algorithm can handle only mono-resource activities, hence multi-resource activities are represented by an appropriate number of mono-resource activities with the same processing time, different resource specification and synchronization by time-lags. The setup times are used to represent the time needed to change the settings of some machine between processing different types of wires. The Petri net representation of the instance for the simple wire harness is shown in Fig. 7. Grey-colored transitions represent the dummy activities, i.e. activities with the zero processing time and no resource requirements. Other transitions correspond to following activities (operations of production): T2 and T3 stand for the marking on the semi-automated machine, T4 is combined marking, cutting and stripping performed on the universal automated machine, T7 and T9 represent cutting and stripping on the semiautomated machine, T8 is the cutting operation on the same machine, T10 and T11 represent combined marking, cutting, stripping and application of a terminator (termination) on the universal automated machine with applicator tool as an additional resource.

310

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

Fig. 7. Petri net instance.

T12 and T13 are cutting, stripping and termination on the same machine with another applicator tool and T14 is the manual termination using the applicator tool. T15 is stripping on the semi-automated machine, T16 is manual stripping and T22 and T23 represent manual application of a terminator while different applicator tool is used in each activity represented by T22 and T23. Since the applicator tool is needed as an additional resource for some production operations, e.g. cutting, stripping and termination on the semi-automated machine represented by T12 and T13, we define time-lags l12:13 = 0 and l13:12 = 0 that lead to s12 = s13. Activity 12 and 13 have the same processing time but different resource demands and therefore the simultaneous utilization of the machine and the applicator tool is ensured. The same situation is for production operations represented by transitions T10 and T11. Furthermore, to avoid accumulation of semi-finished products we define negative time-lags such that there is a maximum allowed time between the beginning and the end of the production process for each wire harness. Such negative time-lags are useful especially when more types of wire harnesses are being scheduled simultaneously. Therefore, in the case study there are negative time-lags l20:2, l24:1 and l17:5. Moreover, there are also positive time-lags l2:6>p2, l2:7>p2, l3:8>p3 and l3:9>p3 since the wires marked on the semi-automated machine have to get dry after marking before they can be further processed Finally, we use sequence dependent setup times to represent the additional time for machines setup between two consecutive production operations. Such an instance contains 26 activities that have to be scheduled on a set of 8 resources. Using the ILP model proposed in Section 3, the optimal solution has been found in 0.15 seconds. The same solution was obtained in 0.19s by the IRSA algorithm. If four similar instances (i.e. two independent orders for the same wire harness) are considered and joined into one instance, then the number of activities raises to 104 and the optimal solution is not found within 48 hours of the ILP solver runtime. On the other hand, IRSA can find the solution in 0.93 seconds. For 10 joined instances, the number of activities is 260 and the IRSA algorithm returns the solution in 3.6 seconds. 7. Conclusion We have presented the resource constrained project scheduling problem with alternative process plans PSm, 1, 1jalt, temp, oijjCmax,

ˇ. motivated by the production of the wire harnesses in Styl Plzen We have decided to represent the structure of the problem by Petri nets. The proof of the problem NP-hardness is shown and the mathematical model able to solve instances with up to 50 activities for the case with one resource is presented. In order to solve larger problems in the nested form, we have developed the heuristic algorithm IRSA implemented in the Matlab environment. Computational experiments demonstrate good performance of this algorithm with a mean difference from the optimal value of the makespan less than 10%, while solving time for instances with 100 activities is less than 1 second. Instances with up to 2000 activities can be solved in the order of a few minutes. The time symmetry mapping was used for the problem and the results show improvement of the solution by 40% on average at the cost of twice as much computational time. From our experience with the IRS algorithm (Hanzálek and Šu˚cha, 2009), we can suppose that the implementation of IRSA in C# language can be up to 40 times faster than the one in Matlab. The IRSA algorithm is successfully applied ˇ. on the production of wire harnesses in Styl Plzen

Acknowledgements This work was supported by the Ministry of Education of the Czech Republic under the Projects OE09004, ME10039 and Research Program MSM6840770038.

Appendix A. ILP formulation for PSjalt, temp, oijjCmax To formulate an ILP model for the problem PSjalt, temp, oijjCmax, i.e. the problem with non-unary resources and multi-resource activities, let Ri 2 Zþ be the capacity of resource i 2 R. Activity i requires r ik 2 Zþ 0 units of resource k 2 R, such that rik6Rk. Let yij be a binary decision variable such that yij = 1 if activities i and j do not share any resource unit on any resource in the schedule and therefore, the resource constraints have to be omitted and yij = 0 otherwise, i.e. there is at least one resource unit of some resource assigned to both i and j. Furthermore, let zivk be another binary variable such that zivk = 1 if activity i is assigned to v-th unit of resource k and zivk = 0 otherwise. Then the ILP model for the problem PSjalt, temp, oijjCmax can be stated as follows:

R. Cˇapek et al. / European Journal of Operational Research 217 (2012) 300–311

min snþ1 subject to:

si þ lij 6 sj þ UB  ð2  v i  v j Þ

8ði; jÞ 2 T 2

ðA:1Þ

sj þ pj þ oji 6 si þ UB  xij þ UB  yij þ UB  ð2  v i  v j Þ

8ði; jÞ 2 M

ðA:2Þ

si þ pi þ oij 6 sj þ UB  ð1  xij Þ þ UB  yij þ UB  ð2  v i  v j Þ

8ði; jÞ 2 M

ðA:3Þ

 xij þ yij 6 0 8ði; jÞ 2 M ziv k þ zjv k  1 6 1  yij Rk X

ziv k ¼ rik

v ¼1

X

vj ¼

8j2T :W ij >0

8ði; jÞ 2 M; 8k 2 R; 8v 2 f1 . . . Rk g

8i 2 T ; 8k 2 R X

v k  di 8i 2 P

ðA:4Þ ðA:5Þ ðA:6Þ ðA:7Þ

8k2T :W ik <0

where:

M ¼ fði; jÞ 2 T 2 : i < j ^ 9k : r ik > 0 ^ rjk > 0g si 2 Rþ0 ;

v i ; xij ; yij ; ziv k 2 f0; 1g

References ˇ epek, O., 2007. Temporal networks with alternatives: Complexity and Barták, R., C model. In: Proceedings of the Twentieth International Florida Artificial Intelligence Research Society Conference (FLAIRS), Florida, USA. AAAI Press, pp. 641–646. ˇ epek, O., 2008. Nested temporal networks with alternatives: Barták, R., C Recognition and tractability. Proceedings of the 2008 ACM Symposium on Applied Computing (SAC). ACM, Ceara, Brazil, pp. 156–157. Beck, J.C., Fox, M.S., 2000. Constraint-directed techniques for scheduling alternative activities. Artificial Intelligence 121, 211–250. Blazewicz, J., Ecker, K.H., Pesch, E., Schmidt, G., Weglarz, J., 1996. Scheduling Computer and Manufacturing Processes. Springer-Verlag, New York, Inc. Boctor, F.F., 1996. A new and efficient heuristic for scheduling projects with resource restrictions and multiple execution modes. European Journal of Operational Research 90, 349–361. Brucker, P., 2007. Scheduling Algorithms. Springer-Verlag, New York, Inc. Brucker, P., Drexl, A., Mohring, R., Neumann, K., Pesch, E., 1999a. Resourceconstrained project scheduling: Notation, classification, models, and methods. European Journal of Operational Research 112, 3–41. Brucker, P., Hilbig, T., Hurnik, J., 1999b. A branch and bound algorithm for a singlemachine scheduling problem with positive and negative time-lags. Discrete Applied Mathematics 94, 77–79. Brucker, P., Kunst, S., 2006. Complex Scheduling. Springer-Verlag, New York, Inc. Capacho, L., Pastor, R., 2006. The ASALB problem with processing alternatives involving different tasks: Definition, formalization and resolution. In:

311

International Conference Computational Science and Its Applications (ICCSA), Glasgow, UK. Springer, pp. 554–563. Capacho, L., Pastor, R., 2008. ASALBP: The alternative subgraphs assembly line balancing problem. International Journal of Production Research 46, 3503– 3516. Capacho, L., Pastor, R., Dolgui, A., Guschinskaya, O., 2009. An evaluation of constructive heuristic methods for solving the alternative subgraphs assembly line balancing problem. Journal of Heuristics 15, 109–132. David, R., Alla, H., 2005. Discrete, Continuous, and Hybrid Petri Nets. SpringerVerlag, Berlin Heidelberg. De Reyck, B., Herroelen, W., 1999. The multi-mode resource-constrained project scheduling problem with generalized precedence relations. European Journal of Operational Research 119, 538–556. Dorndorf, U., Pesch, E., Phan-Huy, T., 2000. A time-oriented branch-and-bound algorithm for resource-constrained project scheduling with generalised precedence constraints. Management Science 46, 1365–1384. Hanzálek, Z., Svádová, M., 2001. Matlab toolbox for petri nets. In: 22nd International Conference, ICATPN 2001 Newcastle upon Tyne. Universitat Trier, pp. 32–36. Hanzálek, Z., Šu˚cha, P., 2009. Time symmetry of project scheduling with time windows and take-give resources. 4th Multidisciplinary International Scheduling Conference: Theory and Applications (MISTA). Springer, Dublin, Ireland, pp. 239–253. Julia, S., de Oliveira, F.F., Valette, R., 2008. Real time scheduling of workflow management systems based on a p-time petri net model with hybrid resources. Simulation Modelling Practice and Theory 16, 462–482. Kis, T., 2003. Job-shop scheduling with processing alternatives. European Journal of Operational Research 151, 307–322. Kloetzer, M., Mahulea, C., Belta, C., Silva, M., 2010. An automated framework for formal verification of timed continuous petri nets. IEEE Transactions on Industrial Informatics 5, 460–471. Korte, B., Vygen, J., 2000. Combinatorial Optimization: Theory and Algorithms (Algorithms and Combinatorics 21), First ed. Springer-Verlag, Berlin Heidelberg New York Tokyo. Lenstra, J.K., Rinnooy Kan, A.H.G., Brucker, P., 1977. Complexity of machine scheduling problems. Annals of Discrete Mathematics 1, 343–362. Mejfa, G., Poensgen, S., 2007. Scheduling application using petri nets: A case study: Intergráficas s.a. In: Proceedings of the 19th International Conference on Production Research – ICPR. International Foundation for Production Research, pp. 490–497. Murata, T., 1989. Petri nets: Properties, analysis and applications. In: Proceedings of the IEEE. IEEE, pp. 541–580. Neumann, K., Schwindt, C., Zimmermann, J., 2003. Project Scheduling with Time Windows and Scarce Resources, Second ed. Springer-Verlag, Berlin Heidelberg. Rau, B.R., 1994. Iterative modulo scheduling: An algorithm for software pipelining loops. MICRO 27: Proceedings of the 27th Annual International Symposium on Microarchitecture. ACM, pp. 63–74. Reddy, J., Kumanan, S., Chetty, O.K., 2001. Application of petri nets and a genetic algorithm to multi-mode multi-resource constrained project scheduling. International Journal of Advanced Manufacturing Technology 17, 305–314. Salewski, F., Schirmer, A., Drexl, A., 1997. Project scheduling under resource and mode identity constraints: Model, complexity, methods, and application. European Journal of Operational Research 102, 88–110. Trautmann, N., Schwindt, C., 2007. Large-scale short-term planning in chemical batch production. In: Proceedings of the 3rd Multidisciplinary International Conference on Scheduling: Theory and Applications (MISTA). Springer, pp. 490– 497. van der Aalst, W., 1996. Petri nets based scheduling. OR Spectrum 18, 221–229.