Dynamic Programming for Services Scheduling with ... - IEEE Xplore

8 downloads 7536 Views 357KB Size Report
Computer Science and Engineering, Southeast University, Nanjing, China ... manufacturing ; dynamic programming; services scheduling. I. INTRODUCTION.
2012 IEEE International Conference on Systems, Man, and Cybernetics October 14-17, 2012, COEX, Seoul, Korea

Dynamic programming for services scheduling with start time constraints in distributed collaborative manufacturing systems Zhicheng CaiˈXiaoping Li , Long Chen Computer Science and Engineering, Southeast University, Nanjing, China [email protected], [email protected], [email protected] Abstract- In this paper, the service scheduling problem with start time constraints is considered for distributed collaborative manufacturing systems, which is different from the discrete time-cost tradeoff problem (DTCTP), well studied during the past decades. The assumption that the ability of services is unlimited in DTCTP is seldom true for practical settings. The fact that most services have limited capabilities, especially for manufacturing services results in constraint start times for requirements. Such a DTCTP is modeled as the DTCTP-STC (discrete time-cost tradeoff problem with start time constraints), also proved to be NP-hard. A service is just available at some time point, which can be assigned as the start time negotiated between a broker and a provider. An effective dynamic programming algorithm is proposed with the time complexity O(N2Mv+1) for the DTCTP-STC. The impact of the number of nodes, the number of modes, and the complexity of the network on the computation time is analyzed by experiments. Simulated experiments are performs on randomly generated instances. The results illustrated that the proposal is very effective for small size instances. As well, the proposal is more suitable for the DTCTP-STC than the DTCTP with faster convergent speed for those general instances with fixed fewer modes. Keywords-component; DTCTP; distributed collabarative manufacturing ; dynamic programming; services scheduling

I. INTRODUCTION In distributed collaborative manufacturing systems, heterogeneous and distributed manufacturing resources are dynamically shared and collaboratively work, which is usually based on the service-oriented architecture [1-5]. Manufacturing services are invoked and charged according to the requirements of users to accomplish activities of a project. As well, the service providers and users can sign SLA on the available start time, duration, cost and quality of the services. Many services with identical functions are supplied by different enterprises, which have different non-functional properties, e.g., the start time, duration, cost and quality. It is often possible to compress the duration of an activity (choose another expensive service) with an additional expense to reduce the total project’s duration. Consequently, the decision making process of selecting appropriate services for activities of a project is a time/cost tradeoff problem. This problem has been represented as a well- known DTCTP (discrete time-cost tradeoff problem). In the DTCTP, activities have several candidate execution modes (time-cost pairs), i.e., the optional services. Appropriate modes must be selected for every activity under the constraints of deadline (or budget) to minimize the project cost (or makespan). DTCTP is an NP-Hard problem. Many exact, heuristic

978-1-4673-1714-6/12/$31.00 ©2012 IEEE

and meta-heuristic algorithms have been developed in the past decades. Exact methods for DTCTP mainly consist of enumeration and dynamic programming. Robinson [6] represented a dynamic programming algorithm which based on PSD (parallel and serial decomposition) of networks. Sine Robinson did not supplied an implementation method for the proposed method, De, Dunne, Ghosh and Wells [8] gave a detailed implementation based on Robinson and a new centralized dynamic programming method was proposed for those networks which cannot be decomposed by PSD (called non-PSD). But the new dynamic programming method is not suitable for the highly parallelized network. Consequently, Demeulemeester et al. [9] developed a method to transfer non-PSD networks to PSD ones by a reduction plan, which can be generated by two different methods. In this algorithm, CI (complexity index) is one of the crucial factors which have great influence on the complexity of the whole algorithm. Exact algorithms are mainly suitable for simple problems and cannot handle the complicated instances well in reasonable amount of time. The complexity of a problem is measured in terms of the number of activities, the number of modes, and the complexity of networks, and so on. Since the DTCTP is known to be NP-hard [10], the search for exact algorithms which are efficient for all kinds of instances is futile and one should instead search for efficient heuristic and meta-heuristic algorithms. Skutella [11] proposed an LP-Round (linear programming rounding) based approximation algorithm for DTCTP. Hafizoglu and Azizoglu [12] represented a heuristic algorithm which is a combination of LP-Round and B&B(Branch and Bound). Akka and DrexlandKimms [14]developed a network decomposition based method similar with Bendes Decomposition. In order to avoid slower convergence of Bendes Decomposition, a local search procedure was given in Hazir et al. [13]. However, the DTCTP is based on the assumption that services have unlimited ability. In practice, the remaining ability of a service changes with the workload in real-time. It cannot fulfill the requirements of brokers at any time. Consequently, the start time of different services for the same activity may be different. And, the start times must be negotiated between brokers and providers. For example, in Figure 1, the project consists of six activities. And for activity 1 there are three candidate services with different workloads. Different start times, end times and costs for the activity 1 are got by negotiating. In a word, the start time constraints of services should be consi-

