TIVDM1Sortation System, Tray Allocation1 Tray allocation for a sortation system Iteration III TI-VDM1 Project by José Antonio Esparza and Kim Bjerge.

Slides:



Advertisements
Similar presentations
Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Advertisements

Evaluating the Effects of Business Register Updates on Monthly Survey Estimates Daniel Lewis.
Lists A list is a finite, ordered sequence of data items. Important concept: List elements have a position. Notation: What operations should we implement?
Ceng-112 Data Structures I Chapter 5 Queues.
Computer Science 112 Fundamentals of Programming II Queues and Priority Queues.
CS1104: Computer Organisation School of Computing National University of Singapore.
1 Modelling using sets Sets: The finite set type constructor Value definitions: enumeration, subrange, comprehension Operators on sets Case Study: the.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 5: Process Synchronization.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 6: Process Synchronization.
Lecture 11 oct 6 Goals: hashing hash functions chaining closed hashing application of hashing.
Designing Algorithms Csci 107 Lecture 4. Outline Last time Computing 1+2+…+n Adding 2 n-digit numbers Today: More algorithms Sequential search Variations.
TIVDM1Sortation System, Tray Allocation1 Tray allocation for a sortation system TI-VDM1 Project by José Antonio Esparza and Kim Bjerge.
TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Real-time version Iteration III TI-VDM2 Project by José Antonio Esparza.
Object Oriented Programming Chapter 7 Programming Languages by Ravi Sethi.
A Behavioral Pattern. Problem: Simple enough right? Object.
Iterators T.J. Niglio Computer & Systems Engineering Fall 2003 Software Design & Documentation Object Behavioral.
Global optimization. Data flow analysis To generate better code, need to examine definitions and uses of variables beyond basic blocks. With use- definition.
Recursive Algorithms Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chapter 14 Simulation. Monte Carlo Process Statistical Analysis of Simulation Results Verification of the Simulation Model Computer Simulation with Excel.
Lecture 11 oct 7 Goals: hashing hash functions chaining closed hashing application of hashing.
Global optimization. Data flow analysis To generate better code, need to examine definitions and uses of variables beyond basic blocks. With use- definition.
L. Grewe. Computing hash function for a string Horner’s rule: (( … (a 0 x + a 1 ) x + a 2 ) x + … + a n-2 )x + a n-1 ) int hash( const string & key )
analysis, plug ‘n’ chug, & induction
11/ VIP Elevator – first model A VDM++ Project Made By: Sune Wolff.
Sequences for system modelling. At the end of this lecture you should be able to: provide a definition of a VDM sequence; identify situations in which.
REFACTORING Lecture 4. Definition Refactoring is a process of changing the internal structure of the program, not affecting its external behavior and.
CIT241 Prerequisite Knowledge ◦ Variables ◦ Operators ◦ C++ Syntax ◦ Program Structure ◦ Classes  Basic Structure of a class  Concept of Data Hiding.
Design patterns. What is a design pattern? Christopher Alexander: «The pattern describes a problem which again and again occurs in the work, as well as.
Binary Trees Chapter 10. Introduction Previous chapter considered linked lists –nodes connected by two or more links We seek to organize data in a linked.
Introduction to Programming (in C++) Algorithms on sequences. Reasoning about loops: Invariants. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept.
Formal Methods in SE Lecture 20. Agenda 2  Relations in Z Specification Formal Methods in SE.
TIVDM1Modelling ordered collections1 Peter Gorm Larsen.
TIVDM1Modelling ordered collections1 Peter Gorm Larsen.
Java – Methods Part II Lecture Notes 6. Objects, Classes and Computer Memory When a Java program is executing, the memory must hold: 1. Templates for.
TIVDM2Real-Time and Distributed Development in VDM++1 Peter Gorm Larsen
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
Data Structures Using C++ 2E Chapter 8 Queues. Data Structures Using C++ 2E2 Objectives Learn about queues Examine various queue operations Learn how.
Personal Medical Unit Lars Sarbæk Kristiansen Kasper J. Nielsen Martin Kjeldsen
Computer Science School of Computing Clemson University Discrete Math and Reasoning about Software Correctness Joseph E. Hollingsworth
TIVDM1Modelling unordered collections1 Peter Gorm Larsen.
TIVDM1Modelling unordered collections1 Peter Gorm Larsen.
Data Structures Using Java1 Chapter 7 Queues. Data Structures Using Java2 Chapter Objectives Learn about queues Examine various queue operations Learn.
CSC 211 Data Structures Lecture 13
CS 153: Concepts of Compiler Design August 26 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Software Testing and Quality Assurance Software Quality Assurance 1.
CSC 480 Software Engineering Design by Contract. Detail Design Road Map Begin with architectural models  Class model: domain classes  Overall state.
Design Patterns Yonglei Tao. Design Patterns  A design pattern describes a recurring design problem, a solution, and the context in which that solution.
Data Structures and Algorithm Analysis Dr. Ken Cosh Stacks ‘n’ Queues.
Protocols Software Engineering II Wirfs Brock et al, Designing Object-Oriented Software, Prentice Hall, Mitchell, R., and McKim, Design by Contract,
Binary Trees Chapter 10. Introduction Previous chapter considered linked lists –nodes connected by two or more links We seek to organize data in a linked.
PMU Agenda Concurrent Model Real Time Model. Environment (1) public createEvents: () ==> () createEvents () == ( if len inlines > 0 then ( dcl curtime.
TIVDM1Modelling relationships1 Peter Gorm Larsen.
Computer Architecture and Operating Systems CS 3230: Operating System Section Lecture OS-5 Process Synchronization Department of Computer Science and Software.
Application Communities Phase II Technical Progress, Instrumentation, System Design, Plans March 10, 2009.
CompSci 100E 15.1 What is a Binary Search?  Magic!  Has been used a the basis for “magical” tricks  Find telephone number ( without computer ) in seconds.
SAT-Based Model Checking Without Unrolling Aaron R. Bradley.
1 Logic Our ability to state invariants, record preconditions and post- conditions, and the ability to reason about a formal model depend on the logic.
2014-T2 Lecture 27 School of Engineering and Computer Science, Victoria University of Wellington  Lindsay Groves, Marcus Frean, Peter Andreae, and Thomas.
TIVDM2Sortation System, Tray Allocation1 Tray allocation for a sortation system Concurrent version Iteration I TI-VDM2 Project by José Antonio Esparza.
Effective C# Item 10 and 11. Understand the Pitfalls of GetHashCode Item 10.
1 CS1110 Lecture 16, 26 Oct 2010 While-loops Reading for next time: Ch (arrays) Prelim 2: Tu Nov 9 th, 7:30-9pm. Last name A-Lewis: Olin 155 Last.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Formal Methods in SE Lecture 21.
7.1 What Is An Object Object-oriented program - Description or simulation of application Object-oriented programming is done by adopting or extending an.
Flexible Synchronisation of Shared Groupware Objects
Algorithm Analysis CSE 2011 Winter September 2018.
Tray allocation for a sortation system Real-time version Iteration III
Prof. Neary Adapted from slides by Dr. Katherine Gibson
Python Tutorial for C Programmer Boontee Kruatrachue Kritawan Siriboon
Lecture 14: The environment model (cont
Presentation transcript:

TIVDM1Sortation System, Tray Allocation1 Tray allocation for a sortation system Iteration III TI-VDM1 Project by José Antonio Esparza and Kim Bjerge

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

Induction group – Tray allocation TIVDM1Sortation System, Tray Allocation3 Sorter ring Induction group Inductions Tray Id. Reader A simplified sorter model

The centralized architecture TIVDM1Sortation System, Tray Allocation4

The distributed architecture TIVDM1Sortation System, Tray Allocation5

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 The sorter state: The induction pattern: 1X1XX Target pattern: 0X0XX

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

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

Class diagram centralized architecture TIVDM1Sortation System, Tray Allocation9

Class diagram with operations and variables TIVDM1Sortation System, Tray Allocation10

Use of strategy pattern for allocation of trays TIVDM1Sortation System, Tray Allocation11

Sequence diagram for allocation simulation TIVDM1Sortation System, Tray Allocation12

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

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

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

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

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