Distributed Virtual Environment and Simulation Package - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Distributed Virtual Environment and Simulation Package

Description:

The federates executive function removes the tick event from the event queue. ... The tick event is forwarded, by the simulators event handler, to all objects ... – PowerPoint PPT presentation

Number of Views:21
Avg rating:3.0/5.0
Slides: 18
Provided by: Ste8259
Category:

less

Transcript and Presenter's Notes

Title: Distributed Virtual Environment and Simulation Package


1
Distributed Virtual Environment and Simulation
Package
  • Stephen Lawrence
  • stevel_at_cc.gatech.edu

2
Overview of Topics
  • Type of Simulation
  • Federation Organization
  • Class Organization
  • Internals of some DVESIM classes
  • Creating a Federate
  • Creating Simulation Objects

3
Type of Simulation
  • Object Based Simulation (using c)
  • Simulator, object(such as a tank or projectile),
    and battlefield classes
  • new object types are created by sub-classing
    existing objects
  • Event Driven
  • Classes define event handlers to process events
  • Federated (using DRTI)
  • Each federate has local and non-local entities
  • object updates are only send when needed
  • Messages are sent between user and entities

4
Federation Organization
UI Federate
UI Federate
5
Federation Organization (cont)
  • Simulator Federates
  • Each controls a number of objects within the
    simulation world
  • Sends and received updates and interactions
    concerning its objects, and objects controlled
    by other federates
  • UI Federates
  • Allows users to view and interact with object in
    the Federation

6
Class Organization
Simulator Federate Classes
Structure
Entity
Projectile
subclass
7
Internals Simulator ClassEach simulator
federate runs one instance of the simulator class
  • Manages Event Queue
  • Schedules events
  • Dispatches events to objects
  • Simulates Battlefield
  • Collision/proximity detection
  • Projectile detonation
  • Federate communication
  • sends and receives events such as object updates
    and messages

8
Internals Simulator Class (continued)
9
Internals Simulator Class (continued)
  • Simulation Class Execution
  • init()
  • Schedule all new object events for all local
    objects.
  • Sets up simulation state
  • schedules first new state event
  • run()
  • while event-queue not empty
  • process event
  • deliver event to object if necessary
  • finishUp()

10
Internals Simulator Class Example
  • The federates executive function removes the tick
    event from the event queue.
  • The tick event is passed to the federates tick
    event handler (a method of it's simulator class).
  • The tick event is forwarded, by the simulators
    event handler, to all objects in the battlefield.
  • The simulator class checks for collision between
    it's local objects and all objects in the
    battlefield (local and foreign).
  • A new tick event is created and scheduled for
    some small time in the future.

11
Internals Battlefield Class
  • Manages objects
  • objects hashed by RTIObjectHandle for fast
    access
  • Provides means for objects to access other
    objects
  • Contains both locally controlled objects, and
    objects controlled by other federates.
  • Terrain Information (not implemented)
  • provides terrain type for given coordinates on
    the battlefield
  • objects view the world in only two dimensions,
    the battlefield provides additional elevation and
    slope information when needed

12
Internals Event Class
  • Stores Event Information (TimeStamp, details)
  • Tick Event -gt triggers location updates and
    collision detection
  • New Object Event -gt adds a new object to the
    battlefield
  • Order Event -gt sends object and simulation
    messages, such as orders, simulation over, etc
  • Other Events
  • Movement Event, Collision Event, Proximity
    Event,Detonation Event, User Defined Events

13
Internals Event Class Example
  • Collision event is passed to the event handler by
    the executive function when it is safe to
    process.
  • The event handler passes the collision event to
    the local object involved in the collision (if
    two local objects are in collision, each will get
    it's own event).
  • The object reacts to the collision event. The
    default action is to do nothing, but subclasses
    of the object type can redefine the event
    handlers to do something interesting, such as
    stop, change direction, or calculate a new path.

14
Internals Object Class
  • Physical State Information (location, velocity,
    acceleration)
  • Processes New State events to update its
    physical state
  • Entity Subclass
  • Provides basic movement services (set
    heading/location, etc)
  • Fires projectiles

15
Internals Object Class (continued)
  • Object Class Execution
  • A new object is created and stored in new object
    event
  • The simulator later processes new object event
  • Calls object init() function
  • Sends New State and other events to object
  • Object is removed by a call to exitObject()
  • objects finishUp() function is called, and the
    object is deleted

16
Internals Object Class Example
  • Simulator federate 1 schedules schedules a new
    object event for object A at time 1, register's
    an object instance for it within the federation,
    and sends an attribute update for the the object
    with timestamp 1
  • Simulator federate 2 discovers the object,
    creates a new object instance, and puts it in a
    temporary holding place.
  • When requesting a Next Event Request for time 1,
    federate 2's RTI ambassador delivers the
    attribute update for object A
  • Federate 2, now having received the first
    attribute information about object A, schedules a
    new object event with timestamp 1, which will be
    processed to add object A to it's battlefield.
  • After completing a Next Event Request for
    timestep 1, federate 1 will be able to process
    it's new object event and add object A to it's
    battlefield.

17
Internals Visualization
  • Displays all the objects in the federation
  • Paces the simulation with wallclock time
  • Allows user to send messages to the objects
    (entities)
Write a Comment
User Comments (0)
About PowerShow.com