803

dered in services scheduling. In this paper, a model of services scheduling considering start time constraints is proposed, denoted as DTCTP-STC (discrete time-cost tradeoff problem with start time constraints) and an effective dynamic programming approach is developed to solve it. The rest of paper is organized as follows. Section II describes the DTCTP-STC model. A dynamic programming algorithm is proposed and its time complexity is analyzed in Section III. Section IV gives the performance evaluation, followed by conclusions in Section V. II. PROBLEM DESCRIPTION Manufacturing projects can be represented as DAG, labeled as D = {V , E} , V = {1,2,..., N} is the set of activities and E is the partial precedence of activities. For example, in Figure 1 the project consists of 6 activities with precedence constraints. The candidate services for the activity i ∈ V make up the service set S i = {S i1 ,...S im } , mi = S i , in which S ik is the k-th service for

Figure 1. An example of start time constraints of services

F  = 

6

6 

i

the activity i . The binary variable χ ik ∈ {0,1}, i ∈ V , 1 ≤ k ≤ mi is used to demonstrate whether S ik is chosen to perform the activity i in a schedule.

i

6  6 

6  Figure 2. Services scheduling without the start time constraint

F  =  6

 

6 

6  6

6  6  6 

 

6  WV =  6  WV  = 

2 2

4

6 

 

6 

S = (6,9) and S = (3,15) are for activity 2, and so on. There are

∏m

6 

6

A. Services scheduling with start time constraints In the traditional DTCTP, the k-th service for activity i is denoted as Sik = (d ik , cik ) , which implies that the duration d ik and the cost cik are needed for service S ik to perform activity i . Services are shared among users based on the assumption that the capabilities of services are infinite. Consequently, services are available at any time without considering that the remaining ability changes with workloads in real-time. As illustrated in Figure 2, the project consists of four activities i = 1,2,3,4 . And there are several candidate services for each activity. For example, the candidate services set for activity 1 consists of S11 = (d11 = 2, c11 = 10) and S12 = (4,7) , the services 1 2

 

 

kinds of schedules maximally with diverse project ma-

i =1

kespans and total costs, by selecting different services for each activity of the project. E.g., A schedule x = (Ȥ 11 = 1, Ȥ 12 = 1, Ȥ 13 = 1, Ȥ 14 = 1) gets the minimize cost C x = 31 , under the deadline of 17. But, the start time constraints are not considered in the DTCTP, which is seldom true for practical settings. Therefore, the start time constraints of services are considered in the proposed DTCTP-STC. New activities can only be allocated to services at some fixed start times negotiated between providers and users. The remaining real-time ability of services, which changes with their workloads, impacts the negotiation process greatly. The k-th service for activity i ∈ V is denoted as S ik = (tsik , teik , cik ) , in which tsik , teik , cik represent the start time, finish time and cost respectively for performing the activity i with Sik selected. As shown in Figure 3, there are many candidate services with diverse start times, finish times and costs for each activity. Horizon ordinate is time axis, and rectangles represent services. The horizon coordinate values corresponding to the left side of rectangles are the start time of services. The lengths of the rectangles represent the durations

Figure 3. Services scheduling with the start time constraint Name

TABLE I. Description

V

the set of activities

E

The partial precedencies of activities

S

k i

The k-th service for the activity i

k i

Duration for the service S ik to perform activity i

k i

Start time for the service S ik to perform the activity i

d

ts

teik k i

