Base type for all atomic DEVS models
Inheritance:
Public Fields
-
atomic_sim_support_t asim_support
-
This structure is used to support the simulation engine.
Public Methods
-
atomic()
- Constructor
-
atomic(const atomic& src)
- Copy constructor
-
const atomic& operator=(const atomic& src)
- Assignment operator
-
void initialize(ADEVS_TIME_TYPE t0)
- Calls the init() method with timeCurrent() equal to t0
-
virtual void init() = 0
- State initialization function
-
virtual void delta_int() = 0
- Internal transition function
-
virtual void delta_ext(ADEVS_TIME_TYPE e, const adevs_bag<PortValue>& x) = 0
- External transition function
-
virtual void delta_conf(const adevs_bag<PortValue>& x) = 0
- Confluent transition function
-
virtual void output_func(adevs_bag<PortValue>& y) = 0
- Output function.
-
virtual void gc_output(adevs_bag<PortValue>& g) = 0
-
Garbage collection function.
-
virtual ~atomic()
- Destructor
-
static void output(ADEVS_PORT_TYPE port, ADEVS_IO_TYPE value, adevs_bag<PortValue>& y)
- Adds the PortValue pair (port,value) to the bag y
-
ADEVS_TIME_TYPE timeNext() const
-
Get the time of the next internal event.
-
ADEVS_TIME_TYPE timeLast() const
- Get the time of the last state transition
-
ADEVS_TIME_TYPE timeCurrent() const
- Get the current simulation time
-
ADEVS_TIME_TYPE sigma() const
-
Get the time until the next event.
-
ADEVS_TIME_TYPE elapsed() const
- Get the time since the last event
-
virtual ADEVS_TIME_TYPE ta() const
-
Get the value of the time advance function.
-
void hold(ADEVS_TIME_TYPE dt)
-
Sets the time of next event (timeNext()) to timeCurrent()+dt
Throws an adevs_exception if dt < ADEVS_ZERO.
-
void passivate()
-
Set the time of next event to ADEVS_INFINITY.
-
atomic* typeIsAtomic()
- Returns a pointer to this model
Inherited from devs:
Public Fields
-
basic_sim_support_t bsim_support
Public Methods
-
virtual devsn* typeIsNetwork()
-
virtual netExec* typeIsNetExec()
-
const devsn* getParent() const
-
devsn* getParent()
-
void setParent(devsn* parent)
-
static void prefer_thread(int thread_id)
Inherited from object:
Public Methods
-
virtual object* clone() const
Documentation
Base type for all atomic DEVS models
atomic()
- Constructor
atomic(const atomic& src)
- Copy constructor
const atomic& operator=(const atomic& src)
- Assignment operator
void initialize(ADEVS_TIME_TYPE t0)
- Calls the init() method with timeCurrent() equal to t0
virtual void init() = 0
- State initialization function
virtual void delta_int() = 0
- Internal transition function
virtual void delta_ext(ADEVS_TIME_TYPE e, const adevs_bag<PortValue>& x) = 0
- External transition function
virtual void delta_conf(const adevs_bag<PortValue>& x) = 0
- Confluent transition function
virtual void output_func(adevs_bag<PortValue>& y) = 0
- Output function. Output values should be added to the bag y.
virtual void gc_output(adevs_bag<PortValue>& g) = 0
-
Garbage collection function. The PortValue objects in g are
no longer in use by the simulation engine and should be disposed of.
` Note that the elements in g are only those PortValue objects produced as
output by this model.
virtual ~atomic()
- Destructor
static void output(ADEVS_PORT_TYPE port, ADEVS_IO_TYPE value, adevs_bag<PortValue>& y)
- Adds the PortValue pair (port,value) to the bag y
ADEVS_TIME_TYPE timeNext() const
-
Get the time of the next internal event. If the ta() method is
overriden, then this method will only return the time of next
event that was valid when the model was activated (e.g., during
an internal event it will always return a value equal to timeCurrent()).
ADEVS_TIME_TYPE timeLast() const
- Get the time of the last state transition
ADEVS_TIME_TYPE timeCurrent() const
- Get the current simulation time
ADEVS_TIME_TYPE sigma() const
-
Get the time until the next event. This returns timeNext()-timeCurrent(),
and so the same restrictions apply here as with timeNext() if the
ta() method has been overridden.
ADEVS_TIME_TYPE elapsed() const
- Get the time since the last event
virtual ADEVS_TIME_TYPE ta() const
-
Get the value of the time advance function. The default implementation
returns the last value passed to the hold() method. If this method is
overriden, then the hold() and passivate() methods can not be used, and the
timeNext() and sigma() values will not immediately reflect the time advance.
void hold(ADEVS_TIME_TYPE dt)
-
Sets the time of next event (timeNext()) to timeCurrent()+dt
Throws an adevs_exception if dt < ADEVS_ZERO. This is the preferred method
for scheduling an event. It can not be used in conjunction with an overriden
ta() method.
void passivate()
-
Set the time of next event to ADEVS_INFINITY. This can not be used in conjunction with
an overriden ta() method.
atomic* typeIsAtomic()
- Returns a pointer to this model
atomic_sim_support_t asim_support
-
This structure is used to support the simulation engine. It should not
be used in any way by a system modeler.
- Direct child classes:
- netExec
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.