SlideShare a Scribd company logo
jEQN
A Java-Based language for the distributed simulation of
                      queueing networks




         Andrea D’Ambrogio, Daniele Gianni and Giuseppe Iazeolla
                          Dept. of Computer Science
                       University of Roma “Tor Vergata”
                                  Roma (Italy)

                              Presented by
                              Daniele Gianni
                                  PhD Student
                           Dept. Of Computer Science
                 University of Roma “TorVergata” Roma (Italy)
Presentation Overview


 Problems of building HLA-based distributed simulators of
  Extended Queueing Network (EQN) systems
 Improving HLA-based development performance by use
  of jEQN
   • jEQN main goals
   • jEQN system architecture
 jEQN Example
 jEQN Effort Saving
                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR            2
Problems of building distributed simulators
               of EQN systems


 Tools to build local EQN simulators
 Not easy, and often not possible, to port them on
  distributed environments
 EQN simulators not supported by current
  Distributed Simulation (DS) environment (e.g.:
  HLA, DIS, etc.)

                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR            3
Problems of using HLA
 What HLA offers:
  • A general framework to develop several kinds
    of distributed simulators
  • Distributed simulation oriented services
 What HLA does not support:
  • Federate internal issues as:
     Events management,
     Federate logic – RTI synchronizations,
     Etc.
  • Explicit simulation paradigms (Continuous
    Simulation, Discrete Event Simulation (DES)
    – PI, ES, AS –, etc.)
                The 21st International Symposium on Computer
                 and Information Sciences 2006 (ISCIS06), Nov
                             1st - 3rd, Istanbul, TR            4
Steps in developing HLA simulators


 Development of an HLA distributed simulator
  requires:

 HLA knowledge
 Decisions on design choices:
  • Which federates to be developed? Which can be
    reused?
  • Which Time Advancing modality?
  • Which data to be exchanged and with which?
  • Which communication modalities to be used?


                 The 21st International Symposium on Computer
                  and Information Sciences 2006 (ISCIS06), Nov
                              1st - 3rd, Istanbul, TR            5
This paper problem


How to develop an EQN HLA-based distributed simulator

   • Without
       knowledge of HLA (or the DS environment in general)
       need of decisions on HLA-related design choices (or
        the DS environment in general)

   • By use of a Java-Based language

   As it were a local simulator


                     The 21st International Symposium on Computer
                      and Information Sciences 2006 (ISCIS06), Nov
                                  1st - 3rd, Istanbul, TR            6
This paper solution

Introduces a Java-Based language to:

 Build EQN simulators without being aware of the actual
  running environment (either local or distributed)

Basing the language on a layered architecture to:

 Port jEQN simulators on several distributed environments
  (e.g.: HLA, DIS, etc.)



                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR            7
jEQN System Architecture
    Layer 4
                                                    jEQN Simulation
                                                    Language Layer




    Layer 3
                                    Implementation of the jEQN
                                       Simulation Language


    Layer 2
                                        Execution Container
                                      LocalEngine     DistributedEngine




    Layer 1                         Distributed DES Abstraction




    Layer 0                                                            Any other Distributed
(Distributed Simulation     HLA                     DIS               Simulation Infrastructure
     Infrastructure)



                          The 21st International Symposium on Computer
                           and Information Sciences 2006 (ISCIS06), Nov
                                       1st - 3rd, Istanbul, TR                                    8
Layer-1
             (Distributed DES Abstraction)
Objective: to implement the Distributed DES services
  basing on HLA services

How-to: by supporting the DES time-advancement and by
  invoking specific HLA services

Services offered to Layer-2:
                               <<interface>>
                        Layer2ToLayer1Interface
                +initDistributedSimulationInfrastructure()
                +waitNextDistributedEvent()
                +waitNextDistributedEventBeforeTime()



                     The 21st International Symposium on Computer
                      and Information Sciences 2006 (ISCIS06), Nov
                                  1st - 3rd, Istanbul, TR            9
Layer-1 implementation on HLA
Components:

DDES Engine:
- To configure the RTI to run according to the DES paradigm
- To synchronize the local environment to the distributed one
- To allow transparent sendings of local events

