10 , currentTime(currentTime)
11 , contributionsToObjective(0)
12 , globals(scenario->globals)
43 auto value =
globals[attribute->index];
44 if ( value.has_value() ) {
45 result += attribute->weight * value.value();
68 return std::move( knownValues.value() );
81 return std::move( knownData.value() );
Represents a state machine for BPMN execution of a scope in the model.
std::optional< BPMNOS::number > instance
Numeric representation of instance id (TODO: can we const this?)
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).
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.
BPMNOS::number contributionsToObjective
All contributions that have already been added to the objective.
const BPMNOS::Model::Scenario * scenario
Pointer to the corresponding scenario.
std::optional< BPMNOS::Values > getDataAttributes(const StateMachine *root, const BPMN::Node *node) const
bool isAlive() const
Function returning true if there are tokens in the system or if there may be new instantiations of to...
std::optional< BPMNOS::number > assumedTime
Timestamp holding the point in time that the simulation is in (this could be a future point in time).
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::vector< std::unique_ptr< Attribute > > attributes
Vector containing new global attributes declared for the model.
The Scenario class holds data for all BPMN instances.
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::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.
bool isCompleted(const BPMNOS::number currentTime) const
Method returning true if the currentTime exceeds the completion time.
const Model * getModel() const
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::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 tim...
BPMNOS::Values getAnticipatedData(const BPMNOS::number instanceId, const BPMN::Node *node, const BPMNOS::number currentTime) const
Method returning the disclosed 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.
Base class for all nodes in a BPMN model.
BPMNOS_NUMBER_TYPE number