Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSDispatch_TraCI.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2007-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// An algorithm that performs dispatch for the taxi device
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <set>
24#include <vector>
25#include <map>
28#include "MSDispatch.h"
29#include "MSDevice_Taxi.h"
30
31
32// ===========================================================================
33// class definitions
34// ===========================================================================
35
41public:
43 MSDispatch(params)
44 { }
45
48 SUMOTime reservationTime,
49 SUMOTime pickupTime,
50 SUMOTime earliestPickupTime,
51 const MSEdge* from, double fromPos,
52 const MSStoppingPlace* fromStop,
53 const MSEdge* to, double toPos,
54 const MSStoppingPlace* toStop,
55 std::string group,
56 const std::string& line,
57 int maxCapacity,
58 int maxContainerCapacity) override;
59
61 std::string removeReservation(MSTransportable* person,
62 const MSEdge* from, double fromPos,
63 const MSEdge* to, double toPos,
64 std::string group) override;
65
67 void computeDispatch(SUMOTime /*now*/, const std::vector<MSDevice_Taxi*>& /*fleet*/) override {}
68
70 void interpretDispatch(MSDevice_Taxi* taxi, const std::vector<std::string>& reservationsIDs);
71
73 std::string splitReservation(std::string resID, std::vector<std::string> personIDs);
74
76 void fulfilledReservation(const Reservation* res) override;
77
78private:
80
81private:
84
85};
long long int SUMOTime
Definition GUI.h:36
A device which collects info on the vehicle trip (mainly on departure and arrival)
A dispatch algorithm that services customers in reservation order and always sends the closest availa...
void fulfilledReservation(const Reservation *res) override
erase reservation from storage
std::string splitReservation(std::string resID, std::vector< std::string > personIDs)
split existing reservations and return the new reservation id
StringBijection< const Reservation * > myReservationLookup
void computeDispatch(SUMOTime, const std::vector< MSDevice_Taxi * > &) override
do nothing (dispatch happens via TraCI calls)
MSDispatch_TraCI & operator=(const MSDispatch_TraCI &)=delete
Invalidated assignment operator.
Reservation * addReservation(MSTransportable *person, SUMOTime reservationTime, SUMOTime pickupTime, SUMOTime earliestPickupTime, const MSEdge *from, double fromPos, const MSStoppingPlace *fromStop, const MSEdge *to, double toPos, const MSStoppingPlace *toStop, std::string group, const std::string &line, int maxCapacity, int maxContainerCapacity) override
add a new reservation
void interpretDispatch(MSDevice_Taxi *taxi, const std::vector< std::string > &reservationsIDs)
trigger taxi dispatch.
MSDispatch_TraCI(const Parameterised::Map &params)
std::string removeReservation(MSTransportable *person, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, std::string group) override
remove person from reservation. If the whole reservation is removed, return its id
An algorithm that performs distpach for a taxi fleet.
Definition MSDispatch.h:112
A road/street connecting two junctions.
Definition MSEdge.h:77
A lane area vehicles can halt at.
std::map< std::string, std::string > Map
parameters map