European Journal of Operational Research xxx (xxxx) xxx
ContentslistsavailableatScienceDirect
European
Journal
of
Operational
Research
journalhomepage:www.elsevier.com/locate/ejor
Production,
Manufacturing,
Transportation
and
Logistics
Optimizing
pre-processing
and
relocation
moves
in
the
Stochastic
Container
Relocation
Problem
Bernard
G.
Zweers
a ,b ,∗,
Sandjai
Bhulai
b ,a,
Rob
D.
van
der
Mei
a ,ba Centrum Wiskunde & Informatica, Stochastics, Science Park 123, 1098XG Amsterdam, the Netherlands
b Vrije Universiteit Amsterdam, Department of Mathematics, De Boelelaan 1105, 1081HV Amsterdam, the Netherlands
a
r
t
i
c
l
e
i
n
f
o
Article history: Received 24 July 2019 Accepted 28 November 2019 Available online xxx Keywords: LogisticsStochastic Container Relocation Problem Container pre-marshalling
Branch-and-bound Local search
a
b
s
t
r
a
c
t
Incontainer terminals,containers areoftenmoved toother stacksin orderto accesscontainers that needtoleavetheterminalearlier.Weproposeanewoptimizationmodelinwhichthecontainerscanbe movedintwodifferentphases:apre-processingandarelocationphase.Tosolvethisproblem,we de-velopanoptimalbranch-and-boundalgorithm.Furthermore,wedevelopalocalsearchheuristicbecause theproblemisNP-hard.Besidesthat,wegivearule-basedmethodtoestimatethenumberofrelocation movesinabay.Thelocalsearchheuristicproducessolutionsthatareclosetotheoptimalsolution. Fi-nally,forinstancesinwhichthebenefitsofmovingcontainersinthetwodifferentphasesareinbalance, thesolutionoftheheuristicyieldssignificantimprovementcomparedtotheexistingmethodsinwhich containersareonlymovedinoneofthetwophases.
© 2019ElsevierB.V.Allrightsreserved.
1. Introduction
Shipping containers are the main way of transporting goods around the world. About 75% ofthe volume ofthe total tradeis carriedby seaandabouthalfofthistradeis shippedin contain-ers(Lee & Song, 2017 ).Akey partofthisglobalsupplychainare containerterminals,atwhichcontainersaretransshippedbetween differentmodesoftransportation.Asaresult,foreachpartofthe transportation, the most efficient mode of transportation can be used. Deep-sea vessels are used to ship thousands ofcontainers fromonecontinenttoanotherandtheyonlyvisitafew deep-sea ports. Atthesedeep-seaports,the containersaretransshippedto bargesortrainsfortheinlandtransportation.Thebargesortrains bringfromtenstoafewhundredcontainerstoaninlandcontainer terminal.Afterward,atruckisusedtoshipthecontainerfromthe inlandcontainerterminaltoitsfinaldestination.
Althoughtheterminalsfacilitatetheshipmentofcontainerson differentmodes,thehandlingofacontainerataterminalimposes extracosts.Tomakethingsworse,containersaremostofthetimes moved multiple times inside the terminal. After a container ar-rives atthe terminal, itis temporarilystored ina container yard because the differentmodes oftransportation are often not syn-chronized. In order to save space, the containers are stacked on
∗ Corresponding author at: Centrum Wiskunde & Informatica, Stochastics, Science Park 123, 1098XG Amsterdam, the Netherlands.
E-mail address: [email protected] (B.G. Zweers).
top ofeach other,but thehandling equipmentof a terminal can only access the top container. Ideally, each container that needs to leave the terminal islocated at the top ofits stack.However, whenacontainer arrives atthecontainerterminal itisoftennot knownwhenexactlyitneeds toleavetheterminal.Consequently, itfrequentlyoccursthat whenacontainerneeds toleavethe ter-minal,othercontainersarestackedontopofthattargetcontainer. Theseblockingcontainerswill thenneedtobe relocatedtoother stacks.Thesemovesarecalledrelocationmovesandsincethey im-poseextracostsanddelays,theyneedtobepreventedasmuchas possible.
Atan inlandterminal,all outboundimportcontainersneed to bedeliveredtotheirfinal destinations.Thislast partofthe trans-portationisalmostalwaysdonewithatruckandinordertoserve asmany trucks as possible on a day, a terminal is interested in reducing the turnaroundtime of a truck.One wayto reduce the truck’sturnaroundtimeisto performfewerrelocation moves be-causetherelocationmovesareperformedwhenatruckiswaiting attheterminal.Ataninlandterminal,thecranetohandle contain-ersismoreoftenidlethan atadeepsea terminalbecausefewer containers are transshipped via an inland terminal. If the crane coulddosomepre-processingwhenitisidletoreducethenumber ofrelocationmoves,thentheturnaroundtimesoftruckscouldbe reduced.Consequently,fewertrucksmightbeneededtotransport allcontainers.AninlandterminalintheportofAmsterdamis fac-ingtheproblemwhichpre-processingmovetoperforminorderto reducethe numberofrelocation moves.Toanswer thatquestion, we presentinthispaper anew optimizationproblem, whichwe https://doi.org/10.1016/j.ejor.2019.11.067
0377-2217/© 2019 Elsevier B.V. All rights reserved.
calltheStochastic ContainerRelocationProblem withPre-Processing
(SCRPPP).
The contributionofthisworkisfourfold.First,we introducea new optimization problem faced by a real inland container ter-minal.Second, we develop a heuristic to solve thisproblem and third, we present an optimal algorithm for thisproblem. Finally, amethodtoestimate thenumberofrelocation movesforagiven bayispresented.
The SCRPPPiscloselyrelatedtootheroperational problemsin containerterminals.Hence,westartbydescribingtherelevant lit-eraturefortheseproblemsinSection 2 .Afterward, wewillgivea detaileddescriptionof theSCRPPP in Section 3 .In Section 4 ,we provethat the SCRPPP isNP-hard and derive boundsforthe op-timalsolution andthe maximumnumber ofcontainersin a bay. InordertosolvetheSCRPPP,we presentinSection 5 bothalocal searchheuristicandanoptimalalgorithm.Theoptimaland heuris-ticsolutionsarecomparedwitheachotherinSection 6 .Finally,in Section 7 ,we drawconclusionsandpresentdirectionsforfurther research.
2. Literaturereview
At a container terminal, many different types of optimization problemsarefaced.Fora generaloverviewoftheseproblemswe referto(Stahlbock & Voß, 2008 ) and(Steenken, Voß, & Stahlbock, 2004 ). The focus of this paper is one specific type of problem, namelystackingpoliciesforcontainers.Thesestackingpoliciescan be applied to a yard withonly inbound or outbound containers ora combination of the two. Foroverview articles ofthe differ-enttypes ofstacking problems we refer to Carlo, Vis, and Rood- bergen (2014) ,Caserta, Schwarze, and Voß (2011a) ,and Lehnfeld and Knust (2014) .Inthiswork,wewillonlyfocusonthestacking ofoutboundcontainers.Thereare twomainproblemsconcerning thestacking of outboundcontainers:(i) theContainer Relocation Problem (CRP), sometimes also called blocks relocation problem, and(ii)theContainerPre-MarshallingProblem(CPMP).Tobemore precise,we willstudya generalizationoftheCRP,whichiscalled the Stochastic Container Relocation Problem (SCRP). Since our problemcanbeseenasacombinationoftheSCRPandtheCPMP, wewilldiscusstherelevantliteratureforthetwoproblemsbelow. IntheCRP,eachcontainerhasauniquelabelthatindicatesthe orderinwhich thecontainersare picked upby a truck. Contain-ers that are on top of a container that is retrieved need to be relocated to other stacks. The objective of the CRP is to use as fewoftheserelocationmovesaspossible.TheCRPwasintroduced by Kim and Hong (2006) andis proven to be NP-hard (Caserta, Schwarze, & Voß, 2012 ). As a result ofthis hardness, the litera-tureconcerning the container relocation problemcan be divided into two different categories. The first branch of the literature dealswithfinding optimal solutions for theCRP andthe second streamofresearch focuses onheuristicsforthe CRP. Onewayto solvetheCRPtooptimalityistouseintegerprogramming.Caserta etal.(2012) werethefirsttointroduce suchaformulation. How-ever,that formulationneeded hours tosolve instances oftwenty to thirty possible locations of containers. In Zehender, Caserta, Feillet, Schwarze, and Voß (2015) , the formulation of Caserta et al. (2012) is improved,but itis still not able tosolve realistic instances.
Heuristics have been proposed for the CRP to solve larger instances in reasonable time. In Caserta, Voß, and Sniedovich (2011b) ,aheuristicfortheCRPthatisbasedondynamic program-ming ispresented.As the numberof statesthat are examined is restricted thisheuristic runs fast, buta heuristic that gives bet-ter solutions is a rule-based heuristic described in Caserta et al. (2012) .Anotherheuristicinwhicharestrictednumberofstatesis considered is presented in Wu and Ting (2012) . In this article,
thebeamsearchprocedureisapplied.Also,afew meta-heuristics have been developed for the CRP. In Jovanovic, Tuba, and Voß (2019b) theCRPissolvedusingantcolonyoptimization.Agenetic algorithm is used inHussein and Petering (2012) to solve a CRP variant in which the energy consumption is minimized. The en-ergyconsumptiondependsontheweightofacontainer, soheavy containersshouldnotmovetoofar.Theyusethegeneticalgorithm tofindthebestparametersettingsofaconstructiveheuristic.
InJi, Guo, Zhu, and Yang (2015) ,avariantofthe CRPis intro-ducedthat alsoincorporates loadingplans ofships. Inthis prob-lem,a stowage plan ofa ship is givenand theloading sequence ofthe containershas to be decided such that thenumber of re-locations inthe container yard is minimized. Ji et al. (2015) use a genetic algorithm to find good solutions for this problem. In Jovanovic, Tanaka, Nishi, and Voß (2019a) ,aGRASPheuristicis pro-posedfor thesame problemandthisheuristic gives significantly bettersolutionsthanthemethodofJi et al. (2015) .
TheSCRP,whichisa generalizationoftheCRPwasintroduced by Zhao and Goodchild (2010) . In the SCRP, the exact order in which containers are retrieved is not known anymore. It is only giveninwhichtime intervalacontainerisretrieved,butmultiple containerscouldhavethesameinterval.Theretrievalorderofthe containersinthesametime intervalisauniformrandom permu-tation. Using a simple heuristic, Zhao and Goodchild (2010) con-clude that the value of information is important for this prob-lem.InKu and Arthanhari (2016) ,amoreadvancedheuristiccalled theExpectedReshufflingIndexisintroduced.Theideabehindthis heuristic is to calculatea score forevery stack based on the ex-pectednumberofreshufflesneededforthat stack.Acontainer is relocated to thestack with thesmallest numberof reshuffles. In Galle, Manshadi, Borjian Boroujeni, Barnhart, and Jaillet (2018) , an-other heuristic is introduced, which is called the Expected Min-max (EM)heuristic. Inthe EM heuristic,containers are relocated to stacksinwhich they are relocated aslate aspossible. Besides theEMheuristic,inGalle et al. (2018) anoptimalformulationfor theSCRPusingdecisiontreesispresented.Forsmallinstances,the optimalsolutioncanbecomputedwhichisclosetothesolutionof theEMheuristic.
TheCPMP wasintroduced byLee and Hsu (2007) anditsgoal isto reshufflethe containersbeforeanycontainer isretrieved,in suchawaythatallcontainerscanberetrievedwithoutanyfurther relocations.Theobjectiveistouseasfewmovesaspossibleto ob-tainsuchalayout.InLee and Hsu (2007) ,theCPMPismodeledas amulti-commodityflownetwork,whichcanbesolvedto optimal-ityusing an integer program.Nevertheless, they are onlyable to solvesmallinstances tooptimality.In Expósito-Izquierdo, Melián- Batista, and Moreno-Vega (2012) ,an A∗ algorithm is proposed to solvetheCPMPtooptimality, butthismethodcanalsoonlysolve relativelysmallinstances.ThemethodofExpósito-Izquierdo et al. (2012) is improved by Tierney, Pacino, and Voß (2017) using the lower bounds for the CPMP introduced by Bortfeld and Forster (2012) . In Parreño-Torres, Alvarez-Valdes, and Ruiz (2019) , eight differentintegerlinearformulationsarepresented,whichgivethe best current mathematical models for the CPMP. Nevertheless, the branch-and-boundalgorithm ofTanaka and Tierney (2018) is the currentstate-of-the-artalgorithm to solve the CPMPto opti-mality.However,forlargerinstances,therunningtimeisstilloften morethananhour.
TheCPMPhasneverbeenproventobeNP-hard,butsincenone ofthe optimalalgorithms produces afast solutionalsoheuristics have been developed. One of the heuristics that is proposed is theLowestPriorityFirstHeuristic(LPFH)(Expósito-Izquierdo et al., 2012 ).TheideabehindtheLPFHistoplacethecontainerwiththe largesttimeframe,i.e.,thelowestpriority,firstinarightlyordered stack.Afterward, thecontainer withthesecond lowest priorityis placedinawell-orderedstack,andsoon.InJovanovic, Tuba, and Pleasecitethisarticleas:B.G.Zweers,S.BhulaiandR.D.vanderMei,Optimizingpre-processingandrelocationmovesintheStochastic
B.G. Zweers, S. Bhulai and R.D. van der Mei / European Journal of Operational Research xxx (xxxx) xxx 3
Fig. 1. The layout of an RMGC and a container yard ( Tierney et al., 2017 ).
Voß (2017) ,animprovedversion oftheLPFHisgiven. InBortfeld and Forster (2012) ,atreesearch procedureisintroduced tosolve theCPMP.
Tothebestofourknowledge,thereisonlylimitedwork deal-ingwithuncertaintyintheCPMP,namelyRendl and Prandtstetter (2013) andTierney and Voß (2016) .These worksstudy the Robust ContainerPre-MarshallingProbleminwhichforeachcontaineran interval in which the containerscould be retrieved is given. The goalisto placecontainerssuch thatthelatest possibledeparture time ofacontainerisalways earlierthantheearliestpossible de-parturetimeofacontainerunderneathit.Thedifferencebetween the intervalsin thisproblem andin theSCRPPP is that herethe interval widthis container-dependent.In Rendl and Prandtstetter (2013) ,thisproblem issolved using constraintprogramming and inTierney and Voß (2016) anIDA∗heuristicisintroducedthat out-performstheearlierworkofRendl and Prandtstetter (2013) both in computationtimeandsolutionquality.
3. Problemdescription
TheSCRPPPisinspiredbyaproblemfacedbyan inland termi-nal intheport ofAmsterdam.Attheendofthe day,itisknown which containers will leave the terminal the next day. The con-tainers thatare going totheir final destination willbe picked up by a truck.For each container, itis knownin whichtime period a truckwillarrive topickit up.However, dueto externalfactors thistimeperiodisnotverypreciseandmultipletrucksmayarrive in thesame time interval. As a consequence,multiplecontainers are pickedupinthesametime intervalandwedonot knowthe arrival orderofthetrucksinthat period.Furthermore,attheend oftheday,itisusuallyalsolessbusyattheterminalthanduring the course ofthe day. Asa result, the crane driver issometimes idleandcoulddoalreadysomemovesthat reducethenumberof movesofthenextday.However, heorshemightnotalways have time to do all pre-marshalling movesfrom the CPMP.On top of that,itmightnotbemotivatingtomovemanycontainersinorder topreventonlyonerelocationmove.
Inorderto modelthesituationsketchedabove,intheSCRPPP containers can be moved in two different phases: the pre-processing phase and the relocation phase. The pre-processing moves can only be executed before any of the containers is re-trieved,whereas therelocation phasestartsthe momentthefirst container isretrieved.The relocationmovesare equivalenttothe moves executed in the SCRP. Although the pre-processing moves might look similar to the pre-marshalling moves in the CPMP, there is one major difference: the containers might still need
to be relocated after we finish the pre-processing phase. This noveldegree offreedom could be used toreduce the total num-ber of moves, but it also increases the problem’s complexity. Since one has to decide when to stop with the pre-processing phase.
To describe the SCRPPP in more detail, we will first describe the operationalprocess at a container terminal. In container ter-minals,containers are stored ina rectangular yard, see Fig. 1 (a). Mostoften, the equipment to handlethe containers ina yard is aRail MountedGantry Crane(RMGC).InFig. 1 ,an illustrationof a container yard and an RMGC is given. As shown in Fig. 1 (a), the RMGC is positioned above a single row of containers which iscalledabay.Usingthetrolleythatisattachedtothecrane,see Fig. 1 (b),allstacksofcontainersinthatbaycanbeaccessed. Obvi-ously,onlythetopcontainerofeachstackcanberetrievedbythe trolley.Ifthe trolleyhasretrieved acontainer it caneithermove toanotherstacktoplacethecontainerthereoritcanmovetothe endof the RMGC to placethe container on a truck. The yard in Fig. 1 correspondstoayardthatispositionedparalleltothequay. Insome terminals,thelay-outoftheyardisslightlydifferentand theyardispositionedperpendiculartothequay.Inthelattertype ofterminals,avehiclecannotbepositionednexttoeverybayasin Fig. 1 (b),butitcan onlyreceiveatthefirstand/orlast bayofthe yard.Thatmeansthatifacontainersisretrieved,theentirecrane needstomovetotheendofyard.Inthefollowingexplanation,we assumeforsimplicityayardthatispositionedparalleltothequay butourmethodsalsoapply toayardthat isperpendicular tothe quay.
Incaseacontainerneedstoberelocatedtoanotherbay,the en-tireRMGCneedstomove.Comparedwithmovingonlythetrolley thisistime-consuming.Ontop ofthat,some terminalsforbidfor safetyreasonsacranetomovewhenitiscarryingacontainer(Lee & Hsu, 2007 ).Hence,intheSCRPPPitisassumedthatnocontainer isrelocatedtoadifferentbay.Consequently,theSCRPPPisa two-dimensionalproblem, similartoFig. 1 (b).TheheightoftheRMGC imposes a maximumheight toa stack of containersbecause the trolleyneeds to be ableto move withacontainer from oneside of the bay to the other. For instance, in Fig. 1 (b) the maximum heightofastack isthreecontainers.Ontop ofthat,thewidthof RMGCalsoimposesamaximumonthenumberofstacksinayard. Hence,thetotalnumberofcontainersthatcanbeplacedinabay islimited.Werefertotheavailablepositionsofcontainersasslots. ThebaygiveninFig. 1 (b)containstwelveslotsbecausethe maxi-mumnumberofstacksisfourthatallhaveamaximumheightof three.
In orderto havea good balance betweenthecurrent practice atcontainerterminalsandcomputationaltractabilityfive assump-tionsaremadefortheSCRPPP:
1.All containers in a bay will leave the bay before any new containersarrive.
2.Acontainermayonlybemovedintherelocationphaseifit isblockingthecontainerthatneedstoberetrieved. 3.For each container, the time interval in which it is picked
up is known,butthe retrievalorderinside an interval isa randomuniformpermutation.
4.The costofmoving acontainerfromonestacktotheother doesnotdependonthestacktowhichacontainerismoved. 5.It is physically possible to stack every container on every
othercontainer.
Assumption1isbasedonthefactthatmanyterminalshave desig-natedareasforinboundandoutboundcontainers.Moreover,when containersareunloadedfromaship,theyaremostlyallplacedin emptybays. Therefore,a bay withoutboundcontainerswill have no newcontainers arriving before it is empty.The problemthat ariseswhenthisassumptionisnotmadeiscalledthedynamic con-tainerrelocationproblem(Akyüz & Lee, 2014 ).
Tothebestofourknowledge,Assumption2isalwaysimposed ontheSCRP.Besidesthefactthatthisassumptionsignificantly de-creases the problem’s complexity, it also represents the current practiceatcontainer terminals(Caserta et al., 2012 ).In the deter-ministicCRP,Assumption2issometimesnotmadeandthe result-ingproblemiscalledtheunrestrictedCRP.WerefertoTanaka and Mizuno (2018) forarecentarticleabouttheunrestrictedCRP.
Assumption 3isinspired by thesituationinwhich aterminal hasatruckappointmentsystem(Ku & Arthanhari, 2016 ). Insuch asystem,trucks makean appointmenttopickupcontainersina certaintime intervaloralsocalledtimeframe. Theterminalthen knowswhichcontainerswillbepickedupinwhichinterval,butit doesnotknowwhichoneofthetrucksinoneintervalwillbethe firsttoarrive andpick upa container.Themomentatwhich the retrievalorderofanintervalisrevealedgivestwodifferentmodels. Inthefirstmodel,theorderoftheother containersinaninterval remainsunknown ifthe first containerof an intervalis revealed. Thismodel iscalled theonline model (see, e.g., Ku & Arthanhari, 2016 andZhao & Goodchild, 2010 ). Whereas, in the batchmodel, atthebeginning ofeachintervaltheexact orderofall containers inthat singleinterval isrevealed. The batch modelis more suit-ablefor larger terminalsin whichthe waitingtime ofa truck is oftenlargerthanthetimelengthoftheinterval(Galle et al., 2018 ). Asour problemsettingis moreapplicable to lessbusyports, we choosetousetheonlinemodel.
A consequence of Assumptions 2 and 3 is that it is easy to checkwhetheracontainer willbemovedintherelocationphase. Acontainer willonly be moved inthe relocationphase ifa con-tainerthat is positioned below it is retrieved earlier. If all time frames of containers below a container are larger than its own time frame, it will not need to be relocated. Otherwise, the ex-pectednumberofrelocationmovesofacontainerisalwayslarger than0.Wesaythatacontainerforwhichnorelocationmovesare needediswell-placedorcorrectlyplaced.
AnotherconsequenceofAssumption3isthatthenumberof re-locationmovesthat needtobe executedtoretrieveallcontainers isstochastic.Thevariabilityofthenumberofrelocation movesis morethanonemightexpectatfirstsight.Forexample,considera stackthatconsistsoutoftwocontainersfromthesametime inter-val.Ifthetopcontaineristhefirsttoberetrievedandthebottom containerthelast,norelocationmovesareneeded.Whereasifthe bottomcontaineristhefirsttoberetrieved,onerelocationmoveis neededforthetopcontainer.Hence,withprobability 1
2 no
reloca-tionmovesareneededandwithprobability 12onerelocationmove
isneededforthecontainersinthat interval.On topofthat, note that thefact that theretrievalorder ofcontainersinone specific intervalisstochasticdoesnotonlyinfluencetheexpectednumber of relocation movesneeded to retrieve the containers from that interval.Therelocation movesthat areperformedinone time in-tervalinfluencethelayoutofthebayafterthatintervalhasended. Because of Assumption 2, it is only allowed to move containers thatareontopofthetargetcontainer.Therefore,theretrieval or-derofthecontainersinsidean intervalhasabiginfluenceonthe order in which relocation movesare performed. Consequently, it mightbe that each retrieval orderof an interval resultsin a dif-ferentlayoutaftertheintervalisfinished.Asaresult,theretrieval orderofthefirstintervalmightinfluencethenumberofrelocation movesneededforthe last intervalandthus, thetotal numberof relocationmovescanvaryacrossawiderangeofvalues.
Assumption4isbasedonthefactthatthetimeneededtopick up and release a container with a trolley is considerably larger than the time needed to move the trolley. As a result, the stack towhichacontainerisrelocateddoesnothaveabiginfluenceon thetotalrelocationtimeofacontainer.Thereareafewarticlesin theliterature inwhichAssumption4isrelaxedandinwhichthe objectiveistominimize aweightedaverageofthenumberof re-location movesandthetotal workingtime ofthecrane(see, e.g., Lin, Lee, & Lee, 2015 andda Silva Firmino, de Abreu Silva, & Times, 2019 ).Inarecentstudy,Voß and Schwarze (2019) showthatifthe crane’sworkingtimeistheobjectivethatisminimized, thenalso thenumberofrelocation movesisclosetotheminimumnumber ofrelocationmoves.AconsequenceofAssumption4isthatthe or-derofthestacksisnotrelevantandanypermutationofthestacks canbetreatedasifitwerethesameinstance.
Another consequence of Assumption 4 is that only the num-ber of moves is relevant in a solution. In the SCRPPP there are two differenttypesofmoves: movesinthe pre-processingphase andmovesintherelocation phase.Weareinterestedin minimiz-ing a weightedaverage of thesetwo types ofmoves. The moves in the pre-processingphase are executed when the crane would otherwisebeidle, whereasduringtherelocation movesatruckis waiting. Therefore, the weight assigned to pre-processing moves islower than theweight forrelocationmoves. We normalizethe weight for relocation moves to 1 and set the weight for pre-processingmoves to 0<
α
<1.The value ofα
canbe seenas an indicationof howinclined someoneis toperform pre-processing moves. If, for instance,α
isset to 14, then one is willing to
per-format mostfour pre-processingmoves inorder to prevent one relocationmove.
Sincecontainershave differentsizes,Assumption5 isnot evi-dentforgeneralcontainersbecauseacontaineroffortyfeetcannot be stacked on top of asingle container oftwenty feet. However, Assumption5isanassumptionthatisnotrestrictingfroma practi-calperspectivebecausemostterminalslocatecontainerswith dif-ferentsizesindifferentbays.Moreover,incasetherewouldbe cer-taincontainersonwhichwe cannotstackacontainer,theSCRPPP iseasier:whenwe needtodetermine towhichstacka container ismoved, we couldsimply ignorethe stacksin whichwe cannot stackthecontainer.
AftertheassumptionsfortheSCRPPP,wewillnowgivethe for-malobjectiveofthe SCRPPP.Letuscalltheinitial bay beforethe pre-processingphase B.Wecan denotethe movementofthe top containerfromstackotostackdasthepair(o,d).Ifpisthe num-berofpre-processingmovesexecuted,thesetofallpre-processing movescanbedenotedby:P=
{
(
o1,d1)
,(
o2,d2)
,...,(
op,dp)
}
.The bay thatisobtainedbythepre-processingmovesP willbecalledB(P).Assumethattherearendifferentretrievalordersofthe con-tainers andlet
σ
i be one ofthose orders.If ina bay Bthe relo-cationmovesareperformedaccordingto acertainpolicyπ
,then thenumberofrelocationmovesfortheretrievalorderσ
iisgiven Pleasecitethisarticleas:B.G.Zweers,S.BhulaiandR.D.vanderMei,Optimizingpre-processingandrelocationmovesintheStochasticB.G. Zweers, S. Bhulai and R.D. van der Mei / European Journal of Operational Research xxx (xxxx) xxx 5
Fig. 2. Example of an instance for the SCRPPP with 5 stacks that have a maximum height of 4.
by Rπ(B,
σ
i). A policyπ
can be anyrule that decides, giventhe complete bay and a target container to which container a stack needs to berelocated. Thegoal oftheSCRPPP isto findthe pre-processingmovesP andthepolicyπ
suchthattheweightedsum ofthenumberofpre-processingmovesandtheexpectednumber of relocation moves is minimized. In other words,the goal is to findthefollowingminimum:min P,π
α|
P|
+ 1 n n i=1 R π(
B(
P)
,σ
i)
. (1)The part
α
|P| in Eq. (1) is equivalent to the costs for the pre-processing moves. Since Rπ(B,σ
i) is the number of relocation movesforonespecificretrievalorderσ
i,theexpectednumberof relocationmovesiscalculatedvia 1nni=1Rπ(
B(
P)
,σ
i)
.Atfirstsight one might think that it is beneficial to perform that many pre-processing movessuch that no relocation movesare needed be-cause pre-processingmoves havea lower weight than relocation moves.However,relocationmoveshavetwoadvantagescompared topre-processingmoves.Thefirstadvantageisthatduringthe pre-processingphase all originalcontainersare still inthebay,while whenarelocationmoveisexecuted somecontainershavealready left the bay. The second advantage of a relocation move is that whenthecontainerneedstoberelocatedatleastsomepartofthe retrievalorderinsideanintervalisknown.Onthecontrary,when apre-processingmoveisdone,noinformationabouttheretrieval orderinsideanintervalisknown.If
α
iscloseto1,thetwobenefitsoftherelocationmoves out-performtheadvantage ofthepre-processingmoveswhichhavea slightly smaller weight. Hence, no pre-processing moves will be performed andthe problemis similar to the SCRP. On the other hand,ifα
iscloseto 0asmanypre-processingmovesasneeded will be performed in order to prevent any relocation move and the problemis equivalentto the CPMP.However, for more mod-eratevaluesofα
itishardtofindtherightbalancebetween pre-processingmovesandrelocationmoves.Runningexample
Throughoutthispaper,anexamplewillbeusedtoillustratethe SCRPPP anditssolution methods.Thisinstanceforthe SCRPPPis giveninFig. 2 andtheviewpointinthisfigure isthesame asin Fig. 1 (b).ThebayinFig. 1 consistsoutoffivestacksthatallhavea maximumheightoffourcontainers.Thenumbersinsideeach con-tainer represent the interval in which the container is retrieved. Wewillnumberthestacksfromlefttoright,sotheleftmoststack isstacknumber1andtherightmost stackisstacknumber5. As-sumeforthemomentthatnopre-processingmovesareperformed.
Table 1
Notation for the SCRPPP.
B Specific layout of a bay S Set of all stacks in a bay
B ( s 1 , s 2 ) Layout of bay B after the top container of stack s 1 has moved to stack s 2
Z Largest time frame in a bay H Maximum height of a stack C Set of containers in a bay C Number of containers in a bay n ( s ) Number of containers in stack s l ( s ) Smallest time frame of stack s h ( s ) Largest time frame of stack s s ( c ) Stack of container c
u ( c ) Smallest time frame of containers underneath c t ( c ) Time frame of container c
q ( c ) Category of container c
p ( c ) Position of a container c in stack s ( c ) 1 is the lowest and H the highest position UB Upper bound for the optimal solution LB Lower bound for the optimal solution
f ( B ) Estimated of expected number of relocation moves in bay B
Thenoneofthethreecontainerswithtimeframe1isthefirst con-tainerto beretrieved. Ifthetop container ofthe middlestack is thefirstcontainertoberetrieved,norelocationmovesareneeded becausenoothercontainersareontopofit.However,thebottom containerofthesecondstackisblockedbythecontainerwithtime frame 5.So ifthiscontainer isthe first tobe retrieved, the con-tainerwith time interval 5 has to be relocated to another stack. Ifonewouldusetheoptimalpolicyfortherelocationmoves, the expectednumberofrelocationmovesforthebayinFig. 2 is61
3.
Let us now consider a situation in which we perform four pre-processing moves to the bay in Fig. 2 , namely P=
{
(
4,1)
,(
4,5)
,(
4,1)
,(
2,1)
}
.InFig. 3 ,the baysafterall thesefour pre-processingmovesare shown. The idea of thefirst three pre-processing moves is to empty the fourth stack such that in the fourthpre-processingmovethecontainer withtimeframe5from thesecondstackcan beplacedinthefourthstack.Notethatthis containerwithtimeinterval5wasnotplacedcorrectlyinstack2, butthatitiswell-placedinthefourthstack.Ifweapplythe opti-malpolicyfortherelocationmovestothebayinFig. 3 (d),the ex-pectednumberofrelocationmovesis3.Hence,theobjective func-tionforthebay inFig. 2 towhichweapplypre-processingmovesP=
{
(
4,1)
,(
4,5)
,(
4,1)
,(
2,1)
}
and the optimal relocation policy is 4α
+3. As the objective function when no relocation moves wereperformedequals 613,themovesP arebeneficial aslongasα
≤3134 = 56.
4. Boundsandcomplexity
In this section, we present bounds regarding the maximum number of containers in a bay and the optimal solution. How-ever, first ofall, we will show in Section 4.1 that the SCRPPP is NP-hard. In Section 4.2 , we will give a bound on the maximum numberofcontainersthat canbe ina bay forafeasible solution oftheSCRPPP.Moreover,itis shownwhen itispossibleto move acontainerinthecorrectpositioninthepre-processingphase.In Section 4.3 ,anupperboundfortheoptimalsolutionoftheSCRPPP isgivenandalower boundfortheoptimalsolutionisderived in Section 4.4 . Throughout this paper, we will need some notation whichisintroducedinTable 1 .
4.1. Complexity
InCaserta et al. (2012) ,theCRPisproventobeNP-hard.Inthis proof,thedecisionproblemofMutualExclusionScheduling(MES)is reducedtoan instanceofthedecisionversion oftheCRP.Solving Pleasecitethisarticleas:B.G.Zweers,S.BhulaiandR.D.vanderMei,Optimizingpre-processingandrelocationmovesintheStochastic
Fig. 3. Four pre-processing moves for the bay of Fig. 2 .
that instance is shown to be equivalent to a yes-instance of the MESby Caserta et al. (2012) .Thatspecific instanceis alsoan in-stancefortheSCRPPPanditistrivialtoshowthatitcanbesolved inn pre-processingmovesandnorelocation movesifandonlyif itcorrespondstoayes-instanceoftheMES.Hence,decidingifthe objectivefunctionoftheSCRPPPequals
α
nisequivalenttofinding ayes-instancesoftheMES.Therefore,theSCRPPPisalsoNP-hard.4.2.Feasibility
Ifallstacksinabay containthemaximumnumberof contain-ers,it islikelythat theSCRPPPdoesnot haveafeasible solution. Sincenopre-processingmovesarepossibleandifrelocationmoves areneededtoretrievethefirstcontainer, thentherearenoempty slotsforthecontainersthatneedtoberelocated.InLemma 1 ,we givea boundonthemaximumnumberofcontainersthat canbe inabayinorderfortheSCRPPPtohaveafeasiblesolution. Lemma 1. If the number of containers C is bounded by C≤ SH−
(
H− 1)
,thenthereexistsafeasiblesolutionfortheSCRPPP.The proof of Lemma 1 follows directly from the condition in Caserta et al. (2012) thatthe numberofcontainersinabay does not exceed SH−
(
H− 1)
is sufficient for feasibility of the CRP. The stochasticity of the SCRPdoes not influence this bound and sincenotperforming anypre-processingmovesisfeasible forthe SCRPPP,thisboundalsoappliesfortheSCRPPP.The bound given in Lemma 1 only considers the moves exe-cutedin therelocation phase. However, ifthere are SH−
(
H− 1)
containersinabay,itmightnotbepossibletomoveacontainerin thepre-processingphasesuch that itbecomeswell-placed.Asan example,considerabayinwhichallstacksbutone havereached their maximum height and the other stack contains only a sin-glecontainer.Inthisbay,exactlySH−(
H− 1)
containersare situ-ated.Ifoneofthecompletelyfilledstackshasacontainerwiththe largesttimeframeZasitstopcontainer,anemptystackisneeded beforethiscontainercanbewell-placed.Thereasonforthatisthat this container withtime frame Z can only be well-placedat the bottomofastack.SincethereareonlyH− 1freeslotsinthebay, itisimpossibletogetanemptystackandcorrectlyplacethe con-tainerwithtimeframeZ.However,ifwehaveHavailableslotsin abay,itispossibletoplaceanycontainertothebottomofastack asisshowninLemma 2 .Lemma2. IfthereareHemptyslotsinabayBwithS>2stacks, it ispossibletomoveeverycontainertothebottomofeachstackinthe pre-processingphase.
This lemma holds because if there are H free slots, it is al-wayspossibletoarrangethecontainersinsuchawayinthe pre-processing phase that one stack is entirely empty. Moreover, if therearemorethantwostacks,wecanmakesurethatcontainerc
isthetopcontainerofastack.Sincewehaveshownabovethatit mightnotbepossibletomoveacontainertothebottomofastack Pleasecitethisarticleas:B.G.Zweers,S.BhulaiandR.D.vanderMei,Optimizingpre-processingandrelocationmovesintheStochastic
B.G. Zweers, S. Bhulai and R.D. van der Mei / European Journal of Operational Research xxx (xxxx) xxx 7 ifthereareH− 1freeslotsinabay,weknowthattheboundgiven
inLemma 2 hastobetight.AconsequenceofLemma 2 isthat if the numberofcontainers ina bay withmore thantwo stacksis limitedby
(
S− 1)
H,theneachcontainercanbecomewell-placed. Corollary 1. If a bay Bwith S>2 stackshas atmostC≤(
S− 1)
H containers, every container could be moved in the pre-processing phasesuchthatitbecomeswell-placed.Proof. By Lemma 2 we know that there is always an option to placeacontaineratthebottomofastackifthereareHfreeslots inabay withmorethantwostacks.Sincea containeratthe bot-tomofastackisalwayswell-placed,weknowthateachcontainer can become well-placedifthe numberoffree slots isat leastH. If the number of containersin a bay is bounded from above by
(
S− 1)
H,thenumberoffreeslotsshouldbeatleastH.InLemma 2 ,wehaveshownthattherealways existsafeasible solution to move a container from one stack s to the bottom of anotherstacksifthereareHfreeslotsinthebay.However,under that condition, one might need to move containersfrom a third stacks.Intheheuristicwe give inSection 5.1 ,wewouldliketo move acontainer inthepre-processingphasefromastack stoa correctpositioninstacks withoutmoving containersfromother stacks.InLemma 3 andCorollary 2 ,weprovethatthatispossible ifthereare2
(
H− 1)
freeslots.Lemma 3. If a bay B has 2
(
H− 1)
empty slots, each container in stacks∈S canbemovedin thepre-processingphase to thebottom of stacks∈S withoutmovingcontainers fromthestacksS\
(
{
s}
∪{
s}
)
.Proof. Letcontainerc be thecontainerthat ismoved inthe pre-processingphase such that it isplaced atthebottom ofstack s. As a result of Assumption 4, we can reshuffle the stacks in any orderwithoutadjustingtheproblem.Thus,ifcontainercisalready placed atthe bottom of a stack, then we can shuffle the stacks such that container c isplaced atthe bottom ofanyother stack. Hence, without loss of generality, we assume that container c is notyetplacedatthebottomofastack.
Wedistinguish twocases:(i) thesituationinwhichtheorigin anddestinationstackssands aredifferent,and(ii)thesituation in which they are the same. In the first case, we need to have available slots forall containersinthe destination stacks which are atmostHcontainers.Moreover, atmostH− 2containersare placedontopofcontainerc.Hence,atmostH− 2slotsshouldbe availableforcontainersfromthestacks.Therefore,thetotal num-beroffreeslotsneededtomovecontainercfromtheoriginstack tothedestinationstackisH+H− 2=2
(
H− 1)
.In the second scenario, in which the origin and the destina-tion stack are the same, the reasoning is slightly different. It is important torealize thatwe need to store container c temporar-ily in another stack and that no other containers from the ori-gin stack might be placed on top of container c because other-wiseitcannotbeplacedagainintheoriginstack.Hence,weneed at least two stackswith available slots. Since container c should block thesmallest numberofemptyslots aspossibleit isplaced on the stack that already consistsof themost containers.Let us denotethe stackinwhichcontainer cistemporarilystoredby s
andlet p(c)be the positionofcontainer c in stacks.After con-tainerc isplacedinstacks we cannotusestacks anymore for theothercontainers.Thenumberofavailable slotsthatcannotbe usedinstacksequalsH− p
(
c)
.Hence,accordingtothecondition of this lemma, there should be at least 2(
H− 1)
−(
H− p(
c))
=H+p
(
c)
− 2slots available for the other containersin the origin stack.Sincep(c) isbydefinitionatleast1,thereareatleastH− 1 slotsavailableforothercontainersandtheycanthusbe placedinotherstacksthanstacks.Afterward,containerc canbeplacedat thebottomoftheoriginstack.
Note that in Lemma 3 we do not impose the condition that there are more than two stacksbecause this lemma also holdif the number of stacks is one or two. If there is only one stack, all2
(
H− 1)
freeslotsshould beinthatsinglestack.The inequal-ity2(
H− 1)
≤ H onlyholdsforthetrivialbayinwhichH=1and thereisonlyonecontainer, orH=2andtherearenocontainers. Incasetherearetwo stacks,therecanbe atmosttwocontainers inthebayifthenumberoffreeslotsisatleast2(
H− 1)
.Withtwo containers,bothcontainerscanbeplacedatthebottomofastack, sothelemmaalsoholds.The bound givenin Lemma 3 istight. Tosee that, consider a bay with three stacks, in which one has a height H, the second hasaheight2andthethirdstackcontainsonlyasinglecontainer. ThenumberoffreeslotsinthisbayequalsH− 2+H− 1=2
(
H− 1)
+1.Inorder toplacethe topcontainer ofthe second stackin thethirdstack,thethirdstackneedstobeempty.However,there isno place forthecontainer of the thirdstack inthe first stack. Furthermore,it isalso notpossible to move thetop container of the second stack at the bottom of the second stack. We could movethetopcontainer ofthesecondstacktothethirdstack,but then the bottom container of the second stackshas no stack in whichitcanbeplaced.TheminimumnumberofavailableslotsgivenbyLemma 3 can be used to get a bound on the maximum number of containers thatcan be inabay such that every containercan become well-placedinastackwithoutmovingcontainersfromathirdstack.In Corollary 2 ,wederivea boundonthisnumberofcontainers.The proofofthiscorollaryissimilartotheproofofCorollary 1 . Corollary2. If thenumber ofcontainers Cis boundedbyC≤ SH− 2
(
H− 1)
, then every containercould be movedfrom stacks∈S in the pre-processing phase to stack s∈S such thatit is well-placed withoutmovingcontainersfromstacksS\
(
{
s}
∪{
s}
)
.4.3.Upperbound
Itisnot hardto findanupperbound fortheoptimalsolution becauseanyfeasiblesetofpre-processingmovesP andpolicyfor relocationmoves
π
isa feasiblesolutionfortheSCRPPPandthus an upper bound for the optimal solution. In caseP=∅, no pre-processingmovesareperformedandallmoveswillbedoneinthe relocation phase. Hence, underthis strategy the SCRPPP will get thesamesolutionastheSCRP.Anotherstrategy couldbe tocontinuewiththepre-processing phaseaslongastherearecontainersthatarenotcorrectlyplaced, whichisequivalenttotheCPMP.Inthelattersituation,oneneeds tomake theassumptionthat thenumberof containersinatime intervalisalwayslessthanthenumberofstacks.Otherwise,there willalways be two containerswiththe sametime interval being stackedontopofeachother,whichresultsinanexpectednumber ofrelocationmovesofatleast 12.
Forlargevaluesof
α
,notperforminganypre-processingmoves isarathergoodstrategy,whileforvaluesofα
closeto0usingthe algorithmsfortheCPMPresultsingoodsolutions.Anupperbound fortheoptimalsolutionoftheSCRPPPistheminimumvalueofthe objective function under these two strategies. This upper bound canbe usedasa benchmarktoevaluate thebenefitsofthe com-binationofa pre-processingandarelocation phase.Furthermore, itcanalsobeusedtogetthemaximumnumberofpre-processing movesintheoptimalsolutionaswewillseeinLemma 4 . Lemma4. The maximumnumber ofpre-processing moves pin the optimalsolutionisboundedbyp≤UBα
.This lemma follows directly from the fact that performing p
pre-processingmovesyields an objective function ofat leastp
α
. Wewillneedthismaximumnumberofpre-processingmovesfor thebranchandboundalgorithmdescribedinSection 5.3 below.4.4.Lowerbound
Besidesagoodupperbound,alsoatightlowerboundisneeded for the branch-and-bound algorithm that will be discussed in Section 5.3 . Finding a good lower bound forthe SCRPPP is more complicatedthan theupper boundofthe previous section.There aremultiple lower boundsknown forthe (S)CRP, (see, e.g.,Galle et al., 2018 andScholl, Boywitz, & Boysen, 2018 ).Onelowerbound fortheCRPistocounthowmanycontainershaveacontainerwith alowertimeframeunderneaththem.Thesecontainersneedtobe relocatedatleastonceandall othercontainer willneverbe relo-cated.Hence,alowerboundfortheCRPforbayBis:
LB CRP
(
B)
=
c∈C
1t(c) <u(c) .
The lower bound for the SCRP from (Galle et al., 2018 ) is simi-larbut alsotakes into account the fact that two containers ina stackmight have thesame time frame. In thislower bound, the probabilitythatacontainerisblockinganothercontaineris calcu-lated.If foracontainer c holds that t(c)<u(c), then itwill never berelocatedandift(c)>u(c) theprobabilityofarelocation move is1.Ift
(
c)
=u(
c)
,itisslightlymorecomplextocalculatethe de-siredprobability. Toderive that probability,let usdefine m(c) as follows:m
(
c)
: =|{
c ∈ C : s(
c)
= s(
c)
∧ p(
c)
> p(
c)
∧ u(
c)
= t(
c)
= t
(
c)
}|
. (2)Thenumberm(c)representsthenumberofcontainersthatare lo-catedunderneathcontainer candthat havethesametimeframe. Theonlypossibilitythatcontainercdoesnothavetoberelocated, iswhenitisretrievedbeforeanyofthem(c)containers.This sce-nariooccurs with probability m(c1)+1. Hence, the probability that containercdoesneedtoberelocatedis1− 1
m(c)+1 =mm(c()c+1) .
Com-biningthisexpressionwiththelowerboundfortheCRPthelower bound for the SCRP of Galle et al. (2018) , LBSCRP(B), is formally givenby: LB SCRP
(
B)
= c∈C 1t(c) <u(c) + m(
c)
m(
c)
+ 1 . (3)Fromthislower boundfortheSCRP,wecan deriveatriviallower boundfortheSCRPPP.Thecontainercneedstobemovedatleast 1t(c) <u(c) +mm(c()c+1) times. Ideally, this move is done in the
pre-processingphaseatacostof
α
,thusalowerboundfortheSCRPPP isα
LBSCRP(B).Thebay inFig. 4 willbe usedtoillustratethelowerboundfor theSCRPPP.Inthisbay,allbuttwocontainershaveonlycontainers with a larger time frame underneath them. The two containers thathaveapositivenumberofrelocationmovesarethecontainers withtimeframe 3 inthe firststack andthecontainer withtime frame 2 in stack 1that is located on top of the other container withtime frame 2.The probability that the container withtime frame 3 is relocated is 1 and the probability that the container withtime frame 2 is relocated is 12. Therefore, the lower bound ofEq. (3) for this bay is 11
2, so the trivial lower bound for the
SCRPPPwouldbe11 2
α
.One extra insighthelps usto geta tighter lower bound than
α
LBSCRP(B): it is only possible to move a container in the pre-processingphase ifall thecontainersontop ofit arealsomoved inthepre-processingphase.Ifonlyasinglecontainercis consid-ered,thelowerboundforthenumberofmovesforthatcontainerFig. 4. Example of a bay layout to illustrate the lower bound.
cisgivenby: min
1t(c) <u(c) + m m(
c(
)
c+)
1 ,α
(
n(
s(
c))
− p(
c)
+ 1)
. (4)The first part of the minimum is the expected number of relo-cationmovesifthe container isnot moved inthepre-processing phaseandisthesameasinEq. (3) .The secondpartofthe mini-mumisthecostassociatedwithmovingthecontainer inthe pre-processing phase. The height of the stack in which container c
is positioned isgiven by n(s(c)).As p(c) indicates the position of container cin stacks(c),intotal n
(
s(
c))
− p(
c)
+1containersare moved if container c is moved inthe pre-processing phase. It is not possible to sum the expression in Eq. (4) over all contain-ersbecause ifthere are multiple containersin a stack forwhichα
(
n(
s(
c))
− p(
c)
+1)
≤ 1t(c) <u(c) +mm(c()c+1) the pre-processingmoveofthetop containerofastackiscountedtwice.Nevertheless,ifa stackisconsideredfromthetoptothebottom,Eq. (4) canbeused to obtain a lower bound for an entire bay. In Algorithm 1 , it is shownindetailhowthislowerboundisconstructed.
Algorithm 1 consistsoftwomainfor-loops.Inthefirstfor-loop, foreachcontainertheprobability thatitisrelocatediscalculated in the same way asin Eq. (3) .In the second for-loop, for every container the current lower bound for that container and all of thecontainersontopofitiscalculated.Ifthesumoftheselower boundsislargerthan
α
timesthenumberofcontainersunder con-sideration,pre-processingallthesecontainersisbeneficial.Hence, foreach ofthese containersthe lower bound is set toα
. Other-wise,itisnotbeneficialtoperformanypre-processingmovesand thelowerboundremainsthesame.Asanexample,consideragainthebayasgiveninFig. 4 .In or-dertomoveanycontainerfromthefirststack,thecontainerwith timeframe1ontopofthatstackalsoneedstoberelocated.Thus, ifwewouldliketorelocatethecontainer withtimeframe3from thatstackinthepre-processingphase,atleasttwopre-processing movesareneeded.Sincethesetwopre-processingmovesareonly resultinginonerelocationmovesless,itisonlybeneficialif
α
≤12.
So the lower bound produced by Algorithm 1 for the bay from Fig. 4 is 3
α
ifα
≤12 and112 if
α
≥12. Wewill closethis sectionwithLemma 5 thatshowsthat the lower boundthat is givenby Algorithm 1 istight.
Lemma5. Thelower bound forthe optimalsolution of theSCRPPP givenbyAlgorithm1istight.
Proof. The example in Fig. 4 can be used to prove this lemma. As stated previously, the lower bound for 0<
α
≤12 forthis
in-stance is 3
α
andfor 12≤α
<1 it is112. It can be easily verified Pleasecitethisarticleas:B.G.Zweers,S.BhulaiandR.D.vanderMei,Optimizingpre-processingandrelocationmovesintheStochasticB.G. Zweers, S. Bhulai and R.D. van der Mei / European Journal of Operational Research xxx (xxxx) xxx 9 Algorithm1:LowerboundfortheSCRPPP.
Input:BayBand0<
α
<1. forc∈C do ift(
c)
>u(
c)
then lb(
c)
=1. else ift(
c)
=u(
c)
then lb(
c)
= m(c) m(c)+1. else lb(
c)
=0. end end end fors∈S do fort=0:n(
s)
− 1do g1(
t)
:=c:s(c)=s∧p(c) ≥n(s) −tlb(
c)
. g2(
t)
:=(
n(
s)
− t+1)
α
. ifg2(
t)
<g1(
t)
then forc∈C:s(
c)
=s∧p(
c)
≥ n(
s)
− tdo lb(
c)
=α
. end end end end Output:LB=c∈Clb(
c)
.that the expected number of relocation moves for the bay in Fig. 4 is 112, thus if one decides to perform no pre-processing moves, thentheobjectivefunctionfortheSCRPPPisalso11
2.
An-other solution could be to perform the following pre-processing moves: P=
{
(
1,2)
,(
1,3)
,(
1,3)
}
. After thesethree pre-processing moves,norelocationmovesareneededandthevalueofthe objec-tivefunctionoftheSCRPPPis3α
.Hence,ifweapplythefirst strat-egyfor 12≤
α
<1andthesecondstrategyforvaluesof0<α
<12,the objective function for the SCRPPP is the same as the lower bound.
5. Solutionmethods
Inthissection,wepresentbothaheuristicmethodandan op-timal branch-and-bound algorithm for the SCRPPP. As shown in Section 4.1 ,theSCRPPPisNP-hard,thus weexpectthat forlarger instancesthebranch-and-boundalgorithmcannotproducean opti-malsolutioninreasonabletime.Therefore,thelocalsearch heuris-ticisneededtoproducesolutionsforlarge-sizedinstances. More-over, thebranch-and-boundalgorithmneedsa goodupperbound fortheoptimalsolutioninordertorunefficientlyandthesolution oftheheuristicisagoodupperboundfortheoptimalsolution.
InSection 5.1 ,wewilldescribealocalsearchheuristictosolve theSCRPPP.Thisheuristicneeds,asasubroutine,afastmethodto get an estimate fortheexpectednumberof relocation movesfor a given bay. In Section 5.2 , we will describe the method that is used to get such an estimation.Finally, an optimal algorithm for theSCRPPPisgiveninSection 5.3 .
5.1. Localsearchheuristic
Inthissection,wewilldescribealocalsearchmethodtosolve theSCRPPP.Ourmainfocusisonthepre-processingphasebecause inGalle et al. (2018) itisshownthat theExpectedMinmax (EM) heuristicproducesfastandgoodsolutionsfortheSCRP.Therefore, wewillusethatheuristicfortherelocationphase.InSection 5.1.1 , we firstgive ageneraloverviewofthelocalsearch heuristic.The heuristicisdescribedinmoredetailinSection 5.1.2 .
5.1.1. Generaloverview
Thegeneralideaofthelocalsearchheuristicistocheckfor ev-erycontainerthatisnotcorrectlyplacedifthereisastacktomove that container to such that the container is correctlyplaced and theobjectivefunctionimproves.Wecallthiscontainerthe investi-gatedcontainer.SimilartotheLPFheuristicfortheCPMP,westart withinvestigatingthemovementofthecontainerswiththe high-esttime frame.Thesecontainersare themostdifficultcontainers toplacecorrectlybecause theycan onlybe placedatthe bottom ofa stack.Letuscall thestack towhich we tryto move the in-vestigated container, the destination stack. We try every stack as possibledestinationstackandifthereisastackthatyieldsan im-provement,then theinvestigatedcontainer ismoved tothe stack that givesthe largest improvement.If fornoneof thestacks the movementoftheinvestigatedcontainersgivesanimprovementin theobjectivefunction,thenthenextcontainerisconsidered.
Fortheinvestigatedcontainertobeplacedcorrectlyinthe des-tinationstack,twotypesofcontainersneedtobemovedtoother stacks.First ofall, theinvestigatedcontainer mightnot be atthe topofa stack,so thecontainersabove theinvestigatedcontainer need to be moved to other stacks. Furthermore,to place the in-vestigatedcontainercorrectlyinthedestinationstack,itmightbe neededto remove containersfromthat destination stack. Ideally, wewouldliketoplacebothtypesofcontainersinastackinwhich allcontainersare correctlyplaced andinwhichitself isalso cor-rectlyplaced.Inthatcase,itislikelythatwedonotneedtomove thecontainerasecondtime.Ifsuchastackdoesnotexist,the con-tainerisplacedinastackinwhichtheminimumtimeframeisas lowaspossible.Thatdecisionisbasedonthefactthatinthisstack thefewestcontainerscanbecorrectlyplaced.
5.1.2. Detaileddescription
Inthissection, we give a moredetaileddescription ofthe lo-cal search heuristic. The structure ofthe local search is given in Fig. 5 . Algorithm 2 is the main algorithm and in this algorithm, itisdecided whichcontainer istheinvestigatedcontainer andto
Algorithm2: Localsearch heuristic forpre-processingphase oftheSCRPPP.
Input: BayBand0<
α
<1. Initializepre-processingmovesP=∅. for p=Z,Z− 1,...,1doAp=
{
c∈C:t(
c)
=p}
for i=1,...,
|
Ap|
doSelectrandomlyacontainercwithtimeframe pthat isnotplacedcorrectly,
UseAlgorithm5toget f
(
B)
. fors∈S doMovecontainerctostacksaccordingtoAlgorithms 3and4.
Letm
(
s)
bethenumberofperformed pre-processingmovesandBstheresultingbay. UseAlgorithm5toestimate f(
Bs)
.I
(
s)
= f(
B)
−(
α
m(
s)
+f(
Bs))
.end
ifmaxs∈S
{
I(
s)
}
>0thenPlacecontainercinstacks=argmaxs∈S
{
I(
s)
}
.Addtherespectivelypre-processingmovestoPThe resultingbayisthenewbayB.
end
Ap=Ap
\
{
c}
.end end
Output: Setofpre-processingmovesP.
Select largest unexplored time frame
Pre-processing phase Algorithm 2 Algorithm 5 Different stack Algorithm 3 Same stack Algorithm 4
Algorithm 5 Perform best improvement move
While unexplored containers Bay
0 1
Relocation phase EM heuristic
Fig. 5. Structure of the local search heuristic for the SCRPPP.
whichstackitshouldbemoved.InAlgorithms 3 and4 ,itis de-cidedhow all containersshould be moved such that the investi-gatedcontainercanbeplaced inthedestinationstack.The differ-encebetweenAlgorithms 3 and4 isthatAlgorithm 3 isusedifthe destinationstackis differentfromthestackinwhich the investi-gatedcontainerislocatedandAlgorithm 4 ifthesetwostacksare thesame.
In Algorithm 2 , the containers are considered in decreasing order of their time frame. If there are multiple containers with the same time frame, a random container is selected. We use Algorithm 5 to get an estimate for the number of relocation movesinabay(f(B)).WeuseAlgorithm 3 and4 tomovethe con-tainertoanotherstack.After that,Algorithm 5 isrunagaintoget an estimate for the numberof relocation moves in thenew bay andwiththattheimprovementintheobjectivefunction(I(s))can becalculated. Ifthenumberofcontainers inabay is fewerthan orequaltoSH− 2
(
H− 1)
,weknowbyCorollary 2 thatevery con-tainercan beplaced in every stackusing Algorithms 3 and4 . In casethere are more than SH− 2(
H− 1)
containersin the bay, it might be infeasible to place a container in a certain stack. If a move is infeasible, the improvement is set to −∞. If there is a stack that gives a strictly positive improvement,the container is movedtothestackthatgivesthebestimprovement.The way that a container is moved to a given stack is de-scribedinAlgorithms 3 and4 .Algorithm 3 isusedtomovea con-tainertoadifferentstackthanthatitiscurrentlylocated,whereas Algorithm 4 is used when the container needs to be positioned ina correctpositioninits currentstack.InAlgorithm 3 ,we need tomovethree differenttypesofcontainers.The firsttype is con-tainercitselfthatneedstomovetoitsdestinationstack.However, itisonlypossibletoaccesscontainerc ifwehavemoved theset ofcontainers that are stacked on top of container c. We denote thissecond setby Oc.Finally, container c needs tobe positioned instackssuchthatitdoesnotneedtoberelocated.Allcontainers thatneedtoberemovedsuch thatcontainerc canbeplaced cor-rectlyinstacksareinthesetMc.Beforecontainerccanbemoved, the containers in Oc and Mc need to be moved to a different
Algorithm3:Pre-processing movestomovecontainer c toa correctpositioninstacks=s(c).
Input: BayBwithSstacks,containerc,stacks,0<
α
<1, 1≤λ
1≤ Sand1≤λ
2≤ S.P=∅.
Oc=
{
c∈C:s(
c)
=s(
c)
∧p(
c)
>p(
c)
}
. Mc={
c∈C:s(
c)
=s∧u(
c)
<t(
c)
}
.whileOc∪Mc=∅do
Letoandmbethetopcontainerof,respectively,thesets
Oc andMc. ift
(
m)
≥ t(
o)
then c=m. Mc=Mc\
{
c}
. p1=s. else c=o. Oc=Oc\
{
c}
. p1=s(
c)
. endifThereexistsastacks∈S
\
(
{
s(
c)
}
∪{
s}
)
forwhich n(
s)
<Handl(
s)
>t(
c)
and f(
B,s)
≤α
thenForallstackss∈S
\
(
{
s}
∪{
s(
c)
}
withn(
s)
<Handf
(
B,s)
≤α
,selectrandomlyastacksoutoftheat mostλ
1stackswiththesmallestvaluesforl(
s)
>t.else
Forallstackss∈S
\
(
{
s}
∪{
s(
c)
}
)
withn(
s)
<H,selectrandomlyastacksoutoftheatmost
λ
2stackswiththesmallestvaluesforl
(
s)
. endRelocatecontainerctostacks.
P=P∪
{
(
p1,s)
}
.end
P=P∪
{
(
s(
c)
,s)
}
.Output:Pre-processingmovesPandbayB.