• Non ci sono risultati.

A Fast Metaheuristic for Scheduling Independent Tasks with Multiple Modes

N/A
N/A
Protected

Academic year: 2021

Condividi "A Fast Metaheuristic for Scheduling Independent Tasks with Multiple Modes"

Copied!
24
0
0

Testo completo

(1)

© by DII-UTOVRM (Dipartimento di Ingegneria dell’Impresa - Università degli Università degli Studi di Roma “Tor Vergata”)

This Report has been submitted for publication and will be copyrighted if accepted for publication.

June 2009 RR-05.09

Massimiliano Caramia, Stefano Giordani

A Fast Metaheuristic for Scheduling

Independent Tasks with Multiple Modes

(2)

Multiple Modes MassimilianoCaramia  Stefano Giordani y Abstra t

We onsiderthefollowingmulti-modetasks hedulingproblem. Givenareasetof

non-preemptiveand independenttasks, and aset ofsingle unit dedi ated renewable

resour es. Atanytimeea hresour e anbeusedbyasingletaskatmost. Ea htask

has to be exe uted without preemption in one out of its possible exe ution modes,

where ea hmodeidenti esasubsetofresour essimultaneouslyrequiredbythetask

foritsexe ution. Theaimoftheproblemisto ndamodeassignmentforea htask,

and a non-preemptive s hedule of the tasks to be exe uted in the assigned modes,

su h that the totalamountof resour esrequested by tasks in anytime period does

notex eedtheresour eavailability,andthes hedulelength,i.e.,themakespan,is

min-imized. Fromthe omplexityviewpointthisproblemisNP-hard. Heuristi algorithms

for s hedulingtasks with multiple modes for theminimum s hedule length riterion

involvein generaltwodistin tphases,taskmodeassignmentandtasks heduling. In

this paperwepropose anovel two-phase approa h metaheuristi based onstrategi

os illationandonarandomized hoi eoftheneighborhoodofthelo alsear htoavoid

beingtrapped in lo al optima. Theproposedapproa hsimpli es that one appeared

in aprevious work of theauthors in whi h an interval T- oloringgraph model and

a metaheuristi approa h based on strategi os illation were provided. The

perfor-man eof the proposed solutionapproa h is ompared to that ofknownmulti-mode

s hedulingheuristi s.

Keywords: independenttasks heduling;multi-mode;metaheuristi .



DipartimentodiIngegneriadell'Impresa, UniversitadiRoma\Tor Vergata", ViadelPolite ni o,1

-00133Roma,Italy. e-mail: aramiadisp.uniroma2.it

y

DipartimentodiIngegneriadell'Impresa, UniversitadiRoma\Tor Vergata", ViadelPolite ni o,1

(3)

Multi-Mode Task S heduling (MMTS) an be foundin several real-life problems arising

in produ tion systems with s ar e resour es. Basi ally, MMTS models those situations

in whi h a task an be exe uted by means of di erent resour e ombinations with

on-sequently di erent pro essing times. For instan e, if we onsider an assembly ell, an

operation anbeexe utedeitherbyusingafastma hineandarobot,or,alternatively, by

usingaslowerma hine,aworker, andanassemblytool. Thetimerequiredtoexe utethe

operationdependsontheamount and thetype ofresour esasso iatedwith itsexe ution

mode: themore powerfultheresour es, thelowertheexe ution time.

Inthiswork,westudythefollowingMMTSproblem: given areasetT=f1;:::;ngof

nindependenttasks(i.e.,notrelatedbypre eden erelations),andasetR=fR

1 ;:::;R

r g

of r single unit dedi ated renewable resour es. Ea h task j has to be exe uted

with-out preemption in one out of its possible m

j

 1 exe ution modes of the set M

j = fM 1 j ;:::;M m j j

g,whereea hmodeM

i j =(R i j ;p i j

) identi esthenonemptysubsetR

i j

R

ofresour essimultaneouslyrequiredbytaskj forp

i j

1timeunitsifthetaskisexe uted

withthat parti ular mode M

i j

. The obje tive isto nda mode assignment forea h task,

and a s hedule of the tasks to be exe uted in the assigned mode, su h that at any time

ea hresour eisusedbyasingletaskatmost,andthes hedulelength,i.e.,themakespan,

is minimized.

The problem has been proved to be NP-hard(see e.g. Bian o et al. 1995), and most

of the previous ontributions to this problem deal with the spe ial ase with only single

unit renewable resour es, like the one we address in this paper. The spe ial ase of the

problem with prespe i edresour e allo ation hasbeen onsidered forexample inBian o

et al. (1994). The more general ase withmultipleexe ution modesand with pre eden e

relationsamongtasks hasbeenanalyzede.g. inBian oet al.(1998), Bian oet al.(1999).

Most of the approa hes in the literatureto solve MMTS are heuristi s based on two

distin t phases, i.e., task mode assignment and task s heduling. For instan e, the

ap-proa h proposed in Bian oet al. (1998) is a lo al sear h algorithm that, iteratively, rst

assignsamodetoeverytaskbyheuristi allyidentifyingthebestamongarestri tedsetof

taskexe utionmodes, andthen heuristi allysolvesthetasksequen ingproblemwiththe

(4)

Byastudyofthesolutionpro le,wenoted(seeSe tion3.4.1)thatthelatterapproa h

endsup withavery fewiterations,i.e., 2or3,and theCPUtimeforea h iterationtends

to be ome huge for instan eswith more than300 tasks. Following these reasons, in this

paperweproposetoover omethesetwodrawba kswithanoveltwo-phaseapproa h. The

latterisametaheuristi algorithmthatextendsapreviousworkbyCaramiaandGiordani

(2007) on a heuristi approa h to solve MMTS in whi h the mode assignment and the

task s hedulingfeatures aremanagedin anintegratedme hanism withmode assignment

embedded in s heduling. In parti ular, in Caramia and Giordani (2007), the authors

modelledMMTSasagraphintervalT- oloringproblemandproposedasolutionapproa h

basedonstrategi os illation(Glover2000). Thisalgorithm( alledSOAR )usesamultiple

restart strategy to diversify the sear h, a randomized hoi e of the neighborhood of the

lo alsear h to avoid being trapped in lo al optima, and strategi os illation to intensify

