1 / 23

SPEEDES

SPEEDES. Charles Lenk, James Timmerman. Outline. SPEEDES - What is it? What has it been used for? SPEEDES Object SPEEDES Event Example Code Two Simulation Modes Rollback Parallel Computation The Event Horizon Advantages Disadvantages SPEEDES vs Time Warp Contributions / Improvements.

Download Presentation

SPEEDES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SPEEDES Charles Lenk, James Timmerman

  2. Outline • SPEEDES - What is it? • What has it been used for? • SPEEDES Object • SPEEDES Event • Example Code • Two Simulation Modes • Rollback • Parallel Computation • The Event Horizon • Advantages • Disadvantages • SPEEDES vs Time Warp • Contributions / Improvements

  3. SPEEDES Synchronous Parallel Environment for Emulation and Discrete- Event Simulation

  4. What has it been used for? • Airspace simulation • Missile defense

  5. SPEEDES Object • Can be physical objects that change or move • The simulation object can be anything, as long as it can have events that change it • Objects inherit from SpSimObj

  6. SPEEDES Event • An event is a C++ function that can modify the simulated object • You can schedule events to take place at a future time and SPEEDES takes care of applying the event Event: Butterfly flaps its wings Weather Object: State changed to hurricane

  7. Example Code // S_HelloWorld.H #include "SpSimObj.H" #include "SpDefineSimObj.H" #include "SpDefineEvent.H" class S_HelloWorld : public SpSimObj { public: S_HelloWorld() {} virtual void Init(); void HelloWorldEvent(); }; DEFINE_SIMOBJ(S_HelloWorld, 1, SCATTER); DEFINE_SIMOBJ_EVENT_0_ARG(HelloWorldEvent, S_HelloWorld, HelloWorldEvent);

  8. Example Code Continued // S_HelloWorld.C #include "S_HelloWorld.H" void S_HelloWorld::Init() { if (SpGetSimObjKindId() == 0) { SCHEDULE_HelloWorldEvent(0.0, SpGetObjHandle()); } } void S_HelloWorld::HelloWorldEvent() { cout << "Hello World" << endl; }

  9. Two Simulation Modes • Conservative • Limits how simulation objects interact • Guarantees that no rollback is ever required • Optimistic • Nodes process events with the hope that an event with an earlier timestamp won’t arrive • Rollbacks may be required

  10. Rollback SPEEDES provides special rollbackable data types • RB_int • RB_double • RB_SpString • RB_voidPtr • RB_ostream • RB_cout

  11. Parallel Computation • One SPEEDES node is one thread of execution • Nodes can be distributed • Multiple CPUs • Multiple networked systems • You can specify the number of nodes as a parameter to the resulting (compiled) program

  12. How does SPEEDES split the work? • Objects can be assigned to nodes (SPEEDES threads) • Nodes execute the events on their respective objects

  13. The Event Horizon • What is it? • Black holes hold on to matter and energy • SPEEDES holds on to messages

  14. Event Horizon in Action • Events in white have been executed this cycle • Events in grey are unreleased messages • Events in black are already scheduled future events

  15. Event Horizon Example Events being executed Unreleased Messages O1 O2 O3

  16. Event Horizon Example Events being executed Unreleased Messages O1 O2 O3

  17. Event Horizon Example Events being executed Unreleased Messages O1 O2 O3

  18. Event Horizon Example Events being executed Unreleased Messages O1 O2 O3

  19. Advantages • SPEEDES is fast • Less computationally expensive than time-stepped simulations • Data structures informed by the event horizon • Reduced anti-messages, no cascading rollback • Supports dynamic simulation object creation • Multiple modes of execution • Conservative • Optimistic

  20. Disadvantages / Limitations • An event can only modify the state of one object • Limited to C++ • Not truly risk-free • Anti-messages • Rollbacks

  21. SPEEDES vs Time Warp

  22. Research Discussion Contributions: • The event horizon model used by SPEEDES can be leveraged by other discrete-event simulators • Increases data structure performance • Greatly reduces anti-messages Suggested Improvements: • Notes on SPEEDES’s event horizon compromises • Comparisons between SPEEDES’s and other’s data structures

  23. Questions?

More Related