|
BPMN-OS
BPMN for optimization and simulation
|
A scenario implementation where all data is known from the start. More...
StaticScenario is optimized for cases where all instance data and attribute values are known at time 0. The currentTime parameter is ignored in query methods.
Definition at line 16 of file StaticScenario.h.
#include <StaticScenario.h>
Public Member Functions | |
| StaticScenario (const Model *model, BPMNOS::number earliestInstantiationTime, BPMNOS::number latestInstantiationTime, const std::unordered_map< const Attribute *, BPMNOS::number > &globalValueMap) | |
| BPMNOS::number | getEarliestInstantiationTime () const override |
| Method returning the time of the earliest instantiation. | |
| bool | isCompleted (const BPMNOS::number currentTime) const override |
| Method returning true if the currentTime exceeds the completion time. | |
| std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > | getCurrentInstantiations (const BPMNOS::number currentTime) const override |
| Method returning a vector of all instances that are known to be instantiated at the given time. | |
| std::vector< const InstanceData * > | getCreatedInstances (const BPMNOS::number currentTime) const override |
| Method returning a vector of all instances that have been created until the given time. | |
| std::vector< const InstanceData * > | getKnownInstances (const BPMNOS::number currentTime) const override |
| Method returning a vector of all instances that have been created or are known for sure until the given time. | |
| std::optional< BPMNOS::number > | getKnownValue (const Scenario::InstanceData *instance, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const override |
| Method returning a known value of an attribute. | |
| std::optional< BPMNOS::number > | getKnownValue (const BPMNOS::number instanceId, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const override |
| Method returning a known value of an attribute. | |
| std::optional< BPMNOS::Values > | getKnownValues (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const override |
| Method returning all known values of new attributes. | |
| std::optional< BPMNOS::Values > | getKnownData (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const override |
| Method returning all known values of new attributes. | |
Public Member Functions inherited from BPMNOS::Model::Scenario | |
| virtual | ~Scenario ()=default |
| const Model * | getModel () const |
| Method returning the model. | |
| virtual void | setTaskCompletionStatus (const BPMNOS::number instanceId, const BPMN::Node *task, BPMNOS::Values status) const |
| Store the completion status when a task enters BUSY state. | |
| virtual BPMNOS::Values | getTaskCompletionStatus (const BPMNOS::number instanceId, const BPMN::Node *task) const |
| Get the completion status for a task. | |
| virtual void | initializeArrivalData (BPMNOS::number instanceId, const BPMN::Node *node, const Values &status, const Values &data, const Values &globals) const |
| Initialize arrival data when a token arrives at an activity. | |
Protected Member Functions | |
| Values | getKnownInitialStatus (const InstanceData *, const BPMNOS::number time) const override |
| Method returning the initial status attributes for process instantiation. | |
| Values | getKnownInitialData (const InstanceData *, const BPMNOS::number time) const override |
| Method returning the initial data attributes for process instantiation. | |
| void | addInstance (const BPMN::Process *process, const BPMNOS::number instanceId, BPMNOS::number instantiationTime) |
| void | setValue (const BPMNOS::number instanceId, const Attribute *attribute, std::optional< BPMNOS::number > value) |
Protected Member Functions inherited from BPMNOS::Model::Scenario | |
Protected Attributes | |
| std::unordered_map< size_t, InstanceData > | instances |
| BPMNOS::number | earliestInstantiationTime |
| BPMNOS::number | latestInstantiationTime |
Friends | |
| class | StaticDataProvider |
Additional Inherited Members | |
Public Attributes inherited from BPMNOS::Model::Scenario | |
| BPMNOS::Values | globals |
| std::map< std::pair< size_t, const BPMN::Node * >, BPMNOS::Values > | taskCompletionStatus |
| Stored completion status per (instanceId, task) | |
| const Model * | model |
| Pointer to the BPMN model. | |
Static Public Attributes inherited from BPMNOS::Model::Scenario | |
| static constexpr char | delimiters [] = {'^','#'} |
| Delimiters used for disambiguation of identifiers of non-interrupting event subprocesses and multi-instance activities. | |
| StaticScenario::StaticScenario | ( | const Model * | model, |
| BPMNOS::number | earliestInstantiationTime, | ||
| BPMNOS::number | latestInstantiationTime, | ||
| const std::unordered_map< const Attribute *, BPMNOS::number > & | globalValueMap ) |
Definition at line 7 of file StaticScenario.cpp.
|
protected |
Definition at line 18 of file StaticScenario.cpp.
|
overridevirtual |
Implements BPMNOS::Model::Scenario.
Definition at line 34 of file StaticScenario.cpp.
|
overridevirtual |
Implements BPMNOS::Model::Scenario.
Definition at line 53 of file StaticScenario.cpp.
|
overridevirtual |
Implements BPMNOS::Model::Scenario.
Definition at line 26 of file StaticScenario.cpp.
|
overridevirtual |
If at least one attribute value is not yet known, the method returns std::nullopt.
Implements BPMNOS::Model::Scenario.
Definition at line 133 of file StaticScenario.cpp.
|
overrideprotectedvirtual |
Used internally by getCurrentInstantiations to get process-level data attributes.
Implements BPMNOS::Model::Scenario.
Definition at line 71 of file StaticScenario.cpp.
|
overrideprotectedvirtual |
Used internally by getCurrentInstantiations to get process-level status attributes.
Implements BPMNOS::Model::Scenario.
Definition at line 63 of file StaticScenario.cpp.
|
overridevirtual |
Implements BPMNOS::Model::Scenario.
Definition at line 44 of file StaticScenario.cpp.
|
overridevirtual |
If the attribute value is not yet known, the method returns std::nullopt.
Implements BPMNOS::Model::Scenario.
Definition at line 120 of file StaticScenario.cpp.
|
overridevirtual |
If the attribute value is not yet known, the method returns std::nullopt.
Implements BPMNOS::Model::Scenario.
Definition at line 79 of file StaticScenario.cpp.
|
overridevirtual |
If at least one attribute value is not yet known, the method returns std::nullopt.
Implements BPMNOS::Model::Scenario.
Definition at line 124 of file StaticScenario.cpp.
|
overridevirtual |
Implements BPMNOS::Model::Scenario.
Definition at line 30 of file StaticScenario.cpp.
|
protected |
Definition at line 22 of file StaticScenario.cpp.
|
friend |
Definition at line 17 of file StaticScenario.h.
|
protected |
Definition at line 44 of file StaticScenario.h.
|
protected |
Definition at line 43 of file StaticScenario.h.
|
protected |
Definition at line 45 of file StaticScenario.h.