Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::gspn::GSPN Class Reference

#include <GSPN.h>

Public Types

typedef double RateType
typedef double WeightType

Public Member Functions

 GSPN (std::string const &name, std::vector< Place > const &places, std::vector< ImmediateTransition< WeightType > > const &itransitions, std::vector< TimedTransition< RateType > > const &ttransitions, std::vector< TransitionPartition > const &partitions, std::shared_ptr< storm::expressions::ExpressionManager > const &exprManager, std::map< storm::expressions::Variable, storm::expressions::Expression > const &constantsSubstitution=std::map< storm::expressions::Variable, storm::expressions::Expression >())
uint64_t getNumberOfPlaces () const
 Returns the number of places in this gspn.
uint64_t getNumberOfImmediateTransitions () const
uint64_t getNumberOfTimedTransitions () const
std::vector< TransitionPartition > const & getPartitions () const
std::vector< TimedTransition< GSPN::RateType > > const & getTimedTransitions () const
 Returns the vector of timed transitions in this gspn.
std::vector< ImmediateTransition< GSPN::WeightType > > const & getImmediateTransitions () const
 Returns the vector of immediate transitions in this gspn.
std::vector< storm::gspn::Place > const & getPlaces () const
 Returns the places of this gspn.
std::shared_ptr< storm::gspn::MarkinggetInitialMarking (std::map< uint64_t, uint64_t > &numberOfBits, uint64_t const &numberOfTotalBits) const
storm::gspn::Place const * getPlace (uint64_t id) const
 Returns the place with the corresponding id.
storm::gspn::Place const * getPlace (std::string const &name) const
 Returns the place with the corresponding name.
storm::gspn::TimedTransition< GSPN::RateType > const * getTimedTransition (std::string const &name) const
 Returns the timed transition with the corresponding name.
storm::gspn::ImmediateTransition< GSPN::WeightType > const * getImmediateTransition (std::string const &name) const
 Returns the immediate transition with the corresponding name.
storm::gspn::Transition const * getTransition (std::string const &name) const
 Returns the transition with the corresponding name.
void writeDotToStream (std::ostream &outStream) const
 Write the gspn in a dot(graphviz) configuration.
void setName (std::string const &name)
 Set the name of the gspn to the given name.
std::string const & getName () const
 Returns the name of the gspn.
std::shared_ptr< storm::expressions::ExpressionManager > const & getExpressionManager () const
 Obtain the expression manager used for expressions over GSPNs.
std::map< storm::expressions::Variable, storm::expressions::Expression > const & getConstantsSubstitution () const
 Gets an assignment of occurring constants of the GSPN to their value.
void setCapacities (std::unordered_map< std::string, uint64_t > const &mapping)
 Set Capacities of places according to name->capacity map.
void setPlaceLayoutInfo (uint64_t placeId, LayoutInfo const &layout) const
void setTransitionLayoutInfo (uint64_t transitionId, LayoutInfo const &layout) const
void setPlaceLayoutInfo (std::map< uint64_t, LayoutInfo > const &placeLayout) const
void setTransitionLayoutInfo (std::map< uint64_t, LayoutInfo > const &transitionLayout) const
std::map< uint64_t, LayoutInfo > const & getPlaceLayoutInfos () const
std::map< uint64_t, LayoutInfo > const & getTransitionLayoutInfos () const
bool isValid () const
 Performe some checks.
void toPnpro (std::ostream &stream) const
void toPnml (std::ostream &stream) const
void toJson (std::ostream &stream) const
 Export GSPN in Json format.
void writeStatsToStream (std::ostream &stream) const

Static Public Member Functions

static uint64_t timedTransitionIdToTransitionId (uint64_t)
static uint64_t immediateTransitionIdToTransitionId (uint64_t)
static uint64_t transitionIdToTimedTransitionId (uint64_t)
static uint64_t transitionIdToImmediateTransitionId (uint64_t)

Detailed Description

Definition at line 21 of file GSPN.h.

Member Typedef Documentation

◆ RateType

Definition at line 29 of file GSPN.h.

◆ WeightType

Definition at line 30 of file GSPN.h.

Constructor & Destructor Documentation

◆ GSPN()

