Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
Place.h
Go to the documentation of this file.
1#ifndef STORM_STORAGE_GSPN_PLACE_H_
2#define STORM_STORAGE_GSPN_PLACE_H_
3
4#include <string>
5#include "boost/optional.hpp"
6
7namespace storm {
8namespace gspn {
12class Place {
13 public:
14 Place(uint64_t id);
15
23 void setName(std::string const& name);
24
30 std::string getName() const;
31
37 uint64_t getID() const;
38
44 void setNumberOfInitialTokens(uint64_t tokens);
45
51 uint64_t getNumberOfInitialTokens() const;
52
59 void setCapacity(boost::optional<uint64_t> const& capacity);
60
66 uint64_t getCapacity() const;
67
71 bool hasRestrictedCapacity() const;
72
73 private:
74 // contains the number of initial tokens of this place
75 uint64_t numberOfInitialTokens = 0;
76
77 // unique id (is used to refer to a specific place in a bitvector)
78 uint64_t id = 0;
79
80 // name which is used in pnml file
81 std::string name;
82
83 // capacity of this place
84 // -1 indicates that the capacity is not set
85 // other non-negative values represents the capacity
86 boost::optional<uint64_t> capacity = boost::none;
87};
88} // namespace gspn
89} // namespace storm
90
91#endif // STORM_STORAGE_GSPN_PLACE_H_
This class provides methods to store and retrieve data for a place in a gspn.
Definition Place.h:12
uint64_t getCapacity() const
Returns the capacity of tokens of this place.
Definition Place.cpp:34
void setName(std::string const &name)
Sets the name of this place.
Definition Place.cpp:10
void setCapacity(boost::optional< uint64_t > const &capacity)
Sets the capacity of tokens of this place.
Definition Place.cpp:30
bool hasRestrictedCapacity() const
Definition Place.cpp:39
uint64_t getID() const
Returns the id of this place.
Definition Place.cpp:18
std::string getName() const
Returns the name of this place.
Definition Place.cpp:14
uint64_t getNumberOfInitialTokens() const
Returns the number of initial tokens of this place.
Definition Place.cpp:26
void setNumberOfInitialTokens(uint64_t tokens)
Sets the number of initial tokens of this place.
Definition Place.cpp:22
LabParser.cpp.
Definition cli.cpp:18