// iteration. time = emf->AdvanceTime(); } // Now for fun, go backward and forward in // time. The internal state of the Emf // will reflect the state of the simulation // at the requested emf ->RequestTime(100.0); emf ->RequestTime(500.0); emf ->RequestTime(1000.0); emf ->RequestTime(200.0); // Here is an example of the Emf looping // in 1 second simulated time from // the time to the end time of the // simulation. for (time = START_TIME; time < END_TIME, time++) { // Request the desired time. emf->RequestTime(time); // Get state information about each // simulated entity and then update the // display. } // Before exiting the application, destroy // the EMF. Then, return a clean error code // from the main program. WpDestroyEmf(emf); return 0; } Applications can directly schedule events for any of the objects that are modeled within the EMF using the full capabilities of the OpenUTF standard modeling framework. To maintain causality, applications must never schedule events with time tags that are in the past of their previous largest time request. In addition, the application can schedule simple events for any object residing within the OpenUTF parallel simulation. The time must never be less than the previous largest time request plus lookahead. The following EMF methods are supported. void WpEmf::ScheduleEvent( double time, const char *eventName ); void WpEmf::ScheduleEventClass( double time, const char *eventName, void *data, int dataBytes ); void WpEmf::ScheduleEventData( double time, const char *eventName, void *data, int dataBytes
// iteration. time = emf->AdvanceTime(); } // Now for fun, go backward and forward in // time. The internal state of the Emf // will reflect the state of the simulation // at the requested emf ->RequestTime(100.0); emf ->RequestTime(500.0); emf ->RequestTime(1000.0); emf ->RequestTime(200.0); // Here is an example of the Emf looping // in 1 second simulated time from // the time to the end time of the // simulation. for (time = START_TIME; time < END_TIME, time++) { // Request the desired time. emf->RequestTime(time); // Get state information about each // simulated entity and then update the // display. } // Before exiting the application, destroy // the EMF. Then, return a clean error code // from the main program. WpDestroyEmf(emf); return 0; } Applications can directly schedule events for any of the objects that are modeled within the EMF using the full capabilities of the OpenUTF standard modeling framework. To maintain causality, applications must never schedule events with time tags that are in the past of their previous largest time request. In addition, the application can schedule simple events for any object residing within the OpenUTF parallel simulation. The time must never be less than the previous largest time request plus lookahead. The following EMF methods are supported. void WpEmf::ScheduleEvent( double time, const char *eventName ); void WpEmf::ScheduleEventClass( double time, const char *eventName, void *data, int dataBytes ); void WpEmf::ScheduleEventData( double time, const char *eventName, void *data, int dataBytes
PDMS_Report_Draft_4.docx