The devssim functions as the root coordinator for a simulation
In generally, it should not be sub-classed, except to override the
halt() method
Public Methods
-
devssim(devs* model, ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Create and initialize a simulator for the model with initial time t0.
-
void step(ADEVS_TIME_TYPE dt)
-
Step the simulator by dt units of time.
-
void step(ADEVS_TIME_TYPE dt, const adevs_bag<PortValue>& input)
-
Steps the simulator after applying the PortValues in the
input list to the top level model.
-
void run(ADEVS_TIME_TYPE t_max = ADEVS_INFINITY)
-
Run the simulation until the time of next event is greater than t_max
-
ADEVS_TIME_TYPE timeCurrent()
- Get the current simulation time
-
ADEVS_TIME_TYPE timeNext()
- Returns the time of next event
-
ADEVS_TIME_TYPE timeLast()
- Returns the time of the last event
-
bool isPassive()
- Returns true if tN = ADEVS_INFINITY, false otherwise
-
virtual void reset(ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Reset the simulator and reinitialize the model
-
virtual bool halt()
-
Returns true if the simulator should stop, false otherwise.
-
virtual ~devssim()
-
Destructor.
Documentation
The devssim functions as the root coordinator for a simulation
In generally, it should not be sub-classed, except to override the
halt() method
devssim(devs* model, ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Create and initialize a simulator for the model with initial time t0.
void step(ADEVS_TIME_TYPE dt)
-
Step the simulator by dt units of time. Throws an adevs_exception
if dt < 0 or if timeCurrent()+dt > timeNext().
void step(ADEVS_TIME_TYPE dt, const adevs_bag<PortValue>& input)
-
Steps the simulator after applying the PortValues in the
input list to the top level model. The values of the PortValue
objects are owned by the caller and can be freed when the step()
method returns.
void run(ADEVS_TIME_TYPE t_max = ADEVS_INFINITY)
-
Run the simulation until the time of next event is greater than t_max
ADEVS_TIME_TYPE timeCurrent()
- Get the current simulation time
ADEVS_TIME_TYPE timeNext()
- Returns the time of next event
ADEVS_TIME_TYPE timeLast()
- Returns the time of the last event
bool isPassive()
- Returns true if tN = ADEVS_INFINITY, false otherwise
virtual void reset(ADEVS_TIME_TYPE t0 = ADEVS_ZERO, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Reset the simulator and reinitialize the model
virtual bool halt()
-
Returns true if the simulator should stop, false otherwise. This method
is called by the simulator at the end of each simulation
cycle. The default behavior is to return true when the model becomes
passive.
virtual ~devssim()
-
Destructor. Does not delete the model.
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.