Um algoritmo enumerativo baseado em ordenamento parcial para resolução do problema de...

20
An exact enumeration scheme for solving the minimization of tool switches problem based on partial ordering Horacio Hideki Yanasse 1* Edson Luiz França Senne 2 Rita de Cássia Meneses Rodrigues 1 1 Instituto Nacional de Pesquisas Espaciais – INPE/LAC Avenida dos Astronautas 1758, Jardim da Granja 12227-010 São José dos Campos, São Paulo, Brasil e-mail: {horacio, rita}@lac.inpe.br 2 Universidade Estadual Paulista Júlio de Mesquita Filho – UNESP Faculdade de Engenharia de Guaratinguetá Av. Ariberto Pereira da Cunha, 333, Portal das Colinas 12516-410 Guaratinguetá, SP, Brasil e-mail: [email protected] *corresponding author Abstract In the minimization of tool switches problem we seek a sequence to process a set of jobs so that the number of tool switches required is minimized. In this work we present an exact enumeration scheme for solving this problem based on partial ordered job sequences. To obtain an initial upper bound for the optimal solution value for the enumeration scheme, a heuristic is proposed based on the same partial ordered idea. Computational test results are presented showing that the proposed scheme has an improved performance compared with previous proposed schemes.

Transcript of Um algoritmo enumerativo baseado em ordenamento parcial para resolução do problema de...

An exact enumeration scheme for solving the minimization of tool

switches problem based on partial ordering

Horacio Hideki Yanasse1*

Edson Luiz França Senne2

Rita de Cássia Meneses Rodrigues1

1Instituto Nacional de Pesquisas Espaciais – INPE/LAC

Avenida dos Astronautas 1758, Jardim da Granja

12227-010 São José dos Campos, São Paulo, Brasil

e-mail: {horacio, rita}@lac.inpe.br

2Universidade Estadual Paulista Júlio de Mesquita Filho – UNESP

Faculdade de Engenharia de Guaratinguetá

Av. Ariberto Pereira da Cunha, 333, Portal das Colinas

12516-410 Guaratinguetá, SP, Brasil

e-mail: [email protected]

*corresponding author

Abstract

In the minimization of tool switches problem we seek a sequence to process a set of jobs so

that the number of tool switches required is minimized. In this work we present an exact

enumeration scheme for solving this problem based on partial ordered job sequences. To

obtain an initial upper bound for the optimal solution value for the enumeration scheme, a

heuristic is proposed based on the same partial ordered idea. Computational test results are

presented showing that the proposed scheme has an improved performance compared with

previous proposed schemes.

Keywords: minimization of tool switches problem, partial ordering, lower and upper

bounds.

1. INTRODUCTION

In the minimization of tool switches problem (MTSP) we are seeking a sequence to

process a set of jobs so that the number of tool switches required is minimized. Each job

requires a set of tools to be processed. Since the machine’s tool magazine is limited, tool

switches are necessary to process the jobs.

MTSP is NP-hard (Crama et al., 1994; Garey and Johnson, 1979; Tang and Denardo,

1988) and it has been studied by several authors (Tang and Denardo, 1988; Laporte et al.,

2004; Bard, 1988; Crama et al., 1994; Hertz et al., 1998; Yanasse and Lamosa, 2005). Success

in solving this problem exactly is limited to small instances. Laporte et al. (2004) report that

just a few instances among a set of 25 jobs instances were solved to optimality using the

branch-and-bound scheme they proposed.

To reduce the search space of enumeration schemes and, hence, be able to solve exactly

larger instances of the MTSP we need better bounds for the optimal solution values. In this

paper, we present an enumeration scheme that tries to determine improved lower bounds of

the MTSP by solving smaller sized instances of the original problem, obtained by

conveniently choosing a subset of the original jobs. The same idea of the enumeration scheme

is used to develop a heuristic to obtain a good upper bound for the optimal solution value.

This is used to reduce the search space in the enumeration scheme.

In the next section we review some properties of MTSP that are used to generate better

lower bounds for the MTSP. In section 3, we present the enumeration scheme based on partial

orderings; in section 4 we present a heuristic based on the enumeration scheme of section 3;

in section 5 we present the computational tests performed and in section 6, we present the

concluding remarks.

2. PROPERTIES OF MTSP PROBLEMS

Property 1 (Yanasse and Rodrigues, 2007; Yanasse et al., 2008): Including more jobs in an

instance of a MTSP implies in having the same or an increased number of tool switches in an

optimal solution.

This is an easy property to see, since any sequence for the larger set of jobs instance can

be used to construct a sequence to process the smaller set of jobs instance requiring the same

or a smaller number of tool switches. The sequence is constructed by simply deleting the jobs

that are not part of the smaller problem.

Using Property 1, we can obtain lower bounds for an instance of MTSP by solving

optimally smaller instances of MTSP obtained from the original instance considering a subset

of its original jobs. Obviously, the larger the number of jobs we consider the greater the

chances of getting a better quality lower bound.

Property 2 (Yanasse and Rodrigues, 2007; Yanasse et al., 2008): In a MTSP, any sequence

of the jobs and its reverse sequence require the same minimum number of tool switches.

This is also an easy property to see, since following, in reverse order, the tool switches

made when a sequence of jobs are processed, we can process this sequence of jobs in reverse

order. Therefore, the total number of tools switches is the same for both sequences.

Properties 1 and 2 were used to develop the new enumeration scheme presented in the

next section.

3. THE ENUMERATION SCHEME

The enumeration scheme we are going to review next was first presented in Yanasse and

