#include <adevs_par_simulator.h>
Inheritance diagram for adevs::ParSimulator< X >:
Public Member Functions | |
ParSimulator (Devs< X > *model, MessageManager< X > *msg_manager=NULL) | |
ParSimulator (Devs< X > *model, LpGraph &g, MessageManager< X > *msg_manager=NULL) | |
double | nextEventTime () |
Get the model's next event time. | |
void | execUntil (double stop_time) |
~ParSimulator () |
To work, your models must have a positive lookahead, your event listeners must be thread safe, and your atomic models must not share any state variables. The conservative simulator is a little more restrictive than the single processor Simulator. You can not inject input into a running simulation, and you must tell it when to stop. The simulator will not halt automatically when there are no more events left (there is no global simulation clock, and so time just keeps creeping forward until the specified end time is reached).
Don't expect too much from this simulator. Unless you have a lot of lookahead, your time advances tend to be about the size of the lookahead, and you carefully partition your models between processors, this simulator is likely to slow things down rather than speed them up. I hope that, with time, it will acquire greater practical value.
|
Create a simulator for the provided model. The Atomic components will be assigned to the prefered processors, or assigned randomly if no preference is given or the preference can not be satisfied. |
|
This constructor also accepts a directed graph whose edges tell the simulator which processes feed input to which other processes. For example, a simulator with processors 1, 2, and 3 where 1 -> 2 and 2 -> 3 would have two edges: 1->2 and 2->3. |
|
Deletes the simulator, but leaves the model intact. The model must exist when the simulator is deleted. Delete the model only after the simulator is deleted. |
|
Execute the simulator until the next event time is greater than the specified value. There is no global clock, and so this must be the actual time that you want to stop. Implements adevs::AbstractSimulator< X >. |