 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
21 #ifndef MSDevice_Transportable_h
22 #define MSDevice_Transportable_h
144 const double frontOnLane,
145 const double timeOnLane,
146 const double meanSpeedFrontOnLane,
147 const double meanSpeedVehicleOnLane,
148 const double travelledDistanceFrontOnLane,
149 const double travelledDistanceVehicleOnLane,
Representation of a vehicle or person.
const std::vector< MSTransportable * > & getTransportables() const
Returns the list of transportables using this vehicle.
std::vector< MSTransportable * > myTransportables
The passengers of the vehicle.
Representation of a lane in the micro simulation.
Representation of a vehicle.
bool myAmContainer
Whether it is a container device.
bool myStopped
Whether the vehicle is at a stop.
MSDevice_Transportable(SUMOVehicle &holder, const std::string &id, const bool isContainer)
Constructor.
const std::string deviceName() const
return the name for this type of device
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
static MSDevice_Transportable * buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into, const bool isContainer)
Build devices for the given vehicle, if needed.
MSDevice_Transportable & operator=(const MSDevice_Transportable &)
Invalidated assignment operator.
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks whether the vehicle is at a stop and transportable action is needed.
void removeTransportable(MSTransportable *transportable)
Remove a passenger (TraCI)
~MSDevice_Transportable()
Destructor.
void addTransportable(MSTransportable *transportable)
Add a passenger.
bool notifyLeave(SUMOTrafficObject &veh, double lastPos, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Passengers leaving on arrival.
int size() const
Return the number of passengers / containers.
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)
Internal notification about the vehicle moves, see MSMoveReminder::notifyMoveInternal()
bool notifyEnter(SUMOTrafficObject &veh, MSMoveReminder::Notification reason, const MSLane *enteredLane=0)
Adds passengers on vehicle insertion.
Notification
Definition of a vehicle state.
Abstract in-vehicle device.