Presentation is loading. Please wait.

Presentation is loading. Please wait.

TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Real-time version Iteration III TI-VDM2 Project by José Antonio Esparza.

Similar presentations


Presentation on theme: "TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Real-time version Iteration III TI-VDM2 Project by José Antonio Esparza."— Presentation transcript:

1 TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Real-time version Iteration III TI-VDM2 Project by José Antonio Esparza and Kim Bjerge

2 Today’s presentation Status on real-time model Update on concurrent model behavior (UML) Update on real-time model (VDM) TIVDM2Sortation System, Tray Allocation2

3 Status for RT model Thread’s deployed to CPU’s CPU for each induction TrayAllocator on a central CPU controller Removed TimeStamp and TrayStep Made periodic thread for TrayAllocator duration used for induction rate Version running Issues for next time How to feed items on based on time? Alternative deployment one CPU for two InductionControllers Error reading logrt? (30 errors encoutered in file) Why we can’t fill the sorter (19/20)? TIVDM2Sortation System, Tray Allocation3

4 Object diagram concurrent version TIVDM2Sortation System, Tray Allocation4

5 Behavior of concurrent model (Sequence #1) TIVDM2Sortation System, Tray Allocation5

6 Behavior of concurrent model (Sequence part #2) TIVDM2Sortation System, Tray Allocation6

7 RT version of SC – system instance variables cpuIC1 : CPU := new CPU (,1E6); cpuIC2 : CPU := new CPU (,1E6); cpuIC3 : CPU := new CPU (,1E9); cpuTA4 : CPU := new CPU (,1E6); bus1 : BUS := new BUS (,1E3,{cpuIC1,cpuTA4}); bus2 : BUS := new BUS (,1E3,{cpuIC2,cpuTA4}); bus3 : BUS := new BUS (,1E3,{cpuIC3,cpuTA4}); public static ic1 : InductionController := new InductionController(1); public static ic2 : InductionController := new InductionController(2); public static ic3 : InductionController := new InductionController(3); public static inductionGroup : seq of InductionController := [ic1, ic2, ic3]; public static allocator : TrayAllocator := new TrayAllocator(inductionGroup); operations public SC: () ==> SC SC() == ( cpuIC1.deploy(ic1); cpuIC2.deploy(ic2); cpuIC3.deploy(ic3); cpuTA4.deploy(allocator); ); TIVDM2Sortation System, Tray Allocation7

8 RT version of TrayAllocator periodic thread -- Periodic thread operation that simulates the TrayStep TrayStep: () ==> () TrayStep () == ( trayCount := trayCount + 1; IO`print(" "); CardReader(trayCount mod TrayAllocator`NumOfTrays + 1, ); -- Induct items for all waiting inductions CheckItemsToInduct(); ); thread -- periodic (20000, 0, 0, 0) (TrayStep); TIVDM2Sortation System, Tray Allocation8

9 RT version of InductionController thread -- Permission predicate on Wait operation (Moved from TrayAllocator) per Wait => threadid not in set dom allocator.icThreadsWaiting; thread ( while (ItemsToInduct()) do ( -- Request tray allocator to induct item and wait for induction let item = GetFirstItem() in ( allocator.RequestTray(threadid, selfIC, item); Wait(); ); -- In teory this value should be 2x20000 see periodic thread in TrayAllocator duration(30000) WaitInductionRate(); ); TIVDM2Sortation System, Tray Allocation9

10 RT version of SorterEnviroment thread while busy do ( timeStep := timeStep + 1; for all i in set {1,...,TrayAllocator`NumOfInductions} do ( -- Check for item to feed induction at time step let size = itemLoader.GetItemAtTimeStep(timeStep, i) in if (size > 0) then ( itemId := itemId + 1; IO`print("[ " ^ String`NatToStr(timeStep) ^ "]"); inductionGroup(i).FeedItem(new Item(size, itemId)); ); -- Check if simulation is finish if (time >= itemLoader.GetNumTimeSteps()) then busy := false; ); TIVDM2Sortation System, Tray Allocation10

11 Async operation FeedItem in InductionController -- Enviroment feeds a new item on induction async public FeedItem: Item ==> () FeedItem(i) == items := items ^ [i]; sync -- Enviroment and TrayAllocator threads mutex (FeedItem); -- Async new mutex needed! mutex (FeedItem, InductFirstItem); TIVDM2Sortation System, Tray Allocation11

12 Simulation Result *Induction id 1 -> Item id 16 size 100 on tray id 1 *Induction id 3 -> Item id 20 size 300 on tray id 5 *Induction id 2 -> Item id 19 size 200 on tray id 7 --------------------------------------------- Simulation completed for sorter configuration --------------------------------------------- Specified throughput [items/hour]: 10000 Sorter speed [mm/sec]: 2000 Item max size [mm]: 1500 Item min size [mm]: 100 Tray size [mm]: 600 Number of trays : 20 Number of inductions : 3 Induction rate : 2 Induction separation [trays]: 2 ---------------------------------------------- Number of trays with items : 19 Two tray items on sorter : 0 Number of tray steps : 23 Number of inducted items : 19 Calculated throughput[items/hour]: 9913 ---------------------------------------------- **** Sorter is not full **** ---------------------------------------------- new World().Run() = () TIVDM2Sortation System, Tray Allocation12


Download ppt "TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Real-time version Iteration III TI-VDM2 Project by José Antonio Esparza."

Similar presentations


Ads by Google