class basic_sim

Common simulator interface (based on the DEVS Core Interface specification)

Inheritance:


Public Methods

[more] basic_sim(ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
Constructor can be used to set the simulator time granule.
[more]ADEVS_TIME_TYPE getTimeGranule() const
Get the time granule for this simulator
[more]virtual void computeInputOutput() = 0
Compute the model I/O for time t = tN()
[more]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()
[more]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()
[more]virtual void endOfCycle() = 0
Do garbage collection at the end of a simulation cycle
[more]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
[more]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
[more]virtual ADEVS_TIME_TYPE timeNext() const = 0
Get the simulator's time of next event
[more]virtual ADEVS_TIME_TYPE timeLast() const = 0
Get the simulator's time of last event
[more]virtual ~basic_sim()
Destructor
[more]virtual void restore_state(ADEVS_TIME_TYPE t)
Restore the state of the simulator to time t.
[more]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

[more]ADEVS_TIME_TYPE t_granule

Protected Methods

[more] basic_sim(const basic_sim& src)
[more]void operator=(const basic_sim& src)


Documentation

Common simulator interface (based on the DEVS Core Interface specification)
o basic_sim(ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
Constructor can be used to set the simulator time granule. Default value is ADEVS_EPSILON.

oADEVS_TIME_TYPE getTimeGranule() const
Get the time granule for this simulator

ovirtual void computeInputOutput() = 0
Compute the model I/O for time t = tN()

ovirtual 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()

ovirtual 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()

ovirtual void endOfCycle() = 0
Do garbage collection at the end of a simulation cycle

ovirtual 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

ovirtual 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

ovirtual ADEVS_TIME_TYPE timeNext() const = 0
Get the simulator's time of next event

ovirtual ADEVS_TIME_TYPE timeLast() const = 0
Get the simulator's time of last event

ovirtual ~basic_sim()
Destructor

ovirtual 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.

ovirtual 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.

oADEVS_TIME_TYPE t_granule

o basic_sim(const basic_sim& src)

ovoid 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++.