Diana
0.8.3
|
#include <DianaPetriNet.hpp>
Public Member Functions | |
PetriNet (DianaDAESO *eso) | |
DianaDAESO * | GetESO () const |
void | AddPlace (PetriPlace *place) |
void | AddTransition (PetriTransition *transition) |
Common::Types::CapeBoolean | Switch (const Common::Types::CapeArrayLong &indices) |
Common::Types::CapeBoolean | shouldFork () |
void | afterFork (const Common::Types::CapeArrayLong &phiIndices, Common::Types::CapeBoolean isDaughter) |
Common::Collection::ICapeCollection * | GetPlaces () |
Common::Collection::ICapeCollection * | GetTransitions () |
void | setShouldFork (CapeBoolean state=true) |
Common::Types::CapeArrayBoolean | getState () |
void | setState (const Common::Types::CapeArrayBoolean &state) |
Common::Types::CapeDouble | GetNextExplicitTime () const |
CapeBoolean | isDaughter () |
CapeBoolean | inAfterFork () |
virtual CapeLong | getForkIndex () |
Gets the handing phi index. If there's none returns -1;. | |
virtual const CapeArrayDouble & | GetStoredPhi () const |
virtual void | SetStoredPhi (const CapeArrayDouble &phi) |
Private Attributes | |
DianaDAESO * | eso |
Diana::DianaCollection | collPlaces |
Diana::DianaCollection | collTransitions |
CapeBoolean | _shouldFork |
CapeBoolean | _afterFork |
Flag that is set during afterFork switching. | |
CapeBoolean | _isDaughter |
CapeLong | forkIndex |
CapeLong | currentIndex |
CapeArrayDouble | arrStoredPhi |
Class that represent Petri net.
PetriNet | ( | DianaDAESO * | eso | ) |
Main costructor of class.
eso | ESO object associated with this Petri net |
void AddPlace | ( | PetriPlace * | place | ) |
Adds place to a Petri net
void AddTransition | ( | PetriTransition * | transition | ) |
Adds transition to a Petri net
void afterFork | ( | const Common::Types::CapeArrayLong & | phiIndices, |
Common::Types::CapeBoolean | isDaughter | ||
) | [virtual] |
Method to perform specific calculations after forking the model isDaughter contains information, whether the ESO is the daughter-cell
Implements IDianaPetriNet.
DianaDAESO* GetESO | ( | ) | const |
Returns ESO object associated with this Petri net
Common::Types::CapeDouble GetNextExplicitTime | ( | ) | const [virtual] |
Gets next time event
Implements IDianaPetriNet.
Common::Collection::ICapeCollection* GetPlaces | ( | ) | [virtual] |
Returns collection of all places in Petri net
Implements IDianaPetriNet.
Common::Types::CapeArrayBoolean getState | ( | ) | [virtual] |
Returns vector, that represents current state of the network
Implements IDianaPetriNet.
virtual const CapeArrayDouble& GetStoredPhi | ( | ) | const [virtual] |
Return the stored state of the phi_funktions before last step
Implements IDianaPetriNet.
Common::Collection::ICapeCollection* GetTransitions | ( | ) | [virtual] |
Returns collection of all transitions in Petri net
Implements IDianaPetriNet.
CapeBoolean inAfterFork | ( | ) |
Flag method to allow special behaviour of Places in afterFork
CapeBoolean isDaughter | ( | ) |
Flag method to allow special handling after forking
void setState | ( | const Common::Types::CapeArrayBoolean & | state | ) | [virtual] |
Sets the Network into specified state
Implements IDianaPetriNet.
virtual void SetStoredPhi | ( | const CapeArrayDouble & | phi | ) | [virtual] |
For the solver: Store the old value of the Phi-functions for further steps
Implements IDianaPetriNet.
Common::Types::CapeBoolean shouldFork | ( | ) | [virtual] |
Returns true, if the PetriNet reached a place, which indicates, that the model should be forked. This state is cleared by the afterFork() method
Implements IDianaPetriNet.
Common::Types::CapeBoolean Switch | ( | const Common::Types::CapeArrayLong & | indices | ) | [virtual] |
Performs switch of Petri net, for phi-functions listed by index inside indices
Implements IDianaPetriNet.