The document introduces jEQN, a Java-based language for developing distributed simulations of queueing networks. jEQN aims to allow developers to build EQN simulators without knowledge of distributed simulation frameworks like HLA. It uses a layered architecture to abstract the underlying distributed simulation environment. This allows jEQN simulators developed as local models to be easily deployed in distributed environments with no additional effort, saving significant time compared to direct HLA development.
TEST BANK For Evidence-Based Practice for Nurses Appraisal and Application of...
Java-Based Language for Distributed EQN Simulation
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