Diana  0.8.3
Public Member Functions | Private Attributes
PetriNet Class Reference

#include <DianaPetriNet.hpp>

Inheritance diagram for PetriNet:
IDianaPetriNet

List of all members.

Public Member Functions

 PetriNet (DianaDAESO *eso)
DianaDAESOGetESO () 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::ICapeCollectionGetPlaces ()
Common::Collection::ICapeCollectionGetTransitions ()
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

DianaDAESOeso
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

Detailed Description

Class that represent Petri net.


Constructor & Destructor Documentation

PetriNet ( DianaDAESO eso)

Main costructor of class.

Parameters:
esoESO object associated with this Petri net

Member Function Documentation

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

Gets next time event

Implements IDianaPetriNet.

Returns collection of all places in Petri net

Implements IDianaPetriNet.

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.

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.

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.

Performs switch of Petri net, for phi-functions listed by index inside indices

Returns:
true, if some switch has really occured (this depends on internal petrinet states too)

Implements IDianaPetriNet.


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