41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 50 const std::vector<std::string>& lines,
53 :
Named(id), myLines(lines), myLane(lane),
54 myBegPos(begPos), myEndPos(endPos), myLastFreePos(endPos), myWaitingPos(endPos) {
104 std::map<const SUMOVehicle*, std::pair<SUMOReal, SUMOReal> >::const_iterator i =
myEndPositions.find(veh);
106 return i->second.second;
145 std::map<const SUMOVehicle*, std::pair<SUMOReal, SUMOReal> >::iterator i;
159 for (std::multimap<MSLane*, SUMOReal>::const_iterator i =
myAccessPos.begin(); i !=
myAccessPos.end(); ++i) {
160 if (edge == &i->first->getEdge()) {
Position getWaitPosition() const
Returns the next free waiting place for pedestrians / containers.
MSEdge & getEdge() const
Returns the lane's edge.
std::vector< MSTransportable * > myWaitingTransportables
Persons waiting at this stop.
SUMOReal getStoppingPosition(const SUMOVehicle *veh) const
For vehicles at the stop this gives the the actual stopping position of the vehicle. For all others the last free stopping position.
bool hasAccess(const MSEdge *edge) const
checks whether this stop provides access to the given edge
SUMOReal myWaitingPos
The next free position for persons / containers.
SUMOReal getLength() const
Get vehicle's length [m].
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
SUMOReal getEndLanePosition() const
Returns the end position of this stop.
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal interpolateLanePosToGeometryPos(SUMOReal lanePos) const
const SUMOReal myEndPos
The end position this bus stop is located at.
const SUMOReal myBegPos
The begin position this bus stop is located at.
void addTransportable(MSTransportable *p)
adds a transportable to this stop
SUMOReal getLastFreePos(const SUMOVehicle &forVehicle) const
Returns the last free position on this stop.
virtual ~MSStoppingPlace()
Destructor.
std::multimap< MSLane *, SUMOReal > myAccessPos
lanes and positions connected to this stop
A road/street connecting two junctions.
const MSLane & myLane
The lane this bus stop is located at.
SUMOReal getBeginLanePosition() const
Returns the begin position of this stop.
Representation of a vehicle.
A point in 2D or 3D with translation and scaling methods.
MSStoppingPlace(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, SUMOReal begPos, SUMOReal endPos)
Constructor.
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
Base class for objects which have an id.
void enter(SUMOVehicle *what, SUMOReal beg, SUMOReal end)
Called if a vehicle enters this stop.
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
SUMOReal myLastFreePos
The last free position at this stop (variable)
void computeLastFreePos()
Computes the last free position on this stop.
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
std::map< const SUMOVehicle *, std::pair< SUMOReal, SUMOReal > > myEndPositions
A map from objects (vehicles) to the areas they acquire after entering the stop.
const MSVehicleType & getVehicleType() const
const MSLane & getLane() const
Returns the lane this stop is located at.
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.