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 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_bag<atomic*> imm
- The atomic model's active flag is used to determine membership in the bag
-
adevs_bag<netExec*> nx_imm
- List of network executives that appear in the imminent set
-
adevs_sched sched
- The event schedule
-
adevs_bag<PortValue> top_model_input
- I/O for the top level model
-
adevs_bag<PortValue> top_model_output
-
object_pool<adevs_bag<PortValue> > io_pool
- Pools of preallocated, commonly used objects
-
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, bool force_passive = false)
- 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(bool component_set_changed, 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&)
-
void operator=(const pdevs_coord&)
Public Methods
-
ADEVS_TIME_TYPE getTimeGranule() const
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 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_bag<atomic*> imm
- The atomic model's active flag is used to determine membership in the bag
adevs_bag<netExec*> nx_imm
- List of network executives that appear in the imminent set
adevs_sched sched
- The event schedule
adevs_bag<PortValue> top_model_input
- I/O for the top level model
adevs_bag<PortValue> top_model_output
object_pool<adevs_bag<PortValue> > io_pool
- Pools of preallocated, commonly used objects
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, bool force_passive = false)
- 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(bool component_set_changed, ADEVS_TIME_TYPE t)
-
Apply structure changes. State changes for the network executives are computed
as part of applying the structural change. The component_set_changed
flag should be true if any of the models appearing in the nx_imm set
have their componentSetChanged() flags set to true.
void remove_model(devs* model)
- Recursively remove a model from the simulation data structures
pdevs_coord()
pdevs_coord(const pdevs_coord&)
void operator=(const pdevs_coord&)
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.