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
70 #define DIST_FAR_AWAY 10000 71 #define DIST_BEHIND 1000 72 #define DIST_OVERLAP -1 129 const MSLane* lane = getSidewalk<MSEdge, MSLane>(person->
getEdge());
140 for (Pedestrians::const_iterator it_ped = pedestrians.begin(); it_ped != pedestrians.end(); ++it_ped) {
141 const PState& ped = **it_ped;
142 const SUMOReal halfVehicleWidth = 1.0;
150 if (collectBlockers == 0) {
153 collectBlockers->push_back(ped.
myPerson);
157 if (collectBlockers == 0) {
160 return collectBlockers->size() > 0;
180 for (Pedestrians::iterator it_p = it_lane->second.begin(); it_p != it_lane->second.end(); ++it_p) {
197 if (from == 0 || to == 0) {
217 const MSLane* walkingArea = getSidewalk<MSEdge, MSLane>(edge);
220 std::vector<const MSLane*> lanes;
222 for (
int j = 0; j < (int)incoming.size(); ++j) {
223 lanes.push_back(getSidewalk<MSEdge, MSLane>(incoming[j]));
226 for (
int j = 0; j < (int)outgoing.size(); ++j) {
227 lanes.push_back(getSidewalk<MSEdge, MSLane>(outgoing[j]));
230 for (
int j = 0; j < (int)lanes.size(); ++j) {
231 for (
int k = 0; k < (int)lanes.size(); ++k) {
234 const MSLane* from = lanes[j];
235 const MSLane* to = lanes[k];
244 shape.push_back(fromPos);
254 if (shape.size() < 2) {
258 assert(shape.size() == 2);
278 const MSLane* nextRouteLane = getSidewalk<MSEdge, MSLane>(nextRouteEdge);
280 const MSLane* nextLane = nextRouteLane;
284 if (nextRouteLane != 0) {
289 std::cout <<
" internal\n";
294 nextLane = currentLane->
getLinkCont()[0]->getLane();
299 std::cout <<
" crossing\n";
310 prohibited.push_back(&prevLane->
getEdge());
314 <<
" nre=" << nextRouteEdge->
getID()
315 <<
" nreDir=" << nextRouteEdgeDir
316 <<
" aPos=" << arrivalPos
317 <<
" crossingRoute=" <<
toString(crossingRoute)
320 if (crossingRoute.size() > 1) {
321 const MSEdge* nextEdge = crossingRoute[1];
322 nextLane = getSidewalk<MSEdge, MSLane>(crossingRoute[1]);
324 assert(nextLane != prevLane);
327 std::cout <<
" nextDir=" << nextDir <<
"\n";
342 <<
" no route from '" << (currentEdge == 0 ?
"NULL" : currentEdge->
getID())
343 <<
"' to '" << (nextRouteEdge == 0 ?
"NULL" : nextRouteEdge->
getID())
350 }
else if (currentEdge == nextRouteEdge) {
352 nextDir = -ped.
myDir;
360 std::cout <<
" next walkingArea " << (nextDir ==
FORWARD ?
"forward" :
"backward") <<
"\n";
369 #ifdef HAVE_INTERNAL_LANES 372 std::cout <<
" direct forward\n";
374 nextLane = MSLinkContHelper::getInternalFollowingLane(currentLane, nextRouteLane);
379 #ifdef HAVE_INTERNAL_LANES 382 std::cout <<
" direct backward\n";
384 nextLane = MSLinkContHelper::getInternalFollowingLane(nextRouteLane, currentLane);
391 nextLane = nextRouteLane;
393 std::cout <<
SIMTIME <<
" no next lane found for " << currentLane->
getID() <<
" dir=" << ped.
myDir <<
"\n";
397 nextLane = nextRouteLane;
404 <<
" l=" << currentLane->
getID()
405 <<
" nl=" << (nextLane == 0 ?
"NULL" : nextLane->getID())
406 <<
" nrl=" << (nextRouteLane == 0 ?
"NULL" : nextRouteLane->
getID())
409 <<
" pedDir=" << ped.
myDir 420 for (MSLinkCont::const_iterator it = links.begin(); it != links.end(); ++it) {
421 if ((*it)->getLane()->getEdge().isWalkingArea()) {
427 const std::vector<MSLane::IncomingLaneInfo>& laneInfos = currentLane->
getIncomingLanes();
428 for (std::vector<MSLane::IncomingLaneInfo>::const_iterator it = laneInfos.begin(); it != laneInfos.end(); ++it) {
429 if ((*it).lane->getEdge().isWalkingArea()) {
430 link = (*it).viaLink;
441 const PState& ego = *pedestrians[egoIndex];
443 std::vector<bool> haveBlocker(stripes,
false);
444 for (
int index = egoIndex + 1; index < (int)pedestrians.size(); index++) {
445 const PState& p = *pedestrians[index];
452 std::cout <<
" dist=" << ego.
distanceTo(o) << std::endl;
460 haveBlocker[p.
stripe()] =
true;
463 if (!haveBlocker[p.
stripe()]) {
482 SUMOReal currentLength,
int currentDir) {
483 if (nextLanesObs.count(nextLane) == 0) {
495 if (nextStripes < stripes) {
496 int offset = (stripes - nextStripes) / 2;
497 if (currentDir == nextDir) {
499 offset += (stripes - nextStripes) % 2;
502 for (
int ii = 0; ii < stripes; ++ii) {
503 if (ii < offset || ii >= nextStripes + offset) {
504 obs[ii] =
Obstacle(nextDir ==
FORWARD ? 0 : nextLength, 0,
"stripeEnd");
513 nextDir = currentDir;
515 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
516 PState& p = *pedestrians[ii];
518 const SUMOReal newY = relPos.
y() + lateral_offset;
526 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(nextDir));
527 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
528 const PState& p = *pedestrians[ii];
533 if (nextDir != currentDir) {
537 const int stripe = p.
stripe(newY);
538 if (stripe >= 0 && stripe < stripes) {
542 if (otherStripe >= 0 && otherStripe < stripes) {
546 for (
int ii = 0; ii < stripes; ++ii) {
554 o.
xFwd += currentLength;
555 o.
xBack += currentLength;
563 nextLanesObs[nextLane] = obs;
565 return nextLanesObs[nextLane];
571 if (stripe >= 0 && stripe < numStripes) {
572 if ((dir ==
FORWARD && x - width / 2. < obs[stripe].xBack) || (dir ==
BACKWARD && x + width / 2. > obs[stripe].xFwd)) {
573 obs[stripe] =
Obstacle(x, 0,
id, width);
581 const MSLane* lane = it_lane->first;
591 std::set<const WalkingAreaPath*, walkingarea_path_sorter> paths;
592 for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) {
595 if (p->
myDir == dir) {
599 std::cout <<
SIMTIME <<
" debugging WalkingAreaPath from=" << debugPath->
from->
getID() <<
" to=" << debugPath->
to->
getID() <<
"\n";
603 for (std::set<const WalkingAreaPath*, walkingarea_path_sorter>::iterator it = paths.begin(); it != paths.end(); ++it) {
607 transformedPeds.reserve(pedestrians.size());
608 for (Pedestrians::iterator it_p = pedestrians.begin(); it_p != pedestrians.end(); ++it_p) {
613 transformedPeds.push_back(p);
614 if (path == debugPath) std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << p->
myRelX <<
" relY=" << p->
myRelY <<
" (untransformed), vecCoord=" 618 const SUMOReal newY = relPos.
y() + lateral_offset;
626 toDelete.push_back(tp);
627 transformedPeds.push_back(tp);
628 if (path == debugPath) {
629 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (transformed), vecCoord=" << relPos <<
"\n";
632 if (path == debugPath) {
633 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (invalid), vecCoord=" << relPos <<
"\n";
640 for (Pedestrians::iterator it_p = toDelete.begin(); it_p != toDelete.end(); ++it_p) {
648 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
650 for (
int i = 0; i < (int)pedestrians.size(); i++) {
651 PState*
const p = pedestrians[i];
655 pedestrians.erase(pedestrians.begin() + i);
676 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
677 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
678 PState& p = *pedestrians[ii];
702 nextLanesObs, lane, nextLane, stripes,
745 p.
walk(currentObs, currentTime);
752 for (
int coll = 0; coll < ii; ++coll) {
753 PState& c = *pedestrians[coll];
760 +
"', lane='" + lane->
getID() +
"', time=" +
time2string(currentTime) +
".");
801 myRelX(stage->getDepartPos()),
805 myWaitingToEnter(true),
807 myWalkingAreaPath(0),
812 if (route.size() == 1) {
819 std::cout <<
" initialize dir for " <<
myPerson->
getID() <<
" forward=" << mayStartForward <<
" backward=" << mayStartBackward <<
"\n";
821 if (mayStartForward && mayStartBackward) {
825 if (crossingRoute.size() > 1) {
827 const MSEdge* nextEdge = crossingRoute[1];
833 std::cout <<
" crossingRoute=" <<
toString(crossingRoute) <<
"\n";
891 const int s =
stripe(relY);
895 if (offset > threshold) {
897 }
else if (offset < -threshold) {
935 std::cout <<
SIMTIME <<
" myRelX=" <<
myRelX <<
" dist=" << dist <<
"\n";
943 const int oldDir =
myDir;
951 <<
" moveToNextLane old=" << oldLane->
getID()
953 <<
" oldDir=" << oldDir
954 <<
" newDir=" <<
myDir 996 myRelX = newLength + dist;
1001 if (
myDir != oldDir) {
1016 const int stripes = (int)obs.size();
1017 const int sMax = stripes - 1;
1021 const int current =
stripe();
1024 std::vector<SUMOReal> utility(stripes);
1026 for (
int i = 0; i < stripes; ++i) {
1030 std::vector<SUMOReal> distance(stripes);
1031 for (
int i = 0; i < stripes; ++i) {
1035 for (
int i = 0; i < stripes; ++i) {
1041 for (
int j = 0; j <= i; ++j) {
1046 for (
int j = i; j < stripes; ++j) {
1057 for (
int i = 0; i < reserved; ++i) {
1061 for (
int i = sMax; i > sMax - reserved; --i) {
1066 for (
int i = 0; i < stripes; ++i) {
1067 if (obs[i].speed < 0) {
1070 utility[i - 1] -= 0.5;
1072 utility[i + 1] -= 0.5;
1080 std::cout <<
" util=" << utility[i] <<
" exp=" << expectedDist <<
"\n";
1082 if (expectedDist >= 0) {
1083 utility[i] += expectedDist;
1093 && obs[current].speed *
myDir < 0) {
1100 && obs[current].speed *
myDir < 0) {
1105 int chosen = current;
1106 for (
int i = 0; i < stripes; ++i) {
1107 if (utility[chosen] < utility[i]) {
1112 const int next = (chosen == current ? current : (chosen < current ? current - 1 : current + 1));
1113 const SUMOReal xDist =
MIN3(distance[current], distance[other], distance[next]);
1121 std::cout <<
" xSpeedPotential=" << xSpeed <<
"\n";
1164 ySpeed = (yDist > 0 ?
1178 <<
" cur=" << current
1179 <<
" cho=" << chosen
1183 <<
" dawdle=" << dawdle
1190 <<
"\n distance=" <<
toString(distance)
1191 <<
"\n utility=" <<
toString(utility)
1274 if ((obs.
xFwd >= maxX && obs.
xBack <= maxX) || (obs.
xFwd <= maxX && obs.
xFwd >= minX)) {
1287 for (
int i = 0; i < (int)into.size(); ++i) {
1289 std::cout <<
" i=" << i <<
" intoDist=" <<
distanceTo(into[i]) <<
" obs2Dist=" <<
distanceTo(obs2[i]) <<
"\n";
1306 std::set<MSPerson*> changedLane;
1311 for (ActiveLanes::const_iterator it_lane =
myModel->getActiveLanes().begin(); it_lane !=
myModel->getActiveLanes().end(); ++it_lane) {
1312 const MSLane* lane = it_lane->first;
1314 if (pedestrians.size() == 0) {
1319 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
1320 const PState& p = *pedestrians[ii];
const Obstacles & getNextLaneObstacles(NextLanesObstacles &nextLanesObs, const MSLane *lane, const MSLane *nextLane, int stripes, SUMOReal nextLength, int nextDir, SUMOReal currentLength, int currentDir)
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
bool gDebugFlag1
global utility flags for debugging
SUMOReal getWidth() const
Returns the lane's width.
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...
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
SUMOReal getLength() const
Returns the lane's length.
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 SUMOReal OBSTRUCTED_PENALTY
static const SUMOReal SAFETY_GAP
MSPerson::MSPersonStage_Walking * myStage
void moveInDirectionOnLane(Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson *> &changedLane, int dir)
move pedestrians forward on one lane
static SUMOReal stripeWidth
model parameters
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.
const MSEdge * getEdge() const
Returns the current edge.
sorts the persons by position on the lane. If dir is forward, higher x positions come first...
SUMOReal mySpeed
the current walking speed
static const MSLane * getNextWalkingArea(const MSLane *currentLane, const int dir, MSLink *&link)
return the next walkingArea in the given direction
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
information regarding surround Pedestrians (and potentially other things)
The base class for an intersection.
PState(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
const MSEdge * getEdge() const
Returns the current edge.
static SUMOReal rand()
Returns a random real number in [0, 1)
std::string time2string(SUMOTime t)
SUMOReal getLength() const
Get vehicle's length [m].
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
static const SUMOReal ONCOMING_CONFLICT_PENALTY
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
const PositionVector & getShape() const
Returns this lane's shape.
PositionVector reverse() const
reverse position vector
std::vector< const MSEdge * > ConstMSEdgeVector
const MSEdgeVector & getIncomingEdges() const
Returns the list of edges from which this edge may be reached.
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)
SUMOReal getMinX(const bool includeMinGap=true) const
return the minimum position on the lane
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 ...
static void addCloserObstacle(Obstacles &obs, SUMOReal x, int stripe, int numStripes, const std::string &id, SUMOReal width, int dir)
SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking &stage) const
return the current speed of the person
static MSPModel * myModel
static WalkingAreaPaths myWalkingAreaPaths
store for walkinArea elements
const MSJunction * getToJunction() const
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
SUMOReal rotationAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
#define WRITE_WARNING(msg)
The simulated network and simulation perfomer.
bool myAmJammed
whether the person is jammed
static OptionsCont & getOptions()
Retrieves the options.
SUMOReal distToLaneEnd() const
the absolute distance to the end of the lane in walking direction (or to the arrivalPos) ...
static Pedestrians noPedestrians
empty pedestrian vector
static bool gCheck4Accidents
static const SUMOReal RESERVE_FOR_ONCOMING_FACTOR
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
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
static const SUMOReal SQUEEZE
A road/street connecting two junctions.
Pedestrians & getPedestrians(const MSLane *lane)
retrieves the pedestian vector for the given lane (may be empty)
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
static const SUMOReal LOOKAHEAD_SAMEDIR
static const int UNDEFINED_DIRECTION
SUMOReal getMaxSpeed() const
accessors to be used by MSPModel
bool moveToNextEdge(MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0)
move forward and return whether the person arrived
static const SUMOReal LATERAL_SPEED_FACTOR
SUMOTime execute(SUMOTime currentTime)
Executes the command.
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 const SUMOReal LOOKAHEAD_ONCOMING
bool compute(const E *from, const E *to, SUMOReal departPos, SUMOReal arrivalPos, SUMOReal 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 SUMOReal INAPPROPRIATE_PENALTY
SUMOReal xFwd
maximal position on the current lane in forward direction
static const SUMOReal OBSTRUCTION_THRESHOLD
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)
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.
SUMOTime string2time(const std::string &r)
SUMOReal x() const
Returns the x-position.
const std::string & getID() const
returns the id of the transportable
bool opened(SUMOTime arrivalTime, SUMOReal arrivalSpeed, SUMOReal leaveSpeed, SUMOReal vehicleLength, SUMOReal impatience, SUMOReal decel, SUMOTime waitingTime, SUMOReal posLat=0, std::vector< const SUMOVehicle *> *collectFoes=0) const
Returns the information whether the link may be passed.
std::map< const MSLane *, Obstacles, lane_by_numid_sorter > NextLanesObstacles
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
bool isCrossing() const
return whether this edge is a pedestrian crossing
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
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)
virtual SUMOTime addEvent(Command *operation, SUMOTime execTimeStep, AdaptType type)
Adds an Event.
SUMOReal getEdgePos(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
abstract methods inherited from PedestrianState
void cleanupHelper()
remove state at simulation end
PedestrianState * add(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, SUMOTime now)
register the given person as a pedestrian
static const SUMOReal MIN_STARTUP_DIST
SUMOReal getAngle(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the direction in which the person faces in degrees
abstract base class for managing callbacks to retrieve various state information from the model ...
SUMOReal getMaxX(const bool includeMinGap=true) const
return the maximum position on the lane
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)
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
SUMOReal getArrivalPos() const
SUMOReal getLength() const
return the length of the edge
A storage for options typed value containers)
Container for pedestrian state and individual position update function.
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
const SUMOReal SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
const MSEdgeVector & getSuccessors() const
Returns the following edges.
std::vector< Obstacle > Obstacles
static const SUMOReal BLOCKER_LOOKAHEAD
const MSEdge & getDestination() const
returns the destination edge
SUMOReal xBack
maximal position on the current lane in backward direction
static const int BACKWARD
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
const MSVehicleType & getVehicleType() const
bool isWalkingArea() const
return whether this edge is walking area
Patch the time in a way that it is at least as high as the simulation begin time. ...
SUMOReal myRelY
the orthogonal shift on the current lane
static const SUMOReal MAX_WAIT_TOLERANCE
SUMOReal myRelX
the advancement along the current lane
MovePedestrians * myCommand
the MovePedestrians command that is registered
bool blockedAtDist(const MSLane *lane, SUMOReal distToCrossing, std::vector< const MSPerson *> *collectBlockers)
whether a pedestrian is blocking the crossing of lane at offset distToCrossing
void push_back_noDoublePos(const Position &p)
insert in back a non double position
static void DEBUG_PRINT(const Obstacles &obs)
SUMOReal getMinGap() const
return the minimum gap of the pedestrian
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
SUMOReal speed
speed relative to lane direction (positive means in the same direction)
SUMOReal distanceTo(const Obstacle &obs, const bool includeMinGap=true) const
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
SUMOReal y() const
Returns the y-position.
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)
SUMOReal getLength() const
return the length of the pedestrian
Representation of a lane in the micro simulation.
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...
static const SUMOReal LATERAL_PENALTY
Obstacle(int dir)
create No-Obstacle
SUMOReal getImpatience() const
Returns this type's impatience.
void extrapolate(const SUMOReal val, const bool onlyFirst=false)
extrapolate position vector
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
static const Position INVALID
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
SUMOReal getImpatience(SUMOTime now) const
returns the impatience