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
129 const MSLane* lane = getSidewalk<MSEdge, MSLane>(person->
getEdge());
139 const MSLane* lane =
dynamic_cast<PState*
>(state)->myLane;
141 for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) {
144 pedestrians.erase(it);
154 for (Pedestrians::const_iterator it_ped = pedestrians.begin(); it_ped != pedestrians.end(); ++it_ped) {
155 const PState& ped = **it_ped;
156 const SUMOReal halfVehicleWidth = 1.0;
164 if (collectBlockers == 0) {
167 collectBlockers->push_back(ped.
myPerson);
171 if (collectBlockers == 0) {
174 return collectBlockers->size() > 0;
194 for (Pedestrians::iterator it_p = it_lane->second.begin(); it_p != it_lane->second.end(); ++it_p) {
211 if (from == 0 || to == 0) {
231 const MSLane* walkingArea = getSidewalk<MSEdge, MSLane>(edge);
234 std::vector<const MSLane*> lanes;
236 for (
int j = 0; j < (int)incoming.size(); ++j) {
237 lanes.push_back(getSidewalk<MSEdge, MSLane>(incoming[j]));
240 for (
int j = 0; j < (int)outgoing.size(); ++j) {
241 lanes.push_back(getSidewalk<MSEdge, MSLane>(outgoing[j]));
244 for (
int j = 0; j < (int)lanes.size(); ++j) {
245 for (
int k = 0; k < (int)lanes.size(); ++k) {
248 const MSLane* from = lanes[j];
249 const MSLane* to = lanes[k];
258 shape.push_back(fromPos);
268 if (shape.size() < 2) {
272 assert(shape.size() == 2);
292 const MSLane* nextRouteLane = getSidewalk<MSEdge, MSLane>(nextRouteEdge);
294 const MSLane* nextLane = nextRouteLane;
298 if (nextRouteLane != 0) {
303 std::cout <<
" internal\n";
308 nextLane = currentLane->
getLinkCont()[0]->getLane();
313 std::cout <<
" crossing\n";
324 prohibited.push_back(&prevLane->
getEdge());
328 <<
" nre=" << nextRouteEdge->
getID()
329 <<
" nreDir=" << nextRouteEdgeDir
330 <<
" aPos=" << arrivalPos
331 <<
" crossingRoute=" <<
toString(crossingRoute)
334 if (crossingRoute.size() > 1) {
335 const MSEdge* nextEdge = crossingRoute[1];
336 nextLane = getSidewalk<MSEdge, MSLane>(crossingRoute[1]);
338 assert(nextLane != prevLane);
341 std::cout <<
" nextDir=" << nextDir <<
"\n";
356 <<
" no route from '" << (currentEdge == 0 ?
"NULL" : currentEdge->
getID())
357 <<
"' to '" << (nextRouteEdge == 0 ?
"NULL" : nextRouteEdge->
getID())
364 }
else if (currentEdge == nextRouteEdge) {
366 nextDir = -ped.
myDir;
374 std::cout <<
" next walkingArea " << (nextDir ==
FORWARD ?
"forward" :
"backward") <<
"\n";
383 #ifdef HAVE_INTERNAL_LANES 386 std::cout <<
" direct forward\n";
388 nextLane = MSLinkContHelper::getInternalFollowingLane(currentLane, nextRouteLane);
393 #ifdef HAVE_INTERNAL_LANES 396 std::cout <<
" direct backward\n";
398 nextLane = MSLinkContHelper::getInternalFollowingLane(nextRouteLane, currentLane);
405 nextLane = nextRouteLane;
407 std::cout <<
SIMTIME <<
" no next lane found for " << currentLane->
getID() <<
" dir=" << ped.
myDir <<
"\n";
411 nextLane = nextRouteLane;
418 <<
" l=" << currentLane->
getID()
419 <<
" nl=" << (nextLane == 0 ?
"NULL" : nextLane->getID())
420 <<
" nrl=" << (nextRouteLane == 0 ?
"NULL" : nextRouteLane->
getID())
423 <<
" pedDir=" << ped.
myDir 434 for (MSLinkCont::const_iterator it = links.begin(); it != links.end(); ++it) {
435 if ((*it)->getLane()->getEdge().isWalkingArea()) {
441 const std::vector<MSLane::IncomingLaneInfo>& laneInfos = currentLane->
getIncomingLanes();
442 for (std::vector<MSLane::IncomingLaneInfo>::const_iterator it = laneInfos.begin(); it != laneInfos.end(); ++it) {
443 if ((*it).lane->getEdge().isWalkingArea()) {
444 link = (*it).viaLink;
455 const PState& ego = *pedestrians[egoIndex];
457 std::vector<bool> haveBlocker(stripes,
false);
458 for (
int index = egoIndex + 1; index < (int)pedestrians.size(); index++) {
459 const PState& p = *pedestrians[index];
466 std::cout <<
" dist=" << ego.
distanceTo(o) << std::endl;
474 haveBlocker[p.
stripe()] =
true;
477 if (!haveBlocker[p.
stripe()]) {
495 int offset = (destStripes - origStripes) / 2;
497 offset += (destStripes - origStripes) % 2;
506 SUMOReal currentLength,
int currentDir) {
507 if (nextLanesObs.count(nextLane) == 0) {
514 const int offset =
getStripeOffset(nextStripes, stripes, currentDir != nextDir && nextStripes > stripes);
525 if (nextStripes < stripes) {
527 for (
int ii = 0; ii < stripes; ++ii) {
528 if (ii < offset || ii >= nextStripes + offset) {
529 obs[ii] =
Obstacle(nextDir ==
FORWARD ? 0 : nextLength, 0,
"stripeEnd", 0,
true);
539 if ((stripes - nextStripes) % 2 != 0) {
542 nextDir = currentDir;
544 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
545 PState& p = *pedestrians[ii];
550 const SUMOReal newY = relPos.
y() + lateral_offset;
559 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(nextDir));
560 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
561 const PState& p = *pedestrians[ii];
567 if (nextDir != currentDir) {
572 const int stripe = p.
stripe(newY);
573 if (stripe >= 0 && stripe < stripes) {
577 if (otherStripe >= 0 && otherStripe < stripes) {
578 obs[otherStripe] = pObs;
583 nextLanesObs[nextLane] = obs;
585 return nextLanesObs[nextLane];
590 for (
int ii = 0; ii < (int)obs.size(); ++ii) {
594 o.
xFwd += currentLength;
595 o.
xBack += currentLength;
598 o.
xFwd = currentLength + nextLength - o.
xBack;
599 o.
xBack = currentLength + nextLength - tmp;
607 o.
xFwd -= nextLength;
608 o.
xBack -= nextLength;
617 if (stripe >= 0 && stripe < numStripes) {
618 if ((dir ==
FORWARD && x - width / 2. < obs[stripe].xBack) || (dir ==
BACKWARD && x + width / 2. > obs[stripe].xFwd)) {
619 obs[stripe] =
Obstacle(x, 0,
id, width);
627 const MSLane* lane = it_lane->first;
637 std::set<const WalkingAreaPath*, walkingarea_path_sorter> paths;
638 for (Pedestrians::iterator it = pedestrians.begin(); it != pedestrians.end(); ++it) {
641 if (p->
myDir == dir) {
645 std::cout <<
SIMTIME <<
" debugging WalkingAreaPath from=" << debugPath->
from->
getID() <<
" to=" << debugPath->
to->
getID() <<
"\n";
649 for (std::set<const WalkingAreaPath*, walkingarea_path_sorter>::iterator it = paths.begin(); it != paths.end(); ++it) {
653 transformedPeds.reserve(pedestrians.size());
654 for (Pedestrians::iterator it_p = pedestrians.begin(); it_p != pedestrians.end(); ++it_p) {
659 transformedPeds.push_back(p);
660 if (path == debugPath) std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << p->
myRelX <<
" relY=" << p->
myRelY <<
" (untransformed), vecCoord=" 664 const SUMOReal newY = relPos.
y() + lateral_offset;
672 toDelete.push_back(tp);
673 transformedPeds.push_back(tp);
674 if (path == debugPath) {
675 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (transformed), vecCoord=" << relPos <<
"\n";
678 if (path == debugPath) {
679 std::cout <<
" ped=" << p->
myPerson->
getID() <<
" relX=" << relPos.
x() <<
" relY=" << newY <<
" (invalid), vecCoord=" << relPos <<
"\n";
687 for (Pedestrians::iterator it_p = toDelete.begin(); it_p != toDelete.end(); ++it_p) {
702 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
704 for (
int i = 0; i < (int)pedestrians.size(); i++) {
705 PState*
const p = pedestrians[i];
709 pedestrians.erase(pedestrians.begin() + i);
729 sort(pedestrians.begin(), pedestrians.end(),
by_xpos_sorter(dir));
730 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
731 PState& p = *pedestrians[ii];
762 nextLanesObs, lane, nextLane, stripes,
805 p.
walk(currentObs, currentTime);
812 for (
int coll = 0; coll < ii; ++coll) {
813 PState& c = *pedestrians[coll];
820 +
"', lane='" + lane->
getID() +
"', time=" +
time2string(currentTime) +
".");
863 myRelX(stage->getDepartPos()),
864 myRelY(stage->getDepartPosLat()),
867 myWaitingToEnter(true),
869 myWalkingAreaPath(0),
874 if (route.size() == 1) {
881 std::cout <<
" initialize dir for " <<
myPerson->
getID() <<
" forward=" << mayStartForward <<
" backward=" << mayStartBackward <<
"\n";
883 if (mayStartForward && mayStartBackward) {
887 if (crossingRoute.size() > 1) {
889 const MSEdge* nextEdge = crossingRoute[1];
895 std::cout <<
" crossingRoute=" <<
toString(crossingRoute) <<
"\n";
953 const int s =
stripe(relY);
957 if (offset > threshold) {
959 }
else if (offset < -threshold) {
997 std::cout <<
SIMTIME <<
" myRelX=" <<
myRelX <<
" dist=" << dist <<
"\n";
1005 const int oldDir =
myDir;
1013 <<
" moveToNextLane old=" << oldLane->
getID()
1015 <<
" oldDir=" << oldDir
1016 <<
" newDir=" <<
myDir 1061 if (-dist > newLength) {
1067 myRelX = newLength + dist;
1073 <<
" newLength=" << newLength
1079 if (
myDir != oldDir) {
1090 <<
" od=" << oldDir <<
" nd=" <<
myDir 1091 <<
" offset=" << offset <<
"\n";
1103 const int stripes = (int)obs.size();
1104 const int sMax = stripes - 1;
1108 const int current =
stripe();
1111 std::vector<SUMOReal> distance(stripes);
1112 for (
int i = 0; i < stripes; ++i) {
1113 distance[i] =
distanceTo(obs[i], !obs[i].border);
1116 std::vector<SUMOReal> utility(stripes, 0);
1118 for (
int i = 0; i < stripes; ++i) {
1124 for (
int j = 0; j <= i; ++j) {
1129 for (
int j = i; j < stripes; ++j) {
1141 for (
int i = 0; i < reserved; ++i) {
1145 for (
int i = sMax; i > sMax - reserved; --i) {
1150 for (
int i = 0; i < stripes; ++i) {
1151 if (obs[i].speed < 0) {
1154 utility[i - 1] -= 0.5;
1156 utility[i + 1] -= 0.5;
1164 std::cout <<
" util=" << utility[i] <<
" exp=" << expectedDist <<
" dist=" << distance[i] <<
"\n";
1166 if (expectedDist >= 0) {
1167 utility[i] += expectedDist;
1181 for (
int i = 0; i < stripes; ++i) {
1187 int chosen = current;
1188 for (
int i = 0; i < stripes; ++i) {
1189 if (utility[chosen] < utility[i]) {
1194 const int next = (chosen == current ? current : (chosen < current ? current - 1 : current + 1));
1195 const SUMOReal xDist =
MIN3(distance[current], distance[other], distance[next]);
1203 std::cout <<
" xSpeedPotential=" << xSpeed <<
"\n";
1210 (xDist == distance[current] && obs[current].border)
1211 || (xDist == distance[other] && obs[other].border)
1212 || (xDist == distance[next] && obs[next].border))
1252 ySpeed = (yDist > 0 ?
1266 <<
" cur=" << current
1267 <<
" cho=" << chosen
1271 <<
" dawdle=" << dawdle
1278 <<
"\n distance=" <<
toString(distance)
1279 <<
"\n utility=" <<
toString(utility)
1376 if ((obs.
xFwd >= maxX && obs.
xBack <= maxX) || (obs.
xFwd <= maxX && obs.
xFwd >= minX)) {
1389 for (
int i = 0; i < (int)into.size(); ++i) {
1391 std::cout <<
" i=" << i <<
" intoDist=" <<
distanceTo(into[i]) <<
" obs2Dist=" <<
distanceTo(obs2[i]) <<
"\n";
1408 std::set<MSPerson*> changedLane;
1413 for (ActiveLanes::const_iterator it_lane =
myModel->getActiveLanes().begin(); it_lane !=
myModel->getActiveLanes().end(); ++it_lane) {
1414 const MSLane* lane = it_lane->first;
1416 if (pedestrians.size() == 0) {
1421 for (
int ii = 0; ii < (int)pedestrians.size(); ++ii) {
1422 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)
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...
bool blockedAtDist(const MSLane *lane, SUMOReal distToCrossing, std::vector< const MSPerson * > *collectBlockers)
whether a pedestrian is blocking the crossing of lane at offset distToCrossing
MSEdge & getEdge() const
Returns the lane's edge.
static const SUMOReal OBSTRUCTED_PENALTY
static const SUMOReal SAFETY_GAP
SUMOReal rotationAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
const MSEdge * getNextRouteEdge() const
SUMOReal distToLaneEnd() const
the absolute distance to the end of the lane in walking direction (or to the arrivalPos) ...
MSPerson::MSPersonStage_Walking * myStage
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)
sorts the persons by position on the lane. If dir is forward, higher x positions come first...
SUMOReal mySpeed
the current walking speed
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 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)
SUMOReal getLength() const
Returns the lane's length.
The base class for an intersection.
SUMOReal distanceTo(const Obstacle &obs, const bool includeMinGap=true) const
const MSStoppingPlace * getDestinationStop() const
returns the destination stop (if any)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
bool isWalkingArea() const
return whether this edge is walking area
PState(MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane)
static SUMOReal rand()
Returns a random real number in [0, 1)
std::string time2string(SUMOTime t)
SUMOReal getLength() const
Get vehicle's length [m].
SUMOReal getImpatience() const
Returns this type's impatience.
MSPedestrianRouterDijkstra & getPedestrianRouter(const MSEdgeVector &prohibited=MSEdgeVector()) const
SUMOReal getWidth() const
Returns the lane's width.
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).
void remove(PedestrianState *state)
remove the specified person from the pedestrian simulation
static std::string getIDSecure(const T *obj, const std::string &fallBack="NULL")
get an identifier for Named-like object which may be Null
const std::string & getID() const
returns the id of the transportable
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)
std::vector< const MSEdge * > ConstMSEdgeVector
std::map< std::pair< const MSLane *, const MSLane * >, WalkingAreaPath > WalkingAreaPaths
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)
static MSPModel * myModel
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
static WalkingAreaPaths myWalkingAreaPaths
store for walkinArea elements
static const SUMOReal DIST_OVERLAP
SUMOReal x() const
Returns the x-position.
#define WRITE_WARNING(msg)
The simulated network and simulation perfomer.
bool myAmJammed
whether the person is jammed
static OptionsCont & getOptions()
Retrieves the options.
const MSEdge * getEdge() const
Returns the current edge.
static Pedestrians noPedestrians
empty pedestrian vector
static bool gCheck4Accidents
static const SUMOReal RESERVE_FOR_ONCOMING_FACTOR
PositionVector reverse() const
reverse position vector
void moveInDirection(SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
move all pedestrians forward and advance to the next lane if applicable
void mergeObstacles(Obstacles &into, const Obstacles &obs2)
replace obstacles in the first vector with obstacles from the second if they are closer to me ...
static void transformToCurrentLanePositions(Obstacles &o, int currentDir, int nextDir, SUMOReal currentLength, SUMOReal nextLength)
NextLaneInfo myNLI
information about the upcoming lane
const MSEdge & getDestination() const
returns the destination edge
static const SUMOReal SQUEEZE
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
SUMOReal getMinX(const bool includeMinGap=true) const
return the minimum position on the lane
const std::string & getID() const
Returns the id.
A road/street connecting two junctions.
Pedestrians & getPedestrians(const MSLane *lane)
retrieves the pedestian vector for the given lane (may be empty)
Position getLanePosition(const MSLane *lane, SUMOReal at, SUMOReal offset) const
get position on lane at length at with orthogonal offset
static const SUMOReal LOOKAHEAD_SAMEDIR
static const int UNDEFINED_DIRECTION
SUMOReal getLength() const
return the length of the edge
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.
void arriveAndAdvance(Pedestrians &pedestrians, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
handle arrivals and lane advancement
const MSVehicleType & getVehicleType() const
MSLane * getLogicalPredecessorLane() const
get the most likely precedecessor lane (sorted using by_connections_to_sorter). The result is cached ...
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)
const MSEdge * getEdge() const
Returns the current edge.
static const SUMOReal LATERAL_SPEED_FACTOR
SUMOTime execute(SUMOTime currentTime)
Executes the command.
const MSEdgeVector & getPredecessors() const
Returns the edge at the given position from the list of reachable edges.
SUMOReal getMinGap() const
Get the free space in front of vehicles of this class.
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
static int getStripeOffset(int origStripes, int destStripes, bool addRemainder)
const ConstMSEdgeVector & getRoute() const
MSLane * getLane() const
Returns the connected lane.
static const SUMOReal INAPPROPRIATE_PENALTY
SUMOReal xFwd
maximal position on the current lane in forward direction
static const SUMOReal OBSTRUCTION_THRESHOLD
StageType getCurrentStageType() const
the current stage type of the transportable
static const SUMOReal DIST_BEHIND
MSEventControl * getBeginOfTimestepEvents()
Returns the event control for events executed at the begin of a time step.
SUMOReal getLength() const
return the length of the pedestrian
SUMOTime getWaitingTime(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the time the person spent standing
Position positionAtOffset(SUMOReal pos, SUMOReal lateralOffset=0) const
Returns the position at the given length.
SUMOTime string2time(const std::string &r)
Position getPosition(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the network coordinate of the person
std::map< const MSLane *, Obstacles, lane_by_numid_sorter > NextLanesObstacles
SUMOReal getAngle(const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const
return the direction in which the person faces in degrees
SUMOTime myWaitingTime
the consecutive time spent at speed 0
bool isInternal() const
return whether this edge is an internal edge
int myDir
the walking direction on the current lane (1 forward, -1 backward)
SUMOTime getWaitingTime(SUMOTime now) const
the time this transportable spent waiting
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
static const SUMOReal RESERVE_FOR_ONCOMING_FACTOR_JUNCTIONS
SUMOReal getSpeed(const MSPerson::MSPersonStage_Walking &stage) const
return the current speed of the person
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 SUMOReal MIN_STARTUP_DIST
abstract base class for managing callbacks to retrieve various state information from the model ...
Obstacle(int dir, SUMOReal dist=DIST_FAR_AWAY)
create No-Obstacle
SUMOReal getArrivalPos() const
SUMOReal getWidth() const
Get the width which vehicles of this class shall have when being drawn.
EdgeBasicFunction getPurpose() const
Returns the edge type (EdgeBasicFunction)
SUMOReal getImpatience(SUMOTime now) const
returns the impatience
std::vector< PState * > Pedestrians
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.
MSLane * getViaLaneOrLane() const
return the via lane if it exists and the lane otherwise
SUMOReal y() const
Returns the y-position.
A storage for options typed value containers)
Container for pedestrian state and individual position update function.
const SUMOReal SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
std::vector< Obstacle > Obstacles
SUMOReal getMaxX(const bool includeMinGap=true) const
return the maximum position on the lane
static const SUMOReal BLOCKER_LOOKAHEAD
SUMOReal xBack
maximal position on the current lane in backward direction
static const int BACKWARD
const PositionVector & getShape() const
Returns this lane's shape.
SUMOReal distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
static const SUMOReal DIST_FAR_AWAY
Patch the time in a way that it is at least as high as the simulation begin time. ...
const MSEdge * getNextEdge(const MSPerson::MSPersonStage_Walking &stage) const
return the list of internal edges if the pedestrian is on an intersection
SUMOReal myRelY
the orthogonal shift on the current lane
static const SUMOReal MAX_WAIT_TOLERANCE
bool isCrossing() const
return whether this edge is a pedestrian crossing
SUMOReal myRelX
the advancement along the current lane
const MSJunction * getFromJunction() const
const MSEdgeVector & getSuccessors() const
Returns the following edges.
MovePedestrians * myCommand
the MovePedestrians command that is registered
SUMOReal getMinGap() const
return the minimum gap of the pedestrian
void push_back_noDoublePos(const Position &p)
insert in back a non double position
static void DEBUG_PRINT(const Obstacles &obs)
const MSLinkCont & getLinkCont() const
returns the container with all links !!!
std::vector< MSEdge * > MSEdgeVector
int myNumActivePedestrians
the total number of active pedestrians
SUMOReal speed
speed relative to lane direction (positive means in the same direction)
const std::vector< IncomingLaneInfo > & getIncomingLanes() const
std::string description
the id / description of the obstacle
SUMOReal getMaxSpeed() const
accessors to be used by MSPModel
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)
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
static const SUMOReal LATERAL_PENALTY
void moveInDirectionOnLane(Pedestrians &pedestrians, const MSLane *lane, SUMOTime currentTime, std::set< MSPerson * > &changedLane, int dir)
move pedestrians forward on one lane
void extrapolate(const SUMOReal val, const bool onlyFirst=false)
extrapolate position vector
static const Position INVALID
used to indicate that a position is valid
Position transformToVectorCoordinates(const Position &p, bool extend=false) const
return position p within the length-wise coordinate system defined by this position vector...
const MSJunction * getToJunction() const
static bool canTraverse(int dir, const ConstMSEdgeVector &route)
return whether the route may traversed with the given starting direction