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.org/sumo
3 // Copyright (C) 2014-2022 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 following model (prototype)
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.h"
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
36 class MSNet;
37 class MSLink;
38 class MSJunction;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
49 class MSPModel_Striping : public MSPModel {
50 
51  friend class GUIPerson; // for debugging
52 
53 public:
54 
56  MSPModel_Striping(const OptionsCont& oc, MSNet* net);
57 
59 
61  void clearState();
62 
65 
67  MSTransportableStateAdapter* loadState(MSTransportable* transportable, MSStageMoving* stage, std::istringstream& in);
68 
71 
80  bool blockedAtDist(const MSLane* lane, double vehSide, double vehWidth,
81  double oncomingGap, std::vector<const MSPerson*>* collectBlockers);
82 
84  bool hasPedestrians(const MSLane* lane);
85 
88  bool usingInternalLanes();
89 
91  PersonDist nextBlocking(const MSLane* lane, double minPos, double minRight, double maxLeft, double stopTime = 0);
92 
95 
96  // @brief the width of a pedstrian stripe
97  static double stripeWidth;
98 
99  // @brief the factor for random slow-down
100  static double dawdling;
101 
102  // @brief the safety buffer to vehicles
103  static double minGapToVehicle;
104 
105  // @brief the time threshold before becoming jammed
109 
110  // @brief the distance (in seconds) to look ahead for changing stripes
111  static const double LOOKAHEAD_SAMEDIR;
112  // @brief the distance (in seconds) to look ahead for changing stripes (regarding oncoming pedestrians)
113  static const double LOOKAHEAD_ONCOMING;
114  // @brief the distance (in m) to look around for vehicles
115  static const double LOOKAROUND_VEHICLES;
116 
117  // @brief the utility penalty for moving sideways (corresponds to meters)
118  static const double LATERAL_PENALTY;
119 
120  // @brief the utility penalty for obstructed (physically blocking me) stripes (corresponds to meters)
121  static const double OBSTRUCTED_PENALTY;
122 
123  // @brief the utility penalty for inappropriate (reserved for oncoming traffic or may violate my min gap) stripes (corresponds to meters)
124  static const double INAPPROPRIATE_PENALTY;
125 
126  // @brief the utility penalty for oncoming conflicts on stripes (corresponds to meters)
127  static const double ONCOMING_CONFLICT_PENALTY;
128 
129  // @brief the minimum utility that indicates obstruction
130  static const double OBSTRUCTION_THRESHOLD;
131 
132  // @brief the factor by which pedestrian width is reduced when sqeezing past each other
133  static const double SQUEEZE;
134 
135  // @brief fraction of the leftmost lanes to reserve for oncoming traffic
138 
139  // @brief the time pedestrians take to reach maximum impatience
140  static const double MAX_WAIT_TOLERANCE;
141 
142  // @brief the fraction of forward speed to be used for lateral movemenk
143  static const double LATERAL_SPEED_FACTOR;
144 
145  // @brief the minimum distance to the next obstacle in order to start walking after stopped
146  static const double MIN_STARTUP_DIST;
147 
149 
150 
151 protected:
152  static const double DIST_FAR_AWAY;
153  static const double DIST_BEHIND;
154  static const double DIST_OVERLAP;
155 
157  public:
159  bool operator()(const MSLane* l1, const MSLane* l2) const {
160  return l1->getNumericalID() < l2->getNumericalID();
161  }
162  };
163 
164  struct Obstacle;
165  struct WalkingAreaPath;
166  class PState;
167  typedef std::vector<PState*> Pedestrians;
168  typedef std::map<const MSLane*, Pedestrians, lane_by_numid_sorter> ActiveLanes;
169  typedef std::vector<Obstacle> Obstacles;
170  typedef std::map<const MSLane*, Obstacles, lane_by_numid_sorter> NextLanesObstacles;
171  typedef std::map<std::pair<const MSLane*, const MSLane*>, const WalkingAreaPath> WalkingAreaPaths;
172  typedef std::map<const MSLane*, double> MinNextLengths;
173 
174  struct NextLaneInfo {
175  NextLaneInfo(const MSLane* _lane, const MSLink* _link, int _dir) :
176  lane(_lane),
177  link(_link),
178  dir(_dir) {
179  }
180 
182  lane(0),
183  link(0),
185  }
186 
187  // @brief the next lane to be used
188  const MSLane* lane;
189  // @brief the link from the current lane to the next lane
190  const MSLink* link;
191  // @brief the direction on the next lane
192  int dir;
193  };
194 
203  };
204 
206  struct Obstacle {
208  Obstacle(int dir, double dist = DIST_FAR_AWAY);
210  Obstacle(const PState& ped);
212  Obstacle(double _x, double _speed, ObstacleType _type, const std::string& _description, const double width = 0.)
213  : xFwd(_x + width / 2.), xBack(_x - width / 2.), speed(_speed), type(_type), description(_description) {};
214 
216  double xFwd;
218  double xBack;
220  double speed;
224  std::string description;
225  };
226 
228  WalkingAreaPath(const MSLane* _from, const MSLane* _walkingArea, const MSLane* _to, const PositionVector& _shape, int _dir) :
229  from(_from),
230  to(_to),
231  lane(_walkingArea),
232  shape(_shape),
233  dir(_dir),
234  length(_shape.length()) {
235  }
236 
237  const MSLane* const from;
238  const MSLane* const to;
239  const MSLane* const lane; // the walkingArea;
241  const int dir; // the direction when entering this path
242  const double length;
243 
244  private:
247 
248  };
249 
251  public:
253  bool operator()(const WalkingAreaPath* p1, const WalkingAreaPath* p2) const {
254  if (p1->from->getNumericalID() < p2->from->getNumericalID()) {
255  return true;
256  }
257  if (p1->from->getNumericalID() == p2->from->getNumericalID()) {
258  if (p1->to->getNumericalID() < p2->to->getNumericalID()) {
259  return true;
260  }
261  }
262  return false;
263  }
264  };
265 
266 
272  public:
273 
276  double getEdgePos(const MSStageMoving& stage, SUMOTime now) const;
277  int getDirection(const MSStageMoving& stage, SUMOTime now) const;
278  Position getPosition(const MSStageMoving& stage, SUMOTime now) const;
279  double getAngle(const MSStageMoving& stage, SUMOTime now) const;
280  SUMOTime getWaitingTime(const MSStageMoving& stage, SUMOTime now) const;
281  double getSpeed(const MSStageMoving& stage) const;
282  const MSEdge* getNextEdge(const MSStageMoving& stage) const;
283  void moveToXY(MSPerson* p, Position pos, MSLane* lane, double lanePos,
284  double lanePosLat, double angle, int routeOffset,
285  const ConstMSEdgeVector& edges, SUMOTime t);
287  bool isJammed() const;
288  const MSLane* getLane() const;
290 
291  PState(MSPerson* person, MSStageMoving* stage, const MSLane* lane);
292 
294  PState(MSPerson* person, MSStageMoving* stage, std::istringstream* in = nullptr);
295 
296  ~PState() {};
300  const MSLane* myLane;
302  double myRelX;
304  double myRelY;
306  int myDir;
308  double mySpeed;
310  double mySpeedLat;
324  mutable double myAngle;
325 
327  virtual double getMinX(const bool includeMinGap = true) const;
328 
330  virtual double getMaxX(const bool includeMinGap = true) const;
331 
333  double getLength() const;
334 
336  double getMinGap() const;
337 
339  double distToLaneEnd() const;
340 
342  bool moveToNextLane(SUMOTime currentTime);
343 
345  void walk(const Obstacles& obs, SUMOTime currentTime);
346 
348  double getImpatience(SUMOTime now) const;
349 
350  int stripe() const;
351  int otherStripe() const;
352 
353  static int stripe(const double relY);
354  int otherStripe(const double relY) const;
355 
356  /* @brief calculate distance to the given obstacle,
357  * - non-negative values signify an obstacle in front of ego
358  * the special values DIST_OVERLAP and DIST_BEHIND are used to signify
359  * obstacles that overlap and obstacles behind ego respectively
360  * the result is the same regardless of walking direction
361  */
362  double distanceTo(const Obstacle& obs, const bool includeMinGap = true) const;
363 
365  void mergeObstacles(Obstacles& into, const Obstacles& obs2);
366 
368  static void mergeObstacles(Obstacles& into, const Obstacles& obs2, int dir, int offset);
369 
371  bool ignoreRed(const MSLink* link) const;
372 
374  virtual const std::string& getID() const;
375 
377  virtual double getWidth() const;
378 
380  bool isRemoteControlled() const;
381 
384  void saveState(std::ostringstream& out);
385 
386  protected:
388  PState();
389  private:
391  PState& operator=(const PState&) = delete;
392  };
393 
394  class PStateVehicle : public PState {
395  public:
396  PStateVehicle(const MSVehicle* veh, const MSLane* walkingarea, double relX, double relY, double xWidth, double yWidth);
397  const std::string& getID() const;
398  double getMinX(const bool includeMinGap = true) const;
399  double getMaxX(const bool includeMinGap = true) const;
400  double getWidth() const;
401  private:
403  const double myXWidth;
404  const double myYWidth;
405  };
406 
407 
408  class MovePedestrians : public Command {
409  public:
412  SUMOTime execute(SUMOTime currentTime);
413  private:
415  private:
418  };
419 
422  public:
424  by_xpos_sorter(int dir): myDir(dir) {}
425 
426  public:
428  bool operator()(const PState* p1, const PState* p2) const {
429  if (p1->myRelX != p2->myRelX) {
430  return myDir * p1->myRelX > myDir * p2->myRelX;
431  }
432  return p1->getID() < p2->getID();
433  }
434 
435  private:
436  const int myDir;
437 
438  private:
441  };
442 
443 
445  void moveInDirection(SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
446 
448  void moveInDirectionOnLane(Pedestrians& pedestrians, const MSLane* lane, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
449 
451  void arriveAndAdvance(Pedestrians& pedestrians, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
452 
454  return myActiveLanes;
455  }
456 
459  return myNumActivePedestrians;
460  }
461 
462  void registerActive() {
464  }
465 
466 private:
467  static void DEBUG_PRINT(const Obstacles& obs);
468 
470  static int connectedDirection(const MSLane* from, const MSLane* to);
471 
477  static NextLaneInfo getNextLane(const PState& ped, const MSLane* currentLane, const MSLane* prevLane);
478 
480  static const MSLane* getNextWalkingArea(const MSLane* currentLane, const int dir, const MSLink*& link);
481 
482  static void initWalkingAreaPaths(const MSNet* net);
483 
484  static const WalkingAreaPath* getWalkingAreaPath(const MSEdge* walkingArea, const MSLane* before, const MSLane* after);
485 
487  static const WalkingAreaPath* getArbitraryPath(const MSEdge* walkingArea);
488 
489  static const WalkingAreaPath* guessPath(const MSEdge* walkingArea, const MSEdge* before, const MSEdge* after);
490 
492  static int numStripes(const MSLane* lane);
493 
494  static Obstacles getNeighboringObstacles(const Pedestrians& pedestrians, int egoIndex, int stripes);
495 
496  const Obstacles& getNextLaneObstacles(NextLanesObstacles& nextLanesObs, const MSLane* lane, const MSLane* nextLane, int stripes,
497  int nextDir, double currentLength, int currentDir);
498 
499  static void transformToCurrentLanePositions(Obstacles& o, int currentDir, int nextDir, double currentLength, double nextLength);
500 
501  static void addCloserObstacle(Obstacles& obs, double x, int stripe, int numStripes, const std::string& id, double width, int dir, ObstacleType type);
502 
504  Pedestrians& getPedestrians(const MSLane* lane);
505 
506  /* @brief compute stripe-offset to transform relY values from a lane with origStripes into a lane wit destStrips
507  * @note this is called once for transforming nextLane peds to into the current system as obstacles and another time
508  * (in reverse) to transform the pedestrian coordinates into the nextLane-coordinates when changing lanes
509  */
510  static int getStripeOffset(int origStripes, int destStripes, bool addRemainder);
511 
513  static bool addCrossingVehs(const MSLane* crossing, int stripes, double lateral_offset, int dir, Obstacles& crossingVehs, bool prio);
514 
516  static Obstacles getVehicleObstacles(const MSLane* lane, int dir, PState* ped = 0);
517 
518  static bool usingInternalLanesStatic();
519 
520  static bool addVehicleFoe(const MSVehicle* veh, const MSLane* walkingarea, const Position& relPos, double xWidth, double yWidth, double lateral_offset,
521  double minY, double maxY, Pedestrians& toDelete, Pedestrians& transformedPeds);
522 
523 private:
526 
529 
532 
535  static std::map<const MSEdge*, std::vector<const MSLane*> > myWalkingAreaFoes;
537 
540 
541 };
542 
543 
544 
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:74
std::pair< const MSPerson *, double > PersonDist
Definition: MSPModel.h:39
long long int SUMOTime
Definition: SUMOTime.h:32
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:82
int getNumericalID() const
Returns this lane's numerical id.
Definition: MSLane.h:470
The simulated network and simulation perfomer.
Definition: MSNet.h:88
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
bool isJammed() const
whether the transportable is jammed
PState & operator=(const PState &)=delete
Invalidated assignment operator.
bool myAmJammed
whether the person is jammed
Position myRemoteXYPos
remote-controlled position
bool myWaitingToEnter
whether the pedestrian is waiting to start its walk
const WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
SUMOTime getWaitingTime(const MSStageMoving &stage, SUMOTime now) const
return the time the transportable spent standing
PState()
constructor for PStateVehicle
double myRelX
the advancement along the current lane
double distToLaneEnd() const
the absolute distance to the end of the lane in walking direction (or to the arrivalPos)
int myDir
the walking direction on the current lane (1 forward, -1 backward)
double myRelY
the orthogonal shift on the current lane
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
void walk(const Obstacles &obs, SUMOTime currentTime)
perform position update
virtual double getWidth() const
return the person width
double mySpeed
the current walking speed
void saveState(std::ostringstream &out)
Saves the current state into the given stream.
int getDirection(const MSStageMoving &stage, SUMOTime now) const
return the walking direction (FORWARD, BACKWARD)
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
double mySpeedLat
the current lateral walking speed
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
double myAngle
cached angle
double getSpeed(const MSStageMoving &stage) const
return the current speed of the transportable
Position getPosition(const MSStageMoving &stage, SUMOTime now) const
return the network coordinate of the transportable
NextLaneInfo myNLI
information about the upcoming lane
const MSLane * myLane
the current lane of this pedestrian
double getAngle(const MSStageMoving &stage, SUMOTime now) const
return the direction in which the transportable faces in degrees
virtual const std::string & getID() const
return the person id
double getImpatience(SUMOTime now) const
returns the impatience
SUMOTime myWaitingTime
the consecutive time spent at speed 0
double distanceTo(const Obstacle &obs, const bool includeMinGap=true) const
const MSLane * getLane() const
whether the transportable is jammed
double getEdgePos(const MSStageMoving &stage, SUMOTime now) const
abstract methods inherited from PedestrianState
double getLength() const
return the length of the pedestrian
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 the person id
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 PState *p1, const PState *p2) const
comparing operation
by_xpos_sorter & operator=(const by_xpos_sorter &)=delete
Invalidated assignment operator.
bool operator()(const MSLane *l1, const MSLane *l2) const
comparing operation
bool operator()(const WalkingAreaPath *p1, const WalkingAreaPath *p2) const
comparing operation
The pedestrian following model.
static const double MIN_STARTUP_DIST
static double RESERVE_FOR_ONCOMING_FACTOR
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 SUMOTime jamTimeCrossing
bool hasPedestrians(const MSLane *lane)
whether the given lane has pedestrians on it
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 const double LOOKAHEAD_SAMEDIR
static double minGapToVehicle
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 void initWalkingAreaPaths(const MSNet *net)
std::vector< PState * > Pedestrians
std::map< const MSLane *, Pedestrians, lane_by_numid_sorter > ActiveLanes
ActiveLanes myActiveLanes
store of all lanes which have pedestrians on them
static const double LOOKAROUND_VEHICLES
static const double SQUEEZE
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)
bool myAmActive
whether an event for pedestrian processing was added
static const WalkingAreaPath * guessPath(const MSEdge *walkingArea, const MSEdge *before, const MSEdge *after)
static SUMOTime jamTime
static double stripeWidth
model parameters
bool blockedAtDist(const MSLane *lane, double vehSide, double vehWidth, double oncomingGap, std::vector< const MSPerson * > *collectBlockers)
whether a pedestrian is blocking the crossing of lane for the given vehicle bondaries
static const double MAX_WAIT_TOLERANCE
static Obstacles getVehicleObstacles(const MSLane *lane, int dir, PState *ped=0)
retrieve vehicle obstacles on the given lane
static const double OBSTRUCTED_PENALTY
std::map< const MSLane *, Obstacles, lane_by_numid_sorter > NextLanesObstacles
static const MSLane * getNextWalkingArea(const MSLane *currentLane, const int dir, const MSLink *&link)
return the next walkingArea in the given direction
PersonDist nextBlocking(const MSLane *lane, double minPos, double minRight, double maxLeft, double stopTime=0)
returns the next pedestrian beyond minPos that is laterally between minRight and maxLeft or 0
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
std::vector< Obstacle > Obstacles
void remove(MSTransportableStateAdapter *state)
remove the specified person from the pedestrian simulation
static const double DIST_BEHIND
bool usingInternalLanes()
whether movements on intersections are modelled /
void moveInDirectionOnLane(Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
move pedestrians forward on one lane
MSPModel_Striping(const OptionsCont &oc, MSNet *net)
Constructor (it should not be necessary to construct more than one instance)
static bool usingInternalLanesStatic()
static Obstacles getNeighboringObstacles(const Pedestrians &pedestrians, int egoIndex, int stripes)
static Pedestrians noPedestrians
empty pedestrian vector
static void addCloserObstacle(Obstacles &obs, double x, int stripe, int numStripes, const std::string &id, double width, int dir, ObstacleType type)
Pedestrians & getPedestrians(const MSLane *lane)
retrieves the pedestian vector for the given lane (may be empty)
static double dawdling
static int numStripes(const MSLane *lane)
return the maximum number of pedestrians walking side by side
int getActiveNumber()
return the number of active objects
static const double OBSTRUCTION_THRESHOLD
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
static const double INAPPROPRIATE_PENALTY
void clearState()
Resets pedestrians when quick-loading state.
static const double ONCOMING_CONFLICT_PENALTY
int myNumActivePedestrians
the total number of active pedestrians
static const double LOOKAHEAD_ONCOMING
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
The pedestrian (and also sometimes container) movement model.
Definition: MSPModel.h:51
static const int UNDEFINED_DIRECTION
Definition: MSPModel.h:110
abstract base class for managing callbacks to retrieve various state information from the model
Definition: MSPModel.h:133
Representation of a vehicle in the micro simulation.
Definition: MSVehicle.h:75
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.
NextLaneInfo(const MSLane *_lane, const MSLink *_link, int _dir)
information regarding surround Pedestrians (and potentially other things)
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
std::string description
the id / description of the obstacle
Obstacle(double _x, double _speed, ObstacleType _type, const std::string &_description, const double width=0.)
create an obstacle from explict values
ObstacleType type
whether this obstacle denotes a border 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)
WalkingAreaPath & operator=(const WalkingAreaPath &s)=delete
Invalidated assignment operator.