thesear h.

Theapproa hweproposeinthisworkhastwomainmotivations: rstly,evenifSOAR

has an overall better performan e than the two-phase approa h in Bian o et al. (1998),

thatindeed,asstatedabove,was on eivedforthemoregeneralsituationwheretasksare

related by pre eden e relations, it tends to onsume a large amount of omputing time

sin etheintervalT- oloringproblemisde nedona graphwithO(nm)verti es, beingn

thenumberof tasksand m themaximumnumberofmodesrequiredbya task;se ondly,

theperforman eof SOARis quitesensitiveto the parametersetting. The new proposed

approa h tends to over ome these two drawba ks of SOAR while preserving its overall

good behaviorpatterns. On theone hand, we designed the new approa h reformulating

thestrategi os illationbasedalgorithmwithoutusingthegraphmodel,and,ontheother

hand, we made some of the parameters self-adaptive. For thisreason, this approa h an

be interpretedasasimpli ationof theapproa h inCaramiaand Giordani(2007).

Theperforman eofthe proposednew metaheuristi is omparedto thealgorithmsin

Bian o et al.(1998), and Caramiaand Giordani(2007).

The remainder of the paper is organized as follows. In Se tion 2, we des ribe the

proposed algorithm and, in Se tion 3, we show omputational results of the proposed

(5)

Diversification

Start

Stop

Stopping rule

Intensification

Initialization

Best solution

improved within the

last q iterations

no

yes

yes

no

Figure1: Flow hart ofthefun tionalities oftheproposedalgorithm.

2 The proposed algorithm

The proposed metaheuristi approa h is based on strategi os illation (see, e.g., Glover

2000), and on a randomized hoi e of the neighborhood to es ape from lo al minima.

Strategi os illation operates by alternating destru tive and onstru tive phases, where

ea h solution generated by a onstru tive phase is partiallydismantled by a destru tive

phase,afterwhi hanew onstru tivephasebuildsanewsolutionstartingfromthepartial

solutionobtainedafter the previousdestru tivephase. Themainblo ksof thealgorithm

are depi tedinFigure 1.

In the Initialization phase, the algorithm nds a greedy starting solution. Then, in

an iterative fashion, it applies the Intensi ation phase that is in harge to improve the

urrentbestsolutionbymovingfromthe urrentsolutiontoanewsolution. Indoingthat

it destroys part of the former solution removingat random some of the tasks, and then

it ompletes this partialsolution rst byassigning new exe ution modes to theremoved

tasksandthenbyres hedulingthesetaskswiththenewassignedmodesassoonaspossible

in a greedy manner. If the urrent bestsolution is not improved withina given number

q of iterations the urrent lo al sear h phase is interrupted, and the algorithm applies

the Diversi ation phase,to avoid being trapped into a lo al optimum, by nding a new

(6)

1: setfrequen y(M i j

)=0,8j2T,i=1;:::;m j

;setiteration=improving iteration=

0

2: assigna mode M

hj j

to ea h taskj arbitrarily

3: order tasksarbitrarily

4: s heduletasks a ordingto the orderingand themodesassigned

5: let z 

be the urrent makespan

6: storethe urrentsolution

7: z pre

=z



Main loop

8: while notstoppingruledofINTENSIFICATIONPHASEg

9: hoosea subsetK ofT at random

10: in reasefrequen y(M

h j j

),8j 2K

11: removeall tasks j2K

12: s heduletasks j2T nK respe tingallin ompatibilities

13: forj2K do

14: assign a new mode M

hj j

to task j at random, a ording to a given probability

distribution

15: endfor

16: s heduletasks j2K a ording to non-in reasingvaluesof theirduration

17: in reaseiteration ount

18: letz be the urrentmakespan value

19: if z<z

 then

20: updatez



and improving iteration=iteration

21: else 22: if z zpre z pre  then

23: storethe urrentsolution

24: z

pre

=z

25: else

26: restore thepreviouslystored solution

27: z=z

pre

28: endif

29: endif

30: if improving iteration + intensify  iteration then fDIVERSIFICATION

PHASEg 31: forj2T do 32: assign mode M h j j

to task j at randoma ording to a probabilitydistribution

that gives more han e to modeswith lowest frequen y(M

h j j

) values

33: endfor

34: order tasksarbitrarily

35: s heduletasksa ording to theordering and themodesassigned

36: frequen y(M i j )=0,8j2T, i=1;:::;m j 37: if z<z  then 38: updatez  39: endif

40: setimproving iteration=iteration

41: endif

(7)

numberof iterationshas beenexe uted).

Referring to Table 1 where a pseudo ode des ription of the pro edure is given, the

algorithm operates in detail as follows. It starts with the Initialization phase with a

twofold aim: one is to perform some initialization, and the other is to nd a starting

s hedule. Referring to the former point, the algorithm initializesto zero three ounters:

one denoted as frequen y(M

i j

), that ounts the number of times a mode i assigned to

task j is dis arded duringthe urrent lo al sear h phase; another ounter is iterations,

that ountstheoveralliterationsperformedbythealgorithmduringitsprogress. Thelast

ounter is improving iteration, that a ounts for the iteration at whi h the algorithm

found the urrent best solution a hieved so far. At Steps 2 and 3, the algorithm rst

assigns a mode M

hj j

2M

j

to ea h task j at random, and then nds an ordering of the

tasks, also inthis ase at random. At step 4,a ording to thisordering andthe assigned

modes, the algorithm s hedules tasks greedily at their earliest starting time. At Step 5,

thealgorithm al ulatesthemakespanz



oftheresultings hedule,beingthebest(unique)

value foundso far. AtSteps 6 and 7,the urrent solutionand its value arestored.

Steps from 9 to 42 represent the main bodyof the algorithm and are repeated until

a stopping rule,representedbya pre xednumberof iterations ora ertainCPU time, is

met. Inparti ular,atStep9,thealgorithm hoosesasubsetKoftasks,whose ardinality

is related to anotherparameter 0 1,i.e., jKj= n, thatwill be introdu edlater

inthe experimentalanalysis se tion.

The hoi e ofthe K tasks ismade at random, and is basedon a parameter req(j)

that onsiders,forea htaskj2T,thebestimprovementintermsofresour erequirement

