Download presentation
Presentation is loading. Please wait.
Published byClinton Green Modified over 9 years ago
1
TIVDM1Sortation System, Tray Allocation1 Tray allocation for a sortation system Iteration III TI-VDM1 Project by José Antonio Esparza and Kim Bjerge
2
TIVDM1Sortation System, Tray Allocation2 Contents of presentation 1.The induction group and the environment 2.Considered architectures I: the centralized architecture 3.Considered architectures II: the distributed architecture 4.Allocation strategies I: Pattern matching allocation algorithm 5.Allocation strategies II: The priority scheme algorithm 6.Class diagrams with operations and variables 7.Snippet of VDM++ code for TrayAllocator and demonstration of simulation model
3
Induction group – Tray allocation TIVDM1Sortation System, Tray Allocation3 Sorter ring Induction group Inductions Tray Id. Reader A simplified sorter model
4
The centralized architecture TIVDM1Sortation System, Tray Allocation4
5
The distributed architecture TIVDM1Sortation System, Tray Allocation5
6
The pattern matching allocation algorithm TIVDM1Sortation System, Tray Allocation6 The sorter state is represented using an state-array (empty/occupied) The induction request are codified, generating an induction pattern per time step. The key point is to match the one’s complemented induction pattern with the state-array. 12345678910 The sorter state: 1010010100 The induction pattern: 1X1XX Target pattern: 0X0XX
7
The priority scheme allocation algorithm A value called priority is incremented by value n every time an induction controller has wait one tray step to induct an item. General rule: Each induction is allowed to induct an item to the sorter unless there is other induction with a higher priority requesting a tray. Faster and self-organized system. TIVDM1Sortation System, Tray Allocation7
8
Algorithm comparison Pattern matching allocation algorithm Connected with the centralized architecture. Higher software maintainability An optimized item allocation can be reached Stronger computational requirements Priority scheme allocation algorithm Connected with the distributed architecture Reliability Flexibility Easier to extend by adding more inductions Simplier strategy and less computing demanding effort. TIVDM1Sortation System, Tray Allocation8
9
Class diagram centralized architecture TIVDM1Sortation System, Tray Allocation9
10
Class diagram with operations and variables TIVDM1Sortation System, Tray Allocation10
11
Use of strategy pattern for allocation of trays TIVDM1Sortation System, Tray Allocation11
12
Sequence diagram for allocation simulation TIVDM1Sortation System, Tray Allocation12
13
TrayAllocator – instance variables instance variables -- Ensure sufficient number of trays on sorter ring based on inductions and separation inv NumOfTrays >= InductionSeperation * NumOfInductions; countTraySteps : nat := 0; -- Used for calculation of throughput countItemsInducted : nat := 0; -- Counts the number of items inducted -- Induction group and invariants public inductionGroup : seq of InductionController := []; inv len inductionGroup = NumOfInductions; inv forall x,y in set elems inductionGroup & x <> y => x.GetId() <> y.GetId(); -- Sorter ring and invariants public sorterRing : inmap Tray`UID to Tray; inv card dom sorterRing = NumOfTrays; -- Tray at card reader and invariants public trayAtCardReader : Tray`UID := 0; inv trayAtCardReader > 0 => trayAtCardReader in set dom sorterRing; TIVDM1Sortation System, Tray Allocation13
14
TrayAllocator – InductItem operation -- Inducting item on sorter if empty trays and no higher induction priority public InductItem: InductionController * Item ==> bool InductItem(ic, item) == ( if InductionsWithHigherPriority(ic) then return false else let numTrays = item.GetSizeOfTrays(), trays = AllocateTray(ic.GetId(), numTrays) in if trays = {} then return false else ( countItemsInducted := countItemsInducted + 1; IO`print("Induction id " ^ String`NatToStr(ic.GetId()) ^ "\n"); PutItemOnTrays(item, trays); return true; ) pre ic in set elems inductionGroup; TIVDM1Sortation System, Tray Allocation14
15
TrayAllocator – AllocateTray operation -- Returns true if no higher priority of inductions in front of this induction private InductionsWithHigherPriority: InductionController ==> bool InductionsWithHigherPriority(ic) == return exists i in set elems inductionGroup(ic.GetId()+1,...,len inductionGroup) & i.GetPriority() > ic.GetPriority() pre ic in set elems inductionGroup; -- Returns set of empty trays at trayAtCardReader private AllocateTray: nat * Item`ItemTraySize ==> set of Tray AllocateTray(icid, size) == ( -- Use of strategy pattern to compute the tray allocation dcl strategy : AllocatorStrategy; if size = 1 then strategy := new AllocatorOneTray(self) else strategy := new AllocatorTwoTray(self); return strategy.AllocateTray(icid); ) pre icid in set inds inductionGroup and size <= 2; -- To be changed if ItemMaxTrays is increased TIVDM1Sortation System, Tray Allocation15
16
AllocatorOnTray strategy class AllocatorOneTray is subclass of AllocatorStrategy operations -- AllocatorOneTray constructor public AllocatorOneTray: TrayAllocator==> AllocatorOneTray AllocatorOneTray(ta) == ( trayAllocator := ta; ); -- Allocates tray if empty at induction offset public AllocateTray: nat ==> set of Tray AllocateTray (icid) == def posTray = InductionOffset(trayAllocator.trayAtCardReader, icid) in if trayAllocator.sorterRing(posTray).IsTrayEmpty() then return {trayAllocator.sorterRing(posTray)} else return {} pre icid in set inds trayAllocator.inductionGroup; end AllocatorOneTray TIVDM1Sortation System, Tray Allocation16
17
Next objectives The main objectives for next week are: Testing and completing the model More test scenarios Writing on the report Description of algorithm and architecture is started TIVDM1Sortation System, Tray Allocation17
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.