77 const std::set<std::string>& lines,
80 const MSEdge* from,
double fromPos,
81 const MSEdge* to,
double toPos,
82 const std::string& group);
97 static const std::vector<MSDevice_Taxi*>&
getFleet() {
122 double newPos,
double newSpeed);
168 void dispatchShared(
const std::vector<const Reservation*>& reservations);
183 void setParameter(
const std::string& key,
const std::string& value);
205 std::vector<SUMOVehicleParameter::Stop>& stops,
206 double& lastPos,
const MSEdge* stopEdge,
double stopPos,
207 const std::string& action);
std::vector< const MSEdge * > ConstMSEdgeVector
Base (microsim) event class.
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
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Saves arrival info.
static SUMOTime triggerDispatch(SUMOTime currentTime)
period command to trigger the dispatch algorithm
MSLane * getStopLane(const MSEdge *edge)
determine stopping lane for taxi
void dispatch(const Reservation &res)
service the given reservation
void dispatchShared(const std::vector< const Reservation * > &reservations)
service the given reservations
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)
void generateOutput(OutputDevice *tripinfoOut) const
Called on writing tripinfo output.
MSIdling * myIdleAlgorithm
algorithm for controlling idle behavior
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
MSDevice_Taxi & operator=(const MSDevice_Taxi &)
Invalidated assignment operator.
static const std::vector< MSDevice_Taxi * > & getFleet()
bool hasFuturePickup()
whether the taxi has another pickup scheduled
bool allowsBoarding(MSTransportable *t) const
whether the given person is allowed to board this taxi
static MSDispatch * myDispatcher
the dispatch algorithm
int myCustomersServed
number of customers that were served
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 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
double myOccupiedDistance
distance driven with customers
MSDevice_Taxi(SUMOVehicle &holder, const std::string &id)
Constructor.
static void addReservation(MSTransportable *person, const std::set< std::string > &lines, SUMOTime reservationTime, SUMOTime pickupTime, const MSEdge *from, double fromPos, const MSEdge *to, double toPos, const std::string &group)
add new reservation
static bool hasServableReservations()
check whether there are still (servable) reservations in the system
void prepareStop(ConstMSEdgeVector &edges, std::vector< SUMOVehicleParameter::Stop > &stops, double &lastPos, const MSEdge *stopEdge, double stopPos, const std::string &action)
prepare stop for the given action
static SUMOVehicle * getTaxi()
returns a taxi if any exist or nullptr
static int getMaxCapacity()
void customerEntered(const MSTransportable *t)
called by MSDevice_Transportable upon loading a person
MSDevice_Taxi(const MSDevice_Taxi &)
Invalidated copy constructor.
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
static MSDispatch * getDispatchAlgorithm()
~MSDevice_Taxi()
Destructor.
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
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.
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.