SOLA
Loading...
Searching...
No Matches
auction_based_task_management.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_TASK_MANAGEMENT_AUCTION_BASED_TASK_MANAGEMENT_H_
18#define DAISI_CPPS_LOGICAL_TASK_MANAGEMENT_AUCTION_BASED_TASK_MANAGEMENT_H_
19
20#include "metrics_composition.h"
21#include "task_management.h"
22
23namespace daisi::cpps::logical {
24
26public:
27 struct InsertionPoint {};
28
29 AuctionBasedTaskManagement(const AmrDescription &amr_description, const Topology &topology,
30 const daisi::util::Pose &pose)
31 : TaskManagement(amr_description, topology, pose) {}
32
33 ~AuctionBasedTaskManagement() override = default;
34
35 virtual bool addTask(const daisi::material_flow::Task &task,
36 std::shared_ptr<InsertionPoint> insertion_point = nullptr) = 0;
37
38 bool addTask(const daisi::material_flow::Task &task) final { return addTask(task, nullptr); }
39
40 virtual bool canAddTask(const daisi::material_flow::Task &task,
41 std::shared_ptr<InsertionPoint> insertion_point = nullptr) = 0;
42
43 bool canAddTask(const daisi::material_flow::Task &task) final {
44 return canAddTask(task, nullptr);
45 }
46
47 virtual std::pair<MetricsComposition, std::shared_ptr<InsertionPoint>>
48 getLatestCalculatedInsertionInfo() const = 0;
49};
50
51} // namespace daisi::cpps::logical
52
53#endif
Definition amr_description.h:27
Definition amr_topology.h:26
Definition auction_based_task_management.h:25
bool addTask(const daisi::material_flow::Task &task) final
insert a task into the management's queue.
Definition auction_based_task_management.h:38
bool canAddTask(const daisi::material_flow::Task &task) final
check wether a new task can be added to the management's queue
Definition auction_based_task_management.h:43
Definition task_management.h:35
Definition task.h:34
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22
Definition auction_based_task_management.h:27
Definition structure_helpers.h:64