17#ifndef DAISI_CPPS_LOGICAL_ALGORITHMS_ASSIGNMENT_AUCTION_PARTICIPANT_STATE_H_
18#define DAISI_CPPS_LOGICAL_ALGORITHMS_ASSIGNMENT_AUCTION_PARTICIPANT_STATE_H_
21#include <unordered_map>
23#include "cpps/logical/message/auction_based/bid_submission.h"
24#include "cpps/logical/message/auction_based/winner_response.h"
25#include "cpps/logical/task_management/auction_based_task_management.h"
26#include "material_flow/model/task.h"
42 std::shared_ptr<AuctionBasedTaskManagement::InsertionPoint> getInsertionPoint()
const;
49 std::shared_ptr<AuctionBasedTaskManagement::InsertionPoint> insertion_point);
60 std::optional<MetricsComposition> metrics_composition_;
64 std::shared_ptr<AuctionBasedTaskManagement::InsertionPoint> insertion_point_;
99 bool checkAllTaskStatesValid();
Definition metrics_composition.h:25
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22
Helper struct for the IteratedAuctionAssignmentParticipant to store the state of open auction process...
Definition auction_participant_state.h:71
bool hasEntries() const
Checking whether there are valid entries.
Definition auction_participant_state.cpp:101
AuctionParticipantTaskState pickBest()
Given the information from the task_state_mapping, the best possible task is picked depending on stor...
Definition auction_participant_state.cpp:62
std::unordered_map< std::string, AuctionParticipantTaskState > task_state_mapping
Storing the state of each open task. The key is the task uuid.
Definition auction_participant_state.h:90
std::string previously_submitted
Task uuid of the lastest previously submitted task. If a task was submitted before,...
Definition auction_participant_state.h:95
void prune()
Removing task states with invalid stored information (= empty metrics and insertion point) from the m...
Definition auction_participant_state.cpp:86
Helper struct for the IteratedAuctionAssignmentParticipant, used inside of the AuctionParticipantStat...
Definition auction_participant_state.h:33
bool isValid() const
Checking whether both metrics and insertion point are initialized.
Definition auction_participant_state.cpp:50
void setInformation(const MetricsComposition &metrics_composition, std::shared_ptr< AuctionBasedTaskManagement::InsertionPoint > insertion_point)
Setting information for both metrics and insertion point.
Definition auction_participant_state.cpp:24
void removeInformation()
Making metrics and insertion point uninitialized.
Definition auction_participant_state.cpp:31