storm::gspn::GSPN::GSPN ( std::string const & name,
std::vector< Place > const & places,
std::vector< ImmediateTransition< WeightType > > const & itransitions,
std::vector< TimedTransition< RateType > > const & ttransitions,
std::vector< TransitionPartition > const & partitions,
std::shared_ptr< storm::expressions::ExpressionManager > const & exprManager,
std::map< storm::expressions::Variable, storm::expressions::Expression > const & constantsSubstitution = std::map<storm::expressions::Variablestorm::expressions::Expression>() )

Definition at line 29 of file GSPN.cpp.

Member Function Documentation

◆ getConstantsSubstitution()

std::map< storm::expressions::Variable, storm::expressions::Expression > const & storm::gspn::GSPN::getConstantsSubstitution ( ) const

Gets an assignment of occurring constants of the GSPN to their value.

Definition at line 142 of file GSPN.cpp.

◆ getExpressionManager()

std::shared_ptr< storm::expressions::ExpressionManager > const & storm::gspn::GSPN::getExpressionManager ( ) const

Obtain the expression manager used for expressions over GSPNs.

Returns

Definition at line 138 of file GSPN.cpp.

◆ getImmediateTransition()

storm::gspn::ImmediateTransition< GSPN::WeightType > const * storm::gspn::GSPN::getImmediateTransition ( std::string const & name) const

Returns the immediate transition with the corresponding name.

Parameters
nameThe name of the timed transition.
Returns
A pointer to the transition, and nullptr otherwise

Definition at line 120 of file GSPN.cpp.

◆ getImmediateTransitions()

std::vector< storm::gspn::ImmediateTransition< GSPN::WeightType > > const & storm::gspn::GSPN::getImmediateTransitions ( ) const

Returns the vector of immediate transitions in this gspn.

Returns
The vector of immediate tansitions.

Definition at line 57 of file GSPN.cpp.

◆ getInitialMarking()

std::shared_ptr< storm::gspn::Marking > storm::gspn::GSPN::getInitialMarking ( std::map< uint64_t, uint64_t > & numberOfBits,
uint64_t const & numberOfTotalBits ) const

Definition at line 65 of file GSPN.cpp.

◆ getName()

std::string const & storm::gspn::GSPN::getName ( ) const

Returns the name of the gspn.

Returns
The name.

Definition at line 244 of file GSPN.cpp.

◆ getNumberOfImmediateTransitions()

uint64_t storm::gspn::GSPN::getNumberOfImmediateTransitions ( ) const

Definition at line 45 of file GSPN.cpp.

◆ getNumberOfPlaces()

uint64_t storm::gspn::GSPN::getNumberOfPlaces ( ) const

Returns the number of places in this gspn.

Returns
The number of places.

Definition at line 41 of file GSPN.cpp.

◆ getNumberOfTimedTransitions()

uint64_t storm::gspn::GSPN::getNumberOfTimedTransitions ( ) const

Definition at line 49 of file GSPN.cpp.

◆ getPartitions()

std::vector< TransitionPartition > const & storm::gspn::GSPN::getPartitions ( ) const

Definition at line 73 of file GSPN.cpp.

◆ getPlace() [1/2]

storm::gspn::Place const * storm::gspn::GSPN::getPlace ( std::string const & name) const

Returns the place with the corresponding name.

Parameters
nameThe name of the place.
Returns
A pointer to the place with the given name, and nullptr otherwise

Definition at line 93 of file GSPN.cpp.

◆ getPlace() [2/2]

storm::gspn::Place const * storm::gspn::GSPN::getPlace ( uint64_t id) const

Returns the place with the corresponding id.

Parameters
idThe id of the place.
Returns
A pointer to the place with the given id, and nullptr otherwise

Definition at line 77 of file GSPN.cpp.

◆ getPlaceLayoutInfos()

std::map< uint64_t, LayoutInfo > const & storm::gspn::GSPN::getPlaceLayoutInfos ( ) const

Definition at line 410 of file GSPN.cpp.

◆ getPlaces()

std::vector< storm::gspn::Place > const & storm::gspn::GSPN::getPlaces ( ) const

Returns the places of this gspn.

Definition at line 61 of file GSPN.cpp.

◆ getTimedTransition()

storm::gspn::TimedTransition< GSPN::RateType > const * storm::gspn::GSPN::getTimedTransition ( std::string const & name) const

Returns the timed transition with the corresponding name.

Parameters
nameThe ID of the timed transition.
Returns
A pointer to the transition, and nullptr otherwise

Definition at line 111 of file GSPN.cpp.

◆ getTimedTransitions()

