A multi-component coordinator
Inheritance:
Public Methods
-
pdevs_coord(devsn* model, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Construct a simulator for the supplied model.
-
void computeInputOutput()
- Compute the model I/O for time t = tN()
-
const adevs_bag<PortValue> & getOutput()
- Get the output for this model previously computed with computeInputOutput()
-
void computeDeltaFunc(ADEVS_TIME_TYPE t)
-
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()
-
void endOfCycle()
- Do garbage collection and rescheduling at the end of a simulation cycle
-
void inject(const PortValue& x)
-
Inject a 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
-
void inject(const adevs_bag<PortValue>& x)
-
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
-
ADEVS_TIME_TYPE timeNext() const
- Get the simulator's time of next event
-
ADEVS_TIME_TYPE timeLast() const
- Get the simulator's time of last event
-
virtual ~pdevs_coord()
- Destructor.
Protected Fields
-
devsn* top_model
-
ADEVS_TIME_TYPE global_tL
-
ADEVS_TIME_TYPE global_tN
-
adevs_set<atomic*> imm
-
adevs_pqueue<ADEVS_TIME_TYPE,atomic*> sched
-
adevs_bag<PortValue> top_model_input
-
adevs_bag<PortValue> top_model_output
-
object_pool<adevs_bag<PortValue> > io_pool
-
object_pool<adevs_bag<EventReceiver> > recv_pool
Protected Methods
-
void schedule(devsn* model)
- Schedule the components of a network model
-
void route(devsn* parent, devs* src, PortValue& pv)
- Route an event generated by the source model contained in the parent model
-
void reschedule_atomic(atomic* model)
- Reschedule an atomic component
-
void compute_atomic_delta_func(atomic* model, ADEVS_TIME_TYPE t)
- Compute a state change for an atomic model
-
void compute_structure_changes(int net_exec_count, ADEVS_TIME_TYPE t)
-
Apply structure changes.
-
void remove_model(devs* model)
- Recursively remove a model from the simulation data structures
-
pdevs_coord()
-
pdevs_coord(const pdevs_coord& src)
-
void operator=(const pdevs_coord& src)
Public Methods
-
ADEVS_TIME_TYPE getTimeGranule() const
-
virtual void restore_state(ADEVS_TIME_TYPE t)
-
virtual void remove_fossils(ADEVS_TIME_TYPE t_old)
Protected Fields
-
ADEVS_TIME_TYPE t_granule
Documentation
A multi-component coordinator
pdevs_coord(devsn* model, ADEVS_TIME_TYPE t_granule = ADEVS_EPSILON)
-
Construct a simulator for the supplied model. The supplied time granule
will be used for zero calculations (ADEVS_EPSILON by default).
void computeInputOutput()
- Compute the model I/O for time t = tN()
const adevs_bag<PortValue> & getOutput()
- Get the output for this model previously computed with computeInputOutput()
void computeDeltaFunc(ADEVS_TIME_TYPE t)
-
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()
void endOfCycle()
- Do garbage collection and rescheduling at the end of a simulation cycle
void inject(const PortValue& x)
-
Inject a 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
void inject(const adevs_bag<PortValue>& x)
-
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
ADEVS_TIME_TYPE timeNext() const
- Get the simulator's time of next event
ADEVS_TIME_TYPE timeLast() const
- Get the simulator's time of last event
virtual ~pdevs_coord()
- Destructor. Does not destroy the model.
devsn* top_model
ADEVS_TIME_TYPE global_tL
ADEVS_TIME_TYPE global_tN
adevs_set<atomic*> imm
adevs_pqueue<ADEVS_TIME_TYPE,atomic*> sched
adevs_bag<PortValue> top_model_input
adevs_bag<PortValue> top_model_output
object_pool<adevs_bag<PortValue> > io_pool
object_pool<adevs_bag<EventReceiver> > recv_pool
void schedule(devsn* model)
- Schedule the components of a network model
void route(devsn* parent, devs* src, PortValue& pv)
- Route an event generated by the source model contained in the parent model
void reschedule_atomic(atomic* model)
- Reschedule an atomic component
void compute_atomic_delta_func(atomic* model, ADEVS_TIME_TYPE t)
- Compute a state change for an atomic model
void compute_structure_changes(int net_exec_count, ADEVS_TIME_TYPE t)
-
Apply structure changes. First argument is a count of the network executives
in the imminent set. State changes for these network executives are computed
as part of applying the structural change.
void remove_model(devs* model)
- Recursively remove a model from the simulation data structures
pdevs_coord()
pdevs_coord(const pdevs_coord& src)
void operator=(const pdevs_coord& src)
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.