FederationManager (HLA federate): to manage the distributed
  environment in order to warrant a DES execution in the
  starting-up phase


                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR            10
Layer-2
                        (Execution Container)
Objective: to realize an abstract Execution Container for
  Layer-3 simulation components

How-to: by proving DES services through its interfaces

                         Services offered to:

            Layer-3                                                    Layer-1
         <<interface>>
  Layer3ToLayer2Interface                                    <<interface>>
                                                        Layer1ToLayer2Interface
  +registerEntity(in e : Entity)
  +registerPort(in p : Port)                           +scheduleEvent(in e : Event)
  +registerLink(in l : Link)
  +startEngine()
                           The 21st International Symposium on Computer
                            and Information Sciences 2006 (ISCIS06), Nov
                                        1st - 3rd, Istanbul, TR                       11
Layer-2 implementation
Components:

 Entity: a logical process, i.e. a fundamental building block in the
   PI paradigm (Local or Remote).

 Event: the basic events in the PI paradigm (e.g.: start, notify,
   sleep, etc.)

 Port: used by Entities to send and receive Events (Input or
   output, Local or Distributed)

 Link: connects output Ports to input Ports (P2P, Multi-
   Sender/Recipient, Local or Distributed):

 Engine: facility for the simulator initialization and execution
   (Local and Distributed PI)
                       The 21st International Symposium on Computer
                        and Information Sciences 2006 (ISCIS06), Nov
                                    1st - 3rd, Istanbul, TR             12
Components example relationships




                                           Key

Entity E1    Entity E2                     Entity
                                           Input Port
                                           Output Port
                                           Link (Event flow)




            The 21st International Symposium on Computer
             and Information Sciences 2006 (ISCIS06), Nov
                         1st - 3rd, Istanbul, TR               13
Engine Component



      <<interface>>                                            <<interface>>
 Layer1ToLayer2Interface                                Layer3ToLayer2Interface
+scheduleEvent(in e : Event)                            +registerEntity(in e : Entity)
                                                        +registerPort(in p : Port)
                                                        +registerLink(in l : Link)
                                                        +startEngine()




                                   «interface»
                                     Engine




                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR                                 14
Layer-3
         (Implementation of jEQN Language)


Each jEQN component:
- Specializes Layer 2 Entity by specifying its
own behaviour (reaction to external events)
- Defines the input and output ports
- Provides flexible parametrization


                The 21st International Symposium on Computer
                 and Information Sciences 2006 (ISCIS06), Nov
                             1st - 3rd, Istanbul, TR            15
jEQN Components

1) User sources
2) Waiting systems
3) Service centers
4) Routers
5) Special nodes
6) Support components (users, service requests,
  probabilities, etc.)

                   The 21st International Symposium on Computer
                    and Information Sciences 2006 (ISCIS06), Nov
                                1st - 3rd, Istanbul, TR            16
Layer-4 jEQN Language
                                    (Example Model)




                                                                      Waiting
                                                                      System    Service
                                                                                Center
                                                         0.7             1        1
                          Waiting                                      (ws1)
                          System    Service
Finite Source                       Center      Router                                    Waiting
  (10 users, 4 cats)         0        0
                                                                                          System    Service
                           (ws0)                                                                    Center
                                                                                             2         2
                                                          0.3
                                                                                           (ws2)




                               The 21st International Symposium on Computer
                                and Information Sciences 2006 (ISCIS06), Nov
                                            1st - 3rd, Istanbul, TR                                           17
Local Simulator – Entity declarations

// Source and related components
MultiCatUsersGenerator ug = new MultiCatUsersGenerator(new UniformStream(0,3));
Category c<i> = new Category("<i>");
ug.addUsersGenerator(new SingleCatUsersGenerator(c<i>));
FiniteSource s = new FiniteSource("source", ug, new ExponentialStream(lambda), numberOfUsers);

