Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Middleware Solutions for Simulation & Modeling
1. Interoperability of Multiple Autonomous Simulators
in Integrated Simulation Environments
Leila Jalali
jalalil@uci.edu
http://www.ics.uci.edu/~ljalali/
Prof. Nalini Venkatasubramanian, Prof. Sharad Mehrotra
University of California, Irvine
University of California, Irvine 2011 Spring SIW Leila Jalali
2. Introduction
Simulation: the process of designing a model of a real
world system and conducting experiments with this
model for our purpose: cheaper, safer, easier, and quicker
Planning and decision support- defence simulations,
emergency response simulations
Domain specific Testing and Analysis - traffic analysis, human
behaviour study: crowd dynamics or evacuation simulators,
network simulators
Immersive synthetic platforms for training
University of California, Irvine 2011 Spring SIW Leila Jalali
3. Motivation for New Simulation
Platforms
Many available simulators
Operate on specific domains
e.g fire simulators, transportation simulators
Infeasible to build complex simulations entirely from
scratch
Economic and organizational constraints
The increasingly complex requirements
Need ability to:
Bring together simulators from various modeling domains:
Metasimulations
Model and test larger and more complex scenarios
Study cause- effect relationships to integrate simulators
University of California, Irvine 2011 Spring SIW Leila Jalali
4. Simulation Integration- historical
view
Distributed Interactive Simulation (DIS) High Level Architecture (HLA)
(1990–today) Army Projects (1996-today) Defence
1975 1980 1985 1990 1995 2000
SIMulator NETworking (SIMNET)
(1983–1990) Combat Simulators
Defense Community Aggregate Level Simulation Protocol (ALSP)
(1991–1997ish) War-gaming models
Dungeons and Dragons
Adventure Board Games Multi-User Dungeon (MUD)
(Xerox PARC) Games Multi-User Video Games
Internet & Gaming Community
University of California, Irvine 2011 Spring SIW Leila Jalali
5. Limitations of current
approaches
Existing Integrated platforms, define a standard model
and require the individual simulators to conform to the
standard
It might not be always possible
The standard may not have designed to handle the new simulator
needs
Current model registration needs a lot of manual work
The approaches are costly, time consuming, easily fail, difficult to
HLA:
maintain, difficult to scale from the practitioner
─ Low level knowledge needed
─ Cost issues
─ Complexity
─ No support for semantic interoperability
─ Transparency
─ HLA is too big and mainly applied in defense
Most of other works on simulation integration provided specific services for interoperability
in a small range of cases
University of California, Irvine 2011 Spring SIW Leila Jalali
6. General Challenges
Managing Complexity of Interoperating Systems
Analysis of cause- effect relationships
Reusability: e.g. components, models
We use meta models to describe simulator-related
meta-data
Make the underlying simulator more understandable
Abstract of lower-level details of integration and interoperability
Correctness
Ensure the correctness of metasimulations
Time synchronization: timing issues and causality correctness
Data exchange: data transformations
Scalability
e.g multiple geography
University of California, Irvine 2011 Spring SIW Leila Jalali
7. Reflective Architecture for Integrated
Simulation Environments (RAISE)
Complex Applications
Data Exchange Time Synchronization
dependencies
Ontology Consistency
Translator Synchronizer Controller
Meta level
Pub/Sub Lock-table
meta-actions
Lock Manager
External
Analyzer & Adaptor Data
Sources
Meta models
Structural specification: UML diagrams, metamodels
Interactions: dependency sets, interdependent data
Observe & Extract Reflect
Base level
INLET Drillsim Fire, Earthquake LTESim
(Transportation Model) (Activity Model) (Crisis Model) (Communication Model)
University of California, Irvine 2011 Spring SIW Leila Jalali
8. Using RAISE- step by step
Reification
Extract simulators’ meta-data from base-level simulators (using the source code, interfaces, and
databases) result in metamodels/specifications and data structures at the meta-level
Analysis of metamodels
Extract the model elements and features that need to be integrated from metamodels
Discover inter-dependencies
Run Federation
Modified features of meta data structures that implement the integration are reflected to the base-
level simulators
Ensuring the correctness
Time synchronization, Data management
Parser
Database meta-models
Interfaces
Source code meta-data inter-dependencies
Run Federation: ye
Reification: Extract Analysis of metamodels: end of
Execute actions s
simulators’ meta-data Discover inter-dependencies simulation?
Communicate with metal-level
Generate meta-actions no
Generate wrapper-actions
Ensure Correctness:
Pre-processing
Time synchronization
Data Transformations
Results Analysis
University of California, Irvine 2011 Spring SIW Leila Jalali
9. Reification
Major challenge: the complexity associated with
reification
Creole as an Eclipse plug in
Examine source code dependencies and to extract the
simulator’s features.
Java simulators, not useful for complex and large
simulators
A parser using a tool for large scale code repositories
Meta-level
search
Extract the entities and attributes from a Java/Matlab
Reification Reflection
simulator
Simulator’s source code Base-level
Interfaces
of Databases
University California, Irvine 2011 Spring SIW Leila Jalali
10. Metamodel
Making the
Base level
underlying simulators
Meta level
more understandable
Abstracting out lower-
level details of
integration and
interoperability
Need to be
comprehensive and
extensible
UML and Eclipse
Modeling FrameworkLeila Jalali
University of California, Irvine 2011 Spring SIW
11. Prototype System
Implementation
Analyzer and Adaptor: to provide data transfer between simulators using data
translators
Synchronizer: to monitor and control concurrent execution of multiple
simulations
• Using concepts from serializability theory in transaction processing
• Developed three techniques: conservative, optimistic, hybrid
University of California, Irvine 2011 Spring SIW Leila Jalali
12. Synchronization in
metasimulation
Ensuring causal correctness while preserving
simulators’ autonomy
A transaction-based approach to modeling the synchronization
problem by mapping it to a problem similar to multidatabase
concurrency
A novel Hybrid Scheduling strategy for metasimulation
synchronization which adapts itself to the "right" level of
pessimism/optimism based on the state of the execution and
underlying dependencies
Relaxation model (motivated by divergence control
mechanisms and weak consistency models) which guarantee
bounded violation of consistency
Applying proposed techniques in a detailed case study using
multiple real-world simulators
University of California, Irvine 2011 Spring SIW Leila Jalali
13. Modeling Metasimulation
A metasimulation consists of a set of autonomous pre-
existing simulators S1, S2 , S3 ,…, Sn that execute
concurrently in an integrated environment
Using a transaction-based approach to modeling
metasimulations
Consider each simulator’s execution as a sequence of actions
(time steps in time stepped simulators or events in event based
simulators)
Scheduling multiple simulators actions such that dependencies
be preserved
a three tuple Si=<Ti, Di , Ai> where:
Ti : the type of the simulator
Time stepped or Event based
Di : The data items that the simulator reads or updates. For each data
item, denotes the domain of d, which is a set of values that can be
University of California, Irvine 2011 Spring SIW Leila Jalali
14. Meta-synchronizer
Metasimulation
dependencies meta-actions
MetaSynchronizer
Meta
level
wrapper wrapper
wrapper wrapper
actions . . . actions
Base level
d . . . d’
Simulator i Simulator j
Meta-synchronizer:
Upon receiving an external action from
For all dependant simulators generate meta-
action
Post to meta-action queue
Upon receiving a request
Find all meta-actions from the queue s.t.
and
Send the metactions to
Simulator’s wrapper:
At the beginning of each iteration:
t=current-time
Send a request to get meta-actions
Receive meta-actions
Generate wrapper-actions
At the end of each iteration:
University of California, Irvine
Send all external action 2011 Spring SIW executed to meta-
that have been Leila Jalali
15. Metascheduling strategies
Address the synchronization problem by
controlling the execution of the simulator's actions
to ensure the legality of resulting schedules
Conservative Scheduling: ensures the legality
of schedules by delaying the actions such that the
dependencies are preserved in the concurrent
execution of actions of different simulators
Optimistic Scheduling: we accept the fact that
violations occur, resolve the violation when it
does occur; by aborting the actions that caused
the violation
Hybrid Scheduling: Combines the benefits of
both the optimistic and conservative strategies
University of California, Irvine 2011 Spring SIW Leila Jalali
16. Relaxed Dependencies
Ideally, dependencies need to be reflected from one
simulator into another as soon as update in one simulator
becomes valid in another
In most of applications, ideal behavior results in
unnecessary synchronization overhead and loss of
concurrency among simulators.
Relax the dependencies that capture the extent to which
simulators can deviate from ideal behavior
Time (t-bound): t-bound works as the delay condition which
states how much time the consumer can use a value behind
the new update of the supplier
Value (v-distance): Let be the value of updated by and be
the value of updated by , we consider the difference between
the values of two data item using a user defined distance
function
University Number of changes (n-update):2011 Spring SIW the maximum
of California, Irvine captures Leila Jalali
17. A Case Study for simulation
integration
To validate the proposed reflective architecture
Using three disparate pre-existing simulators:
1. CFAST (Consolidated Model of Fire and Smoke
Transport): a fire simulator
Simulates the effects of fire and smoke inside a building and
Calculates the evolving distribution of smoke, fire gases and
temperature
2. Drillsim: an activity simulator
Multi-agent system that simulates human behavior in a crisis
3. LTESim: a communication simulator
Abstracts the physical layer and performs network level
simulations of 3GPP Long Term Evolution
University of California, Irvine 2011 Spring SIW Leila Jalali
18. Case study- simulators properties
Evacuation Simulator Communication Fire Simulator
Simulator
DrillSim [9] LTESim [31] CFAST [10]
Simulates a Performs network level Simulates the effects of
response activity simulations of 3GPP LTE fire and smoke inside a
evacuation Event based building
Time stepped Open source (in Time stepped
Open source (in Matlab) Black-box (no access to
Java) Parameters: num. of source)
Agent based transmit and receive Parameters: building
Parameters: health antennas, uplink delay, geometry, materials of
profile, visual distance, network layout, channel construction, fire
speed of walking, num. model, bandwidth, properties, etc.
of ongoing call, etc. frequency, receiver noise, Output: temperatures,
Output: num. of etc. pressure, gas
evacuees, injuries, etc Output: pathloss, concentrations: CO2, etc.
throughput, etc.
University of California, Irvine 2011 Spring SIW Leila Jalali
19. An Examlpe: CFAST - Drillsim Interaction
Interaction between Fire simulation and Drillsim
smoke from fire can affect someone’s health
Agents Profile : Health
Harmful conditions in
Agents Actions : Tell
each space at any time
People
CFAST Drillsim
University of California, Irvine 2011 Spring SIW Leila Jalali
21. Inter-dependencies extracted from
metamodels
1. A harmful condition in CFAST can affect an individual’s health in
Drillsim.
2. Agents in Drillsim can communicate information on the fire and its
location –increase the number of ongoing calls (people talk
about the crisis) in Drillsim.
3. Harmful conditions in CFAST can affect the evacuation process in
Drillsim, e.g. increase walking speed which maps to user speed
in LTEsim.
4. Smoke in CFAST can decrease an agent’s visual distance in
Drillsim.
5. The number of ongoing communications in Drillsim can affect
network pathloss and throughput in LTEsim.
6. Pathloss in LTEsim can be used to determine
connectivity/coverage in Drillsim.
7. Information on building layout from CFAST and Drillsim can
determine the number of transmit and receive antenna required
University of California, Irvine 2011 Spring SIW Leila Jalali
22. Experiments
(a) (b) (c)
(a) Average synchronization overhead in different simulation
phases
(b)Total execution time in different simulation phases
(c) Synchronization overhead vs. the number of
dependencies. (in (a) and (b) no. of dependencies=100)
University of California, Irvine 2011 Spring SIW Leila Jalali
23. Experiments- conclusion
Strategy CS CSR OS OSR HS HSR
Metric synch. time synch. time synch. Time synch. time synch. time synch. time
CFAST 425.374 2225.626 348.812 2149.945 340.273 2140.273 309.931 2111.844 498.283 2298.475 316.007 2118.918
DrillSim 431.265 2232.235 331.192 2133.457 312.182 2113.165 252.011 2055.888 453.592 2253.698 288.555 2089.155
LTEsim 156.035 1956.530 99.277 1901.371 4887.753 3378.743 749.009 2550.043 344.005 2144.187 221.079 2023.039
Total 1012.674 6414.391 779.281 6188.723 2230.208 7632.181 1310.951 6717.755 1295.581 6696.360 816.641 6231.112
Hybrid Scheduling exhibits superior overall
performance to other approaches
The choice of the approach is also dependent on the
simulator, e.g. for event based simulators when the
number of external events is large we need to avoid
using OS
Relaxations always help into get better results in terms
of synchronization overhead and total execution time
University of California, Irvine 2011 Spring SIW Leila Jalali
24. Thanks
jalalil@uci.edu
http://www.ics.uci.edu/~ljalali/
University of California, Irvine 2011 Spring SIW Leila Jalali
Notas do Editor
This is a very interesting research proposal that will requireknowledge in various domains: simulation, middleware technology,software engineering. and databases!
e.g. update an agent’s health in Drillsim based on the harmful condition in CFASTGeometry Transformer: different representation of coordinate systems and resolutions, Using a set of guide points in multiple geographies and determine a coordinate transform matrix