SOLA
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
daisi::cpps::logical::CentralizedInitiator Class Referenceabstract

Algorithm that centrally assigns tasks of incoming material flows to the corresponding centralized participants. Should be implemented by any concrete centralized task assignment algorithm. More...

#include <centralized_initiator.h>

Inheritance diagram for daisi::cpps::logical::CentralizedInitiator:
daisi::cpps::logical::AssignmentInitiator daisi::cpps::logical::AlgorithmInterface daisi::cpps::logical::RoundRobinInitiator

Classes

struct  ParticipantInfo
 Helper that stores all relevant information about the task assignment participants. If more specific information are necessary, use a struct that derives from ParticipantInfo. More...
 

Public Member Functions

 CentralizedInitiator (daisi::cpps::common::CppsCommunicatorPtr communicator, std::shared_ptr< CppsLoggerNs3 > logger)
 
void addMaterialFlow (std::shared_ptr< material_flow::MFDLScheduler > scheduler) override
 Receive a new material flow to assign its tasks to the known participants. Push it into material_flows_.
 
- Public Member Functions inherited from daisi::cpps::logical::AssignmentInitiator
 AssignmentInitiator (daisi::cpps::common::CppsCommunicatorPtr communicator, std::shared_ptr< CppsLoggerNs3 > logger)
 
virtual void logMaterialFlowContent (const std::string &material_flow_uuid)=0
 
- Public Member Functions inherited from daisi::cpps::logical::AlgorithmInterface
 AlgorithmInterface (daisi::cpps::common::CppsCommunicatorPtr communicator)
 
 REGISTER_LOGICAL_MESSAGE (CallForProposal)
 
 REGISTER_LOGICAL_MESSAGE (BidSubmission)
 
 REGISTER_LOGICAL_MESSAGE (IterationNotification)
 
 REGISTER_LOGICAL_MESSAGE (WinnerNotification)
 
 REGISTER_LOGICAL_MESSAGE (WinnerResponse)
 
 REGISTER_LOGICAL_MESSAGE (AssignmentNotification)
 
 REGISTER_LOGICAL_MESSAGE (AssignmentResponse)
 
 REGISTER_LOGICAL_MESSAGE (StatusUpdate)
 
 REGISTER_LOGICAL_MESSAGE (StatusUpdateRequest)
 
 REGISTER_LOGICAL_MESSAGE (MaterialFlowUpdate)
 

Protected Member Functions

virtual void distributeMFTasks (uint32_t index, bool previously_allocated)=0
 Perform task assignment for all unassigned tasks of a material flow.
 
virtual void storeParticipant (ParticipantInfo &info)=0
 Add a new participant and store it locally.
 

Protected Attributes

std::vector< material_flow::MFDLSchedulermaterial_flows_
 All material flows that have been received to assign their tasks.
 
std::vector< AssignmentResponseassignment_acceptions_
 Responses of task assignments that have been accepted.
 
struct { 
 
   util::Duration   wait_to_receive_assignment_response = 0.3 
 Delay between assigning a task and expecting a response.
 
   util::Duration   wait_to_receive_status_update = 0.3 
 Delay between requesting and receiving a status update.
 
delays_ 
 Storing all delays in one place. The unit is seconds.
 
- Protected Attributes inherited from daisi::cpps::logical::AssignmentInitiator
std::shared_ptr< CppsLoggerNs3logger_
 For logging material flow tasks and orders.
 
- Protected Attributes inherited from daisi::cpps::logical::AlgorithmInterface
daisi::cpps::common::CppsCommunicatorPtr communicator_
 

Detailed Description

Algorithm that centrally assigns tasks of incoming material flows to the corresponding centralized participants. Should be implemented by any concrete centralized task assignment algorithm.

Member Function Documentation

◆ addMaterialFlow()

void daisi::cpps::logical::CentralizedInitiator::addMaterialFlow ( std::shared_ptr< material_flow::MFDLScheduler scheduler)
overridevirtual

Receive a new material flow to assign its tasks to the known participants. Push it into material_flows_.

Parameters
scheduler

Implements daisi::cpps::logical::AssignmentInitiator.

◆ distributeMFTasks()

virtual void daisi::cpps::logical::CentralizedInitiator::distributeMFTasks ( uint32_t  index,
bool  previously_allocated 
)
protectedpure virtual

Perform task assignment for all unassigned tasks of a material flow.

Parameters
indexThe index position of the material flow in material_flows_.
previously_allocatedIndicates wether the tasks of the material flow have been assigned to participants before. In that case, only some of them may need to be reassigned.

◆ storeParticipant()

virtual void daisi::cpps::logical::CentralizedInitiator::storeParticipant ( ParticipantInfo info)
protectedpure virtual

Add a new participant and store it locally.

Parameters
infoThe necessary information about the new participant.

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