End time for the service S ik to perform the activity i

c

Cost for performing the activity i with S ik selected

χ ik fi

demonstrates weather S ik is chosen for activity i denotes the time at which activity i finishes

Pi

Set of activities which are the immediate predecessors of activity i Set of activities which are the immediate successors of activity i

Ai

804

NOTATION USED

of services and the labeled integers in rectangles represent the costs of services. E.g., the candidate services set for activity 1 consists of S11 = (3,5,10) and S12 = (2,6,7) . The service S11 can only start at time 3 with duration 5 − 3 = 2 and a cost 10. Though the service S 12 starts at an earlier time 2 with a lower cost 7, the duration 4 is longer than that of S11 . Under the deadline of 17, a realization x = ( χ 11 = 1, χ 22 = 1, χ 32 = 1, Ȥ 42 = 1) gets the minimized cost C x = 38 larger than that without considering the start time constraints. So, the start time constraints of services play a crucial role in services scheduling.

b) At the i -th sub-problem (stage), the finish time of all activities 1 to i is included in state descriptions, except for the activities of which the successors are all already evaluated. The cumulative cost of the activities 1 to i is also contained in state descriptions. c) At each stage of the dynamic programming algorithm, many available states may be contained in the current subproblem. The states which are Pareto dominated are deleted. d) The states of current stage can be generated from the immediate predecessor stage. And the optimal solution of the current stage must contain the optimal solution of the former sub-problems. Let a (i + 1) − tuple φi to denote the state of the i -th subproblem (called stage i ). For each activity j , j < i , which has an immediate successor s , s > i , let the finish time f j of j recorded in the j -th element of φi . And the other elements, corresponding to activities which have no un-evaluated immediate successors, are set ⋅ . The finish time of activity i is recorded in the i -th position of φi , and the cumulative cost of activities 1 to i is recorded in the (i + 1) -th element of φi .At each stage i , there may be many states and they make up the set Ω i . For every φi , a corresponding i -tuple xi is used to record the index of the selected services for each activity j , j = 1,..., i . Let Η i represent the set of all tuples x i at stage i . The detail of the proposed dynamic programming algorithm is shown in Figure 5. At each stage i , i = 1,...N , old states φi −1 ∈ Ω i −1 of stage i − 1 are used to generate new states. For each state φi −1 , services S ik , k = 1,..., mi are checked whether they are available one by one. If the start time ts ik is larger than the maximum finish time of all immediate predecessors of activity i , a new state φi can be generated. The elements φi [ j ], j = 1,..., i − 1 are assigned using the method above mentioned. The finish time φi [i] of activity i and the cumulative cost is computed as follows. φi [i] = teik , φi [i + 1] = φi −1 [i] + cik . For deadline problem DCTCTP-STC-T, states which violate the deadline constraint should be deleted. Therefore, in step 2.2 of Figure 5, each state φi with φi [i] > T , is eliminated. Similarly for the budget version DCTCTP-STC-B, each state φi , of which the cumulative cost is already larger than the budget B , is deleted. For both problems, the Pareto dominated states are also eliminated in step 2.3. For a state φ ia , if there is a state φ ib with φib [ j] ≤ φia [ j ] , j ∈ {1,..., i + 1} φib [ j ] ≠ ⋅ , the state φ ia is Pareto dominated by φ ib . In the remainder of this section, an example project in Figure 5 is used to demonstrate the process of the developed dynamic programming algorithm and the eliminating strategy. The state set Ω i at the end of each stage i in the example is shown in Table II. Considering the computation at stage 1, there are two possible services for activity 1. Since it is the first node of the network, no former states need to be considered and it generates two tuples < 5,8 > and < 7,5 > according to < f 1 , C1 > directly. At stage 2, state tuples are given by < f 1 , f 2 , C 2 >=< f 1 , te2k , C1 + c 2k >, k = 1,2 . From the first

B. Mathematic model The objective of DTCTP-STC can be minimization of the project total cost (or the project makespan), under the constraint of deadline T (or budget B ). The model of the deadline version DTCTP-STC-T is as follows. Min ¦ ¦ cik χ ik (1) i∈V 1≤ k ≤ mi

S. t.

¦χ