//WaitingSystem and related components
CategoryBasedQueuesAssigner qa0 = new CategoryBasedQueuesAssigner();
qa0.addCategoryToQueueMapping(category<i>, <i>, "Queue<i>");
MultiUsersQueues mq0 = new ScanMultiUsersQueues(qa0);
mq0.addUsersQueue(new InfiniteFIFOUsersQueueVector());
ResourceRequestGenerator rg0 = new SingleCatResourceRequestGenerator(new NormalStream(mu, sigma);
WaitingSystem ws0 = new WaitingSystem("multiQueue0", mq0, rg0);

//ServiceCenter
ServiceCenter sc0 = new DoubleNonPreemptiveServiceCenter("serviceCenter0")

//Router
double rp[] = {0.7, 0.3};
Router r = new ProbabilityBasedRouter("router", rp);

                                    The 21st International Symposium on Computer
                                     and Information Sciences 2006 (ISCIS06), Nov
                                                 1st - 3rd, Istanbul, TR                         18
Local Simulator – Links and Engine start
// Links
new SimpleLink(ws0.getUsersOutPort(), sc0.getUsersInPort());
new SimpleLink(sc0.getUsersSynchPort(), ws0.getUsersSynchPort());

new SimpleLink(ws1.getUsersOutPort(), sc1.getUsersInPort());
new SimpleLink(sc1.getUsersSynchPort(), ws1.getUsersSynchPort());

new SimpleLink(ws2.getUsersOutPort(), sc2.getUsersInPort());
new SimpleLink(sc2.getUsersSynchPort(), ws2.getUsersSynchPort());

new SimpleLink(r.getUsersOutPort(0), ws1.getUsersInPort());
new SimpleLink(r.getUsersOutPort(1), ws2.getUsersInPort());

MultiSenderLink msl = new MultiSenderLink(ws0.getUsersInPort());
msl.connectWith(s.getUsersOutPort());
msl.connectWith(sc1.getUsersOutPort());
msl.connectWith(sc2.getUsersOutPort());


// Engine start statement
engine.start();


                        The 21st International Symposium on Computer
                         and Information Sciences 2006 (ISCIS06), Nov
                                     1st - 3rd, Istanbul, TR            19
Distributed Simulator



                                                                     Federate1
                       Federate0
                                                                      Waiting
                                                                      System        Service
                                                                                    Center
                                                        0.7              1            1
                          Waiting                                      (ws1)
                          System    Service
Finite Source                       Center     Router                                         Waiting
  (10 users, 4 cats)         0        0
                                                                                              System    Service
                           (ws0)                                                                        Center
                                                                                                 2         2
                                                         0.3
                                                                                               (ws2)




                                                                                              Federate2




                                    The 21st International Symposium on Computer
                                     and Information Sciences 2006 (ISCIS06), Nov
                                                 1st - 3rd, Istanbul, TR                                          20
Distributed Simulator – Entity declarations


1) For each simulator (Federates 0 through 2):
• Copy and paste the entity declaration statements for
each entity to be run in the proper simulator
• Copy and paste the link statements among entities in the
same federate
i.e.
Federate0: Source, WS0, SC0 and Router
Federate1: WS1, SC1
Federate2: WS2, SC2
                    The 21st International Symposium on Computer
                     and Information Sciences 2006 (ISCIS06), Nov
                                 1st - 3rd, Istanbul, TR            21
Distributed Simulator – Remote Entity declarations




2) For each simulator (Federates 0 through 2): :
Introduce local references to remote entities through the
  meta-statement:
EntityRef eRef = new EntityRef(“<FederateName>”,“<EntityName>”);

And local references to remote ports through the meta-
  statement:
DisInPort inPortRef = new DisInPort(“<PortName>”, eRef);

                            The 21st International Symposium on Computer
                             and Information Sciences 2006 (ISCIS06), Nov
                                         1st - 3rd, Istanbul, TR            22
Distributed Simulator – Distributed link declarations


In practice, for
Federate0:
   -   EntityRef to WS1 and WS2
   -   DisInPort to WS1 and WS2 inPorts

Federate1:
   -   EntityRef to WS0
   -   DisInPort to WS0 inPorts

Federate2:
   -   EntityRef to WS0
   -   DisInPort to WS0 inPorts
                          The 21st International Symposium on Computer
                           and Information Sciences 2006 (ISCIS06), Nov
                                       1st - 3rd, Istanbul, TR            23
