Professional Documents
Culture Documents
Outline
Intro: DVE example Federated Simulations Basic Services
Class Based Subscription Attribute updates Tick Synchronized delivery: Time management
network interface
sound generator
Execute every 1/30th of a second: receive incoming messages & user inputs, update state of remote vehicles update local display for each local vehicle compute (integrate) new state over current time period send messages indicating new state
Reproduced from Miller, Thorpe (1995), SIMNET: The Advent of Simulator Networking, Proceedings of the IEEE, 83(8): 1114-1123.
Typical Sequence
visual display 3 6 7 4 network interface 8
sound generator 2
4. Send fire message 5. Display muzzel flash 6. Compute trajectory, display tracer 7. Display shell impact
4 network interface
8 11
8. Send detonation message 9. Display shell impact 10. Compute damage 11. Send Entity state message indicating damage
sound generator
Controls/panels
Federated Simulations
Interconnecting autonomous simulators Federation
Simulation (federate)
Simulation (federate)
Simulation (federate)
Interface Specification
Interface Specification
Runtime Infrastructure(RTI)
Services to create and manage the execution of the federation Federation setup / tear down Transmitting data among federates Synchronization
Broadcast
Receiver discards messages not relevant to it Used in SIMNET, DIS (initially) Doesnt scale well to large federations
Example
Federate 1
PublishOCA (Tank, position) handle := RegisterOI (Tank) UpdateAV (handle, position, <30,89>)
Federate 2
SubscribeOCA (Tank, position) DiscoverOI (Tank, instance) ReflectAV (instance, position, <30,89>)
RTI
Federate
Federate ambassador Update RTI ambassador Reflect
RTI
Single-threaded implementation
RTI and federate share a single thread of execution (like libraries) Federate must explicitly pass control to the RTI, e.g., to deliver messages Tick() procedure is defined for this purpose Callbacks (Discover, Reflect) made within Tick
Federate
Tick
RTI
ReflectAttributeValues
return (RAV)
/* Federate ambassador */ Proc ReflectAttributeValues () { save incoming message in buffer Waiting4Message := FALSE; }
return (Tick)
RTI
T
local events
federate
current time
Federate: next local event has time stamp T If no TSO messages w/ time stamp < T, advance to T, process local event If there is a TSO message w/ time stamp T T, advance to T and process TSO message
Else
RTI advances federates time to T, invokes Time Advance Grant (T) Typical execution sequences
Federate
Federate
RTI NER(T) NER: Next Event Request TAG(T) TAG: Time Advance Grant RAV: Reflect Attribute Values Federate calls in black RTI callbacks in red
no TSO events
Summary
Distributed simulation: federates, RTI Federates
Model some subset of entities in virtual world Send messages to other federates concerning aspects of entities that are visible to entities in other federates
RTI services
Setting up and realizing communication among federates Control and management of federation execution Synchronizing message delivery (if needed)