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-2023 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>
29#include <microsim/MSLane.h>
30#include "MSPerson.h"
31#include "MSPModel.h"
32
33// ===========================================================================
34// class declarations
35// ===========================================================================
36class MSNet;
37class MSLink;
38class MSJunction;
39
40
41// ===========================================================================
42// class definitions
43// ===========================================================================
50
51 friend class GUIPerson; // for debugging
52
53public:
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
81 bool blockedAtDist(const SUMOTrafficObject* ego, const MSLane* lane, double vehSide, double vehWidth,
82 double oncomingGap, std::vector<const MSPerson*>* collectBlockers);
83
85 bool hasPedestrians(const MSLane* lane);
86
89 bool usingInternalLanes();
90
92 PersonDist nextBlocking(const MSLane* lane, double minPos, double minRight, double maxLeft, double stopTime = 0, bool bidi = false);
93
96
97 // @brief the width of a pedstrian stripe
98 static double stripeWidth;
99
100 // @brief the factor for random slow-down
101 static double dawdling;
102
103 // @brief the safety buffer to vehicles
104 static double minGapToVehicle;
105
106 // @brief intermediate points to smooth out lanes within the walkingarea
108
109 // @brief the time threshold before becoming jammed
113
114 // @brief use old style departPosLat interpretation
115 static bool myLegacyPosLat;
116
117 // @brief the distance (in seconds) to look ahead for changing stripes
118 static const double LOOKAHEAD_SAMEDIR;
119 // @brief the distance (in seconds) to look ahead for changing stripes (regarding oncoming pedestrians)
120 static const double LOOKAHEAD_ONCOMING;
121 // @brief the distance (in m) to look around for vehicles
122 static const double LOOKAROUND_VEHICLES;
123
124 // @brief the utility penalty for moving sideways (corresponds to meters)
125 static const double LATERAL_PENALTY;
126
127 // @brief the utility penalty for obstructed (physically blocking me) stripes (corresponds to meters)
128 static const double OBSTRUCTED_PENALTY;
129
130 // @brief the utility penalty for inappropriate (reserved for oncoming traffic or may violate my min gap) stripes (corresponds to meters)
131 static const double INAPPROPRIATE_PENALTY;
132
133 // @brief the utility penalty for oncoming conflicts on stripes (corresponds to meters)
134 static const double ONCOMING_CONFLICT_PENALTY;
135
136 // @brief the minimum utility that indicates obstruction
137 static const double OBSTRUCTION_THRESHOLD;
138
139 // @brief the factor by which pedestrian width is reduced when sqeezing past each other
140 static const double SQUEEZE;
141
142 // @brief fraction of the leftmost lanes to reserve for oncoming traffic
146
147 // @brief the time pedestrians take to reach maximum impatience
148 static const double MAX_WAIT_TOLERANCE;
149
150 // @brief the fraction of forward speed to be used for lateral movemenk
151 static const double LATERAL_SPEED_FACTOR;
152
153 // @brief the minimum distance to the next obstacle in order to start walking after stopped
154 static const double MIN_STARTUP_DIST;
155
157
158
159protected:
160 static const double DIST_FAR_AWAY;
161 static const double DIST_BEHIND;
162 static const double DIST_OVERLAP;
163
165 public:
167 bool operator()(const MSLane* l1, const MSLane* l2) const {
168 return l1->getNumericalID() < l2->getNumericalID();
169 }
170 };
171
172 struct Obstacle;
173 struct WalkingAreaPath;
174 class PState;
175 typedef std::vector<PState*> Pedestrians;
176 typedef std::map<const MSLane*, Pedestrians, lane_by_numid_sorter> ActiveLanes;
177 typedef std::vector<Obstacle> Obstacles;
178 typedef std::map<const MSLane*, Obstacles, lane_by_numid_sorter> NextLanesObstacles;
179 typedef std::map<std::pair<const MSLane*, const MSLane*>, const WalkingAreaPath> WalkingAreaPaths;
180 typedef std::map<const MSLane*, double> MinNextLengths;
181
183 NextLaneInfo(const MSLane* _lane, const MSLink* _link, int _dir) :
184 lane(_lane),
185 link(_link),
186 dir(_dir) {
187 }
188
190 lane(0),
191 link(0),
193 }
194
195 // @brief the next lane to be used
196 const MSLane* lane;
197 // @brief the link from the current lane to the next lane
198 const MSLink* link;
199 // @brief the direction on the next lane
200 int dir;
201 };
202
211 };
212
214 struct Obstacle {
216 Obstacle(int dir, double dist = DIST_FAR_AWAY);
218 Obstacle(const PState& ped);
220 Obstacle(double _x, double _speed, ObstacleType _type, const std::string& _description, const double width = 0.)
221 : xFwd(_x + width / 2.), xBack(_x - width / 2.), speed(_speed), type(_type), description(_description) {};
222
224 double xFwd;
226 double xBack;
228 double speed;
232 std::string description;
233
234 bool closer(const Obstacle& o, int dir);
235 };
236
238 WalkingAreaPath(const MSLane* _from, const MSLane* _walkingArea, const MSLane* _to, const PositionVector& _shape, int _dir, double _angleOverride) :
239 from(_from),
240 to(_to),
241 lane(_walkingArea),
242 shape(_shape),
243 dir(_dir),
244 angleOverride(_angleOverride),
245 length(_shape.length()) {
246 }
247
248 const MSLane* const from;
249 const MSLane* const to;
250 const MSLane* const lane; // the walkingArea;
252 const int dir; // the direction when entering this path
253 const double angleOverride;
254 const double length;
255
256 };
257
259 public:
261 bool operator()(const WalkingAreaPath* p1, const WalkingAreaPath* p2) const {
262 if (p1->from->getNumericalID() < p2->from->getNumericalID()) {
263 return true;
264 }
265 if (p1->from->getNumericalID() == p2->from->getNumericalID()) {
266 if (p1->to->getNumericalID() < p2->to->getNumericalID()) {
267 return true;
268 }
269 }
270 return false;
271 }
272 };
273
274
280 public:
281
284 double getEdgePos(const MSStageMoving& stage, SUMOTime now) const;
285 int getDirection(const MSStageMoving& stage, SUMOTime now) const;
286 Position getPosition(const MSStageMoving& stage, SUMOTime now) const;
287 double getAngle(const MSStageMoving& stage, SUMOTime now) const;
288 SUMOTime getWaitingTime(const MSStageMoving& stage, SUMOTime now) const;
289 double getSpeed(const MSStageMoving& stage) const;
290 const MSEdge* getNextEdge(const MSStageMoving& stage) const;
291 void moveTo(MSPerson* p, MSLane* lane, double lanePos, double lanePosLat, SUMOTime t);
292 void moveToXY(MSPerson* p, Position pos, MSLane* lane, double lanePos,
293 double lanePosLat, double angle, int routeOffset,
294 const ConstMSEdgeVector& edges, SUMOTime t);
296 bool isJammed() const;
297 const MSLane* getLane() const;
298 double getPathLength() const;
300
301 PState(MSPerson* person, MSStageMoving* stage, const MSLane* lane);
302
304 PState(MSPerson* person, MSStageMoving* stage, std::istringstream* in = nullptr);
305
312 double myRelX;
314 double myRelY;
316 int myDir;
318 double mySpeed;
334 mutable double myAngle;
335
337 virtual double getMinX(const bool includeMinGap = true) const;
338
340 virtual double getMaxX(const bool includeMinGap = true) const;
341
343 double getLength() const;
344
346 double getMinGap() const;
347
349 double distToLaneEnd() const;
350
352 bool moveToNextLane(SUMOTime currentTime);
353
355 void walk(const Obstacles& obs, SUMOTime currentTime);
356
358 double getImpatience(SUMOTime now) const;
359
360 int stripe() const;
361 int otherStripe() const;
362
363 static int stripe(const double relY);
364 int otherStripe(const double relY) const;
365
366 /* @brief calculate distance to the given obstacle,
367 * - non-negative values signify an obstacle in front of ego
368 * the special values DIST_OVERLAP and DIST_BEHIND are used to signify
369 * obstacles that overlap and obstacles behind ego respectively
370 * the result is the same regardless of walking direction
371 */
372 double distanceTo(const Obstacle& obs, const bool includeMinGap = true) const;
373
375 void mergeObstacles(Obstacles& into, const Obstacles& obs2);
376
378 static void mergeObstacles(Obstacles& into, const Obstacles& obs2, int dir, int offset);
379
381 bool ignoreRed(const MSLink* link) const;
382
384 virtual const std::string& getID() const;
385
387 virtual double getWidth() const;
388
389 virtual ObstacleType getOType() const {
390 return OBSTACLE_PED;
391 }
392
394 bool isRemoteControlled() const;
395
398 void saveState(std::ostringstream& out);
399
400 protected:
402 PState();
403 private:
405 PState& operator=(const PState&) = delete;
406 };
407
408 class PStateVehicle : public PState {
409 public:
410 PStateVehicle(const MSVehicle* veh, const MSLane* walkingarea, double relX, double relY, double xWidth, double yWidth);
411 const std::string& getID() const;
412 double getMinX(const bool includeMinGap = true) const;
413 double getMaxX(const bool includeMinGap = true) const;
414 double getWidth() const;
415
417 return OBSTACLE_VEHICLE;
418 }
419 private:
421 const double myXWidth;
422 const double myYWidth;
423 };
424
425
426 class MovePedestrians : public Command {
427 public:
430 SUMOTime execute(SUMOTime currentTime);
431 private:
433 private:
436 };
437
440 public:
442 by_xpos_sorter(int dir): myDir(dir) {}
443
444 public:
446 bool operator()(const PState* p1, const PState* p2) const {
447 if (p1->myRelX != p2->myRelX) {
448 return myDir * p1->myRelX > myDir * p2->myRelX;
449 }
450 return p1->getID() < p2->getID();
451 }
452
453 private:
454 const int myDir;
455 };
456
457
459 void moveInDirection(SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
460
462 void moveInDirectionOnLane(Pedestrians& pedestrians, const MSLane* lane, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir, bool debug);
463
465 void arriveAndAdvance(Pedestrians& pedestrians, SUMOTime currentTime, std::set<MSPerson*>& changedLane, int dir);
466
468 return myActiveLanes;
469 }
470
474 }
475
478 }
479
480private:
481 static void DEBUG_PRINT(const Obstacles& obs);
482
484 static int connectedDirection(const MSLane* from, const MSLane* to);
485
491 static NextLaneInfo getNextLane(const PState& ped, const MSLane* currentLane, const MSLane* prevLane);
492
494 static const MSLane* getNextWalkingArea(const MSLane* currentLane, const int dir, const MSLink*& link);
495
496 static void initWalkingAreaPaths(const MSNet* net);
497
498 static const WalkingAreaPath* getWalkingAreaPath(const MSEdge* walkingArea, const MSLane* before, const MSLane* after);
499
501 static const WalkingAreaPath* getArbitraryPath(const MSEdge* walkingArea);
502
503 static const WalkingAreaPath* guessPath(const MSEdge* walkingArea, const MSEdge* before, const MSEdge* after);
504
506 static int numStripes(const MSLane* lane);
507
508 static Obstacles getNeighboringObstacles(const Pedestrians& pedestrians, int egoIndex, int stripes);
509
510 const Obstacles& getNextLaneObstacles(NextLanesObstacles& nextLanesObs, const MSLane* lane, const MSLane* nextLane, int stripes,
511 int nextDir, double currentLength, int currentDir);
512
513 static void transformToCurrentLanePositions(Obstacles& o, int currentDir, int nextDir, double currentLength, double nextLength);
514
515 static void addCloserObstacle(Obstacles& obs, double x, int stripe, int numStripes, const std::string& id, double width, int dir, ObstacleType type);
516
518 Pedestrians& getPedestrians(const MSLane* lane);
519
520 /* @brief compute stripe-offset to transform relY values from a lane with origStripes into a lane wit destStrips
521 * @note this is called once for transforming nextLane peds to into the current system as obstacles and another time
522 * (in reverse) to transform the pedestrian coordinates into the nextLane-coordinates when changing lanes
523 */
524 static int getStripeOffset(int origStripes, int destStripes, bool addRemainder);
525
527 static bool addCrossingVehs(const MSLane* crossing, int stripes, double lateral_offset, int dir, Obstacles& crossingVehs, bool prio);
528
530 static Obstacles getVehicleObstacles(const MSLane* lane, int dir, PState* ped = 0);
531
532 static bool usingInternalLanesStatic();
533
534 static bool addVehicleFoe(const MSVehicle* veh, const MSLane* walkingarea, const Position& relPos, double xWidth, double yWidth, double lateral_offset,
535 double minY, double maxY, Pedestrians& toDelete, Pedestrians& transformedPeds);
536
537 static int getReserved(int stripes, double factor);
538
539
540private:
543
546
549
552 static std::map<const MSEdge*, std::vector<const MSLane*> > myWalkingAreaFoes;
554
557
558};
559
560
561
long long int SUMOTime
Definition: GUI.h:36
std::vector< const MSEdge * > ConstMSEdgeVector
Definition: MSEdge.h:74
std::pair< const MSPerson *, double > PersonDist
Definition: MSPModel.h:41
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:516
The simulated network and simulation perfomer.
Definition: MSNet.h:88
MSPModel_Striping *const myModel
MovePedestrians(MSPModel_Striping *model)
SUMOTime execute(SUMOTime currentTime)
Executes the command.
MovePedestrians & operator=(const MovePedestrians &)=delete
Invalidated assignment operator.
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
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
void moveTo(MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t)
try to move transportable to the given position
PState & operator=(const PState &)=delete
Invalidated assignment operator.
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
virtual ObstacleType getOType() const
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 getPathLength() const
return the total length of the current lane (in particular for on a walkingarea)
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
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
static SUMOTime jamTimeCrossing
bool hasPedestrians(const MSLane *lane)
whether the given lane has pedestrians on it
const ActiveLanes & getActiveLanes()
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
static const double LOOKAHEAD_SAMEDIR
static double RESERVE_FOR_ONCOMING_MAX
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 int getReserved(int stripes, double factor)
static SUMOTime jamTime
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
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, bool bidi=false)
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
bool blockedAtDist(const SUMOTrafficObject *ego, 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
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 /
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 bool myLegacyPosLat
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:121
abstract base class for managing callbacks to retrieve various state information from the model
Definition: MSPModel.h:150
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, person, or container.
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
bool closer(const Obstacle &o, int dir)
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, double _angleOverride)