#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 () |
adevs::ParSimulator< X >::ParSimulator | ( | Devs< X > * | model, | |
MessageManager< X > * | msg_manager = NULL | |||
) |
Create a simulator for the provided model. The Atomic components will be assigned to the preferred processors, or assigned randomly if no preference is given or the preference can not be satisfied. The message manager is used to handle inter-thread events. If msg_manager is NULL, the assignment and copy constructors of output objects are used and their is no explicit cleanup (see the MessageManager documentation). This constructor assumes all to all connection of the processors.
adevs::ParSimulator< X >::ParSimulator | ( | Devs< X > * | model, | |
LpGraph & | g, | |||
MessageManager< X > * | msg_manager = NULL | |||
) |
This constructor 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.
adevs::ParSimulator< X >::~ParSimulator< X > | ( | ) |
Deletes the simulator, but leaves the model intact. The model must exist when the simulator is deleted, so delete the model only after the simulator is deleted.
void adevs::ParSimulator< X >::execUntil | ( | double | stop_time | ) | [virtual] |
Execute the simulator until the next event time is greater than the specified value. There is no global clock, so this must be the actual time that you want to stop.
Implements adevs::AbstractSimulator< X >.