withrespe t to the urrent mode assignment;thatis,iftask j is urrentlyexe uted with

modeM h j j we have req(j)= max M i j 2M j (p h j j jR h j j j p i j jR i j j):

Notethat req(j)0. Now, jKj tasks are hosen withaMonte arlome hanism,by

assigningto ea h taskj 2T a probabilityequalto

prob(j)= req(j) P j2T req(j) :

(8)

modes asso iated with them, i.e., frequen y(M j j ) where j 2 K and h j is its urrently assigned mode.

At Steps11 and12,thealgorithm rstremovesfrom the urrents hedulethetasksin

K, and then reates a partials hedule of the remaining jT nKj tasks by s heduling the

latter assoon aspossiblea ording to theordering previouslyestablished.

Forea h taskj 2K (see Steps 13-15), thealgorithm assigns a new mode M

hj j based on theprobability prob(M i j )= 1 p i j jR i j j P M i 0 j 2M j 1 p i 0 j jR i 0 j j ;

meaningthat, fortaskj,thelowertheresour eusageofamode,thehighertheprobability

withwhi hit isassigned to j.

At Step 16, the tasks inK are greedily s heduled a ording to non-in reasing values

of theirpro essingtimes. We note thatthe priorityruleusedto s heduletasks inK an

be di erent from the shortest pro essing time rule adopted, and the hoi e we made is

be ause thisrule,on average, gave thebestperforman e.

On e thealgorithm ndsa solution,it al ulatesthe obje tive fun tion value z (Step

18) and thenifthisrepresentsanimprovementon thebestsolutionz



foundsofar(Step

19),itupdatesz



=z(Step20). Thealgorithm ana ept ordis ardthe urrentsolution

based on its relative distan e from the previous a epted solution (see Steps 22-28) of

valuez

pre

: indeed,the urrent solutionisreje tedifthe urrentzvalueisverypoorwith

respe tto theprevious solutionvalue,i.e., when

z z

pre z

pre

> ;

where  0 is a given a eptan e threshold. In other words, = 0 means that the

algorithm moves onlyto non-worse solutions,and = +1 indi ates that the algorithm

a eptsallsolutionsregardless oftheirquality. Notethatifzz

pre

,solutionzisalways

a epted regardlessof its value and the parametervalue.

If z 

hasnot beenimproved withinthe lastintensify iterations, thealgorithm halts

the urrent lo alsear h, andexe utes theDiversi ation phase;otherwise, thealgorithm

progresses inthe urrent lo al sear h with a new Intensi ation phase. In the

Diversi - ation phase(see Steps from 30 to 41), thealgorithm randomlydeterminesa newgreedy

(9)

frequen y. Following a random task order, and a ording to the assigned modes, the

algorithm s hedulestasks greedilyat their earlieststartingtime. Then,from thatgreedy

solution a new lo al sear h is started, after having reset the ounters frequen y(M

i j

) to zero.

3 Experimental analysis

The proposedalgorithm isnamed FAST be ause itisable to ndvery goodsolutionsin

verylimitedrunningtimes. AnextensiveexperimentationonFASTandonthealgorithms

used for omparisons, that is,the two-phase approa h algorithm in Bian oet al. (1998),

denoted asTPA,andalgorithm SOARinCaramiaandGiordani(2007) hasbeen arried

out. Inthisse tion,weprovideour ndings.

The se tion is dividedinto four subse tions: inthe rst one, we give implementation

detailsandthestru tureofthetest problemsusedfortheexperimentation;inthese ond

one, we analyze the performan eof FAST in order to set its parameters; thelatter two

subse tions aredevotedto the omparisonof FAST to SOARandTPA,respe tively;in

parti ular,we beginthelastsubse tionanalyzingtheperforman eof di erentversionsof

algorithm TPA in order to sele t the best one, whi h will be used inthe omparison to

ouralgorithm.

3.1 Implementation details

All the algorithms have been implemented in the C language and exe uted on a PC

with 2.93GHz Intel Celeronpro essor and 256MB RAM.For testing theperforman eof

the algorithms we have de ned di erent instan e lasses hara terized by the following

parameters:

 Numberof tasks, n=50;:::;500;

 Maximumnumberof taskmodes,m=2;:::;5;

 Numberof available(singleunit)resour es, r=10;

(10)

max

Ea h lass is then identi edby four parameters, i.e., (n;m;r;). For instan e, the lass

(100,4,10,5) olle ts instan es with 100 tasks, at most 4 modes for ea h task, and ea h

mode anrequireatmost5resour esoutof10. Inparti ular,forea h lasstype(n;m;r;)

wegeneratedatrandom5instan eswithntaskswherethenumberm

j

ofexe utionmodes

