The document presents jRand, a Java-based generalized framework for producing simulation sequences. jRand increases flexibility in configuring input sequences for simulations. It uses a producer-consumer pattern where random generators produce sequences that are consumed by simulation software. jRand defines interfaces for different types of streams and allows compositions of streams using transformations. An example computer network simulation demonstrates how jRand can be used to model different components with random inputs. Preliminary results suggest jRand has minimal performance overhead.
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Producing simulation sequences using a Java-based generalized framework
1. Producing simulation sequences by use of
a Java-based generalized framework
D. Gianni, A. D’Ambrogio, G. Iazeolla, A. Pieroni
Dept. Of Computer Science
University of Rome TorVergata
presented by
Daniele Gianni
gianni@info.uniroma2.it
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008 1
2. Presentation Overview
Random numbers in simulation
Problem statement
Motivations
jRand: generalised framework for sequences
Example Application
Preliminary performance assessment
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
2
3. Random Numbers in Simulation
The modelling of physical systems is based on:
Identification of system components (static and
dynamic properties)
Identification of their relationships
Random numbers: grouping components into
macro components with analogous properties
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
3
4. Random Numbers in Simulation
In computer systems random variable are emulated
with predetermined and finite sequences of
numbers
The sequences need to be properly designed to
guarantee that they present good statistical
qualities
Several sequences are often needed for a single
simulation experiment European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
4
5. Problem Statement
Observation (O1):
The pattern of model logic is independent from the input
sequence
How can we improve the deployment of input
sequences in a simulator?
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
5
6. Motivations
Large models present wide numbers of random
variables
They are also complex in terms of model logic
and wide number of components
Simulator developers need not be concerned
with input sequence details when implementing
the model logic
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
6
7. Introducing jRand
We introduce jRand a Java component-based framework
to produce sequences of numbers
jRand increases the flexibility in the configuration of the
input sequences
jRand raises the simulation system developers from their
details while designing and coding simulation software,
therefore sequences can be designed and applied with
less effort for the investigated scenarios
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
7
8. jRand Core Concept
Producer/Consumer Pattern
Sequence Sequence
Producer Consumer
Random generators Simulation software
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
8
9. jRand Main Concepts
Object Stream (base interface):
• getNext(): Object
• goTo(Integer i): Void
Stream Classified according to three properties:
a. dependences between values in a sequence (Random, Pseudo-
Random, Deterministic)
b. the type of values (Objects, Numbers, etc.)
c. the structural details of the objects producers (Transformations, e.g.:
composition of two of more streams)
a. Round robin selection of one stream out of a set of a streams
b. Shuffled Stream – shuffles a stream with a numeric sequence
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
9
10. jRand Class Diagram
«interface»
ObjectStream
+getNext() : Object
+goTo(in n : long long(idl))
«interface» «interface»
«interface» «interface» «interface»
NumericStream StreamTrasformation
DeterministicStream PseudoRandomStream RandomStream
+getNext() : Number
+goTo()
RoundRobinStreamTransformation
«interface» «interface» «interface»
DeterministicNumericStream PseudoRandomNumericStream RandomNumericStream
ShuffledStreamTransformation
SystemNanoSeconds
«interface» «interface»
CoreGenerators DistributionGenerators NumericStreamTrasformation
Exponential Poisson
LinearTranformation
Gaussian K-Erlang
BoundedNumericStream
Coxian
IntegerizedStream
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
10
11. jRand Numeric Stream
Specialises ObjectStream with the semantics of
numbers
Interface:
• getNextNumber(): Number
• goTo(Integer i): Void
Properties a., b., and c. are now evaluated with
the “specialised” semantic:
a. Statistical tests
b. Real, Integer
c. Arithmetical operations (Linear combination, mod, etc.)
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
11
12. Example of Use
Core generator :
JavasimGenerator():
Y[i+1] = Y[i] * (55 mod 226);
Y[0] = 772531 (period 224)
Shuffled with a LCG
#1 NumericStream numericStream;
#2 CoreGenerator cg = new JavasimGenerator();
#3 numericStream = new Exponential(cg, lambda);
#4 Number n numericStream.getNextNumber();
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
12
13. Example of Use
jRand in Computer Network Simulation
WAN
(protocol functions of (protocol functions of
Host A Gateway 1 Gateway 2 OSI levels 2 and 1)
OSI levels 2 and 1)
get
Packet source LAN 1 LAN 2
...
(protocol functions Disassembler Fragmentor Transfer Reassembler Fragmentor
OSI levels 6 and 5) (protocol functions of
OSI levels 4 and 3)
Send/
Acknowledgment
through WAN Host B
(protocol functions of OSI
levels 6 and 5)
Packet Sink
Release (protocol functions of
OSI levels 4 and 3)
Ack Sink
...
Acknowledger Reassembler
Flow Control
(Pool of Tokens)
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
13
15. Conclusions
Designing input sequences for simulation studies is a
critical task because the quality and representativeness
of simulation results heavily depend on it
Accurate results require systematic investigations in
multiple scenarios and diverse sequences
The complete and easy control of the sequences is
fundamental to effectively carry out such studies
We presented jRand, a flexible framework for the
representation of such sequences that can be modified
or substituted with very little effort
Beside that, jRand also raises system developers from
the details of the input sequences and contributes to
ease the implementation of model logic
European Modelling Symposium 2008
Liverpool, United Kingdom, September 8 – 10, 2008
15