An optimization-based heuristic for the machine reassignment problem

1 downloads 0 Views 489KB Size Report
Keywords Machine reassignment · Optimization-based heuristic · Mixed integer ... Data centers constitute the most important infrastructure component for ...
Ann Oper Res DOI 10.1007/s10479-015-2002-6

An optimization-based heuristic for the machine reassignment problem Mehdi Mrad1 · Anis Gharbi1 · Mohamed Haouari2 · Mohamed Kharbeche3

© Springer Science+Business Media New York 2015

Abstract We address the machine reassignment problem proposed in the context of the ROADEF/EURO challenge 2012 in partnership with Google. The problem consists in reassigning a set of processes to a set of multiple-resource machines so as to minimize a weighted function of the machines load, the resources balance, and the costs of moving processes while satisfying numerous constraints. We propose an optimization-based heuristic that requires decomposing the problem into a sequence of small-sized instances that are iteratively solved using a general MIP solver. To speed-up the solution process several algorithmic expedients are embedded. Extensive computational experiments provide evidence that the proposed approach exhibits a very good performance. Keywords Machine reassignment · Optimization-based heuristic · Mixed integer programming

1 Introduction Data centers constitute the most important infrastructure component for electronic service providers. Huge data centers deal with thousands of applications with different resource demands. As a matter of fact, giant service providers need to optimize their computer resources usage in order to maintain their high quality of service. For that purpose, various factors need to be taken into account. For instance, a system with overloaded machines is more likely subject to unpredictable failures. Such situations should be avoided and the business must keep running even if an entire data center crashes. A challenging combinatorial

B

Anis Gharbi [email protected]

1

Department of Industrial Engineering, College of Engineering, King Saud University, Riyadh, Saudi Arabia

2

Department of Mechanical and Industrial Engineering, College of Engineering, Qatar University, Doha, Qatar

3

Qatar Road Safety Studies Center, University, Doha, Qatar

123

Ann Oper Res

optimization problem that arises in such practical setting is the so-called Machine Reassignment Problem. This problem was proposed in the context of ROADEF/EURO challenge 2012 in partnership with Google. The problem can be formally described as follows. Consider a set P of processes that are partitioned into a set S of services, and a set M of machines that are partitioned into a set L of locations. Each machine m ∈ M belongs to a set of machines N (m) referred to as its neighborhood. According to Portal (2012), two machines could be in the same neighborhood if they can exchange data fast enough to answer the requests of a user in acceptable time. A set R of common resources is provided so that each process p ∈ P requires an amount R( p, r ) of resource r ∈ R. Moreover, each machine m ∈ M has a limited capacity C(m, r ) of each resource r ∈ R. A feasible assignment is initially provided where each process p ∈ P is assigned to a given machine M0 ( p) ∈ M. The problem consists in reassigning each process p ∈ P to a machine M( p) ∈ M so as to minimize a certain objective cost under the following constraints: – Capacity constraints The usage of each machine m for each resource r, defined by  U (m, r ) = p∈P |M( p)=m R( p, r ), should not exceed the available capacity C(m, r ). – Conflict constraints Two processes of the same service should not be assigned to the same machine. – Spread constraints The processes of each service s ∈ S should be spread on a minimum number of distinct locations, denoted by spr ead Min(s). – Dependency constraints If a service s a depends on another service s b , then each process pa ∈ s a should have at least one process p b ∈ s b that runs in the neighborhood of M( pa ). – Transient usage constraints For a particular set of resources T R ⊆ R, referred to as transient resources, each moved process p requires capacity on both its original assignment M0 ( p) and its new assignment M( p).In other words, a feasible reassignment should satisfy the following condition:  ∀m ∈ M, r ∈ T R, R( p, r ) ≤ C(m, r ) (1) p∈P |M0 ( p)=m∨M( p)=m

The total cost that has to be minimized is a weighted sum of the following various costs: –  Load cost The load cost of a resource r ∈ R is defined by loadCost (r ) = m∈M max(0, U (m, r ) − SC(m, r )), where SC(m, r ) denotes the safety capacity of a resource r on machine m. – Balance cost For a given machine m, the available capacity of a resource r is defined as A(m, r ) = C(m, r ) − U (m, r ). It is desired to achieve a certain target on the availability ratio of some pairs of resources (r1 , r2 ) ∈ R2 . More specifically, let B denote the set of triples b = r1 , r2 , target ∈ R2 × N that represent such resource pairs along with their corresponding targets. The balance cost of a triple b is defined by balanceCost (b) =  m∈M max(0, target ∗ A(m, r1 ) − A(m, r2 )). – Process move cost The process move cost is defined by pr ocess MoveCost =  p∈P |M( p) = M0 ( p) P MC( p) where P MC( p) denotes the cost of moving the process p from its original machine M0 ( p). – Service move cost The service move cost is defined by ser viceMoveCost = maxs∈S (|{ p ∈ s|M( p) = M0 ( p)}|) i.e. the maximum number of moved processes over services. –  Machine move cost The machine move cost is defined by machineMoveCost = p∈P M MC(M0 ( p), M( p)) where M MC(M0 ( p), M( p)) denotes the cost of moving process p from M0 ( p) to M( p).

123

Ann Oper Res

The total cost is formally defined by:  wload (r ).loadCost (r ) totalCost = r ∈R

+



wbalance (b).balanceCost (b)

b∈B

+ w pr ocess Move . pr ocess MoveCost + wser viceMove .ser viceMoveCost + wmachineMove .machineMoveCost

(2)

