SOLA
Loading...
Searching...
No Matches
iterated_auction_assignment_participant.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_CPPS_LOGICAL_ALGORITHMS_ASSIGNMENT_ITERATED_AUCTION_ASSIGNMENT_PARTICIPANT_H_
18#define DAISI_CPPS_LOGICAL_ALGORITHMS_ASSIGNMENT_ITERATED_AUCTION_ASSIGNMENT_PARTICIPANT_H_
19
20#include <memory>
21#include <optional>
22
23#include "assignment_participant.h"
24#include "auction_participant_state.h"
25#include "cpps/common/cpps_communicator.h"
26#include "cpps/logical/task_management/auction_based_task_management.h"
27
28namespace daisi::cpps::logical {
29
38public:
40 daisi::cpps::common::CppsCommunicatorPtr communicator,
41 std::shared_ptr<AuctionBasedTaskManagement> task_management, AmrDescription description);
42
43 ~IteratedAuctionAssignmentParticipant() override = default;
44
48 REGISTER_IMPLEMENTATION(CallForProposal)
49
50
53 REGISTER_IMPLEMENTATION(IterationNotification)
54
55
58 REGISTER_IMPLEMENTATION(WinnerNotification)
59
60private:
64 std::unordered_map<std::string, AuctionParticipantState> initiator_auction_state_mapping_;
65
68 std::shared_ptr<AuctionBasedTaskManagement> task_management_;
69
72 void calculateBids(AuctionParticipantState &state) const;
73
78 void submitBid(const std::string &initiator_connection);
79
80 AmrDescription description_;
81};
82
83} // namespace daisi::cpps::logical
84
85#endif
Definition amr_description.h:27
Algorithm for assigning tasks from a material flow to fitting AMRs. This algorithm is participating i...
Definition assignment_participant.h:31
Definition call_for_proposal.h:30
This class is the counterpart of the IteratedAuctionAssignmentInitiator, particpanting in the iterate...
Definition iterated_auction_assignment_participant.h:37
Definition iteration_notification.h:29
Definition winner_notification.h:29
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