 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
17 #ifndef MSStoppingPlace_h
18 #define MSStoppingPlace_h
71 const std::vector<std::string>& lines,
MSLane& lane,
72 double begPos,
double endPos,
const std::string name =
"",
186 virtual bool addAccess(
MSLane* lane,
const double pos,
const double length);
const MSLane & getLane() const
Returns the lane this stop is located at.
bool hasSpaceForTransportable() const
whether there is still capacity for more transportables
A lane area vehicles can halt at.
std::vector< std::string > myLines
The list of lines that are assigned to this stop.
An upper class for objects with additional parameters.
Representation of a lane in the micro simulation.
Base class for objects which have an id.
bool addTransportable(MSTransportable *p)
adds a transportable to this stop
double getEndLanePosition() const
Returns the end position of this stop.
double getBeginLanePosition() const
Returns the begin position of this stop.
Representation of a vehicle.
MSStoppingPlace(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, double begPos, double endPos, const std::string name="", int capacity=0)
Constructor.
virtual bool addAccess(MSLane *lane, const double pos, const double length)
adds an access point to this stop
void removeTransportable(MSTransportable *p)
Removes a transportable from this stop.
std::map< const SUMOVehicle *, std::pair< double, double > > myEndPositions
A map from objects (vehicles) to the areas they acquire after entering the stop.
const double myBegPos
The begin position this bus stop is located at.
MSStoppingPlace & operator=(const MSStoppingPlace &)
Invalidated assignment operator.
const std::string myName
The name of the stopping place.
const double myEndPos
The end position this bus stop is located at.
std::vector< MSTransportable * > getTransportables() const
Returns the tranportables waiting on this stop.
double getStoppingPosition(const SUMOVehicle *veh) const
For vehicles at the stop this gives the the actual stopping position of the vehicle....
int getStoppedVehicleNumber() const
Returns the number of stopped vehicles waiting on this stop.
A point in 2D or 3D with translation and scaling methods.
std::vector< std::tuple< MSLane *, double, double > > myAccessPos
lanes and positions connected to this stop
A road/street connecting two junctions.
double getAccessDistance(const MSEdge *edge) const
the distance from the access on the given edge to the stop, -1 on failure
void computeLastFreePos()
Computes the last free position on this stop.
void enter(SUMOVehicle *what, double beg, double end)
Called if a vehicle enters this stop.
const std::string & getMyName() const
const int myTransportableCapacity
The number of transportables that can wait here.
virtual ~MSStoppingPlace()
Destructor.
std::set< int > myWaitingSpots
std::map< MSTransportable *, int > myWaitingTransportables
Persons waiting at this stop (mapped to waiting position)
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
const std::vector< std::tuple< MSLane *, double, double > > & getAllAccessPos() const
lanes and positions connected to this stop
double getAccessPos(const MSEdge *edge) const
the position on the given edge which is connected to this stop, -1 on failure
double myLastFreePos
The last free position at this stop (variable)
double getLastFreePos() const
double getWaitingPositionOnLane(MSTransportable *t) const
Returns the lane position corresponding to getWaitPosition()
int getTransportableNumber() const
Returns the number of transportables waiting on this stop.
virtual Position getWaitPosition(MSTransportable *person) const
Returns the next free waiting place for pedestrians / containers.
int getPersonsAbreast() const
bool fits(double pos, const SUMOVehicle &veh) const
return whether the given vehicle fits at the given position
const MSLane & myLane
The lane this bus stop is located at.