For a more detailed description of the problem, the reader is referred to Google (2012). The machine reassignment problem is one of many optimization problems that arise in the context of server loading, such as cloud service provisioning (Ferrer et al. 2012) and power management of virtualized clusters (Petrucci et al. 2011). The challenge competitors have tackled the machine reassignment problem using various approaches. These include tabu search/simulated annealing/late acceptance metaheuristics, large neighborhood search procedures, hyper-heuristics and MIP-based local searches. In particular, Gavranovi´c and Buljubasi´c (2012) proposed an efficient local search heuristic that is based on a clever variable neighborhood. Portal (2012) developed a simulated annealing metaheuristic that uses two neighborhoods. Cremonesi and Sansottera (2012) implemented a variable neighborhood search heuristic for a slightly modified version of the problem. Mehta et al. (2012) compared mixed-integer programming and constraint programming for the machine reassignment problem. They showed that embedding the constraint programming with a large neighborhood search provides better solutions. Wauters (2012), obtained promising results by implementing a reinforcement learning-based late acceptance heuristic. A multi-start iterated local search algorithm has been proposed by Masson et al. (2013) for both machine reassignment and multi-capacity bin packing problems. Malitsky et al. (2013) implemented a large neighborhood search approach and showed that consistently better results could be obtained using a sophisticated parameter tuning method. A closely related (but less complicated) problem is the so-called vector packing problem. This actually constitutes an important family of the well-known multi-dimensional bin packing problem where each bin has a set of limited resources and each item is characterized by a vector of independent resource consumptions (i.e. there is not necessarily a geometrical space consideration). Several authors have proposed optimization techniques for the vector packing problem. To the best of our knowledge, exact branch-and-bound algorithms have been only proposed for the two-dimensional variant (Spieksma 1994; Caprara and Toth 2001). Whereas some Constraint Programming methods have been devised for the multidimensional bin packing (Kell and Hoeve 2013; Moffitt 2013). On the other hand, numerous heuristic approaches have been proposed for vector packing problems with two or more resources. These include the approximation scheme with worst-case performance ratio of Kellerer and Kotov (2003), the set-covering-based heuristic of Monaci and Toth (2006), the genetic algorithm of Wilcox et al. (2011), and the First-Fit-Decreasing based heuristics of Panigrahy et al. (2011), to cite just a few. The machine reassignment problem can be viewed as an extension of the much studied generalized assignment problem which consists in minimizing the cost of assigning jobs to agents subject to resource constraints (Nauss 2006). This NP-hard problem has attracted the attention of several researchers during the last decades. Various techniques have been proposed including branch-and-bound algorithms (Haddadi and Ouzia 2004), branch-andprice algorithms (Savelsbergh 1997), Tabu search heuristics (Yagiura et al. 2004), artificial

123

Ann Oper Res

bee colony heuristics (Baykasoglu et al. 2007), path-relinking methods (Yagiura et al. 2006) and greedy algorithms (Romeijn 2000). In this paper, we propose an optimization-based heuristic for the machine reassignment problem. Generally speaking, an optimization-based heuristic takes advantage from optimally solving a sequence of much simpler subproblems in order to obtain a good approximate solution for the original problem. Numerous techniques have been used in the literature for the subproblem optimization. These include MIP techniques (such as in matheuristics) (Boschetti et al. 2009), branch-and-bound algorithms (Adams et al. 1988; Gharbi and Haouari 2007), and dynamic programming methods (Haouari et al. 2006), to quote just a few. Interestingly, optimization-based heuristics have proven to provide high-quality solutions for various combinatorial optimization problems, such as the vehicle routing problem (Archetti 2008), the political districting problem (Mehrotra et al. 1998), and the robotic cell problem (Carlier et al. 2010). The main idea of our approach consists in selecting a subset of machines together with the associated processes assignment, and optimally reassigning the selected processes to the selected machines through solving an appropriate optimization model. In order to meet the hard time limit constraint that has been set by the challenge organizers, the procedure is speeded up by various acceleration features. The obtained computational results show a promising performance of the proposed heuristic. The remainder of this paper is organized as follows. First, a mixed-integer programming formulation is presented in Sect. 2. Section 3 provides details of our proposed approach. The results of computational experiments that have been carried out on benchmark instances are reported in Sect. 4. Finally, Sect. 5 summarizes our findings and highlights directions for future research.

2 A mixed-integer programming formulation First, we propose a MIP formulation of the reassignment problem. To that aim, we define the following decision variables: – x pm binary variable that takes value 1 if process p is assigned to machine m; and 0 otherwise, ∀ p ∈ P , m ∈ M, – spr ead(s, l) binary variable that takes value 1 if at least one process of service s is assigned to one machine of location l; and 0 otherwise, ∀s ∈ S , l ∈ L, – ymr = max(0, U (m, r ) − SC(m, r )), ∀r ∈ R, m ∈ M, – z bm = max(0, target.[C(m, r1 )−U (m, r1 )]−[C(m, r2 )−U (m, r2 )]), ∀b ∈ B, m ∈ M. Furthermore, we define the binary constant a pm that takes value 1 if m = M0 ( p), and 0 otherwise, ∀ p ∈ P , m ∈ M. The reassignment problem is formulated as follows:     MinimizeZ = wload (r ) ymr + wbalance (b) z bm r ∈R

m∈M

+ w pr ocess Move



b∈B

m∈M

  P MC( p) 1 − x p,M0 ( p)

p∈P

+wser viceMove ser viceMoveCost   + wmachineMove M MC (M0 ( p), m) x pm p∈P m∈M

123

(3)

Ann Oper Res

