Simpact Cyan
Population based event driven simulation using mNRM
|
An interface for a population based mNRM algorithm. More...
#include <populationinterfaces.h>
Public Member Functions | |
virtual bool_t | init ()=0 |
Abstract function to initialize the implementation used. More... | |
virtual bool_t | run (double &tMax, int64_t &maxEvents, double startTime=0)=0 |
This should be called to actually start the simulation, do not call Algorithm::evolve for this. More... | |
virtual void | setAboutToFireAction (PopulationAlgorithmAboutToFireInterface *pAction)=0 |
Allows you to set the action that needs to be performed before firing an event dynamically. More... | |
virtual void | onNewEvent (PopulationEvent *pEvt)=0 |
When a new event has been created, it must be injected into the simulation using this function. More... | |
virtual double | getTime () const =0 |
Must return the simulation tilme of the algorithm. More... | |
virtual GslRandomNumberGenerator * | getRandomNumberGenerator () const =0 |
Must return the random number generator used by the algorithm. More... | |
An interface for a population based mNRM algorithm.
|
pure virtual |
Must return the random number generator used by the algorithm.
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.
|
pure virtual |
Must return the simulation tilme of the algorithm.
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.
|
pure virtual |
Abstract function to initialize the implementation used.
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.
|
pure virtual |
When a new event has been created, it must be injected into the simulation using this function.
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.
|
pure virtual |
This should be called to actually start the simulation, do not call Algorithm::evolve for this.
tMax | Stop the simulation if the simulation time exceeds the specified time. Upon completion of the function, this variable will contain the actual simulation time stopped. |
maxEvents | If positive, the simulation will stop if this many events have been executed. Set to a negative value to disable this limit. At the end of the simulation, this variable will contain the number of events executed. |
startTime | The start time of the simulation, can be used to continue where a previous call to this function left off. |
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.
|
pure virtual |
Allows you to set the action that needs to be performed before firing an event dynamically.
When implementing a new population based algorithm you must make sure that this way the action performed by Algorithm::onAboutToFire can be changed at run time.
Implemented in PopulationAlgorithmAdvanced, PopulationAlgorithmTesting, and PopulationAlgorithmSimple.