6#include <unordered_map>
34 std::shared_ptr<storm::expressions::ExpressionManager>
const& exprManager,
35 std::map<storm::expressions::Variable, storm::expressions::Expression>
const& constantsSubstitution =
36 std::map<storm::expressions::Variable, storm::expressions::Expression>());
52 std::vector<TransitionPartition>
const&
getPartitions()
const;
71 std::vector<storm::gspn::Place>
const&
getPlaces()
const;
79 std::shared_ptr<storm::gspn::Marking>
getInitialMarking(std::map<uint64_t, uint64_t>& numberOfBits, uint64_t
const& numberOfTotalBits)
const;
133 void setName(std::string
const& name);
140 std::string
const&
getName()
const;
157 void setCapacities(std::unordered_map<std::string, uint64_t>
const& mapping);
177 void toPnpro(std::ostream& stream)
const;
179 void toPnml(std::ostream& stream)
const;
186 void toJson(std::ostream& stream)
const;
201 bool testPlaces()
const;
209 bool testTransitions()
const;
215 std::vector<storm::gspn::Place> places;
218 std::vector<storm::gspn::ImmediateTransition<WeightType>> immediateTransitions;
221 std::vector<storm::gspn::TimedTransition<RateType>> timedTransitions;
223 std::vector<storm::gspn::TransitionPartition> partitions;
225 std::shared_ptr<storm::expressions::ExpressionManager> exprManager;
227 std::map<storm::expressions::Variable, storm::expressions::Expression> constantsSubstitution;
230 mutable std::map<uint64_t, LayoutInfo> placeLayout;
231 mutable std::map<uint64_t, LayoutInfo> transitionLayout;
bool isValid() const
Performe some checks.
static uint64_t immediateTransitionIdToTransitionId(uint64_t)
uint64_t getNumberOfPlaces() const
Returns the number of places in this gspn.
static uint64_t timedTransitionIdToTransitionId(uint64_t)
storm::gspn::ImmediateTransition< GSPN::WeightType > const * getImmediateTransition(std::string const &name) const
Returns the immediate transition with the corresponding name.
uint64_t getNumberOfTimedTransitions() const
uint64_t getNumberOfImmediateTransitions() const
void toPnml(std::ostream &stream) const
void setName(std::string const &name)
Set the name of the gspn to the given name.
void setTransitionLayoutInfo(uint64_t transitionId, LayoutInfo const &layout) const
std::map< uint64_t, LayoutInfo > const & getTransitionLayoutInfos() const
std::vector< ImmediateTransition< GSPN::WeightType > > const & getImmediateTransitions() const
Returns the vector of immediate transitions in this gspn.
void setCapacities(std::unordered_map< std::string, uint64_t > const &mapping)
Set Capacities of places according to name->capacity map.
static uint64_t transitionIdToTimedTransitionId(uint64_t)
std::shared_ptr< storm::gspn::Marking > getInitialMarking(std::map< uint64_t, uint64_t > &numberOfBits, uint64_t const &numberOfTotalBits) const
void toJson(std::ostream &stream) const
Export GSPN in Json format.
std::map< storm::expressions::Variable, storm::expressions::Expression > const & getConstantsSubstitution() const
Gets an assignment of occurring constants of the GSPN to their value.
void writeStatsToStream(std::ostream &stream) const
std::vector< TransitionPartition > const & getPartitions() const
std::vector< storm::gspn::Place > const & getPlaces() const
Returns the places of this gspn.
std::map< uint64_t, LayoutInfo > const & getPlaceLayoutInfos() const
storm::gspn::Transition const * getTransition(std::string const &name) const
Returns the transition with the corresponding name.
void setPlaceLayoutInfo(uint64_t placeId, LayoutInfo const &layout) const
void toPnpro(std::ostream &stream) const
storm::gspn::TimedTransition< GSPN::RateType > const * getTimedTransition(std::string const &name) const
Returns the timed transition with the corresponding name.
std::shared_ptr< storm::expressions::ExpressionManager > const & getExpressionManager() const
Obtain the expression manager used for expressions over GSPNs.
storm::gspn::Place const * getPlace(uint64_t id) const
Returns the place with the corresponding id.
static uint64_t transitionIdToImmediateTransitionId(uint64_t)
std::vector< TimedTransition< GSPN::RateType > > const & getTimedTransitions() const
Returns the vector of timed transitions in this gspn.
std::string const & getName() const
Returns the name of the gspn.
void writeDotToStream(std::ostream &outStream) const
Write the gspn in a dot(graphviz) configuration.
This class provides methods to store and retrieve data for a place in a gspn.
This class represents a transition in a gspn.