Subject to: Each process is assigned to exactly one machine:  x pm = 1, ∀ p ∈ P ,

(4)

m∈M

Capacity constraints:  R( p, r )x pm ≤ C(m, r ), ∀m ∈ M, ∀r ∈ R\T R,

(5)

p∈P

Conflict constraints:



x pm ≤ 1, ∀s ∈ S , ∀m ∈ M,

(6)

p∈s

Spread constraints: 

x pm ≥ spr ead(s, l), ∀s ∈ S , ∀l ∈ L,

(7)

p∈s m∈l



spr ead(s, l) ≥ spr ead Min(s), ∀s ∈ S ,

(8)

l∈L

Dependency constraints:   p b ∈s b



x pb m ≥

m ∈N (m)

x pa m ,

pa ∈s a

  ∀ s a , s b ∈ S 2 : s a depends on s b , m ∈ M,

(9)

Transient usage constraints:     R( p, r )a pm + R( p, r ) 1 − a pm x pm ≤ C(m, r ), ∀m ∈ M, ∀r ∈ T R, p∈P

p∈P

(10) Definition of ymr : ymr ≥



R( p, r )x pm − SC(m, r ), ∀m ∈ M, ∀r ∈ R,

(11)

p∈P

ymr ≥ 0, ∀m ∈ M, ∀r ∈ R, Definition of z bm :



z bm ≥ target. ⎣C (m, r1 ) −









(12) ⎤

