43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
169 const std::set<const MSVehicle*>&
bool enterLaneAtMove(MSLane *enteredLane, bool onTeleporting=false)
Update when the vehicle enters a new lane in the move step.
Representation of a vehicle in the micro simulation.
static MSVehicleTransfer * myInstance
The static singleton-instance.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
static const SUMOReal TeleportMinSpeed
The minimum speed while teleporting.
MSVehicleTransfer()
Constructor.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
void endLaneChangeManeuver()
SUMOReal getMaxSpeed() const
Returns the maximum speed.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
VehicleInfVector myVehicles
The information about stored vehicles to move virtually.
bool hasPending() const
Checks whether stored vehicles are present.
virtual ~MSVehicleTransfer()
Destructor.
std::string time2string(SUMOTime t)
SUMOReal getCurrentTravelTime(const SUMOReal minSpeed=0.00001) const
Computes and returns the current travel time for this edge.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSLane * getFreeLane(const std::vector< MSLane * > *allowed, const SUMOVehicleClass vclass) const
Finds the emptiest lane allowing the vehicle class.
SUMOReal getPositionOnLane() const
Get the vehicle's position along the lane.
SUMOReal processNextStop(SUMOReal currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
bool freeInsertion(MSVehicle &veh, SUMOReal speed, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle on any place.
const std::set< const MSVehicle * > & getParkingVehicles(const MSLane *lane) const
return parking vehicles on the given lane
#define WRITE_WARNING(msg)
MSAbstractLaneChangeModel & getLaneChangeModel()
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
virtual bool isInsertionSuccess(MSVehicle *vehicle, SUMOReal speed, SUMOReal pos, bool recheckNextLanes, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle with the given state (speed and pos)
The vehicles starts to park.
void addVeh(const SUMOTime t, MSVehicle *veh)
Adds a vehicle to this transfer object.
void checkInsertions(SUMOTime time)
Checks "movement" of stored vehicles.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
const MSEdge * succEdge(unsigned int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
The vehicle started to teleport.
SUMOReal getSpeedLimit() const
Returns the lane's maximum allowed speed.
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
static const std::set< const MSVehicle * > myEmptyVehicleSet
an empty vector for convenience
The vehicle ends to park.
bool isParking() const
Returns whether the vehicle is parking.
ParkingVehicles myParkingVehicles
static MSVehicleTransfer * getInstance()
Returns the instance of this object.
void leaveLane(const MSMoveReminder::Notification reason)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_UNKNOWN) const
Get the allowed lanes to reach the destination-edge.
The vehicle starts or ends parking.
void scheduleVehicleRemoval(SUMOVehicle *veh)
Removes a vehicle after it has ended.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to)
Informs all added listeners about a vehicle's state change.
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
The vehicle was teleported out of the net.
MSLane * getLane() const
Returns the lane the vehicle is on.
Representation of a lane in the micro simulation.
The vehicle ended being teleported.
The vehicle is being teleported.
const std::string & getID() const
Returns the name of the vehicle.