SOLA
Loading...
Searching...
No Matches
assignment_initiator.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_ASSIGNMENT_INITIATOR_H_
18#define DAISI_CPPS_LOGICAL_ALGORITHMS_ASSIGNMENT_ASSIGNMENT_INITIATOR_H_
19
20#include <memory>
21#include <variant>
22
23#include "../algorithm_interface.h"
24#include "cpps/common/cpps_communicator.h"
25#include "cpps/common/cpps_logger_ns3.h"
26#include "material_flow/model/material_flow.h"
27
28namespace daisi::cpps::logical {
29
34public:
35 AssignmentInitiator(daisi::cpps::common::CppsCommunicatorPtr communicator,
36 std::shared_ptr<CppsLoggerNs3> logger)
37 : AlgorithmInterface(communicator), logger_(std::move(logger)){};
38
39 ~AssignmentInitiator() override = default;
40
43 virtual void addMaterialFlow(std::shared_ptr<material_flow::MFDLScheduler> scheduler) = 0;
44
45 virtual void logMaterialFlowContent(const std::string &material_flow_uuid) = 0;
46
47protected:
49 std::shared_ptr<CppsLoggerNs3> logger_;
50};
51
52} // namespace daisi::cpps::logical
53
54#endif
Definition algorithm_interface.h:45
Algorithm for assigning tasks from a material flow to fitting AMRs. This algorithm is initiating and ...
Definition assignment_initiator.h:33
virtual void addMaterialFlow(std::shared_ptr< material_flow::MFDLScheduler > scheduler)=0
Adding a material flow whose tasks should be allocated.
std::shared_ptr< CppsLoggerNs3 > logger_
For logging material flow tasks and orders.
Definition assignment_initiator.h:49
Modified Round Robin Algorithm that centrally assigns tasks of incoming material flows to the corresp...
Definition algorithm_config.h:22