Eclipse SUMO - Simulation of Urban MObility
MSPModel_Striping.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2014-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The pedestrian movement model using stripes on sidewalks
20 /****************************************************************************/
21 #pragma once
22 #include <config.h>
23 
24 #include <string>
25 #include <limits>
26 #include <utils/common/SUMOTime.h>
27 #include <utils/common/Command.h>
29 #include <microsim/MSLane.h>
30 #include "MSPerson.h"
31 #include "MSPModel_Interacting.h"
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class MSNet;
37 class MSLink;
38 class MSJunction;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
50 
51  friend class GUIPerson; // for debugging
52 
53 public:
54 
55  struct WalkingAreaPath {
56  WalkingAreaPath(const MSLane* _from, const MSLane* _walkingArea, const MSLane* _to, const PositionVector& _shape, int _dir, double _angleOverride) :
57  from(_from),
58  to(_to),
59  lane(_walkingArea),
60  shape(_shape),
61  dir(_dir),
62  angleOverride(_angleOverride),
63  length(_shape.length()) {
64  }
65 
66  const MSLane* const from;
67  const MSLane* const to;
68  const MSLane* const lane; // the walkingArea;
70  const int dir; // the direction when entering this path
71  const double angleOverride;
72  const double length;
73 
74  };
75 
76  typedef std::map<std::pair<const MSLane*, const MSLane*>, const WalkingAreaPath> WalkingAreaPaths;
77 
79  MSPModel_Striping(const OptionsCont& oc, MSNet* net);
80 
82 
85 
87  MSTransportableStateAdapter* loadState(MSTransportable* transportable, MSStageMoving* stage, std::istringstream& in);
88 
91 
93  static double stripeWidth;
94 
96  static double dawdling;
97 
99  static double minGapToVehicle;
100 
103 
108 
110  static bool myLegacyPosLat;
111 
113  static const double LOOKAHEAD_SAMEDIR;
115  static const double LOOKAHEAD_ONCOMING;
117  static const double LOOKAROUND_VEHICLES;
119  static const double LOOKAHEAD_ONCOMING_DIST;
120 
122  static const double LATERAL_PENALTY;
123 
125  static const double OBSTRUCTED_PENALTY;
126 
128  static const double INAPPROPRIATE_PENALTY;
129 
131  static const double ONCOMING_CONFLICT_PENALTY;
132 
134  static const double OBSTRUCTION_THRESHOLD;
135 
137  static const double SQUEEZE;
138 
143 
145  static const double MAX_WAIT_TOLERANCE;
146 
148  static const double LATERAL_SPEED_FACTOR;
149 
151  static const double MIN_STARTUP_DIST;
152 
154 
156  // The striping model uses as lateral position the distance of the center of the pedestrian
157  // to the left boundary of the lane minus a half stripe width, where right is positive.
158  // The vehicle uses the distance to the center of the lane (and left is positive).
159  // The function happens to be self inverse so it can be used to convert in both directions.
160  inline static double posLatConversion(const double posLat, const double laneWidth) {
161  return .5 * (laneWidth - stripeWidth) - posLat;
162  }
163 
164 
165 protected:
166  static const double DIST_FAR_AWAY;
167  static const double DIST_BEHIND;
168  static const double DIST_OVERLAP;
169 
170  struct Obstacle;
171  class PState;
172  typedef std::vector<Obstacle> Obstacles;
173  typedef std::map<const MSLane*, Obstacles, ComparatorNumericalIdLess> NextLanesObstacles;
174  typedef std::map<const MSLane*, double> MinNextLengths;
175 
176  struct NextLaneInfo {
177  NextLaneInfo(const MSLane* _lane, const MSLink* _link, int _dir) :
178  lane(_lane),
179  link(_link),
180  dir(_dir) {
181  }
182 
184  lane(0),
185  link(0),
187  }
188 
190  const MSLane* lane;
192  const MSLink* link;
194  int dir;
195  };
196 
205  };
206 
208  struct Obstacle {
210  Obstacle(int dir, double dist = DIST_FAR_AWAY);
212  Obstacle(const PState& ped);
214  Obstacle(double _x, double _speed, ObstacleType _type, const std::string& _description, const double width = 0., const SUMOVehicle* veh = nullptr)
215  : xFwd(_x + width / 2.), xBack(_x - width / 2.), speed(_speed), type(_type), description(_description), vehicle(veh) {};
216 
218  double xFwd;
220  double xBack;
222  double speed;
226  std::string description;
228  const SUMOVehicle* vehicle = nullptr;
229 
230  bool closer(const Obstacle& o, int dir);
231  };
232 
234  public:
236  bool operator()(const WalkingAreaPath* p1, const WalkingAreaPath* p2) const {
237  if (p1->from->getNumericalID() < p2->from->getNumericalID()) {
238  return true;
239  }
240  if (p1->from->getNumericalID() == p2->from->getNumericalID()) {
241  if (p1->to->getNumericalID() < p2->to->getNumericalID()) {
242  return true;
243  }
244  }
245  return false;
246  }
247  };
248 
249 
255  public:
256  PState(MSPerson* person, MSStageMoving* stage, const MSLane* lane);
257 
259  PState(MSPerson* person, MSStageMoving* stage, std::istringstream* in = nullptr);
260 
261  ~PState() {};
262  Position getPosition(const MSStageMoving& stage, SUMOTime now) const;
263  double getAngle(const MSStageMoving& stage, SUMOTime now) const;
264  const MSEdge* getNextEdge(const MSStageMoving& stage) const;
265  void moveTo(MSPerson* p, MSLane* lane, double lanePos, double lanePosLat, SUMOTime t);
266  void moveToXY(MSPerson* p, Position pos, MSLane* lane, double lanePos,
267  double lanePosLat, double angle, int routeOffset,
268  const ConstMSEdgeVector& edges, SUMOTime t);
269 
274 
276  virtual double getMinX(const bool includeMinGap = true) const;
277 
279  virtual double getMaxX(const bool includeMinGap = true) const;
280 
282  double getLength() const;
283 
285  double getMinGap() const;
286 
288  double distToLaneEnd() const;
289 
291  bool moveToNextLane(SUMOTime currentTime);
292 
294  void walk(const Obstacles& obs, SUMOTime currentTime);
295 
297  double getImpatience(SUMOTime now) const;
298 
299  int stripe() const;
300  int otherStripe() const;
301 
302  static int stripe(const double relY);
303  int otherStripe(const double relY) const;
304 
305  /* @brief calculate distance to the given obstacle,
306  * - non-negative values signify an obstacle in front of ego
307  * the special values DIST_OVERLAP and DIST_BEHIND are used to signify
308  * obstacles that overlap and obstacles behind ego respectively
309  * the result is the same regardless of walking direction
310  */
311  double distanceTo(const Obstacle& obs, const bool includeMinGap = true) const;
312 
314  void mergeObstacles(Obstacles& into, const Obstacles& obs2);
315 
317  static void mergeObstacles(Obstacles& into, const Obstacles& obs2, int dir, int offset);
318 
320  bool ignoreRed(const MSLink* link) const;
321 
323  virtual double getWidth() const;
324 
325  virtual ObstacleType getOType() const {
326  return OBSTACLE_PED;
327  }
328 
330  bool isRemoteControlled() const;
331 
334  void saveState(std::ostringstream& out);
335 
336  const MSLane* getNextCrossing() const;
337 
339  double getLatOffset() const {
341  }
342 
343  inline double getPosLat() const {
344  return myPosLat;
345  }
346 
347  double getPathLength() const;
348  void reverse(const double pathLength, const double usableWidth);
349  void reset(const double edgePos, const double latPos);
350 
351  protected:
353  PState();
354  private:
356  PState& operator=(const PState&) = delete;
357  };
358 
359  class PStateVehicle : public PState {
360  public:
361  PStateVehicle(const MSVehicle* veh, const MSLane* walkingarea, double relX, double relY, double xWidth, double yWidth);
362  const std::string& getID() const;
363  double getMinX(const bool includeMinGap = true) const;
364  double getMaxX(const bool includeMinGap = true) const;
365  double getWidth() const;
366 
368  return OBSTACLE_VEHICLE;
369  }
370 
371  const MSVehicle* getVehicle() const {
372  return myVehicle;
373  }
374  private:
376  const double myXWidth;
377  const double myYWidth;
378  };
379 
380 
381  class MovePedestrians : public Command {
382  public:
385  SUMOTime execute(SUMOTime currentTime);
386  private:
388  private:
391  };
392 
395  public:
397  by_xpos_sorter(int dir): myDir(dir) {}
398 
399  public:
402  if (p1->getEdgePos(0) != p2->getEdgePos(0)) {
403  return myDir * p1->getEdgePos(0) > myDir * p2->getEdgePos(0);
404  }
405  return p1->getID() < p2->getID();
406  }
407 
408  private:
409  const int myDir;
410  };
411 
412 
414  void moveInDirection(SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
415 
417  void moveInDirectionOnLane(Pedestrians& pedestrians, const MSLane* lane, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir, bool debug);
418 
420  void arriveAndAdvance(Pedestrians& pedestrians, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
421 
423  return myActiveLanes;
424  }
425 
426 private:
427  static void DEBUG_PRINT(const Obstacles& obs);
428 
430  static int connectedDirection(const MSLane* from, const MSLane* to);
431 
437  static NextLaneInfo getNextLane(const PState& ped, const MSLane* currentLane, const MSLane* prevLane);
438 
440  static const MSLane* getNextWalkingArea(const MSLane* currentLane, const int dir, const MSLink*& link);
441 
442  static void initWalkingAreaPaths(const MSNet* net);
443 
445  static void insertWalkArePaths(const MSEdge* edge, WalkingAreaPaths& into);
446 
447  static const WalkingAreaPath* getWalkingAreaPath(const MSEdge* walkingArea, const MSLane* before, const MSLane* after);
448 
450  static const WalkingAreaPath* getArbitraryPath(const MSEdge* walkingArea);
451 
452  static const WalkingAreaPath* guessPath(const MSEdge* walkingArea, const MSEdge* before, const MSEdge* after);
453 
455  static int numStripes(const MSLane* lane);
456 
457  static Obstacles getNeighboringObstacles(const Pedestrians& pedestrians, int egoIndex, int stripes);
458 
459  const Obstacles& getNextLaneObstacles(NextLanesObstacles& nextLanesObs, const MSLane* lane, const MSLane* nextLane, int stripes,
460  int nextDir, double currentLength, int currentDir);
461 
462  static void transformToCurrentLanePositions(Obstacles& o, int currentDir, int nextDir, double currentLength, double nextLength);
463 
464  static void addCloserObstacle(Obstacles& obs, double x, int stripe, int numStripes, const std::string& id, double width, int dir, ObstacleType type);
465 
466  /* @brief compute stripe-offset to transform relY values from a lane with origStripes into a lane wit destStrips
467  * @note this is called once for transforming nextLane peds to into the current system as obstacles and another time
468  * (in reverse) to transform the pedestrian coordinates into the nextLane-coordinates when changing lanes
469  */
470  static int getStripeOffset(int origStripes, int destStripes, bool addRemainder);
471 
473  static bool addCrossingVehs(const MSLane* crossing, int stripes, double lateral_offset, int dir, Obstacles& crossingVehs, bool prio);
474 
476  static Obstacles getVehicleObstacles(const MSLane* lane, int dir, PState* ped = 0);
477 
478  static bool addVehicleFoe(const MSVehicle* veh, const MSLane* walkingarea, const Position& relPos, double xWidth, double yWidth, double lateral_offset,
479  double minY, double maxY, Pedestrians& toDelete, Pedestrians& transformedPeds);
480 
481  static int getReserved(int stripes, double factor);
482 
484  static void registerCrossingApproach(const PState& ped, const MSLane* crossing, const MSLane* beforeWA);
485 
486 private:
489  static std::map<const MSEdge*, std::vector<const MSLane*> > myWalkingAreaFoes;
491 };
long long int SUMOTime
Definition: GUI.h:35
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:74
Base (microsim) event class.
Definition: Command.h:50
A road/street connecting two junctions.
Definition: MSEdge.h:77
The base class for an intersection.
Definition: MSJunction.h:58
Representation of a lane in the micro simulation.
Definition: MSLane.h:84
int getNumericalID() const
Returns this lane's numerical id.
Definition: MSLane.h:517
double getWidth() const
Returns the lane's width.
Definition: MSLane.h:627
The simulated network and simulation perfomer.
Definition: MSNet.h:89
The abstract superclass for pedestrian models which actually interact with vehicles.
std::map< const MSLane *, Pedestrians, ComparatorNumericalIdLess > ActiveLanes
std::vector< MSPModel_InteractingState * > Pedestrians
ActiveLanes myActiveLanes
store of all lanes which have pedestrians on them
Container for pedestrian state and individual position update function.
double getEdgePos(SUMOTime) const
abstract methods inherited from MSTransportableStateAdapter
virtual const std::string & getID() const
return ID of the person (or sometimes vehicle) being represented
const MSLane * myLane
the current lane of this pedestrian
double myPosLat
the orthogonal shift on the current lane
MSPModel_Striping *const myModel
MovePedestrians(MSPModel_Striping *model)
MovePedestrians & operator=(const MovePedestrians &)=delete
Invalidated assignment operator.
SUMOTime execute(SUMOTime currentTime)
Executes the command.
Container for pedestrian state and individual position update function.
virtual double getMaxX(const bool includeMinGap=true) const
return the maximum position on the lane
PState & operator=(const PState &)=delete
Invalidated assignment operator.
const WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
PState()
constructor for PStateVehicle
double distToLaneEnd() const
the absolute distance to the end of the lane in walking direction (or to the arrivalPos)
void mergeObstacles(Obstacles &into, const Obstacles &obs2)
replace obstacles in the first vector with obstacles from the second if they are closer to me
bool isRemoteControlled() const
whether the person is currently being controlled via TraCI
const MSEdge * getNextEdge(const MSStageMoving &stage) const
return the list of internal edges if the transportable is on an intersection
const MSLane * getNextCrossing() const
placeholder function for the accessing the next crossing
void walk(const Obstacles &obs, SUMOTime currentTime)
perform position update
virtual double getWidth() const
return the person width
void saveState(std::ostringstream &out)
Saves the current state into the given stream.
bool ignoreRed(const MSLink *link) const
whether the pedestrian may ignore a red light
virtual double getMinX(const bool includeMinGap=true) const
return the minimum position on the lane
bool moveToNextLane(SUMOTime currentTime)
return whether this pedestrian has passed the end of the current lane and update myRelX if so
void reverse(const double pathLength, const double usableWidth)
double getMinGap() const
return the minimum gap of the pedestrian
void moveToXY(MSPerson *p, Position pos, MSLane *lane, double lanePos, double lanePosLat, double angle, int routeOffset, const ConstMSEdgeVector &edges, SUMOTime t)
try to move transportable to the given position
void moveTo(MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t)
try to move transportable to the given position
Position getPosition(const MSStageMoving &stage, SUMOTime now) const
return the network coordinate of the transportable
NextLaneInfo myNLI
information about the upcoming lane
virtual ObstacleType getOType() const
double getAngle(const MSStageMoving &stage, SUMOTime now) const
return the current orientation in degrees
double getImpatience(SUMOTime now) const
returns the impatience
void reset(const double edgePos, const double latPos)
double distanceTo(const Obstacle &obs, const bool includeMinGap=true) const
double getLength() const
return the length of the pedestrian
double getPathLength() const
return the total length of the current lane (in particular for on a walkingarea)
double getLatOffset() const
return the lateral offset to the lane center
double getWidth() const
return the person width
double getMaxX(const bool includeMinGap=true) const
return the maximum position on the lane
double getMinX(const bool includeMinGap=true) const
return the minimum position on the lane
const std::string & getID() const
return ID of the person (or sometimes vehicle) being represented
const MSVehicle * getVehicle() const
PStateVehicle(const MSVehicle *veh, const MSLane *walkingarea, double relX, double relY, double xWidth, double yWidth)
sorts the persons by position on the lane. If dir is forward, higher x positions come first.
bool operator()(const MSPModel_InteractingState *p1, const MSPModel_InteractingState *p2) const
comparing operation
bool operator()(const WalkingAreaPath *p1, const WalkingAreaPath *p2) const
comparing operation
The pedestrian movement model using stripes on sidewalks.
static const double MIN_STARTUP_DIST
the minimum distance to the next obstacle in order to start walking after stopped
static void registerCrossingApproach(const PState &ped, const MSLane *crossing, const MSLane *beforeWA)
register pedestrian approach with the junction model
static double RESERVE_FOR_ONCOMING_FACTOR
fraction of the leftmost lanes to reserve for oncoming traffic
static MinNextLengths myMinNextLengths
static bool addVehicleFoe(const MSVehicle *veh, const MSLane *walkingarea, const Position &relPos, double xWidth, double yWidth, double lateral_offset, double minY, double maxY, Pedestrians &toDelete, Pedestrians &transformedPeds)
MSTransportableStateAdapter * loadState(MSTransportable *transportable, MSStageMoving *stage, std::istringstream &in)
load the state of the given transportable
const ActiveLanes & getActiveLanes()
static double posLatConversion(const double posLat, const double laneWidth)
Convert the striping to the vehicle lateral position and vice versa.
static SUMOTime jamTimeCrossing
void moveInDirection(SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
move all pedestrians forward and advance to the next lane if applicable
static void transformToCurrentLanePositions(Obstacles &o, int currentDir, int nextDir, double currentLength, double nextLength)
static int myWalkingAreaDetail
intermediate points to smooth out lanes within the walkingarea
static const double LOOKAHEAD_SAMEDIR
the distance (in seconds) to look ahead for changing stripes
static double RESERVE_FOR_ONCOMING_MAX
std::map< const MSLane *, Obstacles, ComparatorNumericalIdLess > NextLanesObstacles
static double minGapToVehicle
the safety buffer to vehicles
static NextLaneInfo getNextLane(const PState &ped, const MSLane *currentLane, const MSLane *prevLane)
computes the successor lane for the given pedestrian and sets the link as well as the direction to us...
static const double LOOKAHEAD_ONCOMING_DIST
the distance (in m) to look ahead for obstacles on a subsequent edge
static void initWalkingAreaPaths(const MSNet *net)
static const double LOOKAROUND_VEHICLES
the distance (in m) to look around for vehicles
static const double SQUEEZE
the factor by which pedestrian width is reduced when sqeezing past each other
static SUMOTime jamTimeNarrow
static const WalkingAreaPath * getWalkingAreaPath(const MSEdge *walkingArea, const MSLane *before, const MSLane *after)
void arriveAndAdvance(Pedestrians &pedestrians, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
handle arrivals and lane advancement
std::map< const MSLane *, double > MinNextLengths
static double RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS
static int getStripeOffset(int origStripes, int destStripes, bool addRemainder)
static const WalkingAreaPath * guessPath(const MSEdge *walkingArea, const MSEdge *before, const MSEdge *after)
static int getReserved(int stripes, double factor)
static SUMOTime jamTime
the time threshold before becoming jammed
static void insertWalkArePaths(const MSEdge *edge, WalkingAreaPaths &into)
creates and inserts all paths into the given map
void moveInDirectionOnLane(Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir, bool debug)
move pedestrians forward on one lane
static double stripeWidth
model parameters
static const double MAX_WAIT_TOLERANCE
the time pedestrians take to reach maximum impatience
static Obstacles getVehicleObstacles(const MSLane *lane, int dir, PState *ped=0)
retrieve vehicle obstacles on the given lane
static const double OBSTRUCTED_PENALTY
the utility penalty for obstructed (physically blocking me) stripes (corresponds to meters)
static const MSLane * getNextWalkingArea(const MSLane *currentLane, const int dir, const MSLink *&link)
return the next walkingArea in the given direction
MSTransportableStateAdapter * add(MSTransportable *transportable, MSStageMoving *stage, SUMOTime now)
register the given person as a pedestrian
static const double DIST_OVERLAP
static const WalkingAreaPath * getArbitraryPath(const MSEdge *walkingArea)
return an arbitrary path across the given walkingArea
static const double LATERAL_PENALTY
the utility penalty for moving sideways (corresponds to meters)
std::vector< Obstacle > Obstacles
static const double DIST_BEHIND
MSPModel_Striping(const OptionsCont &oc, MSNet *net)
Constructor (it should not be necessary to construct more than one instance)
static Obstacles getNeighboringObstacles(const Pedestrians &pedestrians, int egoIndex, int stripes)
static bool myLegacyPosLat
use old style departPosLat interpretation
static void addCloserObstacle(Obstacles &obs, double x, int stripe, int numStripes, const std::string &id, double width, int dir, ObstacleType type)
static double dawdling
the factor for random slow-down
static int numStripes(const MSLane *lane)
return the maximum number of pedestrians walking side by side
static const double OBSTRUCTION_THRESHOLD
the minimum utility that indicates obstruction
static bool addCrossingVehs(const MSLane *crossing, int stripes, double lateral_offset, int dir, Obstacles &crossingVehs, bool prio)
add vehicles driving across
static int connectedDirection(const MSLane *from, const MSLane *to)
returns the direction in which these lanes are connectioned or 0 if they are not
static void DEBUG_PRINT(const Obstacles &obs)
static const double LATERAL_SPEED_FACTOR
the fraction of forward speed to be used for lateral movemenk
static const double INAPPROPRIATE_PENALTY
the utility penalty for inappropriate (reserved for oncoming traffic or may violate my min gap) strip...
static const double ONCOMING_CONFLICT_PENALTY
the utility penalty for oncoming conflicts on stripes (corresponds to meters)
static const double LOOKAHEAD_ONCOMING
the distance (in seconds) to look ahead for changing stripes (regarding oncoming pedestrians)
static std::map< const MSEdge *, std::vector< const MSLane * > > myWalkingAreaFoes
const Obstacles & getNextLaneObstacles(NextLanesObstacles &nextLanesObs, const MSLane *lane, const MSLane *nextLane, int stripes, int nextDir, double currentLength, int currentDir)
static const double DIST_FAR_AWAY
std::map< std::pair< const MSLane *, const MSLane * >, const WalkingAreaPath > WalkingAreaPaths
static WalkingAreaPaths myWalkingAreaPaths
store for walkinArea elements
static const int UNDEFINED_DIRECTION
Definition: MSPModel.h:56
abstract base class for managing callbacks to retrieve various state information from the model
Definition: MSPModel.h:154
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:77
A storage for options typed value containers)
Definition: OptionsCont.h:89
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
A list of positions.
Representation of a vehicle.
Definition: SUMOVehicle.h:62
int dir
the direction on the next lane
NextLaneInfo(const MSLane *_lane, const MSLink *_link, int _dir)
const MSLink * link
the link from the current lane to the next lane
const MSLane * lane
the next lane to be used
information regarding surround Pedestrians (and potentially other things)
Obstacle(double _x, double _speed, ObstacleType _type, const std::string &_description, const double width=0., const SUMOVehicle *veh=nullptr)
create an obstacle from explicit values
double speed
speed relative to lane direction (positive means in the same direction)
double xFwd
maximal position on the current lane in forward direction
Obstacle(int dir, double dist=DIST_FAR_AWAY)
create No-Obstacle
bool closer(const Obstacle &o, int dir)
std::string description
the id / description of the obstacle
const SUMOVehicle * vehicle
a pointer to the vehicle if this obstacle is one
ObstacleType type
whether this obstacle denotes a border, a vehicle or a pedestrian
double xBack
maximal position on the current lane in backward direction
WalkingAreaPath(const MSLane *_from, const MSLane *_walkingArea, const MSLane *_to, const PositionVector &_shape, int _dir, double _angleOverride)