77 static bool isReservation(
const std::set<std::string>& lines);
81 const std::set<std::string>& lines,
85 const MSEdge* from,
double fromPos,
87 const MSEdge* to,
double toPos,
89 const std::string& group);
93 const std::set<std::string>& lines,
94 const MSEdge* from,
double fromPos,
95 const MSEdge* to,
double toPos,
96 const std::string& group);
100 const std::set<std::string>& lines,
101 const MSEdge* from,
double fromPos,
102 const MSEdge* to,
double toPos,
103 const std::string& group,
double newFromPos);
118 static const std::vector<MSDevice_Taxi*>&
getFleet() {
139 double newPos,
double newSpeed);
173 void dispatchShared(std::vector<const Reservation*> reservations);
194 void setParameter(
const std::string& key,
const std::string& value);
207 static bool compatibleLine(
const std::string& taxiLine,
const std::string& rideLine);
214 const double frontOnLane,
215 const double timeOnLane,
216 const double meanSpeedFrontOnLane,
217 const double meanSpeedVehicleOnLane,
218 const double travelledDistanceFrontOnLane,
219 const double travelledDistanceVehicleOnLane,
220 const double meanLengthOnLane);
234 std::vector<SUMOVehicleParameter::Stop>& stops,
235 double& lastPos,
const MSEdge* stopEdge,
double stopPos,
237 const std::string& action,
const Reservation* res,
const bool isPickup);
std::vector< const MSEdge * > ConstMSEdgeVector
Base (microsim) event class.
A device that performs vehicle rerouting based on current edge speeds.
A device which collects info on the vehicle trip (mainly on departure and arrival)
static void initDispatch()
initialize the dispatch algorithm
static Command * myDispatchCommand
The repeated call to the dispatcher.
void customerArrived(const MSTransportable *person)
called by MSDevice_Transportable upon unloading a person
static SUMOTime triggerDispatch(SUMOTime currentTime)
period command to trigger the dispatch algorithm
void dispatch(const Reservation &res)
service the given reservation
std::set< const MSTransportable * > myCustomers
the customer of the current reservation
SUMOTime myServiceEnd
the time at which the taxi service ends (end the vehicle may leave the simulation)
static void updateReservationFromPos(MSTransportable *person, const std::set< std::string > &lines, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, const std::string &group, double newFromPos)
update reservation's fromPos due to pre-booking
bool cancelCustomer(const MSTransportable *t)
remove person from reservations
void generateOutput(OutputDevice *tripinfoOut) const
Called on writing tripinfo output.
static std::set< std::string > myVClassWarningVTypes
void dispatchShared(std::vector< const Reservation * > reservations)
service the given reservations
static void addReservation(MSTransportable *person, const std::set< std::string > &lines, SUMOTime reservationTime, SUMOTime pickupTime, SUMOTime earliestPickupTime, const MSEdge *from, double fromPos, const MSStoppingPlace *fromStop, const MSEdge *to, double toPos, const MSStoppingPlace *toStop, const std::string &group)
add new reservation
MSIdling * myIdleAlgorithm
algorithm for controlling idle behavior
std::set< const Reservation * > myCurrentReservations
reservations currently being served
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
bool hasFuturePickup()
whether the taxi has another pickup scheduled
void cancelCurrentCustomers()
remove the persons the taxi is currently waiting for from reservations
std::vector< const Reservation * > myLastDispatch
the last dispatch order
static MSDispatch * myDispatcher
the dispatch algorithm
int myCustomersServed
number of customers that were served
void updateMove(const SUMOTime traveltime, const double travelledDist)
void notifyMoveInternal(const SUMOTrafficObject &veh, const double frontOnLane, const double timeOnLane, const double meanSpeedFrontOnLane, const double meanSpeedVehicleOnLane, const double travelledDistanceFrontOnLane, const double travelledDistanceVehicleOnLane, const double meanLengthOnLane)
Internal notification about the vehicle moves, see MSMoveReminder::notifyMoveInternal()
static int myMaxContainerCapacity
MSDevice_Routing * myRoutingDevice
routing device (if the vehicle has one)
bool isEmpty()
whether the taxi is empty
const std::string deviceName() const
return the name for this type of device
static std::vector< MSDevice_Taxi * > myFleet
static void removeReservation(MSTransportable *person, const std::set< std::string > &lines, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, const std::string &group)
retract reservation
static SUMOTime myDispatchPeriod
the time between successive calls to the dispatcher
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Saves departure info on insertion.
static void cleanup()
resets counters
static bool isReservation(const std::set< std::string > &lines)
whether the given lines description is a taxi call
double myOccupiedDistance
distance driven with customers
bool allowsBoarding(const MSTransportable *t) const
whether the given person is allowed to board this taxi
static bool hasServableReservations()
check whether there are still (servable) reservations in the system
MSDevice_Taxi & operator=(const MSDevice_Taxi &)
Invalidated assignment operator.
static SUMOVehicle * getTaxi()
returns a taxi if any exist or nullptr
void customerEntered(const MSTransportable *t)
called by MSDevice_Transportable upon loading a person
MSDevice_Taxi(const MSDevice_Taxi &)
Invalidated copy constructor.
bool compatibleLine(const Reservation *res)
whether the given reservation is compatible with the taxi line
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Taxi-options.
bool myIsStopped
whether the vehicle is currently stopped
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
SUMOTime myOccupiedTime
time spent driving with customers
bool myReachedServiceEnd
whether the taxi has reached its schedule service end
~MSDevice_Taxi()
Destructor.
void prepareStop(ConstMSEdgeVector &edges, std::vector< SUMOVehicleParameter::Stop > &stops, double &lastPos, const MSEdge *stopEdge, double stopPos, const MSStoppingPlace *stopPlace, const std::string &action, const Reservation *res, const bool isPickup)
prepare stop for the given action
static const std::vector< MSDevice_Taxi * > & getFleet()
MSLane * getStopLane(const MSEdge *edge, const std::string &action)
determine stopping lane for taxi
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
static MSDispatch * getDispatchAlgorithm()
An algorithm that performs distpach for a taxi fleet.
A road/street connecting two junctions.
An algorithm that performs distpach for a taxi fleet.
Representation of a lane in the micro simulation.
Notification
Definition of a vehicle state.
A lane area vehicles can halt at.
Abstract in-vehicle device.
A storage for options typed value containers)
Static storage of an output device and its base (abstract) implementation.
Representation of a vehicle, person, or container.
Representation of a vehicle.