A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br...

40
A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais

Transcript of A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br...

Page 1: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

A GRASP Heuristic to the Extended Car Sequencing Problem

Lucas Rizzo

{surrutia,rizzo}@dcc.ufmg.br

Sebastián Urrutia

Federal University of Minas Gerais

Page 2: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Outline

• The Extended Car Sequencing Problem

• Heuristic Approach

• Results

• Conclusions

2

Page 3: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• The car sequencing problem (CSP) involves the schedule of different kinds of cars along an assembly line

• A group of options need to be installed in each car along this assembly line

• Each type of option is installed by a station

• A limited number of cars can be simultaneously handled by each station

Introduction

3

Page 4: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

The Car Sequencing Problem Definition

• The CSP is defined by the set of entries– C = {c1, c2, ... , cn}– V = {v1, v2, ..., vk}– Vectors p and q associated to each option vi,

such that in every sequence of q(vi) cars at most p(vi) of then require vi

– A function t: C x V → {0,1}, that for each car ci and each option vj returns 1 if vj must be installed in ci and 0 otherwise.

4

Page 5: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• The CSP is a NP-Complete [2] feasibility problem

• It consists in finding an arrangement of the cars in a sequence such that the number of upper violations in the objective function is zero

5

The Car Sequencing Problem Definition

Vv

vqthatso

ik

i

ik

k