R ( p, r1 ) x pm ⎦ − [C (m, r2 )

p∈P

R ( p, r2 ) x pm ⎦ , ∀b = r1 , r2 , target ∈ B, ∀m ∈ M,

(13)

p∈P

z bm ≥ 0, ∀b ∈ B, ∀m ∈ M, Definition of ser viceMoveCost: ser viceMoveCost ≥ |s| −

(14) 

x p,M0 ( p) , ∀s ∈ S ,

(15)

p∈s

123

Ann Oper Res

Binary variables: x pm ∈ {0, 1}, ∀ p ∈ P , ∀m ∈ M,

(16)

spr ead(s, l) ∈ {0, 1}, ∀s ∈ S , ∀l ∈ L.

(17)

Obviously, in the general case, the very large size of the problem prevents the direct solution of this MIP model. Nevertheless, in the sequel, we shall see how the repeated solution of some restricted variants of this model yields near-optimal solutions.

3 Description of the proposed approach Our proposed approach starts from an initial feasible solution and generates a sequence of improved feasible solutions. The procedure is halted when a stopping criterion is met. Actually, we propose four types of improvement procedures: – Procedure 1 It selects a subset Π ⊂ M of μ machines together with the associated processes assignment A(Π), and attempts to reassign the set of processes P (Π) that are assigned to the machines in Π. This reassignment is achieved through solving a reduced problem that is similar to the original one but is restricted to the machines and processes that belong to Π and P (Π), respectively. Toward this end, the restricted problem is modeled as a MIP in the very same vein as Model (3)–(16) and solved using a generalpurpose MIP solver. If after solving the reduced problem, a new reassignment Anew (Π) having a cost that is lower than A(Π) cost is obtained, then Anew (Π) is substituted for A(Π) in the solution, and the process is reiterated. – Procedure 2 This is a variant of Procedure 1 which is based on the observation that if all the selected machines belong to the same neighborhood, then the dependency constraint turns out to be redundant. Indeed, it suffices to observe that the initial solution is feasible, and if Π is included in some specified neighborhood, then all processes in P (Π) might be reassigned while remaining within the same neighborhood. Consequently, the dependency constraints become useless and are therefore omitted. A nice consequence of this fact, is that the resulting reduced instance is relatively easier to solve. This procedure is referred to as intra-neighborhood procedure. By contrast, Procedure 1 (referred to as inter-neighborhood procedure) selects a set of loaded machines that belong to different neighborhoods. – Procedure 3 An improved solution is obtained by transferring a single process from its currently assigned machine to a different machine. For that purpose, several conditions are identified to keep the feasibility of this transfer in terms of conflict, capacity, spread, and dependency constraints. Also, the total cost reduction—including load, balance, and process/service/machine move costs—is calculated and such a transfer is only performed if the total cost reduction is positive. – Procedure 4 A service s ∈ S is selected and the corresponding processes are optimally reassigned to the set of machines M(s) that are covered by service s in the current solution. Interestingly, the improved solution is efficiently derived by solving a linear assignment problem. Moreover, such a reassignment implicitly satisfies the conflict, the spread, and the dependency constraints. This procedure is referred to as intra-service procedure. The four proposed procedures are combined to yield the best performance in the following way. For each implemented procedure Pi (i = 1, . . . , 4), a quality-to-time ratio mpr ovedCosti is calculated at each iteration, where: ρi = I nitialCostiT−I imei

123

Ann Oper Res

– I nitialCosti = The total reassignment cost before applying Pi – I mpr ovedCosti = The total reassignment cost after applying Pi – T imei = The CPU time that has been spent for the last iteration of Pi Accordingly, the procedure that exhibits the largest average ratio (that is computed over the last k iterations) is dynamically identified and invoked at the next iteration (all ratios are initially set to infinity). Furthermore, the number of machines μ that are included in the restricted problem is dynamically selected in the set {2, 4, 6} by setting it to the value that exhibits the best average ratio over the last k iterations. A similar rule is adopted for dynamically selecting the best neighborhood in the intra-neighborhood procedure. In our experiments, we found good results by empirically setting k = 4.

3.1 Formulation of the restricted problem In this section, we provide the details of the restricted model, which constitutes the main element of the inter-neighborhood and intra-neighborhood improvement procedures (namely, Procedures 1 and 2). To construct the restricted problem, we select from M a set Π of μ machines. For that purpose, we select a subset Π0 of the most loaded μ/2 machines and try to compliment it with some lightly loaded machines that might alleviate the load excesses. Actually, the load cost has been emphasized because we observed that it largely dominates the other costs. More precisely, we implemented the following procedure: Algorithm 3.1 Improvement Procedure Step 0: Π = Π0 = ∅ Step 1: We for each machine m ∈ M the corresponding   load cost compute lc(m) = r ∈R weightloadCost (r ). (U (m, r ) − SC(m, r ))+ (where a + = max(0, a)) Step 2: We include in Π0 the μ2 machines having the largest load costs and set Π = 0 Step 3: For each machine m ∈ Π0 3.1 Compute for each machine m ∈ M \ Π Δ(m  )= + + r ∈R (weightloadCost (r ).min((U (m, r )−SC(m, r )) , (SC(m , r )−U (m , r )) )) 3.2 Include in Π the machine m ∗ such that m ∗ = argm ∈M\Π maxΔ(m ) Hence, the restricted instance includes the set of machines Π together with the associated processes P (Π). In order to formulate the restricted problem, the following parameters need to be defined: – P (Π) = P \P (Π) – P0 (Π) : set of processes p ∈ P (Π) such that M0 ( p) ∈ Π. – Ls : set of locations covered by service s by at least one process p ∈ s ∩ P (Π) in the current assignment. – csm : binary constant that takes value 1 if there exists a process p ∈ s ∩ P (Π) running on machine m ∈ M. – d pm : binary constant that takes value 1 if process p is running on machine m in the current assignment.

123

Ann Oper Res

Using the decision variables that have been introduced in Sect. 2, the MIP formulation of the restricted problem is the following:     MinimizeZ R = wload (r ) ymr + wbalance (b) z bm r ∈R

m∈Π

+ w pr ocess Move



b∈B

m∈Π

  P MC( p) 1 − x p,M0 ( p)

p∈P (Π)∩P0 (Π)

+ wser viceMove ser viceMoveCost   + wmachineMove M MC (M0 ( p), m) x pm

(18)

p∈P (Π) m∈Π

Each process is assigned to exactly one machine:  x pm = 1, ∀ p ∈ P (Π),

(19)

m∈Π

Capacity constraints:  R( p, r )x pm ≤ C(m, r ), ∀m ∈ Π, ∀r ∈ R\T R,

(20)

p∈P (Π)

Conflict constraints: 

x pm ≤ 1, ∀s ∈ S , ∀m ∈ Π,

(21)

p∈s ∩P (Π)

Spread constraints: 



x pm ≥ spr ead(s, l), ∀s ∈ S , ∀l ∈ L\Ls ,

(22)

p∈s∩P (Π) m∈l ∩Π



spr ead(s, l) ≥ spr ead Min(s) − |Ls | , ∀s ∈ S ,

(23)

l∈L\Ls

Dependency constraints:  

x pb m +

p b ∈s b ∩P (Π) m ∈N (m)∩Π









cs b m

(24)

p b ∈s b ∩P (Π) m ∈N (m)∩(M\Π)

x p a m + cs a m

pa ∈s a ∩P (Π)

  ∀m ∈ M, ∀ s a , s b ∈ S 2 : s a depends on s b Transient usage constraints:     R ( p, r ) a pm + R( p, r ) 1 − a pm x pm ≤ C(m, r ), ∀m ∈ Π, ∀r ∈ T R, p∈P (Π)

p∈P (Π)

(25) Definition of ymr : ymr ≥



R( p, r )x pm − SC(m, r ), ∀m ∈ Π, ∀r ∈ R,

(26)

p∈P (Π)

ymr ≥ 0, ∀m ∈ Π, ∀r ∈ R,

123

(27)

Ann Oper Res

Definition of z bm : ⎡

z bm ≥ target. ⎣C (m, r1 )−

⎤ ⎡





R ( p, r1 ) x pm ⎦ − ⎣C (m, r2 )−

p∈P (Π )

⎤ R ( p, r2 ) x pm⎦ ,

p∈P (Π )

∀b = r1 , r2 , target ∈ B, ∀m ∈ Π,

(28) (29)

z bm ≥ 0, ∀b ∈ B, ∀m ∈ Π,

Definition of ser viceMoveCost:  ser viceMoveCost ≥ |s|−



x p,M0 ( p) −

p∈s∩P0 (Π)

d p,M0 ( p) , ∀s ∈ S ,

(30)

p∈s∩P0 (Π)

Binary variables: x pm ∈ {0, 1}, ∀ p ∈ P , ∀m ∈ M,

(31)

spr ead(s, l) ∈ {0, 1}, ∀s ∈ S , ∀l ∈ L.

(32)

Now, we describe the main differences between Model (3)–(16) and Model (18)–(32). First, since any location of Ls will remain covered by service s in the next assignment, then only the decision variables that are related to L\Ls need to be considered in the spread constraints where spr ead Min(s) is decreased by |Ls |. Second, the right-hand side of the dependency constraints has been modified in order to take into account the case where m ∈ / Π and cs a m = 1. In this case, the right-hand side is clearly equal to 1 due to the conflict constraints (it is worth recalling that only one process per service can run on a single machine). On the other hand, the left-hand side is larger than or equal to 1 if any process p b ∈ s b ∩ P (Π) is running on any machine m ∈ N (m) ∩ (M\Π), which means that the dependency constraints are redundant for machine m and any service s a that depends on s b . Finally, those processes of P (Π) that are currently assigned to their original machines need to be deducted from the number of moved processes in the calculation of the service move cost. Clearly, the relationship between the objective value of the global problem (Z ) and the objective value of the restricted problem (Z R ) is given by:     Z = ZR + wload (r ) ymr + wbalance (b) z bm r ∈R

+ w pr ocess Move

m∈M\Π





b∈B



m∈M\Π

1 − d p,M0 ( p) P MC( p)

p∈P (Π)∪P0 (Π)

+ wmachineMove





M MC (M0 ( p), m)

(33)

p∈P (Π) m∈M\Π

In order to efficiently generate near-optimal solutions, the following algorithmic expedients have been embedded in our procedure: – Approximate solution of the reduced instances The reduced instances are solved by using the commercial MIP solver CPLEX 12.4. However, for the sake of efficacy, the solver returns a solution that is found by invoking the so-called Populate heuristic method. Each time when the branch-and-bound algorithm finds a new solution that improves the best found one, the Populate method inserts this solution in a so-called “solution pool”. The Populate method stops when either the whole search tree is explored or a stopping criterion is met. In our implementation, we used the pool limit stopping criterion which

123

Ann Oper Res

consists in bounding the number of generated solutions to 20. Hence, the derived solutions of the reduced problems are not necessarily optimal, but this yields a dramatically better quality/time tradeoff. – Relaxation of the objective function Based on the observation that the load cost largely dominates the other cost components, we restricted the objective function to the former component. In this way, the decision variables z bm are removed along with Eqs. (28)–(30), yielding thus an easier reduced problem to solve.

3.2 Single process moves Given a feasible solution Ω, it is possible to derive an improved solution by transferring a single process p1 from a machine m 1 to a different machine m 2 . We assume that p1 belongs to service s1 . Clearly, the new solution Ω that results from transferring p1 from m 1 to m 2 is feasible if and only if all the following four conditions hold: C1 Conflict conditions: s1 does not cover m 2 . C2 Capacity conditions: C (m 2 , r ) − U (m 2 , r ) ≥ R ( p1 , r ) , ∀r ∈ R. C3 Spread conditions: This condition is true if at least one of the following conditions is true C3.1: C3.2: C3.3: C3.4:

spr ead(s1 ) > spr eadmin (s1 ) m 1 and m 2 belong to the same location s1 does not cover any machine within the location of m 2 p1 is not the only process from s1 that is assigned to a machine within the location of m 1

C4 Dependency conditions: This condition is true if at least one of the following conditions is true C4.1: m 1 and m 2 belong to the same neighborhood C4.2: s1 has no dependency relationship with any other service C4.3: (all services s such that s1 depends on s cover the neighborhood of m 2 ) and ((s1 covers several machines within the neighborhood of m 1 ) or (there is no service s that depends on s1 and that covers the neighborhood of m 1 ). If these conditions hold, then we compute the total cost reduction. This cost reduction is given by Δ ( p1 , m 1 , m 2 ) = Δload ( p1 , m 1 , m 2 ) + Δbalance ( p1 , m 1 , m 2 ) + Δ P MC ( p1 , m 1 , m 2 ) + Δ S MC ( p1 , m 1 , m 2 ) + Δ M MC ( p1 , m 1 , m 2 )

(34)

Computation of Δload : The load of resource r will be decreased on machine m 1 by: R ( p1 , r ) if U (m 1 , r ) − SC (m 1 , r ) ≥ R ( p1 , r ) + Δload ( p1 , m 1 , r ) = (U (m 1 , r ) − SC (m 1 , r ))+ otherwise + In other words, the load will be decreased by Δload (r ) = min{(U (m 1 , r ) − SC(m 1 , r ))+ , R( p1 , r )}. On the other hand, the load of resource r on machine m 2 will be increased by ⎧ R ( p1 , r ) if U (m 2 , r ) ≥ SC (m 2 , r ) ⎪ ⎪ ⎨ U (m 2 , r ) − SC (m 2 , r ) + R ( p1 , r ) − Δload ( p1 , m 2 , r ) = if U (m 2 , r ) ≤ SC (m 2 , r ) ≤ U (m 2 , r ) + R ( p1 , r ) ⎪ ⎪ ⎩ 0 if U (m 2 , r ) + R ( p1 , r ) ≤ SC (m 2 , r )

123

Ann Oper Res

Therefore, the total load cost will be reduced by Δload ( p1 , m 1 , m 2 ) =  + − Δload ( p1 , m 1 , r ) − Δload ( p1 , m 2 , r )

 r

wload (r )

Computation of Δbalance : For each balance constraint b, the balance load on machine m 1 will be decreased by Δbalance ( p1 , m 1 , b) = (target. [C (m 1 , r1 ) − U (m 1 , r1 )] − [C (m 1 , r2 ) − U (m 1 , r2 )])+ − (target. [C (m 1 , r1 ) − U (m 1 , r1 ) + R ( p1 , r1 )] − [C (m 1 , r2 ) − U (m 1 , r2 ) + R ( p1 , r2 )])+ On the other hand, the balance load will be increased on m 2 by Δbalance ( p1 , m 2 , b) = (target. [C (m 2 , r1 ) − U (m 2 , r1 ) − R ( p1 , r1 )] − [C (m 2 , r2 ) − U (m 2 , r2 ) − R ( p1 , r2 )])+ − (target. [C (m 2 , r1 ) − U (m 2 , r1 )] − [C (m 2 , r2 ) − U (m 2 , r2 )])+ Therefore, the total balance cost will be reduced by Δbalance ( p1 , m 1 , m 2 ) = wbalance (b)(Δbalance ( p1 , m 1 , b) − Δbalance ( p1 , m 2 , b))

 b

Computation of Δ P MC : Clearly, the total process move cost will be reduced by ⎧ ⎨ −w pr ocess Move ∗ P MC( p1 ) if m 1 = M0 ( p1 ) Δ P MC ( p1 , m 1 , m 2 ) = w pr ocess Move ∗ P MC( p1 ) if m 2 = M0 ( p1 ) ⎩ 0 otherwise Computation ofΔ S MC : Clearly, the total service move cost will be reduced by ⎧ −wser viceMove if m 1 = M0 ( p1 ) and s1 is a service ⎪ ⎪ ⎪ ⎪ with the maximum number of moved processes ⎨ Δ S MC ( p1 , m 1 , m 2 ) = wser viceMove if m 2 = M0 ( p1 ) and s1 is the only service with ⎪ ⎪ the maximum number of moved processes ⎪ ⎪ ⎩ 0 otherwise Computation of Δ M MC : Clearly, the total machine move cost will be reduced by ⎧ −wmachineMove ∗ M MC(M0 ( p1 ), m 2 ) ⎪ ⎪ ⎪ ⎪ if m 1 = M0 ( p1 ) ⎪ ⎪ ⎨ wmachineMove ∗ M MC(M0 ( p1 ), m 1 ) Δ M MC ( p1 , m 1 , m 2 ) = if m 2 = M0 ( p1 ) ⎪ ⎪ ⎪ ⎪ wmachineMove ∗ (M MC(M0 ( p1 ), m 1 ) ⎪ ⎪ ⎩ −M MC(M0 ( p1 ), m 2 )) otherwise Obviously, if Δ( p1 , m 1 , m 2 ) > 0, then it is profitable to reassign p1 to m 2 . Let L 1 = (m (1) , m (2) , . . . , m (|M|) ) and L 2 = (m¯ (1) , m¯ (2) , . . . , m¯ (|M|) ) denote two lists of machines that are sorted in nonincreasing and nondecreasing total load, respectively. The main steps of the proposed procedure are described below:

123

Ann Oper Res

Algorithm 3.2 Single Process Moves For all k = 1..|m| For all processes p that are assigned to m (k) For all h = 1..|m| If all conditions Ci (i = 1, . . . , 4) are satisfied then Compute Δ( p, m (k) , m¯ (h) ) If Δ( p, m (k) , m¯ (h) ) > 0 then Reassign p to m¯ (h) Update the list of processes to m (k) and to m¯ (h) End If End If End For End For End For

3.3 Intra-service reassignment Let s ∈ S be a service that includes processes p1 , p2 , . . . , p|s| and denote by M(s) = {M( p1 ), M( p2 ), . . . , M( p|s| )} the set of machines that are covered by service s in the current solution. Define δ pm as the cost of assigning process p ∈ s to machine m ∈ M(s). Clearly, an improved solution might be derived by solving the following linear assignment problem: A P(s) Minimize 

 

δ pm x pm

(35)

p∈s m∈M(s)

x pm = 1, ∀m ∈ M(s),

(36)

p∈s



x pm = 1, ∀ p ∈ s,

(37)

x pm ∈ {0, 1}.

(38)

m∈M(s)

Interestingly, such a reassignment implicitly satisfies the conflict, the spread, and the dependency constraints. Obviously, if assigning process p to machine m violates the capacity constraints, then δ pm is set to ∞. Otherwise, we have δ pm = Δload ( p, M( p), m) + Δbalance ( p, M( p), m) + Δ P MC ( p, M( p), m) + Δ M MC ( p, M( p), m). It is worth noting that the service move cost has been ignored in order to keep the polynomial complexity of the linear assignment problem. In our implementation, the linear assignment problem is solved for all s ∈ S in turn.

4 Computational results All the computational experiments have been carried out on the ROADEF/EURO challenge testbed which includes three data sets, namely A, B and X , whose specifications are detailed in Table 1. Our procedure has been coded with C++ and compiled with Microsoft Visual Studio 2010. All the MIPs have been solved using CPLEX 12.4. Table 2 displays the results that have been obtained by our approach on each instance of the three data sets. In this table we report, for each instance, the cost of the original assignment

123

Ann Oper Res Table 1 Specifications of the data sets Instance

|M|

|R|

|T R|

|P|

|S|(non unit)

|N |

|L|

∗ Depmax

|B|

a1_1

4

2

0

100

10

1

4

10

1

a1_2

100

4

1

1000

10

2

4

10

0

a1_3

100

3

1

1000

100

5

25

10

0

a1_4

50

3

1

1000

100

50

50

10

1

a1_5

12

4

1

1000

10

2

4

10

1

a2_1

100

3

0

1000



1

1

0

0

a2_2

100

12

4

1000

100

5

25

0

0

a2_3

100

12

4

1000

125

5

25

10

0

a2_4

50

12

0

1000

125

5

25

10

1

a2_5

50

12

0

1000

125

5

25

10

0

b/x_1

100

12

4

5000

500

5

10

30

0

b/x_2

100

12

0

5000

b/x_3

100

6

2

20,000

500

5

10

30

1

1000

5

10

50

0

b/x_4

500

6

0

20,000

1000

5

50

60

1

b/x_5

100

6

2

40,000

1000

5

10

60

0

b/x_6

200

6

0

40,000

1000

5

50

60

1

b/x_7

4000

6

0

40,000

1000

5

50

60

1

b/x_8

100

3

1

50,000

1000

5

10

50

0

b/x_9

1000

3

0

50,000

1000

5

100

60

1

b/x_10

5000

3

0

50,000

1000

5

100

70

1

* Depmax denotes the maximum number of dependencies per service

(Initial cost), the cost of the assignment that has been obtained by our procedure within the time limit (Obtained cost), the cost of the best assignment over all challenge competitors (Best cost), the relative deviation of our obtained cost with respect to the initial and the best costs defined by Scor e = 100.(ObtainedCost − BestCost)/I nitialCost, and the average score over the 27 finalist competitors (Competitors). For data sets B and X , the depicted results are those reported by the ROADEF / EURO challenge organizers for our team (namely S25) (Google 2012). These results have been obtained on the same test machine that is equipped with a Core 2 Duo 3.16 Mhz processor and 4 GB RAM under Windows 7 (64 bits) environment. A time limit of 300 s has been set for each instance. It should be noted that the displayed costs of our procedure for data set A are only for illustration purpose (and not for evaluation purpose). Indeed, the challenge organizers did not publicize the results of each competitor on data set A. The reported results of our procedure for this data set have been obtained on an Intel Core Quad i7-2600 3.4 GHz processor with 16 GB RAM. This yielded solutions that are better than the best obtained ones over all competitors for instances A2_2 and A2_4. For that purpose, Table 2 does not include any detailed score for data set A. Instead, we reported the average scores that have been obtained on the challenge test machine. From Table 2, we observe that our procedure is able to generate very competitive solutions. Indeed, it provides solutions with average scores less than 0.40 % for each of the data sets A, B, and X (namely 0.36, 0.40, and 0.29 %, respectively). Moreover, our obtained score is always much less than the average obtained score over all finalists. According to the displayed

123

Ann Oper Res Table 2 Obtained results Instance

Initial cost

Obtained cost

Best cost

A1_1

49,528,750

44,306,501

44,306,501

A1_2

1,061,649,570

777,532,896

777,532,896

A1_3

583,662,270

583,005,717

583,005,717

A1_4

632,499,600

259,292,086

252,728,589 727,578,309

A1_5

782,189,690

727,578,309

A2_1

391,189,190

237

A2_2

1,876,768,120

A2_3

2,272,487,840

A2_4

3,223,516,130

A2_5

787,355,300

792, 548, 105∗∗∗ 1,311,317,515 1, 680, 609, 218∗∗∗ 342,209,055

198

Score

Competitors

3.580∗

44.705∗∗

816,523,983 1,306,868,761 1,681,353,943 336,170,182

B1

7,644,173,180

3,525,764,462

3,339,186,879

2.441

3.618

B2

5,181,493,830

1,026,965,486

1,015,553,800

0.220

1.019

B3

6,336,834,660

161,414,926

156,835,787

0.072

0.785

B4

9,209,576,380

4,678,431,345

4,677,823,040

0.007

0.565

B5

12,426,813,010

933,213,345

923,092,380

0.081

0.732

B6

12,749,861,240

9,526,517,128

9,525,857,752

0.005

0.205

B7

37,946,901,700

15,284,907,753

14,835,149,752

1.185

3.693

B8

14,068,207,250

1,214,587,068

1,214,458,817

0.001

0.476

B9

23,234,641,520

15,887,742,203

15,885,486,698

0.010

0.960

B10

42,220,868,760

18,051,201,707

18,048,515,118

0.006

3.684

X1

7,422,426,760

3,155,037,525

3,100,852,728

0.730

3.544

X2

5,103,634,830

1,019,821,226

1,002,502,119

0.339

1.179

X3

6,119,933,380

7,606,302

211,656

0.121

0.568

X4

9,207,188,610

4,722,313,822

4,721,629,497

0.007

0.632

X5

12,369,526,590

539,709

93,823

0.004

0.716

X6

12,753,566,360

9,547,581,571

9,546,941,232

0.005

0.208

X7

37,763,791,230

14,690,405,882

14,253,273,178

1.158

4.133

X8

11,611,565,600

391,141

42,674

0.003

0.903

X9

23,146,106,380

16,127,951,823

16,125,612,590

0.010

0.879

X10

42,201,640,770

17,819,914,312

17,816,514,161

0.008

3.843

* Indicates the total score obtained by our team (S25) ** Indicates the average total score over all finalist competitors *** Better than the best obtained results due to different machine configuration

results, the highest scores have been obtained for instances B1, B7, B10, X 1, X 7, and X 10, which suggests that they are the most difficult ones. For these instances, our approach provides scores that are, on average, 75 % less than the mean score of all the finalists. In particular, it yields scores less than 0.01 % for the largest instances with 50,000 processes and 5000 machines (namely B10 and X 10). Table 3 depicts the total score of each finalist competitor on the data sets A, B, X, B + X , and A + B + X , respectively. From this table, we observe that, although being the smallest in size, data set A seems to be the most challenging one (in the competition context, we define an instance to be “challenging” if the best found solution has been reached/approached by a

123

Ann Oper Res Table 3 Detailed competitors’ scores

Competitor

A

B

X

B+X

A+B+X

J05

80.77

27.08

27.38

54.46

135.23

J06

37.32

6.66

6.24

12.90

50.22

J10

52.9

68.43

71.62

140.05

192.95

J12

14.58

1.01

0.71

1.72

16.30

J14

42.44

4.88

5.78

10.66

53.10

J17

1.73

1.49

3.47

4.95

6.68

J19

74.6

5.14

8.93

14.07

88.67

J21

92.6

158.92

177.28

336.19

428.79

J25

50.59

1.51

1.09

2.60

53.19

J33

43.79

2.13

2.54

4.66

48.45

J38

36.64

4.04

8.49

12.53

49.17

S01

47.35

3.12

4.37

7.49

54.84

S05

27.98

3.78

1.49

5.28

33.26

S06

72.43

42.90

41.01

83.91

156.34

S11

80.11

48.67

50.49

99.16

179.27

S14

59.82

1.94

1.97

3.91

63.73

S21

10.97

8.42

6.98

15.39

26.36 14.13

S23

9.55

1.70

2.89

4.58

S25

3.58

4.03

2.38

6.41

9.99

S26

41.3

7.85

5.31

13.16

54.46

S27

59.81

3.85

4.49

8.34

68.15

S34

40.61

2.67

1.65

4.32

44.93

S37

28.37

5.09

4.51

9.60

37.97

S38

5.92

0.20

0.43

0.62

6.54

S40

99.63

2.79

1.77

4.56

104.19

S41

51.15

0.43

0.03

0.47

51.62

S43

40.49

6.21

5.01

11.23

51.72

small number of teams). Indeed, only two teams out of 27 were able to obtain a total score less than 5 % for this data set, versus 16 teams for data sets B and X . At this level, it should be noticed that our approach made feasible to obtain the second best total score on data set A and the third best total score on all data sets. In order to provide insight into the effectiveness of the proposed procedures, we show in Table 4 the detailed performance of each procedure in terms of solution improvement (Imp) and time percentages (Time). From this table, we clearly observe that the inter-neighborhood procedure yields the best improvement rate, with an average improvement rate of 95 %. However, the percentage of time that is spent in this procedure varies from 10 to 100 %. This variation may be explained by the diverse natures of the instances. For example, since instance A2_1 has a single neighborhood, then the inter-neighborhood and the intra-neighborhood procedures turn out to be the same. Therefore, only one of them needs to be called, namely the inter-neighborhood one. Moreover, since each service of this instance is composed of a single process, then it is of no interest to call the intra-service procedure. Furthermore, the computation time was fully dedicated to the inter-neighborhood procedure since its quality-totime ratio was always much better than the one of the single process moves of the first iteration. A similar time distribution can be observed for the four-machine instance A1_1 which has

123

Ann Oper Res Table 4 Detailed performance of the proposed procedures Instance

A1_1

Inter-neighborhood

Intra-neighborhood

Single process moves

Intra-service

Imp

Time∗

Imp

Time

Imp

Time

Imp

Time

100.00

100.00

0.00

0.00

0.00

0.00

0.00

0.00

A1_2

99.01

58.59

0.05

18.69

0.42

13.63

0.52

9.09

A1_3

99.97

55.03

0.00

21.71

0.01

12.69

0.02

10.57 12.57

A1_4

99.85

53.97

0.12

19.71

0.01

13.75

0.02

A1_5

99.97

37.87

0.01

60.18

0.01

1.17

0.01

0.78

A2_1

100.00

100.00

0.00

0.00

0.00

0.00

0.00

0.00 16.69

A2_2

99.91

37.97

0.09

31.99

0.00

13.35

0.00

A2_3

99.90

60.53

0.08

24.90

0.01

6.00

0.01

8.57

A2_4

99.46

60.99

0.34

37.41

0.11

0.71

0.09

0.89

A2_5

99.90

63.81

0.07

35.14

0.01

0.59

0.02

0.46

Average

99.80

62.88

0.08

24.97

0.06

6.19

0.07

5.96

B1

98.75

64.71

1.11

34.61

0.08

0.32

0.06

0.36

B2

98.39

27.14

1.55

72.83

0.02

0.01

0.04

0.02 0.05

B3

97.00

61.84

2.22

38.05

0.35

0.06

0.43

B4

96.00

73.09

0.39

24.16

1.97

1.30

1.64

1.45

B5

97.44

42.68

1.71

57.20

0.51

0.07

0.34

0.05

B6

96.65

80.07

0.14

18.93

1.81

0.37

1.40

0.63

B7

84.62

55.75

7.06

21.27

3.70

8.61

4.62

14.37 0.10

B8

93.87

20.06

4.99

79.69

0.60

0.15

0.54

B9

90.88

82.57

0.36

10.89

5.25

3.69

3.51

2.85

B10

79.82

10.41

4.64

7.58

7.36

41.00

8.18

41.01

Average

93.34

51.83

2.42

36.52

2.17

5.56

2.08

6.09

X1

96.13

45.38

2.05

35.12

0.66

4.34

1.16

15.16

X2

98.12

38.66

1.88

61.28

0.00

0.03

0.00

0.03

X3

97.01

40.58

2.34

59.33

0.29

0.03

0.36

0.06

X4

96.36

76.76

0.30

19.99

1.67

1.62

1.67

1.63

X5

94.61

63.15

3.61

36.74

1.00

0.06

0.78

0.05

X6

96.73

78.49

0.14

20.22

1.77

0.61

1.36

0.68

X7

81.88

49.09

6.63

21.50

6.49

13.07

5.00

16.34 0.18

X8

98.18

42.88

1.54

56.80

0.14

0.14

0.14

X9

91.56

84.05

0.51

11.00

4.76

2.20

3.17

2.75

X10

80.00

10.46

3.92

6.26

7.15

39.45

8.93

43.83

Average

93.06

52.95

2.29

32.82

2.39

6.16

2.26

8.07

∗ All computation times that are

Suggest Documents