jEQN Effort Savings

 jEQN users can concentrate on the model description

 This brings an effort savings (in MM) of
   • Around 30% for average experienced developers
   • Around 60% for beginners

  compared with a EQN HLA-based simulator developed
  without jEQN

 Besides a fixed saving of about 1.2 MM per federate

                        The 21st International Symposium on Computer
                         and Information Sciences 2006 (ISCIS06), Nov
                                     1st - 3rd, Istanbul, TR            24
Conclusions
 Definition of jEQN a simulation language that can
  equivalently support local or distributed simulation by the
  transparent use of DS standards
 jEQN facilitates the development of local or HLA-based
  distributed simulators of EQNs
 jEQN is implemented as a Java library
 jEQN is based upon four software layers to isolate the
  simulator developer from the implementation of underlying
  services (also HLA services).
 No extra effort to implement a distributed EQN simulator
  than the local one.
 Significant savings in effort.
                      The 21st International Symposium on Computer
                       and Information Sciences 2006 (ISCIS06), Nov
                                   1st - 3rd, Istanbul, TR            25

More Related Content

PDF
RESTful Triple Spaces of Things
PDF
Programming Language Memory Models: What do Shared Variables Mean?
PPT
1 Simuladores Rna
PDF
A Java-Compatible Multi-Thread Middleware for an Experimental Wireless Sensor...
PDF
AFIS ambassodorship presentation
PPTX
Uts media pembelajaran
PDF
A Model Transformation Approach for the Development of HLA-based Distributed ...
PPTX
Ika sherlyta 1005309
RESTful Triple Spaces of Things
Programming Language Memory Models: What do Shared Variables Mean?
1 Simuladores Rna
A Java-Compatible Multi-Thread Middleware for an Experimental Wireless Sensor...
AFIS ambassodorship presentation
Uts media pembelajaran
A Model Transformation Approach for the Development of HLA-based Distributed ...
Ika sherlyta 1005309

Viewers also liked (20)

PDF
A framework for distributed control and building performance simulation
PDF
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
PPT
Ethics is good business mandrin28 jan05 v
PDF
SysML to Discrete-event Simulation to Analyze Electronic Assembly Systems
PPS
The Beauty of Mathematics
PDF
Presentazione pieroni
PDF
Validation of Spacecraft Behaviour Using a Collaborative Approach
PDF
Collaborative modeling and co simulation with destecs - a pilot study
PDF
Automated Performance Analysis of Business Processes
PDF
euHeartDB
PDF
ModelicaML Value Bindings for Automated Model Composition
PDF
A vision on collaborative computation of things for personalized analyses
PDF
Collaborative engineering solutions and challenges in the development of spac...
PDF
DDML a support for communication in m&s
PDF
Modules for reusable and collaborative modeling of biological mathematical sy...
PDF
Simj a framework to develop distributed simulators scsc06
PDF
BOM2UML: Integrating BOM Specifications into UML-based Development Environments
PDF
Anatomical Model Database
PDF
Simulation assisted elicitation and validation of behavioral specifications f...
PDF
Collaborative development and cataloguing of simulation and calculation model...
A framework for distributed control and building performance simulation
Calibration of Deployment Simulation Models - A Multi-Paradigm Modelling Appr...
Ethics is good business mandrin28 jan05 v
SysML to Discrete-event Simulation to Analyze Electronic Assembly Systems
The Beauty of Mathematics
Presentazione pieroni
Validation of Spacecraft Behaviour Using a Collaborative Approach
Collaborative modeling and co simulation with destecs - a pilot study
Automated Performance Analysis of Business Processes
euHeartDB
ModelicaML Value Bindings for Automated Model Composition
A vision on collaborative computation of things for personalized analyses
Collaborative engineering solutions and challenges in the development of spac...
DDML a support for communication in m&s
Modules for reusable and collaborative modeling of biological mathematical sy...
Simj a framework to develop distributed simulators scsc06
BOM2UML: Integrating BOM Specifications into UML-based Development Environments
Anatomical Model Database
Simulation assisted elicitation and validation of behavioral specifications f...
Collaborative development and cataloguing of simulation and calculation model...
Ad

