74 const std::vector<std::string>& lines,
MSLane& lane,
75 double begPos,
double endPos,
int capacity,
76 double width,
double length,
double angle,
const std::string& name,
222 virtual void addLotEntry(
double x,
double y,
double z,
223 double width,
double length,
double angle);
Base (microsim) event class.
Representation of a lane in the micro simulation.
A lane area vehicles can halt at.
void notifyEgressBlocked()
update state so that vehicles wishing to enter cooperate with exiting vehicles
double getAngle() const
Returns the lot rectangle angle.
void leaveFrom(SUMOVehicle *what)
Called if a vehicle leaves this stop.
int getNumAlternatives() const
int myCapacity
Stop area capacity.
int getCapacity() const
Returns the area capacity.
void enter(SUMOVehicle *veh)
Called if a vehicle enters this stop.
MSParkingArea & operator=(const MSParkingArea &)
Invalidated assignment operator.
int myLastStepOccupancy
Changes to the occupancy in the current time step.
bool myOnRoad
Whether vehicles stay on the road.
int myLastFreeLot
Last free lot number (-1 no free lot)
void setNumAlternatives(int alternatives)
PositionVector myShape
The roadside shape of this parkingArea.
double getLength() const
Returns the lot rectangle length.
SUMOTime myReservationTime
track parking reservations from the lane for the current time step
double getWidth() const
Returns the lot rectangle width.
virtual ~MSParkingArea()
Destructor.
SUMOTime updateOccupancy(SUMOTime currentTime)
Called at the end of the time step.
int getLastFreeLotAngle() const
Return the angle of myLastFreeLot - the next parking lot only expected to be called after we have est...
double myAngle
The default angle of each parking space.
bool parkOnRoad() const
whether vehicles park on the road
double myReservationMaxLength
int myNumAlternatives
the number of alternative parkingAreas that are assigned to parkingAreaRerouter
double myWidth
The default width of each parking space.
double myLength
The default length of each parking space.
void computeLastFreePos()
Computes the last free position on this stop.
int getOccupancyIncludingBlocked() const
Returns the area occupancy.
double getLastFreeLotGUIAngle() const
Return the GUI angle of myLastFreeLot - the angle the GUI uses to rotate into the next parking lot as...
int getManoeuverAngle(const SUMOVehicle &forVehicle) const
Return the manoeuver angle of the lot where the vehicle is parked.
int getLastStepOccupancy() const
Returns the area occupancy at the end of the last simulation step.
int getOccupancy() const
Returns the area occupancy.
virtual void addLotEntry(double x, double y, double z, double width, double length, double angle)
Add a lot entry to parking area.
double getVehicleAngle(const SUMOVehicle &forVehicle) const
Returns the angle of parked vehicle.
double getLastFreePosWithReservation(SUMOTime t, const SUMOVehicle &forVehicle)
Returns the last free position on this stop including reservatiosn from the current lane and time ste...
Command * myUpdateEvent
Event for updating the occupancy.
std::vector< LotSpaceDefinition > mySpaceOccupancies
All the spaces in this parking area.
double getInsertionPosition(const SUMOVehicle &forVehicle) const
Returns the insertion position of a parked vehicle.
MSParkingArea(const std::string &id, const std::vector< std::string > &lines, MSLane &lane, double begPos, double endPos, int capacity, double width, double length, double angle, const std::string &name, bool onRoad)
Constructor.
Position getVehiclePosition(const SUMOVehicle &forVehicle) const
Returns the position of parked vehicle.
double getGUIAngle(const SUMOVehicle &forVehicle) const
Return the GUI angle of the lot where the vehicle is parked.
bool myEgressBlocked
whether a vehicle wants to exit but is blocked
MSParkingArea(const MSParkingArea &)
Invalidated copy constructor.
A lane area vehicles can halt at.
double getLastFreePos() const
A point in 2D or 3D with translation and scaling methods.
Representation of a vehicle.
Representation of a single lot space.
double myRotation
The rotation.
Position myPosition
The position of the vehicle when parking in this space.
double myLength
The length.
int index
the running index
bool mySideIsLHS
Whether the lot is on the LHS of the lane relative to the lane direction.
SUMOVehicle * vehicle
The last parked vehicle or 0.
double myEndPos
The position along the lane that the vehicle needs to reach for entering this lot.
double myManoeuverAngle
The angle between lane and lot through which a vehicle must manoeuver to enter the lot.