Diana  0.8.3
Public Member Functions | Private Attributes
PetriTransition Class Reference

#include <DianaPetriNet.hpp>

Inheritance diagram for PetriTransition:
IDianaPetriTransition DianaParameter ICapeParameter ICapeParameter ICapeIdentification ICapeIdentification

List of all members.

Public Member Functions

 PetriTransition (Common::Types::CapeString name, PetriNet *net, Common::Parameter::CapeParamMode _mode=Common::Parameter::CAPE_INPUT_OUTPUT, const PtrData &_ptr=PtrData())
Common::Types::CapeString GetName ()
Common::Types::CapeDouble GetPhiValue () const throw (Common::Error::ECapeUnknown)
void AddLinksTo (PetriPlace *place)
void AddLinksFrom (PetriPlace *place)
void setTransFlag (Common::Types::CapeBoolean flag)
void CheckTransition ()
void Switch ()
Common::Types::CapeBoolean CanSwitch ()
void SetPhiIndex (int index)
int GetEventTimeIndex () const
void SetEventTimeIndex (int index)
int GetPhiIndex () const
void SetTimeDelay (Common::Types::CapeDouble timeDelay)
Common::Types::CapeDouble GetNextSwitching ()
Common::Types::CapeDouble GetTimeDelay ()
Common::Types::CapeBoolean IsExplicit ()
Common::Types::CapeBoolean Activate ()
const std::vector< PetriPlace * > & GetFromPlaces ()
const std::vector< PetriPlace * > & GetToPlaces ()

Private Attributes

PetriNetnet
 parent Petri net
Common::Types::CapeBoolean transFlag
std::vector< PetriPlace * > linksTo
 array of destination places
std::vector< PetriPlace * > linksFrom
 array of source places
int phiIndex
 index of phi-function
int eventTimeIndex
 index of eventTime

Detailed Description

Class that represent Petri transition in Petri net.


Constructor & Destructor Documentation

Main costructor ofCommon::Parameter:: class.

Parameters:
nameUser name of place
netReference to a parent Petri net

Member Function Documentation

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.

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.

Sets time delay for explicit transition. Not implemented.

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.


The documentation for this class was generated from the following file: