41 #ifdef CHECK_MEMORY_LEAKS 43 #endif // CHECK_MEMORY_LEAKS 50 const std::vector<std::string>& lines,
53 unsigned int capacity,
108 std::map<unsigned int, LotSpaceDefinition >::iterator i;
110 if ((*i).second.vehicle == &forVehicle) {
111 return (*i).second.myPosition;
119 std::map<unsigned int, LotSpaceDefinition >::iterator i;
121 if ((*i).second.vehicle == &forVehicle) {
167 std::map<unsigned int, LotSpaceDefinition >::iterator i;
169 if ((*i).second.vehicle == what) {
170 (*i).second.vehicle = 0;
183 std::map<unsigned int, LotSpaceDefinition >::iterator i;
185 if ((*i).second.vehicle == 0) {
int getCapacity() const
Returns the area capacity.
int getOccupancy() const
Returns the area occupancy.
int myLastFreeLot
Last free lot number (0 no free lot)
const SUMOReal SUMO_const_laneWidth
SUMOReal getSpaceDim() const
Returns the space dimension.
A lane area vehicles can halt at.
void enter(SUMOVehicle *what, SUMOReal beg, SUMOReal end)
Called if a vehicle enters this stop.
MSParkingArea(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, SUMOReal begPos, SUMOReal endPos, unsigned int capacity, SUMOReal width, SUMOReal length, SUMOReal angle)
Constructor.
SUMOReal getWidth() const
Returns the lane's width.
SUMOReal getVehicleAngle(const SUMOVehicle &forVehicle)
Returns the angle of parked vehicle.
const SUMOReal myEndPos
The end position this bus stop is located at.
SUMOReal x() const
Returns the x-position.
const SUMOReal myBegPos
The begin position this bus stop is located at.
Representation of a vehicle.
A point in 2D or 3D with translation and scaling methods.
PositionVector myShape
The roadside shape of this parkingArea.
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
SUMOReal myLength
The default length of each parking space.
SUMOReal getAngle() const
Returns the lot rectangle angle.
void computeLastFreePos()
Computes the last free position on this stop.
SUMOReal getLastFreePos(const SUMOVehicle &forVehicle) const
Returns the last free position on this stop.
SUMOReal getLength() const
Returns the lot rectangle length.
SUMOReal myAngle
The default angle of each parking space.
int myCapacity
Stop area capacity.
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
SUMOReal getWidth() const
Returns the lot rectangle width.
SUMOReal myLastFreePos
The last free position at this stop (variable)
virtual ~MSParkingArea()
Destructor.
SUMOReal y() const
Returns the y-position.
void addLotEntry(SUMOReal x, SUMOReal y, SUMOReal z, SUMOReal width, SUMOReal length, SUMOReal angle)
Add a lot entry to parking area.
SUMOReal myWidth
The default width of each parking space.
std::map< const SUMOVehicle *, std::pair< SUMOReal, SUMOReal > > myEndPositions
A map from objects (vehicles) to the areas they acquire after entering the stop.
const PositionVector & getShape() const
Returns this lane's shape.
void move2side(SUMOReal amount)
move position vector to side using certain ammount
Representation of a single lot space.
Position getVehiclePosition(const SUMOVehicle &forVehicle)
Returns the position of parked vehicle.
std::map< unsigned int, LotSpaceDefinition > mySpaceOccupancies
A map from objects (vehicles) to the areas they acquire after entering the stop.
Representation of a lane in the micro simulation.
PositionVector getSubpart(SUMOReal beginOffset, SUMOReal endOffset) const
get subpart of a position vector
static const Position INVALID
used to indicate that a position is valid