51 #define DEBUGCOND(PEDID) (PEDID == DEBUG1 || PEDID == DEBUG2) 55 for (
int i = 0; i < (int)obs.size(); ++i) {
57 <<
"(" << obs[i].description
58 <<
" x=(" << obs[i].xBack <<
"," << obs[i].xFwd
59 <<
") s=" << obs[i].speed
130 const MSLane* lane = getSidewalk<MSEdge, MSLane>(person->
getEdge());
140 const MSLane* lane =
dynamic_cast<PState*
>(state)->myLane;
142 for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) {
145 pedestrians.erase(it);
155 for (Pedestrians::const_iterator it_ped = pedestrians.begin(); it_ped != pedestrians.end(); ++it_ped) {
156 const PState& ped = **it_ped;
157 const double halfVehicleWidth = 1.0;
165 if (collectBlockers == 0) {
168 collectBlockers->push_back(ped.
myPerson);
172 if (collectBlockers == 0) {
175 return collectBlockers->size() > 0;
195 for (Pedestrians::iterator it_p = it_lane->second.begin(); it_p != it_lane->second.end(); ++it_p) {
213 if (from == 0 || to == 0) {
233 const MSLane* walkingArea = getSidewalk<MSEdge, MSLane>(edge);
237 std::vector<const MSLane*> lanes;
239 for (
int j = 0; j < (int)incoming.size(); ++j) {
240 lanes.push_back(getSidewalk<MSEdge, MSLane>(incoming[j]));
243 for (
int j = 0; j < (int)outgoing.size(); ++j) {
244 lanes.push_back(getSidewalk<MSEdge, MSLane>(outgoing[j]));
247 for (
int j = 0; j < (int)lanes.size(); ++j) {
248 for (
int k = 0; k < (int)lanes.size(); ++k) {
251 const MSLane* from = lanes[j];
252 const MSLane* to = lanes[k];
258 const double maxExtent = fromPos.
distanceTo2D(toPos) / 4;
259 const double extrapolateBy =
MIN2(maxExtent, walkingArea->
getWidth() / 2);
261 shape.push_back(fromPos);
271 if (shape.size() < 2) {
275 assert(shape.size() == 2);
283 myMinNextLengths[walkingArea] =
MIN2(myMinNextLengths[walkingArea], wap.
length);
297 const MSLane* nextRouteLane = getSidewalk<MSEdge, MSLane>(nextRouteEdge);
299 const MSLane* nextLane = nextRouteLane;
303 if (nextRouteLane != 0) {
308 std::cout <<
" internal\n";
313 nextLane = currentLane->
getLinkCont()[0]->getLane();
318 std::cout <<
" crossing\n";
325 const double arrivalPos = (nextRouteEdge == ped.
myStage->
getRoute().back()
329 prohibited.push_back(&prevLane->
getEdge());
333 <<
" nre=" << nextRouteEdge->
getID()
334 <<
" nreDir=" << nextRouteEdgeDir
335 <<
" aPos=" << arrivalPos
336 <<
" crossingRoute=" <<
toString(crossingRoute)
339 if (crossingRoute.size() > 1) {
340 const MSEdge* nextEdge = crossingRoute[1];
341 nextLane = getSidewalk<MSEdge, MSLane>(crossingRoute[1]);
343 assert(nextLane != prevLane);
346 std::cout <<
" nextDir=" << nextDir <<
"\n";
361 <<
" no route from '" << (currentEdge == 0 ?
"NULL" : currentEdge->
getID())
362 <<
"' to '" << (nextRouteEdge == 0 ?
"NULL" : nextRouteEdge->
getID())
369 }
else if (currentEdge == nextRouteEdge) {
371 nextDir = -ped.
myDir;
379 std::cout <<
" next walkingArea " << (nextDir ==
FORWARD ?
"forward" :
"backward") <<
"\n";
390 std::cout <<
" direct forward\n";
398 std::cout <<
" direct backward\n";
406 nextLane = nextRouteLane;
408 std::cout <<
SIMTIME <<
" no next lane found for " << currentLane->
getID() <<
" dir=" << ped.
myDir <<
"\n";
412 nextLane = nextRouteLane;
419 <<
" l=" << currentLane->
getID()
420 <<
" nl=" << (nextLane == 0 ?
"NULL" : nextLane->getID())
421 <<
" nrl=" << (nextRouteLane == 0 ?
"NULL" : nextRouteLane->
getID())
424 <<
" pedDir=" << ped.
myDir 435 for (MSLinkCont::const_iterator it = links.begin(); it != links.end(); ++it) {
436 if ((*it)->getLane()->getEdge().isWalkingArea()) {
442 const std::vector<MSLane::IncomingLaneInfo>& laneInfos = currentLane->
getIncomingLanes();
443 for (std::vector<MSLane::IncomingLaneInfo>::const_iterator it = laneInfos.begin(); it != laneInfos.end(); ++it) {
444 if ((*it).lane->getEdge().isWalkingArea()) {
445 link = (*it).viaLink;
456 const PState& ego = *pedestrians[egoIndex];
458 std::vector<bool> haveBlocker(stripes,
false);
459 for (
int index = egoIndex + 1; index < (int)pedestrians.size(); index++) {
460 const PState& p = *pedestrians[index];
467 std::cout <<
" dist=" << ego.
distanceTo(o) << std::endl;
475 haveBlocker[p.
stripe()] =
true;
478 if (!haveBlocker[p.
stripe()]) {
496 int offset = (destStripes - origStripes) / 2;
498 offset += (destStripes - origStripes) % 2;
506 MSLane* lane,
const MSLane* nextLane,
int stripes,
int nextDir,
507 double currentLength,
int currentDir) {
508 if (nextLanesObs.count(nextLane) == 0) {
515 const int offset =
getStripeOffset(nextStripes, stripes, currentDir != nextDir && nextStripes > stripes);
526 if (nextStripes < stripes) {
528 for (
int ii = 0; ii < stripes; ++ii) {
529 if (ii < offset || ii >= nextStripes + offset) {
530 obs[ii] =
Obstacle(nextDir ==
FORWARD ? 0 : nextLength, 0,
"stripeEnd", 0,
true);
540 if ((stripes - nextStripes) % 2 != 0) {
543 nextDir = currentDir;
545 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
546 PState& p = *pedestrians[ii];
551 const double newY = relPos.
y() + lateral_offset;
562 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(nextDir));
563 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
564 const PState& p = *pedestrians[ii];
570 if (nextDir != currentDir) {
575 const int stripe = p.
stripe(newY);
576 if (stripe >= 0 && stripe < stripes) {
580 if (otherStripe >= 0 && otherStripe < stripes) {
581 obs[otherStripe] = pObs;
586 nextLanesObs[nextLane] = obs;
588 return nextLanesObs[nextLane];
593 for (
int ii = 0; ii < (int)obs.size(); ++ii) {
597 o.
xFwd += currentLength;
598 o.
xBack += currentLength;
600 const double tmp = o.
xFwd;
601 o.
xFwd = currentLength + nextLength - o.
xBack;
602 o.
xBack = currentLength + nextLength - tmp;
606 const double tmp = o.
xFwd;
610 o.
xFwd -= nextLength;
611 o.
xBack -= nextLength;
620 if (stripe >= 0 && stripe < numStripes) {
621 if ((dir ==
FORWARD && x - width / 2. < obs[stripe].xBack) || (dir ==
BACKWARD && x + width / 2. > obs[stripe].xFwd)) {
622 obs[stripe] =
Obstacle(x, 0,
id, width);
630 const MSLane* lane = it_lane->first;
640 std::set<const WalkingAreaPath*, walkingarea_path_sorter> paths;
641 for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) {
644 if (p->
myDir == dir) {
648 std::cout <<
SIMTIME <<
" debugging WalkingAreaPath from=" << debugPath->
from->
getID() <<
" to=" << debugPath->
to->
getID() <<
"\n";
652 for (std::set<const WalkingAreaPath*, walkingarea_path_sorter>::iterator it = paths.begin(); it != paths.end(); ++it) {
656 transformedPeds.reserve(pedestrians.size());
657 for (Pedestrians::iterator it_p = pedestrians.begin(); it_p != pedestrians.end(); ++it_p) {
662 transformedPeds.push_back(p);
663 if (path == debugPath) std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << p->
myRelX <<
" relY=" << p->
myRelY <<
" (untransformed), vecCoord=" 667 const double newY = relPos.
y() + lateral_offset;
675 toDelete.push_back(tp);
676 transformedPeds.push_back(tp);
677 if (path == debugPath) {
678 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (transformed), vecCoord=" << relPos <<
"\n";
681 if (path == debugPath) {
682 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (invalid), vecCoord=" << relPos <<
"\n";
690 for (Pedestrians::iterator it_p = toDelete.begin(); it_p != toDelete.end(); ++it_p) {
705 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
707 for (
int i = 0; i < (int)pedestrians.size(); i++) {
708 PState*
const p = pedestrians[i];
712 pedestrians.erase(pedestrians.begin() + i);
732 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
733 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
734 PState& p = *pedestrians[ii];
764 nextLanesObs, lane, nextLane, stripes,
806 p.
walk(currentObs, currentTime);
813 for (
int coll = 0; coll < ii; ++coll) {
814 PState& c = *pedestrians[coll];
821 +
"', lane='" + lane->
getID() +
"', time=" +
time2string(currentTime) +
".");
864 myRelX(stage->getDepartPos()),
865 myRelY(stage->getDepartPosLat()),
868 myWaitingToEnter(true),
870 myWalkingAreaPath(0),
875 if (route.size() == 1) {
882 std::cout <<
" initialize dir for " <<
myPerson->
getID() <<
" forward=" << mayStartForward <<
" backward=" << mayStartBackward <<
"\n";
884 if (mayStartForward && mayStartBackward) {
888 if (crossingRoute.size() > 1) {
890 const MSEdge* nextEdge = crossingRoute[1];
896 std::cout <<
" crossingRoute=" <<
toString(crossingRoute) <<
"\n";
954 const int s =
stripe(relY);
958 if (offset > threshold) {
960 }
else if (offset < -threshold) {
998 std::cout <<
SIMTIME <<
" myRelX=" <<
myRelX <<
" dist=" << dist <<
"\n";
1006 const int oldDir =
myDir;
1014 <<
" moveToNextLane old=" << oldLane->
getID()
1016 <<
" oldDir=" << oldDir
1017 <<
" newDir=" <<
myDir 1062 if (-dist > newLength) {
1068 myRelX = newLength + dist;
1074 <<
" newLength=" << newLength
1080 if (
myDir != oldDir) {
1091 <<
" od=" << oldDir <<
" nd=" <<
myDir 1092 <<
" offset=" << offset <<
"\n";
1104 const int stripes = (int)obs.size();
1105 const int sMax = stripes - 1;
1109 const int current =
stripe();
1112 std::vector<double> distance(stripes);
1113 for (
int i = 0; i < stripes; ++i) {
1114 distance[i] =
distanceTo(obs[i], !obs[i].border);
1117 std::vector<double> utility(stripes, 0);
1119 for (
int i = 0; i < stripes; ++i) {
1125 for (
int j = 0; j <= i; ++j) {
1130 for (
int j = i; j < stripes; ++j) {
1142 for (
int i = 0; i < reserved; ++i) {
1146 for (
int i = sMax; i > sMax - reserved; --i) {
1151 for (
int i = 0; i < stripes; ++i) {
1152 if (obs[i].speed < 0) {
1155 utility[i - 1] -= 0.5;
1157 utility[i + 1] -= 0.5;
1161 const double walkDist =
MAX2(0., distance[i]);
1165 std::cout <<
" util=" << utility[i] <<
" exp=" << expectedDist <<
" dist=" << distance[i] <<
"\n";
1167 if (expectedDist >= 0) {
1168 utility[i] += expectedDist;
1182 for (
int i = 0; i < stripes; ++i) {
1188 int chosen = current;
1189 for (
int i = 0; i < stripes; ++i) {
1190 if (utility[chosen] < utility[i]) {
1195 const int next = (chosen == current ? current : (chosen < current ? current - 1 : current + 1));
1196 const double xDist =
MIN3(distance[current], distance[other], distance[next]);
1204 std::cout <<
" xSpeedPotential=" << xSpeed <<
"\n";
1211 (xDist == distance[current] && obs[current].border)
1212 || (xDist == distance[other] && obs[other].border)
1213 || (xDist == distance[next] && obs[next].border))
1254 ySpeed = (yDist > 0 ?
1268 <<
" cur=" << current
1269 <<
" cho=" << chosen
1273 <<
" dawdle=" << dawdle
1280 <<
"\n distance=" <<
toString(distance)
1281 <<
"\n utility=" <<
toString(utility)
1372 const double maxX =
getMaxX(includeMinGap);
1373 const double minX =
getMinX(includeMinGap);
1377 if ((obs.
xFwd >= maxX && obs.
xBack <= maxX) || (obs.
xFwd <= maxX && obs.
xFwd >= minX)) {
1390 for (
int i = 0; i < (int)into.size(); ++i) {
1392 std::cout <<
" i=" << i <<
" intoDist=" <<
distanceTo(into[i]) <<
" obs2Dist=" <<
distanceTo(obs2[i]) <<
"\n";
1409 std::set<MSPerson*> changedLane;
1414 for (ActiveLanes::const_iterator it_lane =
myModel->getActiveLanes().begin(); it_lane !=
myModel->getActiveLanes().end(); ++it_lane) {
1415 const MSLane* lane = it_lane->first;
1417 if (pedestrians.size() == 0) {
1422 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
1423 const PState& p = *pedestrians[ii];
bool blockedAtDist(const MSLane *lane, double distToCrossing, std::vector< const MSPerson *> *collectBlockers)
whether a pedestrian is blocking the crossing of lane at offset distToCrossing
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
bool gDebugFlag1
global utility flags for debugging
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...
double getImpatience(SUMOTime now) const
returns the impatience
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
void moveInDirection(SUMOTime currentTime, std::set< MSPerson *> &changedLane, int dir)
move all pedestrians forward and advance to the next lane if applicable
MSEdge & getEdge() const
Returns the lane's edge.
static const double LATERAL_SPEED_FACTOR
static const double SQUEEZE
MSPerson::MSPersonStage_Walking * myStage
static const double DIST_BEHIND
void moveInDirectionOnLane(Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson *> &changedLane, int dir)
move pedestrians forward on one lane
static const double LOOKAHEAD_ONCOMING
static int numStripes(const MSLane *lane)
return the maximum number of pedestrians walking side by side
static Obstacles getNeighboringObstacles(const Pedestrians &pedestrians, int egoIndex, int stripes)
MSLane * getLane() const
Returns the connected lane.
Obstacle(int dir, double dist=DIST_FAR_AWAY)
create No-Obstacle
const MSEdge * getEdge() const
Returns the current edge.
double getMinGap() const
return the minimum gap of the pedestrian
sorts the persons by position on the lane. If dir is forward, higher x positions come first...
static const MSLane * getNextWalkingArea(const MSLane *currentLane, const int dir, MSLink *&link)
return the next walkingArea in the given direction
bool opened(SUMOTime arrivalTime, double arrivalSpeed, double leaveSpeed, double vehicleLength, double impatience, double decel, SUMOTime waitingTime, double posLat=0, std::vector< const SUMOVehicle *> *collectFoes=0) const
Returns the information whether the link may be passed.
static int connectedDirection(const MSLane *from, const MSLane *to)
returns the direction in which these lanes are connectioned or 0 if they are not
WalkingAreaPath * myWalkingAreaPath
the current walkingAreaPath or 0
static const double MIN_STARTUP_DIST
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
information regarding surround Pedestrians (and potentially other things)
const MSEdgeVector & getPredecessors() const
The base class for an intersection.
double y() const
Returns the y-position.
static const double BLOCKER_LOOKAHEAD
PState(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
const MSEdge * getEdge() const
Returns the current edge.
std::string time2string(SUMOTime t)
double x() const
Returns the x-position.
void registerJammed()
register a jammed transportable
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
void remove(PedestrianState *state)
remove the specified person from the pedestrian simulation
double getLength() const
Returns the lane's length.
const PositionVector & getShape() const
Returns this lane's shape.
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
PositionVector reverse() const
reverse position vector
double rotationAtOffset(double pos) const
Returns the rotation at the given length.
std::vector< const MSEdge * > ConstMSEdgeVector
std::map< std::pair< const MSLane *, const MSLane * >, WalkingAreaPath > WalkingAreaPaths
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
const std::string & getID() const
Returns the id.
bool moveToNextLane(SUMOTime currentTime)
return whether this pedestrian has passed the end of the current lane and update myRelX if so ...
Position getLanePosition(const MSLane *lane, double at, double offset) const
get position on lane at length at with orthogonal offset
static MSPModel * myModel
double getLength() const
return the length of the edge
double getMaxX(const bool includeMinGap=true) const
return the maximum position on the lane
static WalkingAreaPaths myWalkingAreaPaths
store for walkinArea elements
const MSJunction * getToJunction() const
double getLength() const
return the length of the pedestrian
static const double LATERAL_PENALTY
double getWidth() const
Returns the lane's width.
double mySpeed
the current walking speed
static const double OBSTRUCTION_THRESHOLD
#define WRITE_WARNING(msg)
The simulated network and simulation perfomer.
bool myAmJammed
whether the person is jammed
static OptionsCont & getOptions()
Retrieves the options.
static Pedestrians noPedestrians
empty pedestrian vector
static bool gCheck4Accidents
void mergeObstacles(Obstacles &into, const Obstacles &obs2)
replace obstacles in the first vector with obstacles from the second if they are closer to me ...
NextLaneInfo myNLI
information about the upcoming lane
static const double RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS
A road/street connecting two junctions.
Pedestrians & getPedestrians(const MSLane *lane)
retrieves the pedestian vector for the given lane (may be empty)
double xFwd
maximal position on the current lane in forward direction
static const int UNDEFINED_DIRECTION
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the person arrived
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SUMOTime execute(SUMOTime currentTime)
Executes the command.
static const double OBSTRUCTED_PENALTY
static const double DIST_OVERLAP
virtual MSTransportableControl & getPersonControl()
Returns the person control.
void walk(const Obstacles &obs, SUMOTime currentTime)
perform position update
A point in 2D or 3D with translation and scaling methods.
static int getStripeOffset(int origStripes, int destStripes, bool addRemainder)
double myRelY
the orthogonal shift on the current lane
double xBack
maximal position on the current lane in backward direction
double myRelX
the advancement along the current lane
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
virtual void addEvent(Command *operation, SUMOTime execTimeStep=-1)
Adds an Event.
double getSpeed(const MSPerson::MSPersonStage_Walking &stage) const
return the current speed of the person
Position getPosition(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the network coordinate of the person
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
double distToLaneEnd() const
the absolute distance to the end of the lane in walking direction (or to the arrivalPos) ...
SUMOTime string2time(const std::string &r)
static double rand()
Returns a random real number in [0, 1)
const std::string & getID() const
returns the id of the transportable
double getMinGap() const
Get the free space in front of vehicles of this class.
std::map< const MSLane *, Obstacles, lane_by_numid_sorter > NextLanesObstacles
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
double getArrivalPos() const
bool isCrossing() const
return whether this edge is a pedestrian crossing
bool isInternal() const
return whether this edge is an internal edge
SUMOTime myWaitingTime
the consecutive time spent at speed 0
const ConstMSEdgeVector & getRoute() const
int myDir
the walking direction on the current lane (1 forward, -1 backward)
static const double LOOKAHEAD_SAMEDIR
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
double speed
speed relative to lane direction (positive means in the same direction)
const Obstacles & getNextLaneObstacles(NextLanesObstacles &nextLanesObs, const MSLane *lane, const MSLane *nextLane, int stripes, int nextDir, double currentLength, int currentDir)
void cleanupHelper()
remove state at simulation end
PedestrianState * add(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)
register the given person as a pedestrian
bool border
whether this obstacle denotes a border or a pedestrian
static const double RESERVE_FOR_ONCOMING_FACTOR
void arriveAndAdvance(Pedestrians &pedestrians, SUMOTime currentTime, std::set< MSPerson *> &changedLane, int dir)
handle arrivals and lane advancement
static void transformToCurrentLanePositions(Obstacles &o, int currentDir, int nextDir, double currentLength, double nextLength)
abstract base class for managing callbacks to retrieve various state information from the model ...
double getWidth() const
Get the width which vehicles of this class shall have when being drawn.
std::map< const MSLane *, double > MinNextLengths
static const double DIST_FAR_AWAY
double getEdgePos(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
abstract methods inherited from PedestrianState
static const double ONCOMING_CONFLICT_PENALTY
void extrapolate(const double val, const bool onlyFirst=false, const bool onlyLast=false)
extrapolate position vector
const MSEdge * getNextEdge(const MSPerson::MSPersonStage_Walking &stage) const
return the list of internal edges if the pedestrian is on an intersection
std::vector< PState * > Pedestrians
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
const MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
static double stripeWidth
model parameters
static const double INAPPROPRIATE_PENALTY
bool myWaitingToEnter
whether the pedestrian is waiting to start its walk
static MSLink * getConnectingLink(const MSLane &from, const MSLane &to)
Returns the link connecting both lanes Both lanes have to be non-internal; 0 may be returned if no co...
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
The edge is a normal street.
const MSJunction * getFromJunction() const
double distanceTo(const Obstacle &obs, const bool includeMinGap=true) const
A storage for options typed value containers)
Container for pedestrian state and individual position update function.
static void addCloserObstacle(Obstacles &obs, double x, int stripe, int numStripes, const std::string &id, double width, int dir)
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
const MSEdgeVector & getSuccessors() const
Returns the following edges.
std::vector< Obstacle > Obstacles
double getLength() const
Get vehicle's length [m].
const MSEdge & getDestination() const
returns the destination edge
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
static const int BACKWARD
const MSVehicleType & getVehicleType() const
bool isWalkingArea() const
return whether this edge is walking area
bool compute(const E *from, const E *to, double departPos, double arrivalPos, double speed, SUMOTime msTime, const N *onlyNode, std::vector< const E *> &into, bool allEdges=false)
Builds the route between the given edges using the minimum effort at the given time The definition of...
static const double SAFETY_GAP
double getMinX(const bool includeMinGap=true) const
return the minimum position on the lane
MovePedestrians * myCommand
the MovePedestrians command that is registered
void push_back_noDoublePos(const Position &p)
insert in back a non double position
static void DEBUG_PRINT(const Obstacles &obs)
double getImpatience() const
Returns this type's impatience.
const MSEdge * getNextRouteEdge() const
std::vector< MSEdge * > MSEdgeVector
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
int myNumActivePedestrians
the total number of active pedestrians
double getAngle(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the direction in which the person faces in degrees
static MinNextLengths myMinNextLengths
std::string description
the id / description of the obstacle
SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the time the person spent standing
static void initWalkingAreaPaths(const MSNet *net)
MSPModel_Striping(const OptionsCont &oc, MSNet *net)
Constructor (it should not be necessary to construct more than one instance)
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
static const double MAX_WAIT_TOLERANCE
Representation of a lane in the micro simulation.
static const MSLane * getInternalFollowingLane(const MSLane *fromLane, const MSLane *followerAfterInternal)
ActiveLanes myActiveLanes
store of all lanes which have pedestrians on them
const MSLane * myLane
the current lane of this pedestrian
Position transformToVectorCoordinates(const Position &p, bool extend=false) const
return position p within the length-wise coordinate system defined by this position vector...
double getMaxSpeed() const
accessors to be used by MSPModel
static const Position INVALID
used to indicate that a position is valid
StageType getCurrentStageType() const
the current stage type of the transportable
static bool canTraverse(int dir, const ConstMSEdgeVector &route)
return whether the route may traversed with the given starting direction