next up previous contents index
Next: Displaying State as a Up: Atomic DEVS: Atomic Previous: Atomic DEVS: Atomic   Contents   Index

Characteristic Functions

There are four public characteristic functions that are pure virtual. Thus the user must override them to define a concrete class from Atomic.

The function init() is used when the model needs to be reset, such as in the case of an initialization for a simulation run.

    virtual void init() = 0;

The function tau() returns the lifespan of the current state.

    virtual TimeSpan tau() const = 0;

The function delta_x(const_PortValue& x) defines the input state transition caused by an input event x. The return value true indicates that the next schedule needs to be updated by calling tau(). Contrarily, the return value false indicates that the time for the next schedule needs to be preserved.

    virtual bool delta_x(const PortValue& x) = 0;

The function delta_y(PortValue& y) defines the output transition by generating an output event y. Recall that the schedule will be updated right after this occurs, based upon the value of tau().

    virtual void delta_y(PortValue& y) = 0;



MHHwang 2007-05-07