vviolation

)(| |      

),(      

where

otherwise

vpvtifvviolation iikik     1

)(),(    0),(

Page 6: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• This work deals with the extended version of CSP (xCSP) [1]

• Now is also considered lower limitations on the number of cars that a station can simultaneously deal with

• This new limitations aim a more homogeneous distribution of work in the option installation stations

The Extended Car Sequencing Problem

6

Page 7: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• The xCSP is defined by the same set (C,V,t,p,q) of entries shown for the CSP

• Differently we have only – Vectors r and s associated to each option vi,

such that in every sequence of s(vi) cars at least r(vi) of then require vi

7

The Extended Car Sequencing Problem

Page 8: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• The xCSP is an optimization problem with an objective function that considers both upper and lower violations

• Upper violations are considered infinite times more important than the lower ones

8

The Extended Car Sequencing Problem

Page 9: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• For upper violations, subsequences with size smaller than q(vi) are considered at the beginning of the assembly line

• The reason for this is that in the optimization problem, a subsequence that exceeds the limit of a station by a larger number of cars is considered worse than a subsequence that exceeds by a smaller number of cars

9

The Extended Car Sequencing Problem

Page 10: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 11: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 12: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 13: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 14: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 15: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 16: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Suppose a option va such that p(va) = 2 and q(va) = 4. Also suppose r(va) = 1 and s(va) = 4.

X _ _ _ _ X X X _ X X X _ _ _ X

X _ _ _ _ _ X X

Example

Assembly Line 1

Assembly Line 3

Assembly Line 2

10

Page 17: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Heuristic Approach

• To heuristically solve the problem we implemented an algorithm based on the GRASP metaheuristic

1. Final Solution ←

2. For k=1 to MAX ITERATIONS

3. Solution ← Randomized Greedy Algorithm 4. Solution ← Local Search (Solution)

5. If Solution better than Final Solution Then

6. Final Solution ← Solution

7. End If

8. End For

9. Return Final Solution

11

Page 18: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Heuristic Approach

• To heuristically solve the problem we implemented an algorithm based on the GRASP metaheuristic

1. Final Solution ←

2. For k=1 to MAX ITERATIONS

3. Solution ← Randomized Greedy Algorithm 4. Solution ← Local Search (Solution)

5. If Solution better than Final Solution Then

6. Final Solution ← Solution

7. End If

8. End For

9. Return Final Solution

11

Page 19: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Heuristic Approach

• To heuristically solve the problem we implemented an algorithm based on the GRASP metaheuristic

1. Final Solution ←

2. For k=1 to MAX ITERATIONS

3. Solution ← Randomized Greedy Algorithm 4. Solution ← Local Search (Solution)

5. If Solution better than Final Solution Then

6. Final Solution ← Solution

7. End If

8. End For

9. Return Final Solution

11

Page 20: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• We can build a initial solution by iteratively choosing the car that minimize the cost of the new sequence

• This car is added to the last position of the sequence

• Ties in this criterion are not only possible but frequent, for this case we present tie-breaking criterion

Randomized Greedy Algorithm

12

Page 21: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Tie-Breaking Criterion

• Choose the car that minimizes the lower violations

• If ties persist, create a restricted candidate list by randomly choosing two of the cars tied.

• Choose the car that has the larger dynamic highest utilization rate [3].

13

Page 22: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• The dynamic highest utilization (DHU) for an option vi is the ratio between the number of cars requiring the option vi in the current sequence, and the number of cars requiring the option that could be schedule in the current sequence without violations

• The car with the larger dynamic highest utilization rate is the one which has the options with the highest DHU.

Tie-Breaking Criteria

14

Page 23: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Only the swap operator was implemented. It consists in exchanging two given cars in a given sequence

• All feasible solutions are reachable from any other solution by a finite number of swap movements. Therefore the neighborhood is connected.

• Because of this property, the swap operator when well implemented allow us to construct an efficient local search

Local Search

15

Page 24: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• To compare neighbors solutions we consider first of all upper violations and only if they are tied in this criterium, we compute lower violations. This is because upper violations have infinite times more importance than lower violations

• Furthermore this strategy reduces the evaluation time, resulting in a more efficient local search.

Local Search

16

Page 25: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Given cars ci and cj, the swap will only change the value of the objective function if exist an option vi V such that t(ci,vi) ≠ t(cj,vi)

• The cost function may only vary in subsequences affected by the movement

• Auxiliary vectors for each option vi stores the number of cars that have vi in their subsequences. This allow us, in O(1), to decide when a car will generate a violation if placed in a sequence.

Swap Operator

17

Page 26: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• That implies a complexity of O(|V|*qmax + |V|*smax) for a possible exchange

• With this low complexity all possible exchanges can be tested in a very efficient way.

18

Swap Operator

Page 27: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• A total of 74 instances, provided by CSPlib [7], were used in the experiments

• Four instances have 100 cars while the other 70 instances have 200 cars. Each instance considers five possible options to be or not installed in each car

Results

19

Page 28: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Instances are divided in eight groups according to the percentage of use of each option. These vary between 60% and 90%. The first group contains four “classical” instances while the rest of the groups contain 10 instances each.

• In order to adapt the instances to the xCSP we build the restrictions of minimum as

s(vi) = q(vi) and r(vi) = p(vi) – 1

• Results are compared with [1]. As far as we know this is the only work dealing with the xCSP.

Results

20

Page 29: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Both instances and machine are identical to the ones used in [1]

• The average time to each GRASP iteration was 0.3 seconds for the proposed algorithm while in [1] an average time of 1 second per GRASP iteration is reported

21

Results

Page 30: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Results

Classical

60% 65% 70% 75% 80% 85% 90%0123456789

Upper Violations

Our ResultsBautista

Groups of Instances

Co

st

of

Se

qu

en

ce

22

Page 31: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Results

Classical

60% 65% 70% 75% 80% 85% 90%0123456789

Upper Violations

Our ResultsBautista

Groups of Instances

Co

st

of

Se

qu

en

ce

22

Page 32: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Results

Classical

60% 65% 70% 75% 80% 85% 90%0123456789

Upper Violations

Our ResultsBautista

Groups of Instances

Co

st

of

Se

qu

en

ce

22

Page 33: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Results

Classical

60% 65% 70% 75% 80% 85% 90%02468

10121416

Lower Violations

Our ResultsBautista

Groups of Instances

Co

st

of

Se

qu

en

ce

23

Page 34: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Results

Classical

60% 65% 70% 75% 80% 85% 90%02468

10121416

Lower Violations

Our ResultsBautista

Groups of Instances

Co

st

of

Se

qu

en

ce

23

Page 35: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

Conclusions

• A heuristic based on the GRASP metaheuristic was implemented for the Extended Car Sequencing Problem

• This heuristic presents a randomized greedy algorithm and a simple but efficient local search

• Results were compared with the literature using the same instances and machine

24

Page 36: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• A careful implementation of the local search procedure in terms of the cost evaluation of neighbors solutions allowed us to decrease the time of execution of every GRASP iteration in comparison with [1]

• In consequence our algorithm found much better solutions in the same execution time

25

Conclusions

Page 37: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• Further research includes the usage of other neighborhoods in the local search procedure and the developing of new heuristics based on other metaheuristics

• We intend to perform a fine tuning of the algorithm, for example for the size of the restricted candidate list. Preliminary experiments show that better results may be obtained.

26

Conclusions

Page 38: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

A GRASP Heuristic to the Extended Car Sequencing Problem

Lucas Rizzo

{surrutia,rizzo}@dcc.ufmg.br

Sebastián Urrutia

Federal University of Minas Gerais

Page 39: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

References

• [1] Bautista, J., Pereira, J. and Adenso-Díaz, B. A GRASP approach for the extended car sequencing problem, Journal of Scheduling, v.11, p.3-16, 2008.

• [2] Gent, I. Two results on car-sequencing problems (Technical report APES-02-1998).

• [3] Gottlieb, J., Puchta, M. and Solnon, C. A study of greedy, local search and ant colony optimization approaches for car sequencing problems. In Lecture notes in computer science: Vol. 2611, 246-257, 2003.

• [4] Feo T. A. and Resende M. G. C. A probabilistic heuristic for a computationally difficult set covering problem. Operations Research Letters, 8, 67-71, 1989

Page 40: A GRASP Heuristic to the Extended Car Sequencing Problem Lucas Rizzo {surrutia,rizzo}@dcc.ufmg.br Sebastián Urrutia Federal University of Minas Gerais.

• [5] Regin, J. C. and Puget, J. F. A filtering algorithm for global sequencing constraints. In Lecture notes in computer science: Vol. 1330, 32-46, 1997.

• [6] Resende, M.G.C. and Ribeiro, C.C. Greedy randomized adaptive search procedures: Advances, hybridizations, and applications, Handbook of Metaheuristics (M. Gendreau e J.- Y. Potvin, editors), 283-319, Springer, 2nd edition, 2010.

• [7] http://www.csplib.org/

References