= 1, i ∈ V

k i

(2)

1≤ k ≤ mi

fi ≤

¦ ts

k j

χ kj , ∀(i , j ) ∈ E

(3)

¦ te

k i

χ ik , i ∈ V

(4)

1≤ k ≤ m j

fi =

1≤ k ≤ mi

χ i ,k ∈ {0,1}, i ∈ V ,1 ≤ k ≤ mi

(5)

Max{ f i } ≤ T , i ∈ V

(6)

The objective function (1) of the deadline version is to minimize the total cost. A unique service (mode) must be assigned to each sub-task according to the constraint (2). Constraint (3) guarantees the precedence constraints are not violated. Equation (4) ensures that sub-tasks can only begin at the available start time of the selected service. Constraint (5) denotes a binary decision variable. The deadline must be met in accordance with the constraint (6). The objective function of the budget version (DTCTP-STCB) is to minimize the makespan of the project as (7). In addition to the formulation (2-5), the following constraint (8) is also included in the model of DTCTP-STC-B. Min Max{ f i }, i ∈ V (7) s. t.

¦ ¦c

k i

χ ik ≤ B

(8)

i∈V 1≤ k ≤ mi

III.

THE PROPOSED ALGORITHM

A. The proposed dynamic programming algorithm The proposed dynamic programming algorithm uses a centralized strategy, which is similar with that in De, Dunne, Ghosh and Wells [8]. The proposed dynamic programming algorithm has the following major characteristics: a) The activities are sorted according to their topological order and labeled in ascending order using integer numbers. Given any integer i ≤ N , activities 1 to i make up the i -th subproblem. There are totally N sub-problems, which are evaluated in ascending order in the process of the dynamic programming.

805

state < 5,8 > of stage 1, we will create new states < 5,9,8+10> =< 5,9,18 > and < 5,10,8 + 15 > =< 5,10,23 > for each candidate service of activity 2. For the next state < 7,5 > of stage 1, the first service < 5,9,10 > of activity 2 cannot be selected, as the start time 5 is earlier than the finish time 7 of activity 1. And, the state < 7,10,20 > is generated for the service < 8,10,15 > . Since the states < 5,10 ,23 > and < 7 ,10 , 20 > are Pareto dominated by the state < 5 ,9 ,18 > , they are eliminated. It follows that, the other stages are evaluated.

<  > <  > <  ><  >

<  > <  > <  > <  > <  > <  > <  ><  > <  > <  >

B.

Complexity of the proposed dynamic programming algorithm As mentioned above, a (i + 1) − tuple φi is used to represent one state of stage i . Let vi denotes the count of element φi [ j ], j = 1,..., i , that φi [ j ] ≠ ⋅ . The maximum vi over all N stages is denoted as V = max{vi | i = 1,..., N } . Once a service is selected for performing an activity, the finish time of the activity is fixed to the end time of the selected service. So, for an activity i with m i candidate modes, it has m i kinds of finish times maximally. Let M = Max{mi | i = 1,... N } denotes the maximum of the mode count of activities. So, the count of available states of any stage is M V maximally. Consequently the complexity of the proposed algorithm is O( N 2 M V +1 ).

Figure 4.

the example for the proposed algorithm

1 Initialize Ω 0 ← {< 0 >} ˈ Η 0 ← {} 2 For i = 1 to N 2.1 For Each φi −1 ∈ Ω i −1 For k = 1 to mi If ts i ≥ max{ f j } then k

j∈Pi

2.1.1.1.1

If ∃s ( s ∈ S j ∩ s > i ) then

φi [ j ] ← φi −1 [ j ] , Else φi [ j ] ← ⋅ ,

An example in Figure 6 is used to illustrate the process of generating new states from old states of the former stage with new services in the dynamic programming method [8] for DTCTP. In stage i − 1 , there are three old states φi −1 = 1,2,3 . And

2.1.1.1.2

two new services S = (6,8) and S = (4,10) are candidate for the activity i at stage i . For each old state φ i −1∈ Ω i −1 , the earliest start time for new services is denoted as ETφi −1 = max{φi −1 [ j ]} . That is 1 i

2 i

2.1.1.1.3

k i

