1#ifndef BPMNOS_Execution_SystemState_H
2#define BPMNOS_Execution_SystemState_H
82 std::unordered_map< long unsigned int, std::weak_ptr<StateMachine> >
archive;
87 std::unordered_map<long unsigned int, auto_list< std::weak_ptr<Message> > >
unsent;
92 std::unordered_map<StateMachine*, auto_list< std::weak_ptr<Message> > >
inbox;
97 std::unordered_map<const BPMN::FlowNode*, auto_list< std::weak_ptr<Message> > >
outbox;
147 std::vector< std::tuple<const BPMN::Process*, BPMNOS::Values, BPMNOS::Values> >
getInstantiations()
const;
159 size_t instantiationCounter;
Represents a state machine for BPMN execution of a scope in the model.
A class representing the state that the execution or simulation of a given scenario is in.
std::unordered_map< Token *, Token * > tokenAtMultiInstanceActivity
Map holding the main token waiting at a multi-instance (or loop) activity.
std::unordered_map< Token *, std::vector< Token * > > tokensAtActivityInstance
Map holding all tokens representing an active instance of a multi-instance (or loop) activity for eac...
StateMachines instances
Container holding a state machine for each running instance.
BPMNOS::number currentTime
Timestamp holding the point in time that the engine is in (this is usually representing now).
auto_list< std::weak_ptr< Token >, std::weak_ptr< DecisionRequest > > pendingEntryDecisions
auto_list< std::weak_ptr< Token >, std::weak_ptr< DecisionRequest > > pendingExitDecisions
std::unordered_map< BPMNOS::number, auto_list< std::weak_ptr< Token > > > tokensAwaitingSignal
Map holding a container of all tokens at a signal event awaiting a signal with a given name.
std::optional< BPMNOS::Values > getStatusAttributes(const StateMachine *root, const BPMN::Node *node) const
BPMNOS::number getTime() const
Function returning the assumed time time if available or the current time otherwise.
Messages messages
Container holding all messages created by a throwing message event.
BPMNOS::number contributionsToObjective
All contributions that have already been added to the objective.
std::unordered_map< StateMachine *, auto_list< std::weak_ptr< Message > > > inbox
Map holding the undelivered correspondence associated with a state machine which will be withdrawn wh...
std::unordered_map< Token *, std::vector< Token * > > tokensAwaitingBoundaryEvent
Map holding a container of all tokens at a boundary event awaiting to be triggered for each token at ...
std::unordered_map< Token *, Token * > tokenAwaitingCompensationActivity
Map holding a token that waits for completion of another.
const BPMNOS::Model::Scenario * scenario
Pointer to the corresponding scenario.
std::optional< BPMNOS::Values > getDataAttributes(const StateMachine *root, const BPMN::Node *node) const
auto_set< BPMNOS::number, std::weak_ptr< Token > > tokensAwaitingCompletionEvent
Sorted container holding all tokens awaiting a task completion event.
std::unordered_map< long unsigned int, std::weak_ptr< StateMachine > > archive
Container holding instance identifier and corresponding state machine pointer for each instantiation.
auto_list< std::weak_ptr< Token > > tokensAwaitingReadyEvent
Container holding all tokens awaiting a ready event.
auto_list< std::weak_ptr< Token >, std::weak_ptr< DecisionRequest > > pendingMessageDeliveryDecisions
auto_set< BPMNOS::number, std::weak_ptr< Token > > tokensAwaitingTimer
Sorted container holding holding all tokens awaiting a timer event.
auto_list< std::weak_ptr< Token >, std::weak_ptr< DecisionRequest > > pendingChoiceDecisions
std::unordered_map< Token *, std::vector< Token * > > tokensAwaitingEvent
Map holding all tokens at catching events subsequent to an event-based gateway.
bool isAlive() const
Function returning true if there are tokens in the system or if there may be new instantiations of to...
std::unordered_map< Token *, Token * > tokenAtEventBasedGateway
Map holding the token at the relevant event-based gateway.
std::unordered_map< StateMachine *, std::map< const BPMN::FlowNode *, std::vector< Token * > > > tokensAwaitingGatewayActivation
Map holding tokens awaiting activation of a converging gateway.
std::optional< BPMNOS::number > assumedTime
Timestamp holding the point in time that the simulation is in (this could be a future point in time).
std::unordered_map< Token *, Token * > tokenAwaitingMultiInstanceExit
Map holding the token waiting for the exit of an instantiation of a multi-instance (or loop) activity...
BPMNOS::number getObjective() const
Returns the total objective value (assuming maximization) accumulated during execution.
std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > getInstantiations() const
Method returning a vector of all instantiations at the given time.
std::unordered_map< BPMNOS::number, auto_list< std::weak_ptr< Token > > > tokensAwaitingCondition
Map holding a container of all tokens at a conditional event belonginge to a process instance.
std::unordered_map< const BPMN::FlowNode *, auto_list< std::weak_ptr< Message > > > outbox
Map holding messages sent from given node.
std::unordered_map< Token *, Token * > tokenAssociatedToBoundaryEventToken
Map holding the token residing at the associated activity for each token at a boundary event.
std::unordered_map< StateMachine *, Token * > tokenAwaitingCompensationEventSubProcess
Map holding a token that waits for completion of an event subprocess.
std::unordered_map< Token *, std::weak_ptr< Message > > messageAwaitingDelivery
Container holding message awaiting delivery for tokens at send tasks.
std::unordered_map< long unsigned int, auto_list< std::weak_ptr< Message > > > unsent
Map holding unsent messages with recipient that isn't instantiated yet.
std::unordered_map< Token *, std::vector< BPMNOS::Values > > exitStatusAtActivityInstance
Map holding the exit status of all instances of a multi-instance (or loop) activity for each token wa...
Represents a token running through a (sub)process.
List of tuples with automatic removal of tuples containing an expired weak_ptr.
Set of tuples ordered in increasing order of the first component with automatic removal of tuples con...
The Scenario class holds data for all BPMN instances.
Base class for all nodes in a BPMN model.
std::vector< std::shared_ptr< Message > > Messages
std::vector< std::shared_ptr< StateMachine > > StateMachines
BPMNOS_NUMBER_TYPE number