Middleware Solutions for Simulation & Modeling
-
Upload
leila-jalali -
Category
Technology
-
view
359 -
download
2
Transcript of Middleware Solutions for Simulation & Modeling
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Interoperability of Multiple Autonomous Simulators in Integrated Simulation
Environments
Leila [email protected]
http://www.ics.uci.edu/~ljalali/
Prof. Nalini Venkatasubramanian, Prof. Sharad Mehrotra
University of California, Irvine
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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 quickerPlanning and decision support- defence simulations,
emergency response simulationsDomain specific Testing and Analysis - traffic analysis,
human behaviour study: crowd dynamics or evacuation simulators, network simulators
Immersive synthetic platforms for training
Introduction
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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 scratchEconomic and organizational constraints The increasingly complex requirements
Need ability to:Bring together simulators from various modeling domains:
MetasimulationsModel and test larger and more complex scenarios Study cause- effect relationships to integrate simulators
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Simulation Integration- historical view
1975 1980 1985 1990 1995 2000
SIMulator NETworking (SIMNET)(1983–1990) Combat Simulators
Distributed Interactive Simulation (DIS)(1990–today) Army Projects
Aggregate Level Simulation Protocol (ALSP)(1991–1997ish) War-gaming models
High Level Architecture (HLA) (1996-today) Defence
Defense Community
Adventure(Xerox PARC)
Dungeons and DragonsBoard Games Multi-User Dungeon (MUD)
Games
Internet & Gaming Community
Multi-User Video Games
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Limitations of current approaches
Existing Integrated platforms, define a standard model and require the individual simulators to conform to the standardIt might not be always possibleThe standard may not have designed to handle the new
simulator needsCurrent model registration needs a lot of manual workThe approaches are costly, time consuming, easily fail,
difficult to maintain, difficult to scale
Most of other works on simulation integration provided specific services for interoperability in a small range of cases
HLA:─ Low level knowledge needed from the practitioner ─ Cost issues─ Complexity─ No support for semantic interoperability─ Transparency─ HLA is too big and mainly applied in defense
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
General ChallengesManaging Complexity of Interoperating
SystemsAnalysis of cause- effect relationshipsReusability: e.g. components, modelsWe use meta models to describe simulator-
related meta-dataMake the underlying simulator more understandableAbstract of lower-level details of integration and
interoperability
CorrectnessEnsure the correctness of metasimulations
Time synchronization: timing issues and causality correctness
Data exchange: data transformations
Scalabilitye.g multiple geography
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Reflective Architecture for Integrated Simulation Environments (RAISE)
INLET(Transportation Model)
Drillsim(Activity Model)
Fire, Earthquake(Crisis Model)
LTESim(Communication Model)S
IMU
LA
TO
RS
RA
ISE
M
idd
lew
are
Meta models
Analyzer & Adaptor Met
a le
vel
Complex Applications
External Data
Sources
Observe & Extract Reflect
Bas
e le
vel
Structural specification: UML diagrams, metamodelsInteractions: dependency sets, interdependent data
Lock Manager
Lock-table
Consistency Controller
dependencies
meta-actions
Synchronizer
Time SynchronizationData Exchange
Pub/Sub
OntologyTranslator
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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
Reification: Extract simulators’
meta-data
Analysis of metamodels:Discover inter-dependencies
Ensure Correctness:Time synchronizationData Transformations
Run Federation:Execute actions Communicate with metal-levelGenerate meta-actionsGenerate wrapper-actions
Pre-processing
Results Analysis
end of simulation?
no
yes
ParserDatabaseInterfacesSource code meta-data
meta-modelsinter-
dependencies
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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
simulatorsA parser using a tool for large scale code
repositories searchExtract the entities and attributes from a
Java/Matlab simulator Simulator’s source codeInterfacesDatabases
Reification
Meta-level
Base-level
Reification Reflection
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Making the underlying simulators more understandable
Abstracting out lower-level details of integration and interoperability
Need to be comprehensive and extensible
UML and Eclipse Modeling Framework
Metamodel
Base level
Meta level
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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
Prototype System Implementation
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Synchronization in metasimulation
Ensuring causal correctness while preserving simulators’ autonomyA 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
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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 metasimulationsConsider 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 assigned to d.
Ai : the set of actions
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Meta-synchronizer
Simulator i
. . .
Met
a le
vel
dependencies meta-actions
Metasimulation
d
Simulator j
d’
Bas
e le
vel
MetaSynchronizer
wrapper wrapper
. . .wrapperactions
wrapperactions
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: Send all external action that have been executed to meta-synchronizer
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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 (details not available in the slides)
Metascheduling strategies
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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 behaviorTime (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
Number of changes (n-update): captures the maximum number of updates of supplier on before they become reflected on consumer
Relaxed Dependencies
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
To validate the proposed reflective architectureUsing 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
A Case Study for simulation integration
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Case study- simulators properties
Evacuation Simulator
Communication Simulator
Fire Simulator
DrillSim [9] Simulates a response activity evacuationTime steppedOpen source (in Java)Agent basedParameters: health profile, visual distance, speed of walking, num. of ongoing call, etc. Output: num. of evacuees, injuries, etc
LTESim [31]Performs network level simulations of 3GPP LTEEvent basedOpen source (in Matlab)Parameters: num. of transmit and receive antennas, uplink delay, network layout, channel model, bandwidth, frequency, receiver noise, etc. Output: pathloss, throughput, etc.
CFAST [10]Simulates the effects of fire and smoke inside a buildingTime steppedBlack-box (no access to source)Parameters: building geometry, materials of construction, fire properties, etc. Output: temperatures, pressure, gas concentrations: CO2, etc.
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
CFAST Drillsim
Interaction between Fire simulation and Drillsim
smoke from fire can affect someone’s health
An Examlpe: CFAST - Drillsim Interaction
Agents Profile : HealthAgents Actions : Tell
People
Harmful conditions in each space at
any time
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Metamodels
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Inter-dependencies extracted from metamodels1. 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 in LTEsim.
8. Number of evacuees from Drillsim determines the number of users in LTEsim.
9. Number of evacuees in Drillsim can affect receiver noise in LTEsim.
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
(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)
Experiments
(a) (b) (c)
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
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
Experiments- conclusionStrategy CS CSR OS OSR HS HSRMetric 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
Leila JalaliUniversity of California, Irvine 2011 Spring SIW
Thanks
[email protected]://www.ics.uci.edu/~ljalali/