BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
BPMNOS::Execution::SeededGreedyController Class Reference

A controller dispatching the best evaluated decisions. More...

Detailed Description

Definition at line 15 of file SeededGreedyController.h.

#include <SeededGreedyController.h>

Inheritance diagram for BPMNOS::Execution::SeededGreedyController:

Public Member Functions

 SeededGreedyController (const BPMNOS::Execution::FlattenedGraph *flattenedGraph, Evaluator *evaluator)
 
void notice (const Observable *observable) override
 
std::shared_ptr< EventcreateEntryEvent (const SystemState *systemState, const Token *token, const Vertex *vertex) override
 Method creating an initial sequence of vertices.
 
std::shared_ptr< EventcreateExitEvent (const SystemState *systemState, const Token *token, const Vertex *vertex) override
 Method creating a choice event.
 
std::shared_ptr< EventcreateChoiceEvent (const SystemState *systemState, const Token *token, const Vertex *vertex) override
 Method creating a choice event.
 
std::shared_ptr< EventcreateMessageDeliveryEvent (const SystemState *systemState, const Token *token, const Vertex *vertex) override
 Method creating a choice event.
 
- Public Member Functions inherited from BPMNOS::Execution::SeededController
 SeededController (const BPMNOS::Execution::FlattenedGraph *flattenedGraph, Config config=default_config())
 
bool setSeed (const std::vector< size_t > initialSeed)
 
void connect (Mediator *mediator)
 
void subscribe (Engine *engine)
 
void synchronizeSolution (const Token *token)
 
std::vector< size_t > getSequence () const
 Method return true if a token entering a catch event node may be withdrawn.
 
size_t getProgress () const
 Method providing the vertex sequence in the solution.
 
void initializePendingVertices ()
 Method returning the number of processed vertices.
 
const Vertexentry (const Vertex *vertex) const
 Method creating a message delivery event.
 
const Vertexexit (const Vertex *vertex) const
 
- Public Member Functions inherited from BPMNOS::Execution::Controller
 Controller ()
 
virtual ~Controller ()=default
 
- Public Member Functions inherited from BPMNOS::Execution::Observer
- Public Member Functions inherited from BPMNOS::Execution::EventDispatcher
virtual ~EventDispatcher ()=default
 
virtual void notice (Event *event)
 
- Public Member Functions inherited from BPMNOS::Execution::EventListener
void subscribe (EventDispatcher *eventDispatcher)
 
- Public Member Functions inherited from BPMNOS::Execution::Notifier
 Notifier ()
 
virtual ~Notifier ()=default
 
template<typename... ObservableTypes>
void addSubscriber (Observer *subscriber, ObservableTypes... observableTypes)
 
template<typename... ObservableTypes>
void removeSubscriber (Observer *subscriber, ObservableTypes... observableTypes)
 
void notify (const Observable *observable) const
 
void notify (const Observable &observable) const
 

Protected Attributes

auto_list< std::weak_ptr< const Message > > messages
 
std::unique_ptr< BisectionalChoicechoiceDispatcher
 
Evaluatorevaluator
 
- Protected Attributes inherited from BPMNOS::Execution::SeededController
Evaluatorevaluator
 
std::shared_ptr< TerminationEventterminationEvent
 
Config config
 
std::vector< size_t > seed
 
std::unordered_map< const Vertex *, const Vertex * > performing
 
std::list< const Vertex * > pendingVertices
 
std::list< const Vertex * > processedVertices
 The list of vertices to be processed.
 
- Protected Attributes inherited from BPMNOS::Execution::EventListener
std::vector< EventDispatcher * > eventDispatchers
 

Additional Inherited Members

- Public Types inherited from BPMNOS::Execution::SeededController
using Vertex = FlattenedGraph::Vertex
 
using RequestType = Observable::Type
 
- Static Public Member Functions inherited from BPMNOS::Execution::SeededController
static Config default_config ()
 
- Public Attributes inherited from BPMNOS::Execution::SeededController
const FlattenedGraphflattenedGraph
 
- Protected Member Functions inherited from BPMNOS::Execution::SeededController
std::shared_ptr< EventdispatchEvent (const SystemState *systemState)
 
bool hasPendingPredecessor (const Vertex *vertex) const
 The list of vertices already processed.
 
bool hasPendingRecipient (const Vertex *vertex) const
 
void finalizePredecessorPositions (const Vertex *vertex)
 
void fetchPendingPredecessors (std::unordered_set< const Vertex * > &predecessors, const Vertex *vertex) const
 
std::list< constVertex * >::iterator finalizeVertexPosition (const Vertex *vertex)
 
std::list< constVertex * >::iterator finalizeUnvisited (const Vertex *vertex)
 Method finalizing the sequence position of a pending vertex and removing it from the list.
 
void finalizeUnvisitedChildren (const Vertex *vertex)
 
std::list< constVertex * >::iterator finalizeUnvisitedTypedStartEvents (std::list< const Vertex * >::iterator it)
 
bool withdrawableEntry (const BPMN::Node *node) const
 Method finalizing the sequence position of a unvisited vertices belonging to typed start events.
 
- Protected Member Functions inherited from BPMNOS::Execution::EventListener
std::shared_ptr< EventfetchEvent (SystemState *systemState)
 

Constructor & Destructor Documentation

◆ SeededGreedyController()

SeededGreedyController::SeededGreedyController ( const BPMNOS::Execution::FlattenedGraph * flattenedGraph,
Evaluator * evaluator )

Definition at line 7 of file SeededGreedyController.cpp.

Member Function Documentation

◆ createChoiceEvent()

std::shared_ptr< Event > SeededGreedyController::createChoiceEvent ( const SystemState * systemState,
const Token * token,
const Vertex * vertex )
overridevirtual

Implements BPMNOS::Execution::SeededController.

Definition at line 47 of file SeededGreedyController.cpp.

◆ createEntryEvent()

std::shared_ptr< Event > SeededGreedyController::createEntryEvent ( const SystemState * systemState,
const Token * token,
const Vertex * vertex )
overridevirtual

Implements BPMNOS::Execution::SeededController.

Definition at line 27 of file SeededGreedyController.cpp.

◆ createExitEvent()

std::shared_ptr< Event > SeededGreedyController::createExitEvent ( const SystemState * systemState,
const Token * token,
const Vertex * vertex )
overridevirtual

Implements BPMNOS::Execution::SeededController.

Definition at line 37 of file SeededGreedyController.cpp.

◆ createMessageDeliveryEvent()

std::shared_ptr< Event > SeededGreedyController::createMessageDeliveryEvent ( const SystemState * systemState,
const Token * token,
const Vertex * vertex )
overridevirtual

Implements BPMNOS::Execution::SeededController.

Definition at line 59 of file SeededGreedyController.cpp.

◆ notice()

void SeededGreedyController::notice ( const Observable * observable)
overridevirtual

Reimplemented from BPMNOS::Execution::SeededController.

Definition at line 14 of file SeededGreedyController.cpp.

Member Data Documentation

◆ choiceDispatcher

std::unique_ptr<BisectionalChoice> BPMNOS::Execution::SeededGreedyController::choiceDispatcher
protected

Definition at line 25 of file SeededGreedyController.h.

◆ evaluator

Evaluator* BPMNOS::Execution::SeededGreedyController::evaluator
protected

Definition at line 26 of file SeededGreedyController.h.

◆ messages

auto_list< std::weak_ptr<const Message> > BPMNOS::Execution::SeededGreedyController::messages
protected

Definition at line 24 of file SeededGreedyController.h.


The documentation for this class was generated from the following files: