|
BPMN-OS
BPMN for optimization and simulation
|
The Scenario class holds data for all BPMN instances. More...
Definition at line 20 of file Scenario.h.
#include <Scenario.h>
Classes | |
| struct | Data |
| struct | Disclosure |
| struct | InstanceData |
Public Member Functions | |
| Scenario (const Model *model, BPMNOS::number inception, BPMNOS::number completion, const DataInput &attributes, const std::unordered_map< const Attribute *, BPMNOS::number > &globalValueMap, unsigned int index=0) | |
| Constructor for Scenario. | |
| Scenario (const Scenario &other, unsigned int index) | |
| Copy constructor for Scenario. | |
| const Model * | getModel () const |
| virtual void | update () |
| Virtual method allowing derived scenarios to update their data. | |
| BPMNOS::number | getInception () const |
| Method returning the time of the earliest instantiation. | |
| void | updateCompletion (const BPMNOS::number time) |
| Method updating the completion time. | |
| bool | isCompleted (const BPMNOS::number currentTime) const |
| 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 |
| Method returning a vector of all instances that are known to be instantiated at the given time. | |
| std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > | getAnticipatedInstantiations (const BPMNOS::number currentTime, const BPMNOS::number assumedTime) const |
| Method returning a vector of all instances that are anticipated to be instantiated at the assumed time. | |
| std::vector< const InstanceData * > | getCreatedInstances (const BPMNOS::number currentTime) const |
| 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 |
| Method returning a vector of all instances that have been created or are known for sure until the given time. | |
| std::vector< const InstanceData * > | getAnticipatedInstances (const BPMNOS::number currentTime) const |
| Method returning a vector of all instances that are anticipated and not known for sure at the given time. | |
| std::optional< BPMNOS::number > | getKnownValue (const Scenario::InstanceData *instance, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const |
| 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 |
| Method returning a known value of an attribute. | |
| Values | getKnownInitialStatus (const InstanceData *, const BPMNOS::number time) const |
| Method returning the initial status of a known instantiation at the given time. | |
| Values | getKnownInitialData (const InstanceData *, const BPMNOS::number time) const |
| Method returning the initial data attributes of a known instantiation at the given time. | |
| std::optional< BPMNOS::number > | getAnticipatedValue (const Scenario::InstanceData *instance, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const |
| Method returning disclosed value of an attribute. | |
| std::optional< BPMNOS::number > | getAnticipatedValue (const BPMNOS::number instanceId, const BPMNOS::Model::Attribute *attribute, const BPMNOS::number currentTime) const |
| Method returning disclosed value of an attribute. | |
| BPMNOS::Values | getAnticipatedInitialStatus (const InstanceData *, const BPMNOS::number currentTime) const |
| Method returning the initial status of an anticipated instantiation at the given time. | |
| BPMNOS::Values | getAnticipatedInitialData (const InstanceData *, const BPMNOS::number currentTime) const |
| Method returning the initial data attributes of an anticipated instantiation at the given time. | |
| std::optional< BPMNOS::Values > | getKnownValues (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const |
| 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 |
| Method returning all known values of new attributes. | |
| BPMNOS::Values | getAnticipatedValues (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const |
| Method returning the disclosed values of new attributes. | |
| BPMNOS::Values | getAnticipatedData (const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const |
| Method returning the disclosed values of new attributes. | |
| void | addInstance (const BPMN::Process *process, const BPMNOS::number instanceId, Data instantiation) |
| void | removeAnticipatedInstance (const BPMNOS::number instanceId) |
| Data & | getInstantiationData (const BPMNOS::number instanceId) |
| Data & | getAttributeData (const BPMNOS::number instanceId, const Attribute *attribute) |
| void | addAnticipation (Data &data, Disclosure anticipation) |
| void | setRealization (Data &data, Disclosure realization) |
Public Attributes | |
| unsigned int | index |
| BPMNOS::Values | globals |
| const Model * | model |
| Pointer to the BPMN model. | |
Static Public Attributes | |
| static constexpr char | delimiters [] = {'^','#'} |
| Delimiters used for disambiguation of identifiers of non-interrupting event subprocesses and multi-instance activities. | |
Protected Member Functions | |
| const Scenario::Disclosure & | getLatestDisclosure (const std::vector< Scenario::Disclosure > &data, const BPMNOS::number currentTime) const |
Protected Attributes | |
| const DataInput & | attributes |
| Map holding all attributes in the model with keys being the process and attribute id. | |
| std::unordered_map< size_t, InstanceData > | instances |
| Map of instances with key being the instance id. | |
| BPMNOS::number | inception |
| Time earliest time in execution. | |
| BPMNOS::number | completion |
| The latest time in execution at which an instantiation can happen. | |
| Scenario::Scenario | ( | const Model * | model, |
| BPMNOS::number | inception, | ||
| BPMNOS::number | completion, | ||
| const DataInput & | attributes, | ||
| const std::unordered_map< const Attribute *, BPMNOS::number > & | globalValueMap, | ||
| unsigned int | index = 0 ) |
Definition at line 9 of file Scenario.cpp.
| Scenario::Scenario | ( | const Scenario & | other, |
| unsigned int | index ) |
Definition at line 22 of file Scenario.cpp.
| void Scenario::addAnticipation | ( | Scenario::Data & | data, |
| Scenario::Disclosure | anticipation ) |
Definition at line 59 of file Scenario.cpp.
| void Scenario::addInstance | ( | const BPMN::Process * | process, |
| const BPMNOS::number | instanceId, | ||
| Scenario::Data | instantiation ) |
Definition at line 39 of file Scenario.cpp.
| BPMNOS::Values Scenario::getAnticipatedData | ( | const BPMNOS::number | instanceId, |
| const BPMN::Node * | node, | ||
| const BPMNOS::number | currentTime ) const |
Definition at line 294 of file Scenario.cpp.
| BPMNOS::Values Scenario::getAnticipatedInitialData | ( | const InstanceData * | instance, |
| const BPMNOS::number | currentTime ) const |
Definition at line 272 of file Scenario.cpp.
| BPMNOS::Values Scenario::getAnticipatedInitialStatus | ( | const InstanceData * | instance, |
| const BPMNOS::number | currentTime ) const |
Definition at line 263 of file Scenario.cpp.
| std::vector< const Scenario::InstanceData * > Scenario::getAnticipatedInstances | ( | const BPMNOS::number | currentTime | ) | const |
Definition at line 110 of file Scenario.cpp.
| std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > Scenario::getAnticipatedInstantiations | ( | const BPMNOS::number | currentTime, |
| const BPMNOS::number | assumedTime ) const |
Definition at line 143 of file Scenario.cpp.
| std::optional< BPMNOS::number > Scenario::getAnticipatedValue | ( | const BPMNOS::number | instanceId, |
| const BPMNOS::Model::Attribute * | attribute, | ||
| const BPMNOS::number | currentTime ) const |
If no attribute value is yet disclosed, the method returns std::nullopt.
Definition at line 258 of file Scenario.cpp.
| std::optional< BPMNOS::number > Scenario::getAnticipatedValue | ( | const Scenario::InstanceData * | instance, |
| const BPMNOS::Model::Attribute * | attribute, | ||
| const BPMNOS::number | currentTime ) const |
If no attribute value is yet disclosed, the method returns std::nullopt.
Definition at line 243 of file Scenario.cpp.
| BPMNOS::Values Scenario::getAnticipatedValues | ( | const BPMNOS::number | instanceId, |
| const BPMN::Node * | node, | ||
| const BPMNOS::number | currentTime ) const |
Definition at line 282 of file Scenario.cpp.
| Scenario::Data & Scenario::getAttributeData | ( | const BPMNOS::number | instanceId, |
| const Attribute * | attribute ) |
Definition at line 323 of file Scenario.cpp.
| std::vector< const Scenario::InstanceData * > Scenario::getCreatedInstances | ( | const BPMNOS::number | currentTime | ) | const |
Definition at line 83 of file Scenario.cpp.
| std::vector< std::tuple< const BPMN::Process *, BPMNOS::Values, BPMNOS::Values > > Scenario::getCurrentInstantiations | ( | const BPMNOS::number | currentTime | ) | const |
Definition at line 129 of file Scenario.cpp.
| BPMNOS::number Scenario::getInception | ( | ) | const |
Definition at line 74 of file Scenario.cpp.
| Scenario::Data & Scenario::getInstantiationData | ( | const BPMNOS::number | instanceId | ) |
Definition at line 318 of file Scenario.cpp.
| std::optional< BPMNOS::Values > Scenario::getKnownData | ( | const BPMNOS::number | instanceId, |
| const BPMN::Node * | node, | ||
| const BPMNOS::number | currentTime ) const |
If at least one attribute value is not yet known, the method returns std::nullopt.
Definition at line 231 of file Scenario.cpp.
| BPMNOS::Values Scenario::getKnownInitialData | ( | const InstanceData * | instance, |
| const BPMNOS::number | time ) const |
Definition at line 180 of file Scenario.cpp.
| BPMNOS::Values Scenario::getKnownInitialStatus | ( | const InstanceData * | instance, |
| const BPMNOS::number | time ) const |
Definition at line 166 of file Scenario.cpp.
| std::vector< const Scenario::InstanceData * > Scenario::getKnownInstances | ( | const BPMNOS::number | currentTime | ) | const |
Definition at line 97 of file Scenario.cpp.
| std::optional< BPMNOS::number > Scenario::getKnownValue | ( | const BPMNOS::number | instanceId, |
| const BPMNOS::Model::Attribute * | attribute, | ||
| const BPMNOS::number | currentTime ) const |
If the attribute value is not yet known, the method returns std::nullopt.
Definition at line 212 of file Scenario.cpp.
| std::optional< BPMNOS::number > Scenario::getKnownValue | ( | const Scenario::InstanceData * | instance, |
| const BPMNOS::Model::Attribute * | attribute, | ||
| const BPMNOS::number | currentTime ) const |
If the attribute value is not yet known, the method returns std::nullopt.
Definition at line 194 of file Scenario.cpp.
| std::optional< BPMNOS::Values > Scenario::getKnownValues | ( | const BPMNOS::number | instanceId, |
| const BPMN::Node * | node, | ||
| const BPMNOS::number | currentTime ) const |
If at least one attribute value is not yet known, the method returns std::nullopt.
Definition at line 218 of file Scenario.cpp.
|
protected |
Definition at line 304 of file Scenario.cpp.
| const Model * Scenario::getModel | ( | ) | const |
Definition at line 70 of file Scenario.cpp.
| bool Scenario::isCompleted | ( | const BPMNOS::number | currentTime | ) | const |
Definition at line 78 of file Scenario.cpp.
| void Scenario::removeAnticipatedInstance | ( | const BPMNOS::number | instanceId | ) |
Definition at line 51 of file Scenario.cpp.
| void Scenario::setRealization | ( | Scenario::Data & | data, |
| Scenario::Disclosure | realization ) |
Definition at line 66 of file Scenario.cpp.
|
inlinevirtual |
Definition at line 58 of file Scenario.h.
| void BPMNOS::Model::Scenario::updateCompletion | ( | const BPMNOS::number | time | ) |
|
protected |
Definition at line 184 of file Scenario.h.
|
protected |
Definition at line 188 of file Scenario.h.
|
staticconstexpr |
Definition at line 53 of file Scenario.h.
| BPMNOS::Values BPMNOS::Model::Scenario::globals |
Definition at line 181 of file Scenario.h.
|
protected |
Definition at line 187 of file Scenario.h.
| unsigned int BPMNOS::Model::Scenario::index |
Definition at line 51 of file Scenario.h.
|
protected |
Definition at line 185 of file Scenario.h.
| const Model* BPMNOS::Model::Scenario::model |
Definition at line 182 of file Scenario.h.