1#ifndef BPMNOS_Execution_GreedyDispatcher_H
2#define BPMNOS_Execution_GreedyDispatcher_H
17template <
typename... WeakPtrs>
30 void addEvaluation(WeakPtrs..., std::shared_ptr<Decision> decision, std::optional<double> reward );
34 bool intersect(
const std::vector<const BPMNOS::Model::Attribute*>& first,
const std::set<const BPMNOS::Model::Attribute*>& second)
const;
Represents an abstract base class for a pending Evaluator.
Class for dispatching the event with the best evaluation.
auto_list< WeakPtrs..., std::shared_ptr< Decision > > invariantEvaluations
std::shared_ptr< Event > dispatchEvent(const SystemState *systemState) override
virtual void dataUpdate(const DataUpdate *update)
std::unordered_map< long unsigned int, auto_list< WeakPtrs..., std::shared_ptr< Decision > > > timeAndDataDependentEvaluations
std::unordered_map< long unsigned int, auto_list< WeakPtrs..., std::shared_ptr< Decision > > > dataDependentEvaluations
auto_list< WeakPtrs..., std::shared_ptr< Decision > > timeDependentEvaluations
GreedyDispatcher(Evaluator *evaluator)
virtual ~GreedyDispatcher()=default
void removeDependentEvaluations(const DataUpdate *update, std::unordered_map< long unsigned int, auto_list< WeakPtrs..., std::shared_ptr< Decision > > > &evaluatedDecisions, auto_list< WeakPtrs..., std::shared_ptr< Decision > > &unevaluatedDecisions)
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 removeObsolete(const DataUpdate *update, auto_list< WeakPtrs..., std::shared_ptr< Decision > > &evaluation, auto_list< WeakPtrs..., std::shared_ptr< Decision > > &unevaluatedDecisions)
bool intersect(const std::vector< const BPMNOS::Model::Attribute * > &first, const std::set< const BPMNOS::Model::Attribute * > &second) const
A class representing the state that the execution or simulation of a given scenario is in.
List of tuples with automatic removal of tuples containing an expired weak_ptr.
Set of tuples ordered in increasing order of the first component with automatic removal of tuples con...
BPMNOS_NUMBER_TYPE number