Similar to jEQN a java-based language for the distributed simulation of queueing networks (20)

PDF
Final Report(Routing_Misbehavior)
PDF
A Java-Compatible Multi-Thread Middleware for an Experimental Wireless Sensor...
PDF
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
PDF
sqlmap - security development in Python
PPTX
Scc2012 Scala
PDF
REAL TIME OPERATING SYSTEM PART 2
PPT
OSI 7 Layer Model
PDF
[USENIX-WOOT] Introduction to Procedural Debugging through Binary Libification
PDF
LO-PHI: Low-Observable Physical Host Instrumentation for Malware Analysis
PPTX
OSI reference model
PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
PDF
12-Case-Study-WindowsNT.pdf in operating sysetm.
PDF
Artificial Neural Network Implementation On FPGA Chip
DOCX
Running Head THE SEVEN LAYER MODEL OF OSIKao 1THE SEVEN LAYE.docx
DOCX
OSI model (Tamil)
PDF
Kqueue : Generic Event notification
PDF
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
PDF
Keynote joearmstrong
DOC
Network simulator
PDF
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
Final Report(Routing_Misbehavior)
A Java-Compatible Multi-Thread Middleware for an Experimental Wireless Sensor...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
sqlmap - security development in Python
Scc2012 Scala
REAL TIME OPERATING SYSTEM PART 2
OSI 7 Layer Model
[USENIX-WOOT] Introduction to Procedural Debugging through Binary Libification
LO-PHI: Low-Observable Physical Host Instrumentation for Malware Analysis
OSI reference model
MULTI LEVEL DATA TRACKING USING COOJA.pptx
12-Case-Study-WindowsNT.pdf in operating sysetm.
Artificial Neural Network Implementation On FPGA Chip
Running Head THE SEVEN LAYER MODEL OF OSIKao 1THE SEVEN LAYE.docx
OSI model (Tamil)
Kqueue : Generic Event notification
Sioux Hot-or-Not: Functional programming: unlocking the real power of multi-c...
Keynote joearmstrong
Network simulator
[html5jロボット部 第7回勉強会] Microsoft Cognitive Toolkit (CNTK) Overview
Ad

More from Daniele Gianni (13)

PDF
Integrated modeling and simulation framework for wireless sensor networks
PDF
A package system for maintaining large model distributions in vle software
PDF
A collaborative environment for urban landscape simulation
PDF
System model optimization through functional models execution methodology and...
PDF
Validation of Service Oriented Computing DEVS Simulation Models
PDF
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
PDF
Modular Mathematical Modelling of Biological Systems
PDF
A Model-Based Method for System Reliability Analysis
PDF
Automation of SysML Activity Diagram Simulation with Model-Driven Engineering...
PDF
Model Transformation from BPMN to DEVS in a Prototype Implementation of the M...
PDF
SimArch: A Layered Architectural Approach to Reduce the Development Effort of...
PDF
A Methodology to Predict the Performance of Distributed Simulation Systems
PDF
Modelling Methodologies in Support of Complex Systems of Systems Design and I...
Integrated modeling and simulation framework for wireless sensor networks
A package system for maintaining large model distributions in vle software
A collaborative environment for urban landscape simulation
System model optimization through functional models execution methodology and...
Validation of Service Oriented Computing DEVS Simulation Models
The DEVS-Driven Modeling Language: Syntax and Semantics Definition by Meta-Mo...
Modular Mathematical Modelling of Biological Systems
A Model-Based Method for System Reliability Analysis
Automation of SysML Activity Diagram Simulation with Model-Driven Engineering...
Model Transformation from BPMN to DEVS in a Prototype Implementation of the M...
SimArch: A Layered Architectural Approach to Reduce the Development Effort of...
A Methodology to Predict the Performance of Distributed Simulation Systems
Modelling Methodologies in Support of Complex Systems of Systems Design and I...

Recently uploaded (20)

