42 const MSEdge* _from,
double _fromPos,
43 const MSEdge* _to,
double _toPos,
44 const std::string& _group) :
45 persons(_persons.begin(), _persons.end()),
78 std::string
getID()
const;
101 MSDispatch(
const std::map<std::string, std::string>& params);
110 const MSEdge* from,
double fromPos,
111 const MSEdge* to,
double toPos,
112 const std::string& group,
131 const MSEdge* from,
double fromPos,
132 const MSEdge* via,
double viaPos,
133 const MSEdge* to,
double toPos,
135 double& timeDirect) ;
A device which collects info on the vehicle trip (mainly on departure and arrival)
sorts reservations by time
time_sorter()
Constructor.
int operator()(const Reservation *r1, const Reservation *r2) const
Comparing operator.
An algorithm that performs distpach for a taxi fleet.
OutputDevice * myOutput
optional file output for dispatch information
virtual ~MSDispatch()
Destructor.
static SUMOTime computePickupTime(SUMOTime t, const MSDevice_Taxi *taxi, const Reservation &res, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router)
compute time to pick up the given reservation
bool myHasServableReservations
whether the last call to computeDispatch has left servable reservations
std::map< std::string, std::vector< Reservation * > > myGroupReservations
std::vector< Reservation * > getReservations()
retrieve all reservations
static double computeDetourTime(SUMOTime t, SUMOTime viaTime, const MSDevice_Taxi *taxi, const MSEdge *from, double fromPos, const MSEdge *via, double viaPos, const MSEdge *to, double toPos, SUMOAbstractRouter< MSEdge, SUMOVehicle > &router, double &timeDirect)
compute directTime and detourTime
virtual Reservation * addReservation(MSTransportable *person, SUMOTime reservationTime, SUMOTime pickupTime, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, const std::string &group, int maxCapacity)
add a new reservation
bool hasServableReservations()
check whether there are still (servable) reservations in the system
MSDispatch(const std::map< std::string, std::string > ¶ms)
Constructor;.
virtual void computeDispatch(SUMOTime now, const std::vector< MSDevice_Taxi * > &fleet)=0
computes dispatch and updates reservations
void servedReservation(const Reservation *res)
A road/street connecting two junctions.
Static storage of an output device and its base (abstract) implementation.
An upper class for objects with additional parameters.
bool operator==(const Reservation &other) const
Reservation(const std::vector< MSTransportable * > &_persons, SUMOTime _reservationTime, SUMOTime _pickupTime, const MSEdge *_from, double _fromPos, const MSEdge *_to, double _toPos, const std::string &_group)
std::string getID() const
debug identification
std::set< MSTransportable * > persons