Rodrigues (2007). In Yanasse et al. (2008) we present a set of computational results showing

that this scheme performs better than the Laporte et al. (2004) branch and bound algorithm.

We present the scheme in this article since the new heuristic proposed in section 4 is based on

the same idea and the article Yanasse et al. (2008) may not be readable for many interested

researchers or interested readers.

In the enumeration made we try to identify an optimal order, in an optimal solution, of a

subset of the original set of jobs. Given an optimal order of a subset of the original jobs, we

know that any other additional job must be processed before, after or in between this ordered

subset of jobs. The enumeration scheme follows this simple idea. Given a sequence of i jobs, i

= 1, 2, …, N – 1, where N is the total number of jobs needed to be processed, we include an

additional job, one at a time. The possibilities to process this new job are to sequence it

before, after or in between jobs of this ordered subset of i jobs. Hence, there are (i + 1)

branches to consider and, for each one, we proceed with the same scheme.

We start the enumeration scheme with one or more combination of jobs and we proceed

until all the N jobs are considered. It would be nice if we could select the least possible

number of jobs to get the best possible lower bound for the problem, according to Property 1.

So, in order to direct the search towards this goal, the following two simple job selection rules

are proposed:

Initial choice of jobs:

Start selecting the least number of jobs that together use all tools of the problem. If there

are sets of jobs with the same cardinality that use all tools of the problem, choose one whose

jobs share the largest number of tools in common.

Selecting the next job to insert

Choose job that result in the largest number of tool switches. If there are ties, choose the

job that has the largest sum of the number of tool switches. If there is a tie again, choose the

job that requires the largest number of tools. In case there is a tie again, choose one of them at

random.

According to Property 2, a sequence and its reverse order sequence require the same

minimum number of tool switches. Therefore, in our enumeration tree, we can disregard the

branches that generate the reverse order sequences. More specifically, in the early stages of

the enumeration, when we have only two jobs, i and j, there are two branches corresponding

to the two ordering possibilities: (i, j) and (j, i). One of these branches can be eliminated since

it generates the reverse order sequences of the other branch.

There are other details of the enumeration scheme that are easier to be understood with an

example. Consider the instance TEST of MTSP given in Table 1. In this instance we have N =

25, M = 15 and C = 10, where M is the total number of tools required to process all jobs and C

is the capacity of the machine’s tool magazine. In Table 1, Ti is the set of tools required to

process job i ∈ {1, 2, …, N}.

Table 1 – Data of instance TEST T1 = {1,2} T10 = {1,3,5,8,11} T19 = {1,3,5,6,7,9,11,15} T2 = {5,15} T11 = {2,5,9,11,14} T20 = {1,4,5,6,7,8,9,10} T3 = {4,7,11} T12 = {7,8,9,11,13,14} T21 = {4,5,7,8,9,10,11,13} T4 = {2,8,9} T13 = {1,4,5,11,12,14} T22 = {2,3,4,5,9,10,13,14,15} T5 = {5,13,15} T14 = {2,3,5,7,11,13} T23 = {1,2,5,8,9,10,12,14,15} T6 = {1,7,9,13} T15 = {1,4,6,8,9,10} T24 = {3,4,5,6,8,9,11,12,13,14} T7 = {3,7,10,11} T16 = {1,2,5,8,10,11,12} T25 = {1,2,4,7,9,10,12,13,14,15} T8 = {4,5,7,8,9} T17 = {3,4,5,6,8,9,11}

T9 = {2,7,9,10,15} T18 = {4,7,8,11,12,13,14}

This instance can be reduced in size since there are jobs that are dominated by others (for

instance, T1⊂T16, T2⊂T5, etc.). In Table 2 we present the reduced instance (with N = 15 jobs)

obtained after deleting the dominated jobs.

Table 2 – TEST, after deleting the dominated jobs T7 = {3,7,10,11} T14 = {2,3,5,7,11,13} T21 = {4,5,7,8,9,10,11,13} T10 = {1,3,5,8,11} T16 = {1,2,5,8,10,11,12} T22 = {2,3,4,5,9,10,13,14,15} T11 = {2,5,9,11,14} T18 = {4,7,8,11,12,13,14} T23 = {1,2,5,8,9,10,12,14,15} T12 = {7,8,9,11,13,14} T19 = {1,3,5,6,7,9,11,15} T24 = {3,4,5,6,8,9,11,12,13,14} T13 = {1,4,5,11,12,14} T20 = {1,4,5,6,7,8,9,10} T25 = {1,2,4,7,9,10,12,13,14,15}

Initial choice of jobs:

Combine the jobs two by two to see how many tools they use. The single combination that

uses all 15 tools is the set of jobs 24 and 25. We have a lower bound of 5 for TEST

considering, for instance, the partial sequence (24, 25) (partial sequence (25, 24) is

disregarded due to Property 2). Observe that this lower bound value is already equal to the

known trivial lower bound given by M – C.

Selecting next job to insert

It is convenient to have a table with the number of tool switches that occur when we

process any two jobs of TEST, one after the other, regardless of any other jobs. In Table 3 we

provide these numbers.

Table 3: Minimum number of tool switches to process jobs i and j, one after the other

7 10 11 12 13 14 16 18 19 20 21 22 23 24 25

7 0 0 0 0 0 0 0 0 0 0 0 1 2 2 2 10 0 0 0 0 0 0 0 0 0 0 0 2 1 1 4 11 0 0 0 0 0 0 0 0 0 1 0 1 0 1 2 12 0 0 0 0 0 0 1 0 1 1 0 2 2 1 2 13 0 0 0 0 0 0 0 0 1 1 1 2 1 1 2

