45 const std::vector<std::string>& lines,
47 double begPos,
double endPos,
const std::string name)
48 :
Named(id), myLines(lines), myLane(lane),
49 myBegPos(begPos), myEndPos(endPos), myLastFreePos(endPos), myWaitingPos(endPos), myName(name) {
99 std::map<const SUMOVehicle*, std::pair<double, double> >::const_iterator i =
myEndPositions.find(veh);
101 return i->second.second;
141 std::map<const SUMOVehicle*, std::pair<double, double> >::iterator i;
155 for (std::multimap<MSLane*, double>::const_iterator i =
myAccessPos.begin(); i !=
myAccessPos.end(); ++i) {
156 if (edge == &i->first->getEdge()) {
169 for (std::multimap<MSLane*, double>::const_iterator i =
myAccessPos.begin(); i !=
myAccessPos.end(); ++i) {
170 if (edge == &i->first->getEdge()) {
Position getWaitPosition() const
Returns the next free waiting place for pedestrians / containers.
std::map< const SUMOVehicle *, std::pair< double, double > > myEndPositions
A map from objects (vehicles) to the areas they acquire after entering the stop.
double getAccessPos(const MSEdge *edge) const
the position on the given edge which is connected to this stop, -1 on failure
MSStoppingPlace(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, double begPos, double endPos, const std::string name="")
Constructor.
MSEdge & getEdge() const
Returns the lane's edge.
double getBeginLanePosition() const
Returns the begin position of this stop.
std::vector< MSTransportable * > myWaitingTransportables
Persons waiting at this stop.
bool hasAccess(const MSEdge *edge) const
checks whether this stop provides access to the given edge
const double myEndPos
The end position this bus stop is located at.
void enter(SUMOVehicle *what, double beg, double end)
Called if a vehicle enters this stop.
double getLastFreePos(const SUMOVehicle &forVehicle) const
Returns the last free position on this stop.
const PositionVector & getShape() const
Returns this lane's shape.
const std::string & getMyName() const
void addTransportable(MSTransportable *p)
adds a transportable to this stop
virtual ~MSStoppingPlace()
Destructor.
std::multimap< MSLane *, double > 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.
double getEndLanePosition() const
Returns the end position of this stop.
Representation of a vehicle.
double myLastFreePos
The last free position at this stop (variable)
A point in 2D or 3D with translation and scaling methods.
double getMinGap() const
Get the free space in front of vehicles of this class.
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
Base class for objects which have an id.
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
const std::string myName
The name of the stopping place.
const double myBegPos
The begin position this bus stop is located at.
double interpolateLanePosToGeometryPos(double lanePos) const
double getLength() const
Get vehicle's length [m].
void computeLastFreePos()
Computes the last free position on this stop.
const MSVehicleType & getVehicleType() const
double myWaitingPos
The next free position for persons / containers.
const MSLane & getLane() const
Returns the lane this stop is located at.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
double 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.
Representation of a lane in the micro simulation.
virtual const MSVehicleType & getVehicleType() const =0
Returns the vehicle's type.