fortaskjisuniformlydistributedintherange[1;m℄,thenumberjR

i j

jofresour esrequired

bytask j inthe mode M

i j

is uniformlydistributedin the range [1;℄, and durationp

i j

is

uniformlydistributed inthe range [1;p

max

℄. Forea h instan e, the resultsof FAST are

obtained byrunningthealgorithm 5 timesand taking theaverage value.

3.2 Tuning the parameters of FAST

Inthissubse tionweanalyzetheperforman eofFAST,withtheaimofsettingthevalues

of its parameters.

We have arried outa wide variety of test runs to tune the algorithm parameters of

theIntensi ation phase,whi hare:

 intensify: the maximum number of onse utive iterations of the Intensi ation

phase withoutimprovement w.r.t. the best solutionfoundsofar;

 : theratio(inper entage) betweenjKj and n,that ontrolstheneighborhoodsize

inthelo alsear h ofthe Intensi ation phase;

 : thea eptan ethresholdofanon-improvingsolutionw.r.t. thepreviousa epted

solutioninthelo alsear h ofthe Intensi ation phase.

We start by analyzing the pro le of the solution values foundby the algorithm with

di erentvaluesofintensifyandshowthebehaviorofthealgorithm: westoppedthe

algo-rithmafter 1500iterations. InFigures2and 3,weshowthemakespanvaluesa hieved by

FAST overtimewhen =0, =0:02andintensify is xedto200 and80,respe tively,

for a single run of FAST over one instan e inthe lass (150;5;10;5). In parti ular, the

guresshowtheiteration ount and themakespan valueswhen theDiversi ation phase

is exe uted and the algorithm restarts the lo al sear h phase with a new random initial

solution; moreover, the minimum (\y min" in the gures), maximum (\y max" in the

(11)

number of iterations allowed). At the beginning, in both the two ases, the algorithm

starts and exe utes a large amount of iterations without any diversi ation and nds a

goodsolution: withintensify=200,thisphaselasts828 iterationsand thebestsolution

found is notimproved in the remainingiterations; withintensify=80, thisphase lasts

a smaller number of iterations equal to 373, and the best solution found is su essively

improved afterthe rst Diversi ation phase.

0

500

1000

1500

150

200

250

300

350

400

450

iterations

makespan

makespan

x max

y min

y max

y mean

restart = 829

makespan = 202

restart = 1029

makespan = 322

restart = 1229

makespan = 218

Figure 2: Solution values pro le of the algorithm (intensify = 200, = 0, = 0:02,

n=150).

Asit an be inferred,with intensify=80 the Diversi ation phaseis more frequent

thanforthe asewithintensify=200.

Figure 4 plots the trends of the average solution values of the instan es with n =

100;200 tasks, intensify=200, =0:02;0:1;0:5;0:9 and =0;0:02;0:1;+1; the gure

shows that, experimentally,the best hoi e for and are0.02 and0, respe tively.

Withthislatter hoi e,weanalyzedthee e tivenessandtheeÆ ien yofthealgorithm,

(12)

0

200

400

600

800

1000

1200

150

200

250

300

350

400

450

X: 0

Y: 244.7

iterations

makespan

makespan

x max

y min

y max

y mean

restart = 1082

makespan = 289

restart = 374

makespan = 212

restart = 682

makespan = 279

restart = 762

makespan = 317

restart = 922

makespan = 312

restart = 1002

makespan = 281

restart = 842

makespan = 263

Figure 3: Solution values pro le of the algorithm (intensify = 80, = 0, = 0:02,

n=150).

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

220

225

230

235

240

245

α

makespan

β=0

β=0.02

β=0.1

β

=+

(13)

CPUtime(inse onds)amongtheinstan esofthesame lass(CPUtimesreportedarethe

times when thebest solutionvalues were found);moreover, theaverage valuesamong all

theexperimentedinstan esoverin reasingintensify valuesareplottedinFigure 5. The

gure shows the trade-o between the e e tiveness and the eÆ ien y of the algorithm,

and how for in reasing intensify values the e e tiveness in reases while the eÆ ien y

de reases.

Table 2: Average makespan and CPU time values over the instan e lasses ( = 0:02;

=0).

instan e lass intensify=80 intensify=200 intensify=600 intensify=2000

makespan CPU makespan CPU makespan CPU makespan CPU

n m r  (se ) (se ) (se ) (se )

50 2 10 2 48.0 0.8 48.2 1.0 48.0 1.4 48.0 1.6 50 2 10 5 83.8 2.2 87.0 3.2 85.8 5.8 87.4 4.8 50 2 10 8 158.6 4.0 156.8 3.6 156.6 5.6 157.8 6.6 50 4 10 2 37.4 2.2 36.2 3.6 36.0 6.4 36.0 4.4 50 4 10 5 64.2 4.8 62.4 6.0 62.4 13.8 60.6 14.4 50 4 10 8 91.8 21.6 90.6 19.0 88.2 12.8 89.0 28.4 100 2 10 2 93.8 0.6 90.6 4.0 89.0 4.6 89.0 8.2 100 2 10 5 175.4 13.6 170.6 6.4 167.4 19.6 165.8 33.2 100 2 10 8 270.4 8.4 268.0 26.6 261.2 25.4 261.4 39.0 100 4 10 2 66.4 7.6 63.8 18.6 61.8 24.0 61.2 37.0 100 4 10 5 139.6 15.6 135.0 48.0 131.6 76.2 129.2 114.0 100 4 10 8 195.6 46.2 188.2 79.4 182.2 119.4 182.4 181.2 200 2 10 2 159.2 24.8 155.8 32.6 153.4 28.6 151.4 67.8 200 2 10 5 338.6 26.2 334.2 71.6 327.0 128.2 323.8 241.8 200 2 10 8 514.8 21.2 507.0 123.4 499.2 231.4 495.0 406.4 200 4 10 2 126.2 120.4 123.4 43.0 119.0 118.2 116.6 222.0 200 4 10 5 268.2 96.2 258.4 157.0 252.0 539.8 246.2 944.4 200 4 10 8 381.0 129.8 376.8 260.4 372.2 858.4 370.4 1537.2

3.2.1 Changing parameter values dynami ally

From the e e tiveness point of view, we experimentally obtained better results with

= 0:02 and = 0, that is, with a very narrow neighborhood and only improvement

movesintheIntensi ationphase. Nevertheless,we also experimentedthatwitha wider

neighborhood (i.e., with = 0:3) and a epting also non-improvement moves within a

given threshold(i.e., with = 0:03), we were able to rea h a good solution in a shorter

time. From this onsideration, we de ided to vary and dynami ally within the

al-gorithm run, adopting a sort of variable neighborhood sear h with a variable threshold

(14)

0

500

1000

1500

2000

170

172

174

176

178

180

makespan

intensify iterations

0

500

1000

1500

2000

0

50

100

150

200

250

cpu (sec)

Figure5: Averagemakespanvalues(solidline)andCPUtimes(dottedline)overin reasing

intensify values( =0:02; =0).

the rst one (i.e., sub-phase 1) the algorithm sear hes new solutions over a wide

neigh-borhood (e.g.,

1

= 0:3) and also a epts non-improving solutions (e.g.,

1

= 0:05); in

the next sub-phase 2,the algorithm hanges thesear h strategy by sear hinginto a

nar-row neighborhood (e.g.,

2

=0:02) and withouta epting non-improvingsolutions (e.g.,

2

=0).

A ordingly, with sub-phase 1 the algorithm is able to look for a new solution over

a large neighborhoodspa e a epting also non-improvingmoves, in order to avoid to be

trappedsoon ina lo aloptimum; sub-phase2issu essivelyusedto improvethesolution

values by intensifying the sear h on a small neighborhood, if for a ertain time period

we were unableto nd good solutions w.r.t. the best solution found. In parti ular, the

transition from sub-phase 1 to sub-phase 2 is done when, within a ertain number of

iterations or CPU time t

0

, the algorithm fails in nding a new solution of value z not

greater than(1+)z



, wherez



isthebest solutionvaluefoundsofarbythealgorithm,

and is anarbitrarilysmallparameter.

InTables3-5,weshowthebestmakespanvaluesandthe orrespondingrunningtimes,

obtained with t

0

= 20 se onds and  = 0:1, for di erent values of

1

and

1

(15)

1 1 1 =0 instan e lass 1 =0:1 1 =0:3 1 =0:6

n m r  makespan CPU(se ) makespan CPU(se ) makespan CPU(se )

300 2 10 2 235.6 87.4 235.8 166.0 236.0 103.0 300 2 10 5 492.4 160.8 483.2 187.2 494.6 93.2 300 2 10 8 769.4 187.0 767.2 186.0 782.4 116.0 300 4 10 2 187.0 92.0 186.2 97.0 187.0 101.0 300 4 10 5 389.8 123.0 393.8 131.8 397.0 106.6 300 4 10 8 593.6 208.0 605.0 134.0 606.4 118.0 500 2 10 2 379.8 150.0 389.4 145.0 394.0 95.4 500 2 10 5 862.2 117.2 841.2 117.2 855.4 66.4 500 2 10 8 1318.4 138.0 1311.0 138.0 1327.2 91.4 500 4 10 2 328.0 119.0 317.6 89.0 323.6 94.2 500 4 10 5 674.2 137.2 672.6 154.2 673.6 153.8 500 4 10 8 1021.0 157.0 1007.0 86.2 988.8 120.0

Table4: Average makespanand CPU timevaluesfordi erent

1 valuesand 1 =0:05. 1 =0:05 instan e lass 1 =0:1 1 =0:3 1 =0:6

n m r  makespan CPU(se ) makespan CPU(se ) makespan CPU(se )

300 2 10 2 235.2 105.0 240.2 93.4 233.6 110.0 300 2 10 5 474.6 190.4 469.0 142.6 476.8 121.4 300 2 10 8 778.4 158.0 779.0 155.0 780.4 167.0 300 4 10 2 186.0 117.0 182.0 115.0 186.8 113.0 300 4 10 5 392.6 133.0 388.0 141.8 390.6 139.6 300 4 10 8 602.6 202.0 608.8 132.0 606.8 146.0 500 2 10 2 387.6 191.0 362.5 119.8 388.2 129.0 500 2 10 5 841.2 202.4 851.6 120.6 856.0 108.4 500 2 10 8 1327.2 97.8 1310.8 82.6 1312.0 124.0 500 4 10 2 317.6 116.0 279.8 132.2 310.6 103.0 500 4 10 5 671.6 167.4 626.6 90.4 691.8 142.4 500 4 10 8 1035.0 116.0 1005.8 84.0 1023.8 45.0 2 =0:02 and 2

=0. By analysingthe resultsinthese tables, we notethat mostof the

bestresultsare obtainedwhen

1

=0:3and

1

=0:05.

In the following, we ompare the algorithm version with dynami parameters (with

t 0 = 20 se onds,  = 0:1, 1 = 0:3, 1 = 0:05, 2 = 0:02 and 2

= 0) and the version

(16)

1 1 1 =0:2 instan e lass 1 =0:1 1 =0:3 1 =0:6

n m r  makespan CPU(se ) makespan CPU(se ) makespan CPU(se )

300 2 10 2 235.0 99.2 235.2 120.4 231.6 117.6 300 2 10 5 490.8 145.8 497.4 149.4 490.8 114.6 300 2 10 8 789.4 184.0 783.4 258.2 785.6 182.0 300 4 10 2 187.6 120.0 186.6 103.6 185.4 118.4 300 4 10 5 395.4 139.4 393.0 140.8 389.6 159.6 300 4 10 8 607.8 120.6 601.6 142.6 605.2 199.4 500 2 10 2 389.6 159.4 386.6 106.0 388.0 115.0 500 2 10 5 848.2 147.2 847.2 191.8 839.4 162.8 500 2 10 8 1334.2 132.4 1322.6 113.4 1315.6 91.6 500 4 10 2 317.4 135.2 314.6 116.4 315.4 127.6 500 4 10 5 668.0 125.4 677.0 84.8 677.8 43.0 500 4 10 8 1008.0 121.2 997.4 145.8 1016.8 93.2 exe uted (i.e.,t 0 =0, 2 =0:02and 2 =0).

1350

1400

1450

1500

1550

1600

1650

0

2

4

6

8

10

12

14

16

18

20

t

0

= 20 sec

t

0

= 0 sec

sec

makespan

Figure 6: Best solutionvaluesfoundwith t

0

=0and t

0

=20se onds, respe tively, on an

instan e inthe lass (500;2;10;8).

Figure6showsthemakespanpro leofthetwo versionsduringthe rststagesoftheir

exe ution obtained by running on e the two algorithms on one large instan e belonging

to the lass (500;2;10;8); the gure shows that in the rst 20 se onds, the algorithm

implementedwithdynami parameters is ableto a hieve better solutionsw.r.t. the xed

(17)

valuesof and .

instan e lass xedparameters dynami parameters

n m r  makespan CPU(se ) makespan CPU(se )

300 2 10 2 232.8 106.8 240.2 93.4 300 2 10 5 488.2 144.8 469.0 142.6 300 2 10 8 790.6 146.0 779.0 154.8 300 4 10 2 191.4 107.4 182.0 115.4 300 4 10 5 396.6 144.4 388.0 141.8 300 4 10 8 609.2 148.0 608.8 131.8 500 2 10 2 390.2 128.6 362.5 119.8 500 2 10 5 848.2 154.2 851.6 120.6 500 2 10 8 1320.8 141.0 1310.8 82.6 500 4 10 2 323.2 117.4 279.8 132.2 500 4 10 5 685.0 172.6 626.6 90.4 500 4 10 8 996.0 174.4 1005.8 84.0

3 se onds). For instan es with 300 and 500 tasks, Table 6 shows the omparison of the

resultsobtainedbythetwoalgorithmswith200se ondsoftimelimitoveralltheinstan es.

3.3 The omparison between FAST and SOAR

In this subse tion we ompare our algorithm FAST with the dynami parameters

dis- ussed in the previous subse tion to algorithm SOAR in Caramia and Giordani (2007).

The omparison has been arried using the same set of test instan es (the 10 random

instan esused inCaramiaand Giordani2007) and thesame ma hine. Table 7showsthe

average valuesof the best solutions ( olumn denoted makespan) and the orresponding

omputing times, in se onds, to ndthem ( olumn denoted CPU), a hieved by the two

approa heson instan eswith n=50, 100 and150 tasks.

The experimentationis made by running SOAR and FAST with a time limitequal

to 500 se ondsand100 se onds, respe tively, to assessthatFAST isindeedoftenable to

improve SOAR solutionsinredu ed omputingtime. Bytheresultslistedinthetable it

an be seen thatFAST isable to improve thequalityof thesolutiongiven bySOARin

many ases and espe ially for the instan es with a large number of tasks; also the CPU

time needed to ndthebest solutionswithinthe given timelimits shows that FAST on

averageisfasterthanSOAR . Inparti ular,forinstan eswith50taskswehaveanaverage

(18)

ing from50 to 150 tasks.

instan e lass SOAR FAST

n m r  makespan CPU(se ) makespan CPU(se )

50 5 10 2 33.8 29.4 33.8 82.4 50 4 10 2 31.4 194.2 33.7 11.3 50 3 10 2 36.2 110.1 36.2 36.7 50 2 10 2 51.3 73.4 52.0 4.5 50 5 10 5 73.4 279.7 73.4 27.6 50 4 10 5 61.2 79.4 59.1 4.0 50 3 10 5 55.4 114.7 56.3 19.9 50 2 10 5 86.5 2.3 84.2 33.2 50 5 10 8 85.7 3.4 85.7 34.4 50 4 10 8 127.4 16.6 129.1 41.0 50 3 10 8 120.2 61.2 119.8 39.6 50 2 10 8 122.1 18.1 121.0 82.2 100 5 10 2 59.8 92.5 59.8 31.6 100 4 10 2 68.3 57.4 68.3 10.0 100 3 10 2 64.8 175.3 62.2 34.3 100 2 10 2 105.0 21.4 104.2 14.0 100 5 10 5 155.2 101.3 153.7 31.4 100 4 10 5 133.0 67.0 131.2 26.7 100 3 10 5 150.6 21.4 151.8 25.4 100 2 10 5 161.3 56.3 159.1 8.3 100 5 10 8 189.6 11.5 193.4 4.6 100 4 10 8 221.8 31.5 218.5 69.0 100 3 10 8 242.6 57.4 234.4 88.1 100 2 10 8 236.5 107.0 234.1 30.6 150 5 10 2 92.1 49.5 92.1 52.1 150 4 10 2 110.0 62.2 109.3 31.5 150 3 10 2 105.3 129.5 106.3 45.6 150 2 10 2 145.1 53.6 141.7 53.2 150 5 10 5 228.0 164.3 228.0 60.2 150 4 10 5 197.2 123.7 207.2 16.4 150 3 10 5 213.6 11.7 211.0 2.2 150 2 10 5 258.2 14.6 247.6 18.4 150 5 10 8 270.1 8.2 270.1 80.3 150 4 10 8 321.6 4.6 315.6 47.2 150 3 10 8 366.2 198.0 365.4 73.8 150 2 10 8 377.0 3.2 365.2 13.9

FAST and 81.9se ondsfor SOAR . For instan eswith100 tasks ouralgorithm a hieved

an average makespanof 147.6 withrespe tto 149.0 of SOAR , and an average CPUtime

(19)

SOAR , instead,a hieved anaverage makespan of223.7and anaverageCPU timeof68.6

se ondson thesame instan e set.

3.4 The omparison between FAST and TPA

Inthissubse tionwe ompare theperforman eofFAST (withdynami parameters) and

algorithm TPA proposed inBian o et al. (1998). Preliminary, we ondu ted an analysis

of the performan e of di erent versions of TPA,in order to sele t thebest one used for

the omparison withFAST.

3.4.1 Experimental analysis of di erent versions of TPA

AlgorithmTPAisalo alsear halgorithmbaseduponaheuristi investigationofthespa e

of taskmodeassignments, andupon heuristi allysolvingthetasks hedulingproblem for

a given mode assignment. The algorithm,at ea h iteration, rst assigns a mode to ea h

task and then nds afeasible s heduleforthe taskswith theassigned modesbygreedily

s heduling thetasks a ording to a sequen ing rule. Before exe uting a new iteration, a

variationphaseisexe utedforredu ingthespa eofpossiblemodeassignments. Di erent

versions ofTPA were proposed bythe authors, a ording to the riterion sele ted inthe

variationphase, thespe i heuristi for theassignment phase,and the sequen ingrules

adopted inthes heduling phase.

We testedalgorithm TPA onsidering themode ex hange(ME), andthe riti al path

(CP) riteria for the variation phase; moreover, we onsider three sequen ing rules for

the sequen ing phase, that is: longest pro essing time (LPT); shortest pro essing time

(SPT); maximum degree of ompetition (MDC); nally, forthe mode assignment phase,

we onsider the assignment MR pro edure that greedily sele ts a mode for ea h task

minimizing the usage of the most used resour e, whi h seems to perform better with

respe tto theother ones providedinBian oet al. (1998).

In Table 8, we report the performan e of the two-phase algorithm implementedwith

di erentsequen ing rules,and withtheME riterionforthevariationphase,that

exper-imentally performsbetter thantheCP riterion.

Forea hinstan e lasswithn=50;100;150,thetableliststheaveragesolutionvalues,

(20)

ME variation riterion.

instan e lass LPT SPT MDC

n m r  makespan CPU (se ) makespan CPU (se ) makespan CPU (se )

50 2 10 2 51.0 0.0 48.8 0.0 48.8 0.0 50 2 10 5 100.2 0.0 102.8 0.0 101.2 0.2 50 2 10 8 169.4 0.0 168.4 0.0 169.2 0.0 50 3 10 2 44.2 0.0 44.0 0.0 42.6 0.0 50 3 10 5 95.6 0.0 95.2 0.0 92.4 0.2 50 3 10 8 139.8 0.0 140.4 0.0 142.6 0.0 50 4 10 2 38.8 0.0 39.8 0.0 40.4 0.0 50 4 10 5 79.6 0.0 82.0 0.0 81.2 0.0 50 4 10 8 101.8 0.0 102.0 0.0 103.4 0.0 50 5 10 2 37.0 0.0 35.8 0.0 35.6 0.0 50 5 10 5 83.4 0.0 85.2 0.0 82.4 0.2 50 5 10 8 113.0 0.0 113.4 0.0 112.8 0.0 100 2 10 2 92.8 0.4 95.2 0.4 92.6 0.4 100 2 10 5 190.4 0.4 189.8 0.2 189.8 0.6 100 2 10 8 302.0 0.2 306.8 0.4 301.8 0.6 100 3 10 2 72.4 0.2 72.8 0.2 73.6 0.2 100 3 10 5 159.6 0.2 161.2 0.2 161.6 0.2 100 3 10 8 240.0 0.2 243.0 0.4 239.6 0.2 100 4 10 2 68.6 0.2 68.6 0.4 68.2 0.2 100 4 10 5 151.0 0.2 157.2 0.4 153.8 0.4 100 4 10 8 215.6 0.2 218.0 0.2 216.0 0.4 100 5 10 2 62.6 0.8 63.2 0.2 62.8 0.2 100 5 10 5 132.4 0.0 133.8 0.4 131.4 0.4 100 5 10 8 192.2 0.4 193.8 0.6 195.4 0.4 150 2 10 2 119.0 1.4 122.4 1.4 119.6 1.2 150 2 10 5 287.4 2.0 292.8 1.8 288.2 1.6 150 2 10 8 425.8 2.0 427.0 1.6 433.8 1.8 150 3 10 2 99.8 1.4 99.8 1.6 98.4 1.0 150 3 10 5 241.8 1.8 246.4 1.6 246.0 1.4 150 3 10 8 363.6 2.4 367.0 1.6 368.2 1.8 150 4 10 2 96.0 1.8 97.0 1.6 97.2 1.2 150 4 10 5 221.0 1.8 221.8 1.6 220.2 1.6 150 4 10 8 322.0 1.8 325.8 2.0 322.8 2.0 150 5 10 2 86.6 1.2 86.6 1.8 86.8 1.2 150 5 10 5 188.6 1.6 192.8 1.4 188.2 1.4 150 5 10 8 293.4 1.8 294.6 2.0 298.6 1.4

adoptedintheTPAalgorithm;onaverage,theLPT sequen ingruleperformsbetterthan

theother ones.

(21)

theless, for larger instan es, that is when n  300, the exe ution time of the algorithm

grows very fast, e.g., the algorithm needs about 30 se onds per iteration when n =300,

and about160 se ondswhen n=500.

3.4.2 FAST vs. TPA

In the following, we report the results forthe omparison between FAST and TPA. In

parti ular, a ording to the analysis reported above, the version of TPA used for the

omparisonistheonewiththeME variation riterion,theLPT sequen ingrule,andthe

MR pro edure forthemode assignment phase. The resultsare listedinTables9and 10.

Table 9: Makespan omparison between FAST and TPA on instan eswith 50 and 100

tasks.

instan e lass TPA FAST

n m r  makespan CPU(se ) makespan gap CPU(se )

50 5 10 2 37.0 0.0 32.2 -13.0% 8.4 50 4 10 2 38.8 0.0 35.8 -7.7% 5.2 50 3 10 2 44.2 0.0 41.2 -6.8% 1.4 50 2 10 2 51.0 0.0 48.6 -4.7% 0.4 50 5 10 5 83.4 0.0 68.0 -18.5% 18.6 50 4 10 5 79.6 0.0 61.6 -22.6% 12.0 50 3 10 5 95.6 0.0 80.0 -16.3% 8.0 50 2 10 5 100.2 0.0 88.2 -12.0% 5.0 50 5 10 8 113.0 0.0 95.0 -15.9% 56.2 50 4 10 8 101.8 0.0 89.0 -12.6% 28.2 50 3 10 8 139.8 0.0 122.8 -12.2% 14.6 50 2 10 8 169.4 0.0 158.0 -6.7% 11.2 100 5 10 2 62.6 0.4 59.4 -5.1% 17.6 100 4 10 2 68.6 0.2 62.2 -9.3% 34.0 100 3 10 2 72.4 0.0 70.2 -3.0% 16.0 100 2 10 2 92.8 0.2 88.2 -5.0% 4.0 100 5 10 5 132.4 0.6 116.0 -12.4% 39.0 100 4 10 5 151.0 0.2 130.2 -13.8% 44.4 100 3 10 5 159.6 0.2 140.8 -11.8% 20.4 100 2 10 5 190.4 0.6 166.0 -12.8% 6.4 100 5 10 8 192.2 0.4 165.4 -13.9% 48.6 100 4 10 8 215.6 0.4 183.2 -15.0% 93.0 100 3 10 8 240.0 0.2 211.4 -11.9% 38.4 100 2 10 8 302.0 0.8 260.6 -13.7% 26.6

(22)

the average relative di eren e  makespan(FAST) makespan(TPA) makespan(TPA)  , in per entage, between

themakespan valuesprovidedbyFAST and TPA.

Table10: Makespan omparisonbetweenFAST andTPAoninstan eswith200,300and

500 tasks.

instan e lass TPA FAST

n m r  makespan CPU(se ) makespan gap CPU(se )

200 5 10 2 115.6 8.6 116.8 1.0% 106.8 200 4 10 2 123.2 4.0 120.4 -2.3% 71.0 200 3 10 2 134.2 5.0 131.6 -1.9% 81.0 200 2 10 2 155.8 5.4 152.8 -1.9% 53.0 200 5 10 5 249.2 5.2 233.2 -6.4% 152.8 200 4 10 5 280.4 5.8 261.6 -6.7% 112.2 200 3 10 5 314.2 4.2 290.8 -7.4% 131.2 200 2 10 5 361.2 6.0 325.8 -9.8% 126.6 200 5 10 8 369.6 5.8 336.4 -9.0% 158.6 200 4 10 8 420.2 6.6 388.4 -7.6% 164.4 200 3 10 8 469.0 7.2 427.4 -8.9% 129.0 200 2 10 8 544.2 6.8 504.0 -7.4% 159.8 300 5 10 2 161.0 26.4 155.0 -3.7% 92.6 300 4 10 2 180.8 20.8 182.0 0.7% 115.4 300 3 10 2 195.0. 27.4 197.2 -1.1% 80.4 300 2 10 2 231.2 27.2 240.2 3.9% 93.4 300 5 10 5 350.2 29.2 348.6 -0.5% 106.8 300 4 10 5 388.4 22.6 388.0 -0.1% 141.8 300 3 10 5 450.4 26.6 440.6 -2.2% 148.6 300 2 10 5 512.0 29.4 469.0 -8.4% 142.6 300 5 10 8 556.4 29.6 551.0 -1.0% 104.2 300 4 10 8 621.0 31.2 608.8 -2.0% 131.8 300 3 10 8 684.8 32 659.8 -3.7% 130.2 300 2 10 8 828.2 31.6 779.0 -5.9% 154.8 500 5 10 2 256.4 110.6 250.0 -2.5% 113.8 500 4 10 2 286.6 197.8 279.8 -2.4% 132.2 500 3 10 2 306.8 195.8 305.4 -0.5% 112.0 500 2 10 2 368.2 172.6 362.5 -1.6% 119.8 500 5 10 5 580.2 141.2 592.6 2.3% 163.2 500 4 10 5 621.6 124.6 626.6 0.8% 90.4 500 3 10 5 708.8 136.2 722.8 2.0% 127.0 500 2 10 5 840.4 184 851.6 1.3% 120.6 500 5 10 8 877.6 134.6 862.4 -1.7% 168.2 500 4 10 8 993.0 134.8 1005.8 1.3% 84.0 500 3 10 8 1141.8 162 1134.4 -0.6% 90.2 500 2 10 8 1329.0 205 1310.8 -1.4% 82.6

(23)

lessthanthoseofTPAoninstan eswith50tasks,and10:6% oninstan eswith100tasks.

For larger instan es thisgap redu es to the following values: 5:7% when n = 200, 2:0%

when n=300, and 0:3% when n =500. We note that this gap redu tion has not to be

interpretedasa negative out omeof FAST: indeed, whileTPA haltswhen itgets stu k

in a lo al optimum, our algorithm has a stopping riterion of 200 se onds regardless of

what isthenumbertasks; therefore,a largertimelimit ouldleadto even better solution

valuesforinstan eswith300 and500 tasks.

4 Con lusions

In thispaperweproposedanovel two-phaseapproa hmetaheuristi formulti-modetask

s heduling. The algorithm exploits on epts like strategi os illation and variable

neigh-borhood sear h. Indeed, it adopts an intensi ation phase in whi h rst uses a wide

neighborhood for a ertain number of iterations, and then, if no improvement is met, it

passes to a narrowneighborhoodto re ne thesear h. A multi-start me hanism is

imple-mented to diversify solutions. The performan e of the proposed solution approa h has

been omparedto that oftwoknownmulti-modes heduling heuristi s,showinghow itis

able to produ eoftenbetter resultsina very limited omputingtime.

Referen es

[1℄ L.Bian o, P. Dell'Olmo, M.G. Speranza, Nonpreemptive S heduling ofIndependent

Tasks withPrespe i edPro essorAllo ations,Nav. Res. Log.41 (1994) 959{971.

[2℄ L.Bian o,P.Dell'Olmo,M.G.Speranza,S hedulingIndependentTaskswithMultiple

Modes, Dis . Appl.Math. 62 (1995)35{50.

[3℄ L.Bian o,P.Dell'Olmo,M.G.Speranza,Heuristi sforMulti-ModeS heduling

Prob-lemswith Dedi ated Resour es,Eur. J.of Oper. Res.107 (1998) 260{271.

[4℄ L. Bian o, P. Dell'Olmo, S. Giordani, M.G. Speranza, Minimizing Makespan in a

MultimodeMultipro essor ShopS heduling Problem,Nav.Res. Log. 46(1999) 893{

(24)

MultipleModes, J. ofHeuristi s DOI10.1007/s10732-00 7-9 06 2, in press,2007.

[6℄ F.Glover,Multi-StartandStrategi Os illationMethods-Prin iplestoExploit

Adap-tive Memory, in: M. Laguna, J.L.Gozales Velarde, eds., Computing Toolsfor

Mod-eling, Optimizationand Simulation: Interfa es inComputer S ien eand Operations

Figura

Figure 1: Flow 
hart of the fun
tionalities of the proposed algorithm.
Figure 2: Solution values prole of the algorithm (intensif y = 200,  = 0,  = 0:02,
Figure 3: Solution values prole of the algorithm (intensify = 80,  = 0,  = 0:02,
Table 2: Average makespan and CPU time v alues over the instan
e 
lasses ( = 0:02;
+6

Riferimenti

Documenti correlati

The study of the SRM specification and the test case analysis and design have allowed us to drastically reduce the number of test cases to write, while keeping the test set

delle disposizioni del titolo I-bis del t.u.f., ma legittima la stessa Commissione a compiere tutti gli atti necessari all’accertamento delle violazioni, utilizzando

The present work aimed to assess the suitability of replacing 5% of soybean concentrate with a commer- cial blend of seaweeds in a feed for rainbow trout (Oncorhynchus mykiss

KIR gene frequencies, KIR haplotypes, KIR ligands and combinations of KIRs and their HLA Class I ligands were investigated in 114 patients diagnosed with type 1 autoimmune hepatitis

SOLUTION

With low filling level in the waterway (C), the sewage opens the flap valve (KL1) with its own pressure force and flows through tower chamber (KW), outflow collector (KO) and

The properties of merger shocks, at least based on cosmological simulations, are expected to be fairly independent of the host cluster mass and on the merger configuration,

We found that 38 ± 2 per cent of our AGN sample analysed (178/469) present detected outflows, mostly blueshifted, and that the fraction of blue versus redshifted outflows in our