Diana
0.8.3
|
#include <DianaPetriNet.hpp>
Class that represent Petri transition in Petri net.
PetriTransition | ( | Common::Types::CapeString | name, |
PetriNet * | net, | ||
Common::Parameter::CapeParamMode | _mode = Common::Parameter::CAPE_INPUT_OUTPUT , |
||
const PtrData & | _ptr = PtrData() |
||
) |
Main costructor ofCommon::Parameter:: class.
name | User name of place |
net | Reference to a parent Petri net |
Performs activation, if this transition is explicit and CanSwitch()
void AddLinksFrom | ( | PetriPlace * | place | ) |
Sets place to be the destination for transition. There can be more than one destination place for transition.
void AddLinksTo | ( | PetriPlace * | place | ) |
Sets place to be the source for transition. There can be more than one source place for transition.
Checks whether transition can switch, i.e. all source places have marks (transFlag == true) and associated phi-function changed sign in this step of integration (for implicit transition).
void CheckTransition | ( | ) |
Checks whether all source places of transition have marks and calls setTransFlag(true) if so.
int GetEventTimeIndex | ( | ) | const |
Returns index of event-times associated with the explicit transition.
const std::vector<PetriPlace*>& GetFromPlaces | ( | ) |
Returns the incoming places of this transition
Returns time of next switching for explicit transition. Not implemented.
int GetPhiIndex | ( | ) | const |
Returns index of phi-function associated with the implicit transition.
Common::Types::CapeDouble GetPhiValue | ( | ) | const throw (Common::Error::ECapeUnknown) [virtual] |
Returns the value of phi-function connected with the implicit event
Implements IDianaPetriTransition.
Returns time delay for explicit transition.
const std::vector<PetriPlace*>& GetToPlaces | ( | ) |
Returns the outgoing places of this transition
Returns true, if this transition is explicit (delay or time)
void SetEventTimeIndex | ( | int | index | ) |
Sets index of event-times associated with explicit transition. The array of event-times is calculated with GetEventTimes(CapeDouble time) in the ESO
void SetPhiIndex | ( | int | index | ) |
Sets index of phi-function associated with implicit transition. The array of phi-function values is stored in DianaDAESO class.
void SetTimeDelay | ( | Common::Types::CapeDouble | timeDelay | ) |
Sets time delay for explicit transition. Not implemented.
void setTransFlag | ( | Common::Types::CapeBoolean | flag | ) |
Sets flag, indicated that all source places have marks. Used internally.
void Switch | ( | ) |
Performs switching of transition. All source places is set to empty and all destination is set to marked.