23 auto decision = std::make_shared<ExitDecision>(request->token,
evaluator);
40 auto [ token_ptr, request_ptr, decision ] = std::move(*it);
45 auto reward = decision->evaluate();
47 if ( reward.has_value() ) {
48 return std::make_shared<ExitEvent>(decision->token);
54 constexpr std::size_t last = std::tuple_size<
decltype(decisionTuple)>::value - 1;
55 std::weak_ptr<Event>& event_ptr = std::get<last>(decisionTuple);
56 if (
auto event = event_ptr.lock();
57 event && std::get<0>(decisionTuple) < std::numeric_limits<double>::max()
Represents an abstract base class for an evaluator determining feasibility and reward of a decision.
Class for dispatching the event with the best evaluation.
void addEvaluation(WeakPtrs..., std::shared_ptr< Decision > decision, std::optional< double > reward)
void notice(const Observable *observable) override
void connect(Mediator *mediator) override
auto_set< double, WeakPtrs..., std::weak_ptr< Event > > evaluatedDecisions
auto_list< WeakPtrs..., std::shared_ptr< Decision > > decisionsWithoutEvaluation
void notice(const Observable *observable) override
void connect(Mediator *mediator) override
GreedyExit(Evaluator *evaluator)
std::shared_ptr< Event > dispatchEvent(const SystemState *systemState) override
void addSubscriber(Observer *subscriber, ObservableTypes... observableTypes)
A class representing the state that the execution or simulation of a given scenario is in.
BPMNOS::number currentTime
Timestamp holding the point in time that the engine is in (this is usually representing now).
Represents a pending decision.
virtual constexpr Type getObservableType() const =0