|
BPMN-OS
BPMN for optimization and simulation
|
A controller dispatching decisions in the order derived from a given seed. More...
Definition at line 28 of file SeededController.h.
#include <SeededController.h>
Classes | |
| struct | Config |
| struct | pair_hash |
| Map holding the entry vertex of a sequential activity performed by a sequential performer. More... | |
Public Types | |
| using | Vertex = FlattenedGraph::Vertex |
| using | RequestType = Observable::Type |
Public Member Functions | |
| 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 | notice (const Observable *observable) override |
| 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. | |
| virtual std::shared_ptr< Event > | createEntryEvent (const SystemState *systemState, const Token *token, const Vertex *vertex)=0 |
| Method creating an initial sequence of vertices. | |
| virtual std::shared_ptr< Event > | createExitEvent (const SystemState *systemState, const Token *token, const Vertex *vertex)=0 |
| Method creating a choice event. | |
| virtual std::shared_ptr< Event > | createChoiceEvent (const SystemState *systemState, const Token *token, const Vertex *vertex)=0 |
| Method creating a choice event. | |
| virtual std::shared_ptr< Event > | createMessageDeliveryEvent (const SystemState *systemState, const Token *token, const Vertex *vertex)=0 |
| Method creating a choice event. | |
| const Vertex * | entry (const Vertex *vertex) const |
| Method creating a message delivery event. | |
| const Vertex * | exit (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 |
Static Public Member Functions | |
| static Config | default_config () |
Public Attributes | |
| const FlattenedGraph * | flattenedGraph |
Protected Member Functions | |
| std::shared_ptr< Event > | dispatchEvent (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< Event > | fetchEvent (SystemState *systemState) |
Protected Attributes | |
| Evaluator * | evaluator |
| std::shared_ptr< TerminationEvent > | terminationEvent |
| 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 |
Definition at line 31 of file SeededController.h.
Definition at line 30 of file SeededController.h.
| SeededController::SeededController | ( | const BPMNOS::Execution::FlattenedGraph * | flattenedGraph, |
| Config | config = default_config() ) |
Definition at line 12 of file SeededController.cpp.
|
virtual |
Reimplemented from BPMNOS::Execution::Controller.
Definition at line 23 of file SeededController.cpp.
|
pure virtual |
Implemented in BPMNOS::Execution::SeededGreedyController.
|
pure virtual |
Implemented in BPMNOS::Execution::SeededGreedyController.
|
pure virtual |
Implemented in BPMNOS::Execution::SeededGreedyController.
|
pure virtual |
Implemented in BPMNOS::Execution::SeededGreedyController.
|
inlinestatic |
Definition at line 37 of file SeededController.h.
|
protectedvirtual |
Implements BPMNOS::Execution::EventDispatcher.
Definition at line 406 of file SeededController.cpp.
Definition at line 91 of file SeededController.h.
Definition at line 92 of file SeededController.h.
|
protected |
Definition at line 57 of file SeededController.cpp.
|
protected |
Definition at line 75 of file SeededController.cpp.
|
protected |
Definition at line 132 of file SeededController.cpp.
|
protected |
Definition at line 109 of file SeededController.cpp.
|
protected |
Definition at line 371 of file SeededController.cpp.
|
protected |
Definition at line 43 of file SeededController.cpp.
| size_t SeededController::getProgress | ( | ) | const |
Definition at line 634 of file SeededController.cpp.
| std::vector< size_t > SeededController::getSequence | ( | ) | const |
Definition at line 615 of file SeededController.cpp.
|
protected |
Definition at line 335 of file SeededController.cpp.
|
protected |
Definition at line 395 of file SeededController.cpp.
| void SeededController::initializePendingVertices | ( | ) |
Definition at line 299 of file SeededController.cpp.
|
overridevirtual |
Reimplemented from BPMNOS::Execution::Controller.
Reimplemented in BPMNOS::Execution::SeededGreedyController.
Definition at line 277 of file SeededController.cpp.
| bool SeededController::setSeed | ( | const std::vector< size_t > | initialSeed | ) |
Definition at line 33 of file SeededController.cpp.
| void SeededController::subscribe | ( | Engine * | engine | ) |
Definition at line 27 of file SeededController.cpp.
| void SeededController::synchronizeSolution | ( | const Token * | token | ) |
Definition at line 159 of file SeededController.cpp.
|
protected |
Definition at line 357 of file SeededController.cpp.
|
protected |
Definition at line 49 of file SeededController.h.
|
protected |
Definition at line 46 of file SeededController.h.
| const FlattenedGraph* BPMNOS::Execution::SeededController::flattenedGraph |
Definition at line 51 of file SeededController.h.
|
protected |
Definition at line 70 of file SeededController.h.
|
protected |
Definition at line 54 of file SeededController.h.
|
protected |
Definition at line 71 of file SeededController.h.
|
protected |
Definition at line 53 of file SeededController.h.
|
protected |
Definition at line 47 of file SeededController.h.