14 0 0 0 0 0 0 0 0 0 2 0 1 3 2 3 16 0 0 0 1 0 0 0 1 2 1 1 3 0 3 3 18 0 0 0 0 0 0 1 0 3 2 0 3 3 1 2 19 0 0 0 1 1 0 2 3 0 1 2 3 3 3 4 20 0 0 1 1 1 2 1 2 1 0 0 3 2 3 3 21 0 0 0 0 1 0 1 0 2 0 0 2 3 2 3 22 1 2 1 2 2 1 3 3 3 3 2 0 2 3 2 23 2 1 0 2 1 3 0 3 3 2 3 2 0 4 2 24 2 1 1 1 1 2 3 1 3 3 2 3 4 0 5 25 2 4 2 2 2 3 3 2 4 3 3 2 2 5 0

To select the job that results in the largest number of tool switches, we have to determine

the job whose smallest number of tool switches, when sequenced before or after any one of

the jobs already in the partial sequence, is the largest. From Table 4, obtained from the last

two rows of Table 3, we can see that jobs 16, 19 and 20 require at least 3 tool switches to be

processed together with jobs 24 and 25 (in any sequence). Therefore, one of these jobs is

going to be selected to be inserted. To do that, we compute the total number of tool switches

(TNTS) required by these candidate jobs to be processed together with jobs 24 and 25 (in any

sequence). Since TNTS = 7 for job 19, that is, job 19 requires 3 tool switches to be processed

before (or after) job 24 and 4 tool switches to be processed before (or after) job 25, we select

it to be inserted next.

Table 4: Minimum number of tool switches involving jobs 24 and 25

7 10 11 12 13 14 16 18 19 20 21 22 23 24 25 24 2 1 1 1 1 2 3 1 3 3 2 3 4 0 5 25 2 4 2 2 2 3 3 2 4 3 3 2 2 5 0

TNTS 6 7 6

The branching

We consider inserting job 19 before job 24, in between jobs 24 and 25, and after job 25

in the partial sequence (24, 25). For these possibilities we have the following partial

orderings:

(19, 24, 25), with 8 tool switches;

(24, 19, 25), with 7 tool switches;

(24, 25, 19), with 9 tool switches.

Observe that considering 3 jobs of TEST we determine a lower bound of 7 for this

instance. Let us consider for branching the partial sequence (24, 19, 25), the longest partial

sequence that provides the best lower bound so far.

Selecting next job to insert

From Table 5, obtained from Table 3, we can see that jobs 16, 21, 22 and 23 require at

least 2 tool switches to be processed together with jobs 19, 24 and 25 (in any sequence). Since

the job 23 requires more tool switches (TNTS = 9) to be processed before (or after) jobs 19,

24 and 25, we select it to be inserted next.

Table 5: Minimum number of tool switches involving jobs 19, 24 and 25

7 10 11 12 13 14 16 18 19 20 21 22 23 24 25

19 0 0 0 1 1 0 2 3 0 1 2 3 3 3 4 24 2 1 1 1 1 2 3 1 3 3 2 3 4 0 5 25 2 4 2 2 2 3 3 2 4 3 3 2 2 5 0

TNTS 8 7 8 9

The branches

We consider inserting job 23 before job 24, in between jobs 24 and 19, in between jobs

19 and 25, and after job 25 in the partial sequence (24, 19, 25). For these possibilities we have

the following partial orderings:

(23, 24, 19, 25), with 11 tool switches;

(24, 23, 19, 25), with 11 tool switches;

(24, 19, 23, 25), with 8 tool switches;

(24, 19, 25, 23), with 9 tool switches.

Considering all open nodes of the enumeration tree, the current lower bound is now 8.

So, we are going to branch next the partial sequence (24, 19, 23, 25) since it is the longest

partial sequence with the best lower bound so far.

Selecting next job to insert

From Table 6, obtained from Table 3, we can see that jobs 21 and 22 require at least 2 tool

switches to be processed together with jobs 19, 23, 24 and 25 (in any sequence). As both

require the same number of tool switches (TNTS = 10) to be processed before (or after) jobs