PPTX
Job-opportunities lecture about it skills
PPT
Gsisgdkddkvdgjsjdvdbdbdbdghjkhgcvvkkfcxxfg
PPTX
Autonomic_Nervous_SystemM_Drugs_PPT.pptx
PPTX
microtomy kkk. presenting to cryst in gl
PPTX
Cerebral_Palsy_Detailed_Presentation.pptx
PPTX
_+✅+JANUARY+2025+MONTHLY+CA.pptx current affairs
PPTX
OnePlus 13R – ⚡ All-Rounder King Performance: Snapdragon 8 Gen 3 – same as iQ...
PPT
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
PPTX
Definition and Relation of Food Science( Lecture1).pptx
PPTX
PE3-WEEK-3sdsadsadasdadadwadwdsdddddd.pptx
PPTX
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
PDF
Manager Resume for R, CL & Applying Online.pdf
PDF
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
PPTX
Surgical thesis protocol formation ppt.pptx
PPTX
Overview Planner of Soft Skills in a single ppt
PPTX
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
DOCX
How to Become a Criminal Profiler or Behavioural Analyst.docx
PPTX
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
PDF
シュアーイノベーション採用ピッチ資料|Company Introduction & Recruiting Deck
PDF
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf
Job-opportunities lecture about it skills
Gsisgdkddkvdgjsjdvdbdbdbdghjkhgcvvkkfcxxfg
Autonomic_Nervous_SystemM_Drugs_PPT.pptx
microtomy kkk. presenting to cryst in gl
Cerebral_Palsy_Detailed_Presentation.pptx
_+✅+JANUARY+2025+MONTHLY+CA.pptx current affairs
OnePlus 13R – ⚡ All-Rounder King Performance: Snapdragon 8 Gen 3 – same as iQ...
BCH3201 (Enzymes and biocatalysis)-JEB (1).ppt
Definition and Relation of Food Science( Lecture1).pptx
PE3-WEEK-3sdsadsadasdadadwadwdsdddddd.pptx
FINAL PPT.pptx cfyufuyfuyuy8ioyoiuvy ituyc utdfm v
Manager Resume for R, CL & Applying Online.pdf
313302 DBMS UNIT 1 PPT for diploma Computer Eng Unit 2
Surgical thesis protocol formation ppt.pptx
Overview Planner of Soft Skills in a single ppt
ESD MODULE-5hdbdhbdbdbdbbdbdbbdndbdbdbdbbdbd
How to Become a Criminal Profiler or Behavioural Analyst.docx
chapter 3_bem.pptxKLJLKJLKJLKJKJKLJKJKJKHJH
シュアーイノベーション採用ピッチ資料|Company Introduction & Recruiting Deck
Daisia Frank: Strategy-Driven Real Estate with Heart.pdf

