Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/VDM/VDMPP/DiningPP/   (Wiener Entwicklungsmethode ©)  Datei vom 13.4.2020 mit Größe 798 B image not shown  

SSL AllocatorStrategy.vdmpp   Sprache: VDM

 
-- ===============================================================================================================
-- Allocator in tray allocation for a sortation system
-- By José Antonio Esparza and Kim Bjerge - spring 2010
-- (strategy pattern)
-- ===============================================================================================================

class AllocatorStrategy

 instance variables
  protected trayAllocator : [TrayAllocator] := nil;    -- TrayAllocator
  
 operations
  
  public AllocateTray: nat ==> set of Tray
  AllocateTray (-) ==
   is subclass responsibility;
  
  public InductionsWithHigherPriority: InductionController ==> bool
  InductionsWithHigherPriority(ic) ==
   is subclass responsibility;
   
 functions
 
     -- Calculate current tray UID at position in front of induction based on position of card reader 
  protected InductionOffset: Tray`UID * nat -> Tray`UID
  InductionOffset(trayAtCardReader, icid) ==
   ((trayAtCardReader + icid*TrayAllocator`InductionSeperation) mod TrayAllocator`NumOfTrays) + 1;

end AllocatorStrategy

94%


¤ Dauer der Verarbeitung: 0.7 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.