84 if (i->myVeh == veh) {
185 const std::set<const MSVehicle*>&
198 std::map<const MSVehicle*, const MSLane*> parkingLanes;
200 const std::set<const MSVehicle*>& vehs = it->second;
201 for (std::set<const MSVehicle*>::const_iterator it2 = vehs.begin(); it2 != vehs.end(); ++it2) {
202 parkingLanes[*it2] = it->first;
227 if (parkingLane != 0) {
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
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.
void remove(MSVehicle *veh)
Remove a vehicle from this transfer object.
MSVehicleTransfer()
Constructor.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
MSLane * getLane() const
Returns the lane the vehicle is on.
VehicleInfVector myVehicles
The information about stored vehicles to move virtually.
bool isInsertionSuccess(MSVehicle *vehicle, double speed, double pos, double posLat, bool recheckNextLanes, MSMoveReminder::Notification notification)
Tries to insert the given vehicle with the given state (speed and pos)
bool freeInsertion(MSVehicle &veh, double speed, MSMoveReminder::Notification notification=MSMoveReminder::NOTIFICATION_DEPARTED)
Tries to insert the given vehicle on any place.
double getPositionOnLane() const
Get the vehicle's position along the lane.
SUMOVehicle * getVehicle(const std::string &id) const
Returns the vehicle with the given id.
virtual ~MSVehicleTransfer()
Destructor.
std::string time2string(SUMOTime t)
const std::vector< MSLane * > * allowedLanes(const MSEdge &destination, SUMOVehicleClass vclass=SVC_IGNORING) const
Get the allowed lanes to reach the destination-edge.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
const std::string & getID() const
Returns the id.
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
#define WRITE_WARNING(msg)
MSAbstractLaneChangeModel & getLaneChangeModel()
const std::set< const MSVehicle * > & getParkingVehicles(const MSLane *lane) const
return parking vehicles on the given lane
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
double getCurrentTravelTime(const double minSpeed=NUMERICAL_EPS) const
Computes and returns the current travel time for this edge.
double getMaxSpeed() const
Returns the maximum speed.
A road/street connecting two junctions.
void leaveLane(const MSMoveReminder::Notification reason, const MSLane *approachedLane=0)
Update of members if vehicle leaves a new lane in the lane change step or at arrival.
void saveState(OutputDevice &out) const
Saves the current state into the given stream.
virtual long long int getLong(int id) const =0
Returns the long-value of the named (by its enum-value) attribute.
The vehicles starts to park.
void checkInsertions(SUMOTime time)
Checks "movement" of stored vehicles.
Encapsulated SAX-Attributes.
bool hasPending() const
Checks whether stored vehicles are present.
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
double getSpeedLimit() const
Returns the lane's maximum allowed speed.
void add(const SUMOTime t, MSVehicle *veh)
Adds a vehicle to this transfer object.
The vehicle started to teleport.
void onRemovalFromNet(const MSMoveReminder::Notification reason)
Called when the vehicle is removed from the network.
static const std::set< const MSVehicle * > myEmptyVehicleSet
an empty set for convenience
void loadState(const SUMOSAXAttributes &attrs, const SUMOTime offset, MSVehicleControl &vc)
Loads one transfer vehicle state from the given descriptionn.
The vehicle ends to park.
ParkingVehicles myParkingVehicles
double getLateralPositionOnLane() const
Get the vehicle's lateral position on the lane.
void alreadyDeparted(SUMOVehicle *veh)
stops trying to emit the given vehicle (because it already departed)
static MSVehicleTransfer * getInstance()
Returns the instance of this object.
static bool dictionary(const std::string &id, MSLane *lane)
Static (sic!) container methods {.
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.
double processNextStop(double currentVelocity)
Processes stops, returns the velocity needed to reach the stop.
void setTentativeLaneAndPosition(MSLane *lane, double pos, double posLat=0)
set tentative lane and position during insertion to ensure that all cfmodels work (some of them requi...
MSInsertionControl & getInsertionControl()
Returns the insertion control.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to)
Informs all added listeners about a vehicle's state change.
const MSEdge * succEdge(int nSuccs) const
Returns the nSuccs'th successor of edge the vehicle is currently at.
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
The vehicle was teleported out of the net.
The class responsible for building and deletion of vehicles.
bool isParking() const
Returns whether the vehicle is parking.
double getSpeed() const
Returns the vehicle's current speed.
const std::string & getID() const
Returns the name of the vehicle.
Representation of a lane in the micro simulation.
MSLane * getFreeLane(const std::vector< MSLane *> *allowed, const SUMOVehicleClass vclass, double departPos) const
Finds the emptiest lane allowing the vehicle class.
The vehicle ended being teleported.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
static const double TeleportMinSpeed
The minimum speed while teleporting.
SUMOVehicleClass getVehicleClass() const
Get this vehicle type's vehicle class.
The vehicle is being teleported.
void endLaneChangeManeuver(const MSMoveReminder::Notification reason=MSMoveReminder::NOTIFICATION_LANE_CHANGE)