19, 23, 24 and 25, we select the job 22, since it uses the largest number of tools (#T = 9).

Table 6: Minimum number of tool switches involving jobs 19, 23, 24 and 25

7 10 11 12 13 14 16 18 19 20 21 22 23 24 25 19 0 0 0 1 1 0 2 3 0 1 2 3 3 3 4 23 2 1 0 2 1 3 0 3 3 2 3 2 0 4 2 24 2 1 1 1 1 2 3 1 3 3 2 3 4 0 5 25 2 4 2 2 2 3 3 2 4 3 3 2 2 5 0

TNTS 10 10 #T 8 9

We have now the following partial orderings:

(22, 24, 19, 23, 25), with 11 tool switches;

(24, 22, 19, 23, 25), with 11 tool switches;

(24, 19, 22, 23, 25), with 10 tool switches;

(24, 19, 23, 22, 25), with 10 tool switches;

(24, 19, 23, 25, 22), with 10 tool switches.

Following the scheme, we continue inserting new jobs and updating the lower and upper

(with sequences containing all jobs) bounds until all branches are investigated. We reach the

following optimal sequence: (11, 22, 14, 21, 7, 18, 12, 24, 13, 19, 10, 20, 16, 23, 25) for the

reduced size instance with a total of 13 tool switches. An optimal solution to TEST is

obtained by sequencing the dominated jobs just after its dominant job in this optimal

sequence.

4. DETERMINING A GOOD UPPER BOUND

Based on the enumeration scheme presented in section 3, we propose simple heuristics

aiming to get a good upper bound for the problem. It is well known that good upper bounds

are helpful in reducing the search space in an enumeration procedure.

The heuristic is as follows: use, as the basis, the enumeration scheme of section 3, keeping

at most the best s branches at each node, where s is a positive integer number.

The computational effort and quality of the proposed heuristic solution depend on the

value of s. Larger values of s generate better solutions in terms of quality but the

computational effort also increases and may be prohibitive.

5. COMPUTATIONAL TESTS

The proposed heuristic and enumeration scheme were implemented in C and the

computational tests were performed in an Intel Core 2 Duo microcomputer with 3 GHz and 2

GB of RAM. In the enumeration scheme implemented, a depth first search strategy was

adopted in order to avoid storing a large number of active nodes of the enumeration tree.

Given a sequence of jobs, the minimum number of tool switches required to process these

jobs was obtained using the KTNS (Keep Tool Needed Soonest) algorithm of Tang and

Denardo (1988).

The instances of MTSP used in the tests were generated in the same way as in Laporte et

al. (2004), that is, the minimum and maximum number of tools required for any job are

predefined and, for each job the number t of tools in it is randomly generated within this

interval. Then the t tools required for the job are randomly selected. Finally, it is ensured that,

in any instance, there are no dominated jobs. A total of 1350 instances of MTSP were

generated and a maximum of 3600 seconds was imposed on the solution time of any instance.

Initially, tests were performed with the proposed heuristic in order to evaluate the

computational effort and the quality of the solutions for some values of s. The results obtained

are summarized in the Tables 7 and 8. In these tables we have:

N Number of jobs;

M Number of tools;

HS(i) Proposed heuristic with s = i;

NS Number of instances solved;

NG Number of nodes generated in the enumeration tree;

CT Computational time, in seconds;

G Gap between the solution obtained by the heuristic and the optimal (or best known)

solution for the instance.

Table 7 – Computational effort for the heuristic

HS(1) HS(2) HS(3) N M NS NG CT NG CT NG CT 8 15 40 81.88 0.00 86.98 0.00 91.18 0.00 8 20 100 706.19 0.01 710.84 0.01 715.09 0.01 8 25 200 691.84 0.01 699.25 0.01 704.61 0.01 9 15 40 149.73 0.00 159.93 0.00 170.15 0.01 9 20 100 626.66 0.02 638.18 0.02 649.96 0.02 9 25 190 679.49 0.02 701.44 0.02 724.99 0.03

10 10 40 25.03 0.00 37.93 0.00 50.60 0.00 15 15 40 119.28 0.02 438.90 0.07 1550.93 0.28 15 20 140 1155.49 0.13 2376.51 0.38 4843.51 0.95 15 25 200 1176.79 0.17 2971.95 0.65 7505.07 1.91 20 15 30 141.47 0.04 1991.60 0.58 20450.97 6.43 20 20 50 2761.56 0.62 16060.24 5.17 76919.94 27.96 20 25 100 4548.24 1.27 50273.91 21.00 233996.08 104.20 25 15 10 231.10 0.16 5659.80 2.52 114472.50 56.55 25 20 20 2664.20 0.99 68488.85 35.82 663431.89 414.48 25 25 50 8223.74 3.21 275281.62 186.81 981548.89 699.39

Table 8 – Quality of the solution for the heuristic

HS(1) HS(2) HS(3)

N M NS G=0 G=1 G=2 G>2 G=0 G=1 G=2 G>2 G=0 G=1 G=2 G>2 8 15 40 37 3 0 0 40 0 0 0 40 0 0 0 8 20 100 93 6 1 0 98 2 0 0 99 1 0 0 8 25 200 180 20 0 0 189 11 0 0 195 5 0 0 9 15 40 37 3 0 0 39 1 0 0 40 0 0 0 9 20 100 88 11 1 0 97 3 0 0 99 1 0 0 9 25 190 163 24 3 0 180 10 0 0 185 5 0 0

10 10 40 35 4 1 0 38 2 0 0 40 0 0 0 15 15 40 25 12 2 1 34 6 0 0 38 2 0 0 15 20 140 91 32 15 2 113 26 1 0 128 12 0 0 15 25 200 112 60 21 7 153 44 3 0 175 25 0 0 20 15 30 11 10 8 1 16 13 1 0 24 6 0 0 20 20 50 23 18 7 2 32 17 1 0 40 10 0 0 20 25 100 32 37 17 14 56 36 7 1 83 16 1 0 25 15 10 4 6 0 0 7 3 0 0 9 1 0 0 25 20 20 2 11 7 0 9 11 0 0 15 5 0 0 25 25 50 22 17 10 1 39 11 0 0 41 6 2 1

As expected, the solution’s quality improves when s increases. For s equal to 3, the quality

of the solution is quite good. Note that about 93% of the solutions obtained (1251 out of

1350) were optimal or the best known solution obtained (G = 0). However, as the size of the

problem increases, HS(3) generates more nodes in the enumeration tree compared with HS(2)

(or HS(1)), and, in some instances, it was not able to complete the enumeration within the

time limit set. This is the reason why we observed a deterioration in the performance of HS(3)

compared with HS(2) in the set of instances with N = 25 and M = 25 (last row of Table 8).

Considering the quality of the solutions and that the computational times were not

excessive (at least in the majority of the instances), we adopted s equal to 3 in the

computational tests of the exact enumeration scheme conducted next.

For the computational tests with the exact enumeration scheme, the same set of 1350

instances was used. The results obtained are reported in Tables 9 to 13. In these tables we use

the same indications of Tables 7 and 8 plus:

Min Minimum quantity of tools required for a job;

Max Maximum quantity of tools required for a job;

C Magazine capacity;

YRS New enumeration scheme;

LGS Laporte et al. (2004) branch and bound scheme.

The computational times of Laporte et al. (2004) refer to a Sunfire 4800 computer with

900 MHz. Therefore, they are not comparable with the times reported in this article. We

provide the number of nodes generated in the enumeration tree in order to give us another

parameter for comparison.

Table 9 – Computational results for instances with 8 tasks

HS(3) YRS LGS N M Min Max C NS NG CT NS NG CT NS NG CT 8 15 2 5 5 10 133.0 0.0 10 150.0 0.0 10 5503.9 81.9 8 15 2 5 10 10 157.1 0.0 10 157.1 0.0 10 35409.3 371.2 8 15 5 10 10 10 20.2 0.0 10 37.9 0.0 10 3917.4 72.1 8 15 2 10 10 10 54.4 0.0 10 58.4 0.0 10 7382.9 99.7 8 20 2 5 5 10 2279.0 0.0 10 2282.0 0.1 10 9564.9 178.2 8 20 2 5 10 10 2275.6 0.0 10 2275.6 0.0 10 50006.5 775.7 8 20 5 10 10 10 62.6 0.0 10 107.5 0.0 10 5790.4 189.7 8 20 2 10 10 10 69.5 0.0 10 85.8 0.0 10 14915.8 325.0 8 20 2 5 15 10 2275.6 0.0 10 2275.6 0.0 10 36585.4 469.2 8 20 5 10 15 10 28.6 0.0 10 28.6 0.0 10 23799.9 404.6 8 20 10 15 15 10 15.6 0.0 10 32.6 0.0 10 2131.9 47.0 8 20 2 10 15 10 98.3 0.0 10 98.3 0.0 10 31119.1 476.8 8 20 5 15 15 10 14.3 0.0 10 22.0 0.0 10 9014.8 222.6 8 20 2 15 15 10 31.8 0.0 10 60.3 0.0 10 10206.2 248.3 8 25 2 5 5 10 2521.3 0.1 10 2521.3 0.1 10 12169.4 252.0 8 25 2 5 10 10 2521.0 0.0 10 2521.0 0.0 10 52531.5 1055.6 8 25 5 10 10 10 360.9 0.0 10 378.6 0.0 10 5447.8 202.0 8 25 2 10 10 10 900.7 0.0 10 917.7 0.1 10 16854.5 580.0 8 25 2 5 15 10 2521.0 0.0 10 2521.0 0.0 10 52700.2 928.0 8 25 5 10 15 10 417.4 0.0 10 429.0 0.0 10 32057.8 1057.3 8 25 10 15 15 10 67.5 0.0 10 142.3 0.0 10 1226.2 46.2 8 25 2 10 15 10 163.0 0.0 10 163.0 0.0 10 43993.8 1037.3 8 25 5 15 15 10 64.8 0.0 10 91.7 0.0 10 13533.6 572.3 8 25 2 15 15 10 84.6 0.0 10 130.7 0.0 10 22865.3 816.7 8 25 2 5 20 10 2521.0 0.0 10 2521.0 0.0 10 13.7 0.8 8 25 5 10 20 10 519.7 0.0 10 519.7 0.0 10 42120.2 684.9 8 25 10 15 20 10 61.5 0.0 10 132.7 0.0 10 14394.6 443.2 8 25 15 20 20 10 8.6 0.0 10 15.6 0.0 10 614.8 11.4 8 25 2 10 20 10 1136.2 0.0 10 1136.2 0.0 10 42367.1 693.0 8 25 5 15 20 10 134.5 0.0 10 146.4 0.0 10 23426.0 502.0 8 25 10 20 20 10 12.7 0.0 10 19.6 0.0 10 7615.7 209.0 8 25 2 15 20 10 36.0 0.0 10 36.0 0.0 10 35652.1 638.1 8 25 5 20 20 10 22.6 0.0 10 31.2 0.0 10 8437.1 235.0 8 25 2 20 20 10 17.2 0.0 10 20.0 0.0 10 16092.0 373.6

Table 10 – Computational results for instances with 9 tasks

HS(3) YRS LGS N M Min Max C NS NG CT NS NG CT NS NG CT 9 15 2 5 5 10 301.3 0.0 10 363.2 0.0 10 28091.0 767.0 9 15 2 5 10 10 327.7 0.0 10 327.7 0.0 9 134725.6 2432.1 9 15 5 10 10 10 29.6 0.0 10 58.4 0.0 9 10334.2 383.1

9 15 2 10 10 10 22.0 0.0 10 33.7 0.0 10 37044.3 902.5 9 20 2 5 5 10 2369.4 0.1 10 2437.3 0.1 9 40273.4 1283.5 9 20 2 5 10 10 1439.3 0.0 10 1439.3 0.0 9 126077.2 2825.2 9 20 5 10 10 10 131.9 0.0 10 287.4 0.0 9 21376.3 1214.1 9 20 2 10 10 10 91.4 0.0 10 181.2 0.0 6 31548.0 1424.2 9 20 2 5 15 10 2307.4 0.0 10 2307.4 0.0 9 98304.3 1737.7 9 20 5 10 15 10 52.4 0.0 10 85.0 0.0 5 67785.8 2415.1 9 20 10 15 15 10 5.5 0.0 10 9.2 0.0 10 9045.2 366.6 9 20 2 10 15 10 53.1 0.0 10 53.1 0.0 4 129573.5 2532.0 9 20 5 15 15 10 31.9 0.0 10 56.5 0.0 9 43409.3 1886.8 9 20 2 15 15 10 17.3 0.0 10 30.8 0.0 8 41242.5 1948.2 9 25 2 5 5 10 2618.7 0.1 10 2670.9 0.2 9 47458.3 1688.5 9 25 2 5 10 10 2524.7 0.0 10 2524.7 0.0 5 117100.4 2976.3 9 25 5 10 10 10 416.0 0.0 10 606.6 0.1 9 24348.3 1601.9 9 25 2 10 10 10 471.4 0.0 10 504.1 0.0 1 50494.0 3178.6 9 25 2 5 15 10 2523.7 0.0 10 2523.7 0.0 9 118109.2 2731.3 9 25 10 15 15 10 110.0 0.0 10 265.4 0.0 10 5397.9 349.4 9 25 2 10 15 10 687.1 0.0 10 954.5 0.1 1 120895.0 3459.9 9 25 5 15 15 10 91.1 0.0 10 150.9 0.0 4 41433.5 2701.9 9 25 2 15 15 10 457.3 0.0 10 637.4 0.1 1 116744.0 3267.5 9 25 2 5 20 10 2523.4 0.0 10 2523.4 0.0 10 42.0 1.7 9 25 5 10 20 10 216.7 0.0 10 216.7 0.0 7 125601.0 2925.8 9 25 10 15 20 10 191.7 0.0 10 511.1 0.1 1 50700.0 3095.0 9 25 15 20 20 10 20.4 0.0 10 40.2 0.0 10 3078.9 97.7 9 25 2 10 20 10 707.2 0.0 10 707.2 0.0 9 111075.9 2526.5 9 25 5 15 20 10 75.4 0.0 10 96.6 0.0 3 80084.0 2812.4 9 25 10 20 20 10 21.2 0.0 10 42.3 0.0 10 32740.4 1588.9 9 25 2 15 20 10 68.2 0.0 10 68.2 0.0 4 125347.8 3086.1 9 25 5 20 20 10 17.4 0.0 10 27.6 0.0 8 35628.6 1779.6 9 25 2 20 20 10 33.3 0.0 10 36.6 0.0 5 54889.0 2016.8

Table 11 – Computational results for instances with 10 and 15 tasks

HS(3) YRS LGS NT NF Min Max C NS NG CT NS NG CT NS NG CT 10 10 2 4 4 10 69.0 0.0 10 124.1 0.0 10 2545.7 0.0 10 10 2 4 5 10 61.6 0.0 10 87.6 0.0 10 2397.3 0.0 10 10 2 4 6 10 35.6 0.0 10 66.3 0.0 10 1413.5 0.0 10 10 2 4 7 10 36.2 0.0 10 36.2 0.0 10 61.3 0.0 15 20 2 6 6 10 5596.3 1.0 10 13933.6 2.7 10 2654120.8 21.8 15 20 2 6 8 10 5574.0 1.0 10 13720.3 2.6 10 1355251.7 10.7 15 20 2 6 10 10 6972.5 1.3 10 16604.4 3.4 10 335957.7 2.5 15 20 2 6 12 10 5810.7 1.1 10 78917.9 19.3 10 214.4 0.0

Table 12 – Computational results for instances with 15 tasks

HS(3) YRS LGS NT NF Min Max C NS NG CT NS NG CT NS NG CT 15 15 2 5 5 10 2306.8 0.4 10 8381.2 1.4 10 872889.9 6.3 15 15 2 5 10 10 3686.8 0.7 10 6561.5 1.2 10 203.1 0.0 15 15 5 10 10 10 62.6 0.0 10 162.8 0.0 10 12695066.5 146.5 15 15 2 10 10 10 147.5 0.0 10 474.4 0.1 10 3248709.3 38.6 15 20 2 5 5 10 22447.6 4.4 10 76721.2 15.2 10 4015611.7 30.6 15 20 2 5 10 10 11363.3 2.5 10 11363.3 2.5 10 236.8 0.0 15 20 5 10 10 10 1390.7 0.3 10 5180.5 1.1 10 6973355.3 94.0 15 20 2 10 10 10 1207.7 0.3 10 5123.1 1.1 10 54641596.0 647.3 15 20 2 5 15 10 1671.7 0.0 10 1671.7 0.0 10 120.0 0.0 15 20 5 10 15 10 4536.3 1.0 10 205013.4 51.1 10 925615.8 10.7 15 20 10 15 15 10 2.0 0.0 10 2.0 0.0 10 1995247.1 41.0 15 20 2 10 15 10 1126.5 0.2 10 5091.8 1.1 10 1494274.5 15.5

15 20 5 15 15 10 83.4 0.0 10 582.6 0.1 10 45984478.8 669.9 15 20 2 15 15 10 26.5 0.0 10 65.5 0.0 9 24426805.0 394.4 15 25 2 5 5 10 54181.3 13.2 10 223825.4 54.3 10 2934256.2 23.3 15 25 2 5 10 10 9791.2 2.2 10 9791.2 2.2 10 140.3 0.0 15 25 5 10 10 10 19236.3 5.7 10 122705.5 33.8 10 25601323.3 385.1 15 25 2 10 10 10 3025.4 0.8 10 9373.7 2.5 10 28979040.4 371.2 15 25 2 5 15 10 2539.6 0.0 10 2539.6 0.0 10 120.0 0.0 15 25 5 10 15 10 16227.5 4.3 10 84190.9 22.1 10 1324492.4 18.6 15 25 10 15 15 10 4337.3 1.3 10 47694.3 13.4 10 3376786.9 80.5 15 25 2 10 15 10 7677.4 2.1 10 61187.5 18.6 10 609674.0 6.9 15 25 5 15 15 10 880.6 0.3 10 2980.7 0.8 8 54864983.3 915.5 15 25 2 15 15 10 2938.1 0.8 10 7098.4 1.9 10 9713799.6 134.4 15 25 2 5 20 10 2538.7 0.0 10 2538.7 0.0 10 120.0 0.0 15 25 5 10 20 10 18945.8 5.1 9 1034415.0 304.6 10 40618.1 0.4 15 25 10 15 20 10 1323.8 0.3 10 8321.2 1.9 10 7822686.2 168.8 15 25 15 20 20 10 2.0 0.0 10 2.0 0.0 10 1933537.9 58.5 15 25 2 10 20 10 941.8 0.1 10 941.8 0.1 10 139.1 0.0 15 25 5 15 20 10 3467.1 1.0 10 22649.2 6.0 10 9559616.3 139.0 15 25 10 20 20 10 15.9 0.0 10 31.8 0.0 10 29057947.8 700.5 15 25 2 15 20 10 1483.7 0.4 10 9555.0 2.8 10 9713799.6 134.4 15 25 5 20 20 10 58.1 0.0 10 444.2 0.1 9 52172340.4 1037.8 15 25 2 20 20 10 489.7 0.1 10 2128.5 0.6 8 68791747.2 1336.9

Table 13 – Computational results for instances with 20 and 25 tasks

HS(3) YRS LGS NT NF Min Max C NP NG CT NP NG CT NP NG CT 20 15 2 5 5 10 15311.8 4.5 10 755587.8 212.4 8 131899592.2 1375.0 20 15 2 5 10 10 45352.5 14.5 8 2830349.4 875.1 9 1671881.2 14.9 20 15 2 10 10 10 688.6 0.2 10 5570.7 1.5 1 15334759.0 170.4 20 20 2 5 5 10 134244.2 46.8 10 773547.8 244.9 6 86609305.0 929.8 20 20 2 5 10 10 222877.6 82.4 6 711111.7 242.7 10 25376623.1 225.0 20 20 2 5 15 10 9031.7 3.2 10 9031.7 3.2 10 221.2 0.0 20 20 5 10 15 10 8743.4 3.2 10 665119.1 255.1 4 110670505.0 1771.9 20 20 2 10 15 10 9702.8 3.7 9 1057597.7 417.8 4 23796204.5 349.3 20 25 2 5 5 10 711977.6 288.9 6 2420780.0 909.7 3 116304539.3 1226.6 20 25 2 5 10 10 803722.2 364.3 5 1586119.4 748.1 10 17861308.4 170.2 20 25 2 5 15 10 20626.2 9.6 10 20626.2 9.6 10 225.5 0.0 20 25 5 10 15 10 315107.5 144.7 6 2829164.2 1219.3 1 33106709.0 536.3 20 25 10 15 15 10 111719.1 56.6 9 3446053.9 1511.8 2 39590854.0 1432.4 20 25 2 10 15 10 131803.9 67.0 8 218307.9 94.8 5 67379248.8 1025.4 20 25 2 5 20 10 2548.3 0.0 10 2548.3 0.0 10 210.0 0.0 20 25 5 10 20 10 216628.5 89.7 3 24557.0 11.0 8 16763635.6 274.2 20 25 2 10 20 10 23369.9 12.3 10 23369.9 12.3 10 42837.6 0.5 20 25 5 15 20 10 2457.6 1.0 10 41444.0 18.8 1 146490505.0 3094.2 25 15 2 5 10 10 114472.5 55.7 2 1878904.5 908.0 4 9863072.2 84.1 25 20 2 5 10 10 1803926.8 1015.4 1 573824.0 332.2 1 187936788.0 2284.9 25 20 2 10 15 10 466435.8 317.7 2 2013294.5 1147.8 1 7458838.0 102.5 25 25 2 5 10 3 3603963.7 2428.6 0 - - 3 7320014.0 73.9 25 25 2 5 15 7 1698490.6 1357.6 7 1698490.6 1357.6 10 895.3 0.0 25 25 2 5 20 10 17794.5 11.8 10 17794.5 11.8 10 332.8 0.0 25 25 5 10 20 10 1377035.5 923.4 1 294066.0 208.9 1 688098.0 10.9 25 25 2 10 20 9 761314.3 208.2 6 205761.0 159.9 8 4725531.6 70.6

In Table 14 we summarize the results obtained.

Table 14 – Average computational results

HS(3) YRS LGS Table Total Average Total Average Total Average

NS NG NS NG NS NG 9 340 635.5 340 649.0 340 20278.3

10 330 635.0 330 690.3 232 63030.3 11 80 3019.5 80 15436.3 80 543995.3 12 340 5887.1 339 58200.3 334 13640334.7 13 249 485744.1 179 964120.9 150 40418951.3

From Tables 9 to 13, we observe that, among the 1350 instances tested, the heuristic with

s equal to 3 was able to complete its whole enumeration in 1339 instances within 3600

seconds. The enumeration scheme proposed in this article was able to find a solution and

prove its optimality in 1268 of these instances, compared with the 1136 instances of Laporte

et al. (2004) branch and bound algorithm.

Yanasse et al. (2008) enumeration scheme that does not include the upper bound given by

the heuristic was able to find a solution and prove its optimality in 1233 of these instances. As

expected, the average number of nodes in their enumeration tree was also larger compared

with the values presented in Table 14, under the corresponding YRS column. So, we

improved the performance of the enumeration scheme with the introduction of the new upper

bound.

We observe from Table 13 that the new scheme did not perform well, compared with

Laporte et al. (2004) algorithm, for the classes of instances where the maximum number of

tools in a job is considerably small compared with the capacity C of the magazine. This can

be explained by the fact that, in these cases, the number of tool switches that occurs when

processing any two jobs of the instance, one followed by the other, is almost always zero,

therefore, our job selection rule is not effective. The next job to insert will be, most of the

times, selected at random among the jobs requiring the largest number of tools.

5. CONCLUDING REMARKS

In this work we presented a new heuristic to solve the minimization of tool switches

problem based on partial ordering of the jobs. The heuristic embedded in an enumeration

scheme that uses the same partial order idea presented an improved performance compared

with previous schemes of the literature.

The proposed scheme did not perform well in some classes of instances of MTSP. When

the maximum number of tools in a job is considerably small compared with the capacity C of

the magazine, Laporte et al. (2004) algorithm performed better. The user, hence, should

choose the best algorithm to use pending the class of problems he is faced with.

In the proposed enumeration scheme, simple job selection rules were considered. Other

strategies can be adopted without much difficulty. However, their performances have to be

evaluated and compared with the ones proposed in the literature.

Similarly, many other different variations of the proposed heuristic can be considered. For

instance, (i) different strategies for searching the enumeration tree; (ii) at each node, keep all

branches (not only s) with the smallest number of tool switches value; (iii) at each level of the

enumeration tree, keep only the nodes with the smallest number of tool switches value, (iv) at

each node, keep the best s branches, but when backtracking, randomly choose a node to

branch next, and so on.

The idea of the enumeration scheme with partial ordered sequences can be extended to

solve other combinatorial problem, for instance, scheduling problems where we seek some

permutation with the minimum cost and the cost function satisfies the triangular inequality. If

the costs are sequence dependent, the proposed scheme may be competitive with other

algorithms of the literature. This has yet to be investigated.

Acknowledgments:

We would like to thank Professor J.J. Salazar González, that kindly sent us his MTSP instance

generator. Work partially financed by CNPq and FAPESP.

6. REFERENCES

Bard, J.F. (1988) A Heuristic for Minimizing the Number of Tool Switches on Flexible

Machine. IIE Transactions, 20, 382-391.

Crama, Y., Kolen, A.W.J., Oelermans, A.G. and Spieksma, F.C.R. (1994) Minimizing the

number of tool switches on a flexible machine, International Journal of Flexible

Manufacturing Systems,6, 33-54.

Garey, M. and Johnson, D.S. (1979) Computers and Intractability, Freeman, New York.

Hertz, A., Laporte, G., Mittaz, M. and Stecke, K. (1998) Heuristics for minimizing tool

switches when scheduling part types on a flexible machine. IEE Transactions,30, 689-694.

Laporte, G., Salazar, J.J. and Semet, F. (2004) Exact Algorithms for the Job Sequencing and

Tool Switching Problem. IIE Transactions, 36, 37-45.

Tang, C.S. and Denardo, E.V. (1988) Models Arising from a Flexible Manufacturing

Machine, Part I: Minimization of the Number of Tool Switches, Operations Research,36, 767-

777.

Yanasse, H.H. and Lamosa, M.J.P. (2005) An application of the generalized travelling

salesman problem: the minimization of tool switches problem, Operations Research 2005 -

International Annual Scientific Conference of the German Operations Research Society,

Bremen, Germany, Program, 90-90.

Yanasse, H.H. and Rodrigues, R.C.M. (2007) A partial ordering enumeration scheme for

solving the minimization of tool switches problem, INFORMS Annual Meeting Seattle 2007,

Seattle, Washington, EUA, Book of Abstracts, 299-299.

Yanasse, H.H., Rodrigues, R.C.M. and Senne, E.L.F. (2008) Um algoritmo enumerativo

baseado em ordenamento parcial para resolução do problema de minimização de trocas de

ferramentas, Submitted to Gestão e Produção.

Biographical sketches

Horacio Hideki Yanasse obtained his Ph.D. in Operations Research from the Massachusetts

Institute of Technology in 1981. He held an office as the Head of the Special Technologies

Center of INPE – the Brazilian Institute for Space Research where he is currently a

researcher. He was a former President of ALIO – the Latin Ibero-American Association of

Operational Research Societies and he is currently a Vice-President of IFORS appointed by

ALIO. He is the Editor of Pesquisa Operacional, the Brazilian Operations Research Society’s

journal, and associate editor or editorial board member of other operations research related

Brazilian journals. His research interests are in the development of algorithms for

combinatorial optimization problems, in particular those arising in cutting and packing

settings.

Edson Luiz França Senne is a Computer Science Professor in the Mathematics Department

at São Paulo State University, Campus of Guaratinguetá. He received the doctorate degree in

Applied Computation in 1987 from INPE – the Brazilian Institute for Space Research. His

research interest includes linear programming, combinatorial optimization, decision support

systems and programming languages.

Rita de Cássia Meneses Rodrigues is a researcher at INPE - the Brazilian Institute for Space

Research. She received the doctorate degree in Applied Computation in 1998 from INPE. Her

research interest are in stochastic modelling for analysis and optimization of systems’

performance, in particular production systems and communication network.