std::vector< storm::gspn::TimedTransition< GSPN::RateType > > const & storm::gspn::GSPN::getTimedTransitions ( ) const

Returns the vector of timed transitions in this gspn.

Returns
The vector of timed transitions.

Definition at line 53 of file GSPN.cpp.

◆ getTransition()

storm::gspn::Transition const * storm::gspn::GSPN::getTransition ( std::string const & name) const

Returns the transition with the corresponding name.

Parameters
nameThe name of the timed transition
Returns
A pointer to the transition, and nullptr otherwise

Definition at line 129 of file GSPN.cpp.

◆ getTransitionLayoutInfos()

std::map< uint64_t, LayoutInfo > const & storm::gspn::GSPN::getTransitionLayoutInfos ( ) const

Definition at line 414 of file GSPN.cpp.

◆ immediateTransitionIdToTransitionId()

uint64_t storm::gspn::GSPN::immediateTransitionIdToTransitionId ( uint64_t itId)
static

Definition at line 17 of file GSPN.cpp.

◆ isValid()

bool storm::gspn::GSPN::isValid ( ) const

Performe some checks.

  • testPlaces()
  • testTransitions()
Returns
true if no errors are found

Definition at line 248 of file GSPN.cpp.

◆ setCapacities()

void storm::gspn::GSPN::setCapacities ( std::unordered_map< std::string, uint64_t > const & mapping)

Set Capacities of places according to name->capacity map.

Definition at line 146 of file GSPN.cpp.

◆ setName()

void storm::gspn::GSPN::setName ( std::string const & name)

Set the name of the gspn to the given name.

Parameters
nameThe new name.

Definition at line 240 of file GSPN.cpp.

◆ setPlaceLayoutInfo() [1/2]

void storm::gspn::GSPN::setPlaceLayoutInfo ( std::map< uint64_t, LayoutInfo > const & placeLayout) const

Definition at line 403 of file GSPN.cpp.

◆ setPlaceLayoutInfo() [2/2]

void storm::gspn::GSPN::setPlaceLayoutInfo ( uint64_t placeId,
LayoutInfo const & layout ) const

Definition at line 396 of file GSPN.cpp.

◆ setTransitionLayoutInfo() [1/2]

void storm::gspn::GSPN::setTransitionLayoutInfo ( std::map< uint64_t, LayoutInfo > const & transitionLayout) const

Definition at line 406 of file GSPN.cpp.

◆ setTransitionLayoutInfo() [2/2]

void storm::gspn::GSPN::setTransitionLayoutInfo ( uint64_t transitionId,
LayoutInfo const & layout ) const

Definition at line 399 of file GSPN.cpp.

◆ timedTransitionIdToTransitionId()

uint64_t storm::gspn::GSPN::timedTransitionIdToTransitionId ( uint64_t ttId)
static

Definition at line 13 of file GSPN.cpp.

◆ toJson()

void storm::gspn::GSPN::toJson ( std::ostream & stream) const

Export GSPN in Json format.

Parameters
streamOutputstream.

Definition at line 697 of file GSPN.cpp.

◆ toPnml()

void storm::gspn::GSPN::toPnml ( std::ostream & stream) const

Definition at line 536 of file GSPN.cpp.

◆ toPnpro()

void storm::gspn::GSPN::toPnpro ( std::ostream & stream) const

Definition at line 418 of file GSPN.cpp.

◆ transitionIdToImmediateTransitionId()

uint64_t storm::gspn::GSPN::transitionIdToImmediateTransitionId ( uint64_t tId)
static

Definition at line 25 of file GSPN.cpp.

◆ transitionIdToTimedTransitionId()

uint64_t storm::gspn::GSPN::transitionIdToTimedTransitionId ( uint64_t tId)
static

Definition at line 21 of file GSPN.cpp.

◆ writeDotToStream()

void storm::gspn::GSPN::writeDotToStream ( std::ostream & outStream) const

Write the gspn in a dot(graphviz) configuration.

Parameters
outStreamThe stream to which the output is written to.

Definition at line 154 of file GSPN.cpp.

◆ writeStatsToStream()

void storm::gspn::GSPN::writeStatsToStream ( std::ostream & stream) const

Definition at line 701 of file GSPN.cpp.


The documentation for this class was generated from the following files:
  • src/storm-gspn/storage/gspn/GSPN.h
  • src/storm-gspn/storage/gspn/GSPN.cpp