Ω i ← φ i ∪ Ω i , Η i ← Η i ∪ xi

2.3 Eliminate the Pareto dominated states from Ω i . 3 Return the best states. Figure 5. The proposed dynamic programming TABLE II.

i −1

( ET , ET + d , c ) from each service S ∈ S i ,

φi [i ] ← f i

2.2 Eliminate some states of Ω i according deadline T or budget B .

LEMMA 1. The DTCTP can be transformed to the = STC_DTCTP by generating a new service NS φk k i

,

x i [i ] ← k ,

j∈Pi

k i

f i ← etik

φi [i + 1] ← φi −1 [i] + c

to say, the new services S i1 and S i2 cannot be arranged earlier than the earliest start time ET1 =19, ET2 =10 and ET3 = 14 for the three old states respectively.

k i

If i > 1 then For Each j ∈ {1,...i − 1}

k = 1,..., S i for

Stage 1

every state φi −1 ∈ Ω i −1 at each stage i , i.e., the DTCTP-STC is NP-hard as the DTCTP.

2

PROOF. In DTCTP-STC, The set Sinew consists of services generated from the traditional candidate services set S i for DTCTP at stage i . Let the set NS s denotes new services generated from the old state s and all services of S i . And the set NS k denotes new services derived from the services S ik and all states of Ω i−1 . E.g. six services S inew = {NS11 , NS12 , NS 21 , NS 22 , NS 31 , NS 32 } are generated for the instance in Figure 7. The set NS1 = {NS11 , NS12 } is composed by new services generated from old state 1 and all services in DTCTP. Services generated from the service Si1 and all old states make up the set NS 1 = {NS11 , NS 21 , NS 31 } .

3 4 5

6

806

Tuple model < f1 ,C1 >

STATES OF THE EXAMPLE

Tuples < 5,8 > < 7,5 > < 5,9,18 > < 5,10,23 > < f1 , f 2 , C2 > < 7,10,20 > < ⋅, f 2 , f 3 , C3 > < ⋅,9,15,24 > < ⋅,9,10,30 > < ⋅,9,16, 28 > < ⋅,⋅, f 3 , f 4 , C4 > < ⋅,⋅,15,22,31 > < ⋅,⋅,10,19,40 > < ⋅,⋅,10,22,37 > < ⋅,⋅,⋅, f 4 , f 5 , C5 > < ⋅,⋅,⋅,22,22,43 > < ⋅,⋅,⋅,22,17,45 > < ⋅,⋅,⋅,22,22,49 > < ⋅,⋅,⋅,22,29,40 > < ⋅,⋅,⋅,19,22,52 > < ⋅,⋅,⋅,⋅,⋅, f 6 , C6 > < ⋅,⋅,⋅,⋅,⋅28,49 > < ⋅,⋅,⋅,⋅,⋅22,58 > < ⋅,⋅,⋅,⋅,⋅, 28,54 > < ⋅,⋅,⋅,⋅,⋅,28,51 >

,

All of the new states generated in the DTCTP can be generated in the corresponding DTCTP-STC by using new generated services. That is, any state φi = < ..., ETφi −1 + d ik , φi −1 [i] + cik > ,

S

generated from φi −1 and Sik at the stage i of the DTCTP, can also be generated by φi −1 and the new service NS φk in the DTCTP-

2 i

Si1

max{ f j | j ∈ Pi }

i −1

STC. This is because the service Sik is just arranged at the time which equals the available start time of NS φk . For example, in i −1

Figure 6 and Figure 7, the state < ...,19,25,18 > generated by state 1 and S i1 can also be generated by state 1 and NS11 in the DTCTP-STC. New states generated in the corresponding DTCTP-STC, can be either generated in the DTCTP or be dominated by other states, i.e., the new state, derived from φi−1 and the serin DTCTP-STC, can be derived vice NS φk ∈ NS φ i −1

Figure 6. New states generation for DTCTP

2 1

NS NS 22

i −1

NS 21

NS11

NS31

from Sik and φi−1 in the DTCTP as mentioned above. And other states, generated from the old state φi −1 and the serk vice NS other ∈ NS k / NS φ , are Pareto dominated by the state de-

NS32 Figure 7. Transform from DTCTP to DTCTP-STC