jEQN a java-based language for the distributed simulation of queueing networks

  • 1. jEQN A Java-Based language for the distributed simulation of queueing networks Andrea D’Ambrogio, Daniele Gianni and Giuseppe Iazeolla Dept. of Computer Science University of Roma “Tor Vergata” Roma (Italy) Presented by Daniele Gianni PhD Student Dept. Of Computer Science University of Roma “TorVergata” Roma (Italy)
  • 2. Presentation Overview  Problems of building HLA-based distributed simulators of Extended Queueing Network (EQN) systems  Improving HLA-based development performance by use of jEQN • jEQN main goals • jEQN system architecture  jEQN Example  jEQN Effort Saving The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 2
  • 3. Problems of building distributed simulators of EQN systems  Tools to build local EQN simulators  Not easy, and often not possible, to port them on distributed environments  EQN simulators not supported by current Distributed Simulation (DS) environment (e.g.: HLA, DIS, etc.) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 3
  • 4. Problems of using HLA  What HLA offers: • A general framework to develop several kinds of distributed simulators • Distributed simulation oriented services  What HLA does not support: • Federate internal issues as:  Events management,  Federate logic – RTI synchronizations,  Etc. • Explicit simulation paradigms (Continuous Simulation, Discrete Event Simulation (DES) – PI, ES, AS –, etc.) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 4
  • 5. Steps in developing HLA simulators  Development of an HLA distributed simulator requires:  HLA knowledge  Decisions on design choices: • Which federates to be developed? Which can be reused? • Which Time Advancing modality? • Which data to be exchanged and with which? • Which communication modalities to be used? The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 5
  • 6. This paper problem How to develop an EQN HLA-based distributed simulator • Without  knowledge of HLA (or the DS environment in general)  need of decisions on HLA-related design choices (or the DS environment in general) • By use of a Java-Based language As it were a local simulator The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 6
  • 7. This paper solution Introduces a Java-Based language to:  Build EQN simulators without being aware of the actual running environment (either local or distributed) Basing the language on a layered architecture to:  Port jEQN simulators on several distributed environments (e.g.: HLA, DIS, etc.) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 7
  • 8. jEQN System Architecture Layer 4 jEQN Simulation Language Layer Layer 3 Implementation of the jEQN Simulation Language Layer 2 Execution Container LocalEngine DistributedEngine Layer 1 Distributed DES Abstraction Layer 0 Any other Distributed (Distributed Simulation HLA DIS Simulation Infrastructure Infrastructure) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 8
  • 9. Layer-1 (Distributed DES Abstraction) Objective: to implement the Distributed DES services basing on HLA services How-to: by supporting the DES time-advancement and by invoking specific HLA services Services offered to Layer-2: <<interface>> Layer2ToLayer1Interface +initDistributedSimulationInfrastructure() +waitNextDistributedEvent() +waitNextDistributedEventBeforeTime() The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 9
  • 10. Layer-1 implementation on HLA Components: DDES Engine: - To configure the RTI to run according to the DES paradigm - To synchronize the local environment to the distributed one - To allow transparent sendings of local events FederationManager (HLA federate): to manage the distributed environment in order to warrant a DES execution in the starting-up phase The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 10
  • 11. Layer-2 (Execution Container) Objective: to realize an abstract Execution Container for Layer-3 simulation components How-to: by proving DES services through its interfaces Services offered to: Layer-3 Layer-1 <<interface>> Layer3ToLayer2Interface <<interface>> Layer1ToLayer2Interface +registerEntity(in e : Entity) +registerPort(in p : Port) +scheduleEvent(in e : Event) +registerLink(in l : Link) +startEngine() The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 11
  • 12. Layer-2 implementation Components:  Entity: a logical process, i.e. a fundamental building block in the PI paradigm (Local or Remote).  Event: the basic events in the PI paradigm (e.g.: start, notify, sleep, etc.)  Port: used by Entities to send and receive Events (Input or output, Local or Distributed)  Link: connects output Ports to input Ports (P2P, Multi- Sender/Recipient, Local or Distributed):  Engine: facility for the simulator initialization and execution (Local and Distributed PI) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 12
  • 13. Components example relationships Key Entity E1 Entity E2 Entity Input Port Output Port Link (Event flow) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 13
  • 14. Engine Component <<interface>> <<interface>> Layer1ToLayer2Interface Layer3ToLayer2Interface +scheduleEvent(in e : Event) +registerEntity(in e : Entity) +registerPort(in p : Port) +registerLink(in l : Link) +startEngine() «interface» Engine The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 14
  • 15. Layer-3 (Implementation of jEQN Language) Each jEQN component: - Specializes Layer 2 Entity by specifying its own behaviour (reaction to external events) - Defines the input and output ports - Provides flexible parametrization The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 15
  • 16. jEQN Components 1) User sources 2) Waiting systems 3) Service centers 4) Routers 5) Special nodes 6) Support components (users, service requests, probabilities, etc.) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 16
  • 17. Layer-4 jEQN Language (Example Model) Waiting System Service Center 0.7 1 1 Waiting (ws1) System Service Finite Source Center Router Waiting (10 users, 4 cats) 0 0 System Service (ws0) Center 2 2 0.3 (ws2) The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 17
  • 18. Local Simulator – Entity declarations // Source and related components MultiCatUsersGenerator ug = new MultiCatUsersGenerator(new UniformStream(0,3)); Category c<i> = new Category("<i>"); ug.addUsersGenerator(new SingleCatUsersGenerator(c<i>)); FiniteSource s = new FiniteSource("source", ug, new ExponentialStream(lambda), numberOfUsers); //WaitingSystem and related components CategoryBasedQueuesAssigner qa0 = new CategoryBasedQueuesAssigner(); qa0.addCategoryToQueueMapping(category<i>, <i>, "Queue<i>"); MultiUsersQueues mq0 = new ScanMultiUsersQueues(qa0); mq0.addUsersQueue(new InfiniteFIFOUsersQueueVector()); ResourceRequestGenerator rg0 = new SingleCatResourceRequestGenerator(new NormalStream(mu, sigma); WaitingSystem ws0 = new WaitingSystem("multiQueue0", mq0, rg0); //ServiceCenter ServiceCenter sc0 = new DoubleNonPreemptiveServiceCenter("serviceCenter0") //Router double rp[] = {0.7, 0.3}; Router r = new ProbabilityBasedRouter("router", rp); The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 18
  • 19. Local Simulator – Links and Engine start // Links new SimpleLink(ws0.getUsersOutPort(), sc0.getUsersInPort()); new SimpleLink(sc0.getUsersSynchPort(), ws0.getUsersSynchPort()); new SimpleLink(ws1.getUsersOutPort(), sc1.getUsersInPort()); new SimpleLink(sc1.getUsersSynchPort(), ws1.getUsersSynchPort()); new SimpleLink(ws2.getUsersOutPort(), sc2.getUsersInPort()); new SimpleLink(sc2.getUsersSynchPort(), ws2.getUsersSynchPort()); new SimpleLink(r.getUsersOutPort(0), ws1.getUsersInPort()); new SimpleLink(r.getUsersOutPort(1), ws2.getUsersInPort()); MultiSenderLink msl = new MultiSenderLink(ws0.getUsersInPort()); msl.connectWith(s.getUsersOutPort()); msl.connectWith(sc1.getUsersOutPort()); msl.connectWith(sc2.getUsersOutPort()); // Engine start statement engine.start(); The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 19
  • 20. Distributed Simulator Federate1 Federate0 Waiting System Service Center 0.7 1 1 Waiting (ws1) System Service Finite Source Center Router Waiting (10 users, 4 cats) 0 0 System Service (ws0) Center 2 2 0.3 (ws2) Federate2 The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 20
  • 21. Distributed Simulator – Entity declarations 1) For each simulator (Federates 0 through 2): • Copy and paste the entity declaration statements for each entity to be run in the proper simulator • Copy and paste the link statements among entities in the same federate i.e. Federate0: Source, WS0, SC0 and Router Federate1: WS1, SC1 Federate2: WS2, SC2 The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 21
  • 22. Distributed Simulator – Remote Entity declarations 2) For each simulator (Federates 0 through 2): : Introduce local references to remote entities through the meta-statement: EntityRef eRef = new EntityRef(“<FederateName>”,“<EntityName>”); And local references to remote ports through the meta- statement: DisInPort inPortRef = new DisInPort(“<PortName>”, eRef); The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 22
  • 23. Distributed Simulator – Distributed link declarations In practice, for Federate0: - EntityRef to WS1 and WS2 - DisInPort to WS1 and WS2 inPorts Federate1: - EntityRef to WS0 - DisInPort to WS0 inPorts Federate2: - EntityRef to WS0 - DisInPort to WS0 inPorts The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 23
  • 24. jEQN Effort Savings  jEQN users can concentrate on the model description  This brings an effort savings (in MM) of • Around 30% for average experienced developers • Around 60% for beginners compared with a EQN HLA-based simulator developed without jEQN  Besides a fixed saving of about 1.2 MM per federate The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 24
  • 25. Conclusions  Definition of jEQN a simulation language that can equivalently support local or distributed simulation by the transparent use of DS standards  jEQN facilitates the development of local or HLA-based distributed simulators of EQNs  jEQN is implemented as a Java library  jEQN is based upon four software layers to isolate the simulator developer from the implementation of underlying services (also HLA services).  No extra effort to implement a distributed EQN simulator than the local one.  Significant savings in effort. The 21st International Symposium on Computer and Information Sciences 2006 (ISCIS06), Nov 1st - 3rd, Istanbul, TR 25