50 consensus::ConsensusSettings settings, NextTOMode next_to_mode, uint32_t device_id);
52 [[nodiscard]] std::string getConnectionString()
const {
return sola_->getConectionString(); }
54 void setRoutes(StationRoutes routes);
55 void setDeliveryStations(DeliveryStationPoints points);
57 [[nodiscard]]
size_t numberAGVAtStation()
const;
61 void scheduleSpawnTO(uint32_t start_time, uint32_t stop_time,
65 [[nodiscard]] std::string getFullName()
const;
73 void update(
const std::string &agv_id);
86 [[nodiscard]] std::optional<uint32_t> getRandomStationIfOtherSideNearer(
87 uint32_t delivery_station_id);
94 void negotiationGo(
const std::string &agv_uuid);
96 void processMessage(
const sola::Message &msg);
107 [[nodiscard]] ns3::Vector2D getNextPoint(
AGVInfo &agv);
110 void initiateConsensusToDelivery(
AGVInfo &agv);
111 void initiateConsensusToPickup(
AGVInfo &agv);
114 const uint32_t device_id_ = 0;
118 uint32_t current_delay_ = 0;
125 uint32_t amrs_to_initialize_ = 0;
127 uint32_t to_stop_time_ = 0;
129 std::shared_ptr<PathPlanningLoggerNs3> logger_;
130 std::shared_ptr<sola_ns3::SOLAWrapperNs3> sola_;
132 consensus::ConsensusSettings consensus_settings_;
133 std::optional<consensus::Consensus> consensus_;
135 std::unordered_map<std::string, AGVInfo> agv_ownership_;
137 struct ConsensusData {
138 std::string agv_uuid;
139 PointTimePairs pairs;
142 std::optional<ConsensusData>
145 NextTOMode next_to_mode_;