i −1

rived from the service NS φk and the old state φi −1 . The reason is i −1

Si5

Si4

k as follows. If the start time of service NS other is earlier than the time ETφ , it cannot be used to generate new states with the old

Si2

Si1

i −1

state φi −1 . Otherwise the service NS must have a later available start time than that of NS φk . At the same time, the serk other

Si3

i −1

k vice NS other has an equal duration and cost with the service NS φk . i −1

k Consequently the state generated by NS other is Pareto dominated k by that derived from NS φ . For example, in Figure 7, the state i −1

Figure 8. An example for DTCTP-STC

< ...,14,23,25 > generated by the service NS12 and the old state 3 is Pareto dominated by the state < ...,14,18,25 > generated by the service NS 32 and the state 3. Consequently, the DTCTP and the corresponding DTCTP-STC have equal states structures at any stage. As well, the two problems have equal complexity and the DTCTP-STC is NP-hard. But, compared with the dynamic programming algorithm for the DTCTP, the proposal for the DTCTP-STC has faster convergence for general instances with fixed fewer modes. It is because of the following reasons. a) In general instances of DTCTP-STC, the number of modes is far smaller than S inew . It lessens the computation bur-

due to the start time constraints. For example, in Figure 8, when the start time constraints must be obeyed , the new state generated by S i3 will be Pareto dominated by that generated by S i5 for the same old state 1, although the two services have equal duration and cost. IV. EXPERIMENTAL RESULTS In order to evaluate the influences of the count of nodes, modes and the value of V on performance to the proposed dynamic programming algorithm, a serial of experiments are performed. The experiments are coded in java and run on a 2.5GHZ computer. As there are no standard benchmarks for DTCTP-STC from the literature, 1280 instances, corresponding to 64 kinds of project settings in Table III with 20 replicates, are generated. The AON networks of projects are generated randomly according to the number of nodes and the value of Vwith a single source node and a single sink node. Linear cost functions are used to generate the cost and duration of services (modes). The start time of the modes of task i is generated from { min {et kj }} , max{ max {et kj }}] randomly. the interval U [max j∈P k =1,..., m

den significantly. b) The limitation of available start time makes the services not available for some old states, for example, in Figure 8, the service Si1 is not available for all old states and the service S i2 cannot be selected for the old state 2 and so on. c) The start time constraints break the state of Pareto nondominated in the DTCTP states. In the DTCTP, new services are arranged at the same start time for the same old state. And new states generated from the same old state are all Pareto nondominated by each other, if the new services are all Pareto nondominated by each other. E.g., in Figure 5, the new generated states (...,19,25,18) and (...,19,23,10) are non-dominated by each other, since the services S i1 = (6,8) and S i2 = (4,10) are nondominated. But in the DTCTP-STC, this state may be broken

i

j

j∈Pi

k =1,..., m j

The computational results, which consist of the average execution time (in milliseconds) of the 20 instances for every kinds of project setting, are presented in Table IV. As shown in Table IV, the number of nodes impacts the computation time of the algorithm greatly. When the number of

807

TABLE III.

Parameters Nodes Modes

V.

PROJECT SETTINGS

In this paper, the DTCTP-STC is proposed to model the services scheduling problem in distributed collaborative manufacturing. The start time constraints of services are considered because of the real-time changing workloads of services. To solve it, an effective dynamic programming algorithm is developed. Although the DTCTP-STC is proved to be an NP-hard problem, the proposal for solving it has faster convergence than that for the DTCTP on general instances with fixed fewer modes. Some experiments are performed and it indicates that the computation time of the proposal increases when the number of nodes, the number modes or the value of V increases. Although the proposed algorithm can solve the small-sized instances in reasonable amount of time, more efficient approximate, heuristic or meta-heuristic algorithms should be developed to solve the large-sized instances in future work.

Levels 10,20,30,40 5,10,15,20 4,6,8,10

V

TABLE IV.

COMPUTATIONAL TIME FOR EVERY COMBINATION

Nodes*Modes 10*5 10*10 10*15 10*20 20*5 20*10 20*15 20*20 30*5 30*10 30*15 30*20 40*5 40*10 40*15 40*20

V4 1