Common simulator interface (based on the DEVS Core Interface specification)
Inheritance:
Public Methods
-
basic_sim(ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Constructor can be used to set the simulator time granule.
-
ADEVS_TIME_TYPE getTimeGranule() const
- Get the time granule for this simulator
-
virtual void computeInputOutput() = 0
- Compute the model I/O for time t = tN()
-
virtual const adevs_bag<PortValue> & getOutput() = 0
-
Get the output for this model previously computed with computeInputOutput()
The output objects should be deleted during the next call to endOfCycle()
-
virtual void computeDeltaFunc(ADEVS_TIME_TYPE t) = 0
-
Compute the next state of this model for time t <= tN()
Will apply all injected inputs at time t and use the results
of the previous call to computeInputOutput() if t = tN()
-
virtual void endOfCycle() = 0
- Do garbage collection at the end of a simulation cycle
-
virtual void inject(const PortValue& x) = 0
-
Inject an input for use during the next call to computeDeltaFunc()
The input is owned by the caller and will not be deleted by the simulator
-
virtual void inject(const adevs_bag<PortValue>& x) = 0
-
Inject an input for use during the next call to computeDeltaFunc()
The input is owned by the caller and will not be deleted by the simulator
-
virtual ADEVS_TIME_TYPE timeNext() const = 0
- Get the simulator's time of next event
-
virtual ADEVS_TIME_TYPE timeLast() const = 0
- Get the simulator's time of last event
-
virtual ~basic_sim()
- Destructor
-
virtual void restore_state(ADEVS_TIME_TYPE t)
-
Restore the state of the simulator to time t.
-
virtual void remove_fossils(ADEVS_TIME_TYPE t_old)
-
This method should be called with restore_state(ADEVS_TIME_TYPE) will not
be called with t >= t_old.
Protected Fields
-
ADEVS_TIME_TYPE t_granule
Protected Methods
-
basic_sim(const basic_sim& src)
-
void operator=(const basic_sim& src)
Documentation
Common simulator interface (based on the DEVS Core Interface specification)
basic_sim(ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Constructor can be used to set the simulator time granule.
Default value is ADEVS_EPSILON.
ADEVS_TIME_TYPE getTimeGranule() const
- Get the time granule for this simulator
virtual void computeInputOutput() = 0
- Compute the model I/O for time t = tN()
virtual const adevs_bag<PortValue> & getOutput() = 0
-
Get the output for this model previously computed with computeInputOutput()
The output objects should be deleted during the next call to endOfCycle()
virtual void computeDeltaFunc(ADEVS_TIME_TYPE t) = 0
-
Compute the next state of this model for time t <= tN()
Will apply all injected inputs at time t and use the results
of the previous call to computeInputOutput() if t = tN()
virtual void endOfCycle() = 0
- Do garbage collection at the end of a simulation cycle
virtual void inject(const PortValue& x) = 0
-
Inject an input for use during the next call to computeDeltaFunc()
The input is owned by the caller and will not be deleted by the simulator
virtual void inject(const adevs_bag<PortValue>& x) = 0
-
Inject an input for use during the next call to computeDeltaFunc()
The input is owned by the caller and will not be deleted by the simulator
virtual ADEVS_TIME_TYPE timeNext() const = 0
- Get the simulator's time of next event
virtual ADEVS_TIME_TYPE timeLast() const = 0
- Get the simulator's time of last event
virtual ~basic_sim()
- Destructor
virtual void restore_state(ADEVS_TIME_TYPE t)
-
Restore the state of the simulator to time t. Optional method for
simulators that support incremental state saving.
virtual void remove_fossils(ADEVS_TIME_TYPE t_old)
-
This method should be called with restore_state(ADEVS_TIME_TYPE) will not
be called with t >= t_old. The simulator can remove all but last stored state
with time of last event < t_old.
ADEVS_TIME_TYPE t_granule
basic_sim(const basic_sim& src)
void operator=(const basic_sim& src)
- Direct child classes:
- pdevs_sim
pdevs_coord
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.