40 PetriNet(
const std::set<std::string> &petri_net_xmls,
41 const std::string &case_id, std::shared_ptr<TaskSystem> threadpool,
42 const Marking &goal_marking = {},
55 PetriNet(
const Net &net,
const std::string &case_id,
56 std::shared_ptr<TaskSystem> threadpool,
70 const std::string &transition)
const noexcept;
80 const Callback &callback)
const noexcept;
108 const std::shared_ptr<Petri> impl;
Token fire(const T &callback)
Generates a Token based on what kind of information the Callback returns.
Definition callback.h:64
Eventlog getLog(const T &)
Get the Log object. By default it returns an empty vector.
Definition callback.h:82
void resume(const T &)
Templates a resume action for a Callback. By default it does nothing and not resume the Callback.
Definition callback.h:52
void cancel(const T &)
The default cancel implementation is naive. It only returns a user-exit state and does nothing to the...
Definition callback.h:34
void pause(const T &)
Implements a pause action for a Callback. By default it does nothing and not pause the Callback.
Definition callback.h:43
Callback is a wrapper around any type that you to tie to a transition. Typically this is an invokable...
Definition callback.h:98
PetriNet exposes the possible constructors to create PetriNets. It also allows the user to register a...
Definition symmetri.h:27
Marking getMarking() const noexcept
Get the Marking object. This function is thread-safe and be called during PetriNet execution.
Definition symmetri.cpp:64
void registerCallback(const std::string &transition, const Callback &callback) const noexcept
The default transition payload (DirectMutation) is overload by the Callback supplied for a specific t...
Definition symmetri.cpp:57
std::function< void()> getInputTransitionHandle(const std::string &transition) const noexcept
By registering a input transition you get a handle to manually force a transition to fire....
Definition symmetri.cpp:37
PetriNet(const std::set< std::string > &petri_net_xmls, const std::string &case_id, std::shared_ptr< TaskSystem > threadpool, const Marking &goal_marking={}, const PriorityTable &priorities={})
Construct a new PetriNet object from a set of paths to PNML- or GRML-files. Since PNML-files do not h...
Definition symmetri.cpp:11
bool reuseApplication(const std::string &case_id)
reuseApplication resets the PetriNet such that the same net can be used again after a cancel call or ...
Definition symmetri.cpp:76
Tokens are elements that can reside in places. Tokens can have a color which makes them distinguishab...
Definition colors.hpp:104
std::vector< std::pair< Transition, int8_t > > PriorityTable
Definition types.h:51
std::vector< Event > Eventlog
Definition types.h:32
std::vector< std::pair< Place, Token > > Marking
Definition types.h:46
std::unordered_map< Transition, std::pair< std::vector< std::pair< Place, Token > >, std::vector< std::pair< Place, Token > > > > Net
Definition types.h:35