• No results found

param SensorID: integer, Front: boolean

var numItem : integer var time_ : time var n,m : integer

var item_obj, item_class, item : object numItem := orderinStation.sum({1,1}..{*,1}) time_ := numItem * 0:02.0000 //packing time // move item to the station

for n:= BufferOrder.numMu downto 1 item_obj := BufferOrder.MU(n) item_class := item_obj.class for m:= 1 to orderinStation.xdim

if orderinStation[m,1] = 1

track651.startPause(time_)

A.7. ChoicePod method (for Kiva system)

param SensorID: integer, Front: boolean .models.frame.pod_item.deleteContents .models.frame.sumItem_bj.deletecontents .models.frame.batchItem.deletecontents .models.frame.testPodContent.deletecontents

.models.frame.nowpodcontent.copyrangeTo({0,0}..{*,*},testpodContent,0,0)

105

if orderass1.empty = true and orderass2.empty = true and orderass3.empty = true podlist[numpodList] := void

-- when the order are finished end

if orderass1.empty = false or orderass2.empty = false or orderass3.empty = false -- find the table indexes pod_item

for b:=1 to orderass1.dim

-- find the contents of the table pod_item for n:=1 to testPodContent.xdim

-- define the table sumitem_bj for n:=1 to pod_Item.xdim

-- unavable shelves are excluded numpodlist -= 3

106

-- know the amount of goods that each pod can give to the order, I have to see if there is a pod that can complete the order

if maxi = orderass1.dim and orderass1.empty = false for row:= 1 to distance.ydim

if distance[0,row] = pod_str

-- if it's true that pod completes the order

-- if I find a result, that pod is put in the list of pods to be taken podlist[numpodlist]:= choise_pod

choise_pod_string := obj_to_str(choise_pod)

-- found the pod, but this can also contain items that serve other orders

-- delete the contents of the pod_item table because it contains only articles per order of the station 1

.models.frame.pod_Item.deletecontents

-- find the sum of the items requested by the three stations j:=0

107

-- find the new table indexes pod_item for b:=1 to BatchItem.Dim

-- find the new contents of the table pod_item for n:=1 to NowPodContent.XDim

if NowPodContent[n,0] = Choise_pod_string for t:=1 to BatchItem.Dim

for m:=1 to NowPodContent.YDim

if NowPodContent[0,m] = batchItem[t] and NowPodContent[n,m] > 0

108

TableError[6,numpodlist] := orderass1.dim TableError[7,numpodlist] := orderass2.dim TableError[8,numpodlist] := orderass3.dim

if TableError[6,numpodlist] = 0 or TableError[7,numpodlist] =0 or TableError[8,numpodlist]=0

TableError[9,numpodlist] := eventcontroller.simTime end

-- if the order of the station 1 has been concluded I will assign another order to the station

-- if the order of the station 3 has been concluded I will assign another order to the station

-- if the order of the station 2 has been concluded I will assign another order to the station

-- if I have assigned another order to the station it means that for that station maybe there will be articles that can be taken then control

-- find the sum of the items requested by the three stations j:=0

for j1:=1 to OrderAss1.Dim j+=1

batchItem[j] := OrderAss1[j1]

109

-- find the new table indexes pod_item for b:=1 to BatchItem.Dim

-- find the new contents of the table pod_item for n:=1 to NowPodContent.XDim

if NowPodContent[n,0] = Choise_pod_string for t:=1 to BatchItem.Dim

for m:=1 to NowPodContent.YDim

if NowPodContent[0,m] = batchItem[t] and NowPodContent[n,m] > 0

110

next

-- check again if the station 1 order is not empty after picking up the items -- otherwise I will assign a new order

if orderAss1.empty

if TableError[6,numpodlist] = 0 or TableError[7,numpodlist] =0 or TableError[8,numpodlist]=0

TableError[9,numpodlist] := eventcontroller.simTime end

-- check again if the station 3 order is not empty after picking up the items -- otherwise I will assign a new order

if orderAss3.empty

-- check again if the station 2 order is not empty after picking up the items -- otherwise I will assign a new order

if orderAss2.empty

elseif maxi /= orderass1.dim or orderass1.empty = true .models.frame.pod_item.deletecontents

.models.frame.sumitem_bj.deletecontents

111

.models.frame.batchItem.deletecontents .models.frame.testPodContent.deletecontents

.models.frame.nowpodcontent.copyrangeTo({0,0}..{*,*},testpodContent,0,0) -- check if there is a pod that completes the order 2

..

..

-- repeat the commands executed for the station order 1 using order elements 2 ..

..

-- if there are no pods that complete the order 2

elseif maxi /= orderass2.dim or orderass2.empty = true .models.frame.pod_item.deletecontents

.models.frame.sumitem_bj.deletecontents .models.frame.batchItem.deletecontents .models.frame.testPodContent.deletecontents

.models.frame.nowpodcontent.copyrangeTo({0,0}..{*,*},testpodContent,0,0) -- check if there is a pod that completes the order 3

..

..

-- repeat the commands executed for the station order 1 and 2 using order elements 3

..

..

--if there are no pods that complete the order 3 elseif maxi /= orderass3.dim or orderass3.empty= true .models.frame.pod_item.deletecontents

.models.frame.sumitem_bj.deletecontents .models.frame.batchItem.deletecontents .models.frame.testPodContent.deletecontents

.models.frame.nowpodcontent.copyrangeTo({0,0}..{*,*},testpodContent,0,0) -- find the sum of the items requested by the three stations

j:=0

-- find the table indexes pod_item for b:=1 to BatchItem.Dim

-- find the contents of the table pod_item if batchItem.dim /= 0

112

-- find the contents of the table sumitem_bj for n:=1 to pod_item.xdim

-- delete the pod not available numpodlist -= 3

if pod_stringa = distance[colomn,0]

colonna := colomn end

next

sumItem_bj[2,n] := distance[colonna,riga] / sumItem_bj[1,n]

113

if sumItem_bj[2,b] = mini

choise_pod:= sumItem_bj[0,b]

end next

Podlist[numpodlist]:=choise_pod

Choise_pod_string:=obj_to_str(choise_Pod)

-- delete the order lines that are picked up and then update the number of the item in the pod

-- delete the order lines of order of station 1 .models.frame.orderass1.remove(b)

-- delete the order lines of order of station 2 .models.frame.orderass2.remove(b)

-- delete the order lines of order of station 3 .models.frame.orderass3.remove(b)

114

end