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()
This method 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.
Protected Fields
-
ADEVS_TIME_TYPE t_granule
Protected Methods
-
basic_sim(const basic_sim&)
-
void operator=(const basic_sim&)
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.
The 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()
This method 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. Does not deleted the model.
ADEVS_TIME_TYPE t_granule
basic_sim(const basic_sim&)
void operator=(const basic_sim&)
- Direct child classes:
- pdevs_sim
pdevs_coord
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.