11 auto token = decision->
token;
14 assert(extensionElements);
17 extensionElements->computeInitialValues(token->owner->systemState->getTime(),status,data,globals);
21assert(!
"No entry for event-subprocesses");
23 extensionElements->applyOperators(status,data,globals);
26 if ( !extensionElements->feasibleEntry(status,data,globals) ) {
39 extensionElements->applyOperators(status,data,globals);
41 return extensionElements->fullScopeRestrictionsSatisfied(status,data,globals);
45 auto token = decision->
token;
46 assert( token->completed() );
49 auto now = token->owner->systemState->getTime();
55 assert(extensionElements);
57 return extensionElements->feasibleExit(status,data,globals);
61 auto token = decision->
token;
68 assert(extensionElements);
69 extensionElements->applyOperators(status,data,globals);
70 return extensionElements->feasibleCompletion(status,data,globals);
74 auto token = decision->
token;
80 assert( token->node );
81 assert( token->node->parent );
82 auto extensionElements =
87 assert(extensionElements);
90 message->apply(token->node,token->getAttributeRegistry(),status,data,globals);
91 extensionElements->applyOperators(status,data,globals);
95 return extensionElements->feasibleCompletion(status,data,globals);
98 return extensionElements->feasibleEntry(status,data,globals);
101 return extensionElements->satisfiesInheritedRestrictions(status,data,globals);
106 auto token = decision->
token;
109 assert(extensionElements);
110 Values status = token->status;
112 Values data(*token->data);
113 Values globals = token->globals;
114 double evaluation = (double)extensionElements->getObjective(status,data,globals);
117 bool feasible =
updateValues(decision,status,data,globals);
123 return extensionElements->getObjective(status,data,globals) - evaluation;
127 auto token = decision->
token;
128 assert( token->completed() );
129 Values status = token->status;
131 Values data(*token->data);
132 Values globals = token->globals;
133 bool feasible =
updateValues(decision,status,data,globals);
141 auto token = decision->
token;
142 assert( token->busy() );
144 assert(extensionElements);
145 assert( extensionElements->choices.size() == decision->
choices.size() );
146 auto evaluation = (double)extensionElements->getObjective(token->status, *token->data, token->globals);
148 assert(
dynamic_cast<const ChoiceEvent*
>(decision) );
149 Values status(token->status);
151 Values data(*token->data);
152 Values globals = token->globals;
154 for (
size_t i = 0; i < extensionElements->choices.size(); i++) {
155 extensionElements->attributeRegistry.setValue( extensionElements->choices[i]->attribute, status, data, globals, decision->
choices[i] );
158 bool feasible =
updateValues(decision,status,data,globals);
163 return extensionElements->getObjective(status,data,globals) - evaluation;
167 auto token = decision->
token;
168 assert( token->busy() );
171 assert(extensionElements);
172 Values status = token->status;
174 Values data(*token->data);
175 Values globals = token->globals;
176 double evaluation = (double)extensionElements->getObjective(status,data,globals);
178 bool feasible =
updateValues(decision,status,data,globals);
183 return extensionElements->getObjective(status,data,globals) - evaluation;
188 std::set<const BPMNOS::Model::Attribute*> dependencies;
190 auto token = decision->
token;
192 assert(extensionElements);
198 dependencies.insert(extensionElements->operatorDependencies.begin(), extensionElements->operatorDependencies.end());
201 dependencies.insert(extensionElements->entryDependencies.begin(), extensionElements->entryDependencies.end());
207 dependencies.insert(extensionElements->operatorDependencies.begin(), extensionElements->operatorDependencies.end());
213 std::set<const BPMNOS::Model::Attribute*> dependencies;
215 auto token = decision->
token;
217 assert(extensionElements);
219 dependencies.insert(extensionElements->exitDependencies.begin(), extensionElements->exitDependencies.end());
225 auto token = decision->
token;
227 assert(extensionElements);
230 std::set<const BPMNOS::Model::Attribute*> dependencies = extensionElements->operatorDependencies;
232 dependencies.insert(extensionElements->completionDependencies.begin(), extensionElements->completionDependencies.end());
235 for (
auto& choice : extensionElements->choices ) {
236 dependencies.insert(choice->dependencies.begin(), choice->dependencies.end());
243 std::set<const BPMNOS::Model::Attribute*> dependencies;
244 auto token = decision->
token;
257 assert(extensionElements);
258 dependencies.insert(extensionElements->completionDependencies.begin(), extensionElements->completionDependencies.end());
259 dependencies.insert(extensionElements->operatorDependencies.begin(), extensionElements->operatorDependencies.end());
262 auto eventSubProcess = token->node->parent;
264 assert(extensionElements);
265 dependencies.insert(extensionElements->entryDependencies.begin(), extensionElements->entryDependencies.end());
266 dependencies.insert(extensionElements->operatorDependencies.begin(), extensionElements->operatorDependencies.end());
std::set< const BPMNOS::Model::Attribute * > getDependencies(EntryDecision *decision) override
virtual bool updateValues(EntryDecision *decision, Values &status, Values &data, Values &globals)
std::optional< double > evaluate(EntryDecision *decision) override
const SystemState * systemState
BPMNOS::number getTime() const
Function returning the current time.
const BPMN::FlowNode * node
const StateMachine * owner
State machine owning the token.
Class representing a task in which one or more choices have to be made.
Class holding extension elements representing execution data for nodes.
std::unique_ptr< ExtensionElements > extensionElements
Scope * parent
Reference to the parent node.
T * as()
Casts the element to the specified type T.
T * represents()
Attempts to cast the element to the specified type T.
Represents the event that choices are made for a DecisionTask.
Represents the event that choices are made for a DecisionTask.
std::vector< number > choices
Represents the event of a token entering a node.
Represents the event of a token exiting a node.
Represents the event of a message from the message pool being delivered.
Represents the event of a message from the message pool being delivered.
static constexpr size_t Timestamp