48 const std::vector<std::string>& lines,
50 double begPos,
double endPos,
51 unsigned int capacity,
52 double width,
double length,
double angle) :
84 double lot_angle = ((double) atan2((s.
x() - f.
x()), (f.
y() - s.
y())) * (double) 180.0 / (
double)
M_PI) +
myAngle;
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) {
122 return (((*i).second.myRotation - 90.) * (double)
M_PI / (
double) 180.0);
137 double width,
double length,
double angle) {
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) {
std::map< const SUMOVehicle *, std::pair< double, double > > myEndPositions
A map from objects (vehicles) to the areas they acquire after entering the stop.
int getCapacity() const
Returns the area capacity.
int getOccupancy() const
Returns the area occupancy.
bool lefthand() const
return whether the network was built for lefthand traffic
int myLastFreeLot
Last free lot number (0 no free lot)
double getLength() const
Returns the lot rectangle length.
double getWidth() const
Returns the lane's width.
A lane area vehicles can halt at.
void enter(SUMOVehicle *what, double beg, double end)
Called if a vehicle enters this stop.
const double myEndPos
The end position this bus stop is located at.
double x() const
Returns the x-position.
const double SUMO_const_laneWidth
double interpolateLanePosToGeometryPos(double lanePos) const
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
double getWidth() const
Returns the lot rectangle width.
double getLastFreePos(const SUMOVehicle &forVehicle) const
Returns the last free position on this stop.
double myAngle
The default angle of each parking space.
MSParkingArea(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, double begPos, double endPos, unsigned int capacity, double width, double length, double angle)
Constructor.
double getVehicleAngle(const SUMOVehicle &forVehicle)
Returns the angle of parked vehicle.
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.
PositionVector myShape
The roadside shape of this parkingArea.
double myLength
The default length of each parking space.
double y() const
Returns the y-position.
void computeLastFreePos()
Computes the last free position on this stop.
void move2side(double amount)
move position vector to side using certain ammount
void addLotEntry(double x, double y, double z, double width, double length, double angle)
Add a lot entry to parking area.
const double myBegPos
The begin position this bus stop is located at.
int myCapacity
Stop area capacity.
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
virtual ~MSParkingArea()
Destructor.
const PositionVector & getShape() const
Returns this lane's shape.
PositionVector getSubpart(double beginOffset, double endOffset) const
get subpart of a position vector
Representation of a single lot space.
double getSpaceDim() const
Returns the space dimension.
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.
double myWidth
The default width of each parking space.
Representation of a lane in the micro simulation.
double getAngle() const
Returns the lot rectangle angle.
static const Position INVALID
used to indicate that a position is valid