|
SUMO - Simulation of Urban MObility
|
Container for pedestrian state and individual position update function. More...
#include <MSPModel_Striping.h>


Public Member Functions | |
| SUMOReal | distanceTo (const Obstacle &obs, const bool includeMinGap=true) const |
| calculate distance to the given obstacle, positive values mean in front of me in walking direction, negative behind me, 0 means overlap More... | |
| SUMOReal | distToLaneEnd () const |
| the absolute distance to the end of the lane in walking direction (or to the arrivalPos) More... | |
| SUMOReal | getImpatience (SUMOTime now) const |
| returns the impatience More... | |
| SUMOReal | getLength () const |
| return the length of the pedestrian More... | |
| SUMOReal | getMaxX (const bool includeMinGap=true) const |
| return the maximum position on the lane More... | |
| SUMOReal | getMinGap () const |
| return the minimum gap of the pedestrian More... | |
| SUMOReal | getMinX (const bool includeMinGap=true) const |
| return the minimum position on the lane More... | |
| void | mergeObstacles (Obstacles &into, const Obstacles &obs2) |
| replace obstacles in the first vector with obstacles from the second if they are closer to me More... | |
| bool | moveToNextLane (SUMOTime currentTime) |
| return whether this pedestrian has passed the end of the current lane and update myRelX if so More... | |
| int | otherStripe () const |
| int | otherStripe (const SUMOReal relY) const |
| PState (MSPerson *person, MSPerson::MSPersonStage_Walking *stage, const MSLane *lane) | |
| int | stripe () const |
| int | stripe (const SUMOReal relY) const |
| void | walk (const Obstacles &obs, SUMOTime currentTime) |
| perform position update More... | |
| ~PState () | |
| SUMOReal | getEdgePos (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
| abstract methods inherited from PedestrianState More... | |
| Position | getPosition (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
| return the network coordinate of the person More... | |
| SUMOReal | getAngle (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
| return the direction in which the person faces in degrees More... | |
| SUMOTime | getWaitingTime (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
| return the time the person spent standing More... | |
| SUMOReal | getSpeed (const MSPerson::MSPersonStage_Walking &stage) const |
| return the current speed of the person More... | |
| const MSEdge * | getNextEdge (const MSPerson::MSPersonStage_Walking &stage) const |
| return the list of internal edges if the pedestrian is on an intersection More... | |
Data Fields | |
| bool | myAmJammed |
| whether the person is jammed More... | |
| int | myDir |
| the walking direction on the current lane (1 forward, -1 backward) More... | |
| const MSLane * | myLane |
| the current lane of this pedestrian More... | |
| NextLaneInfo | myNLI |
| information about the upcoming lane More... | |
| MSPerson * | myPerson |
| SUMOReal | myRelX |
| the advancement along the current lane More... | |
| SUMOReal | myRelY |
| the orthogonal shift on the current lane More... | |
| SUMOReal | mySpeed |
| the current walking speed More... | |
| MSPerson::MSPersonStage_Walking * | myStage |
| SUMOTime | myWaitingTime |
| the consecutive time spent at speed 0 More... | |
| bool | myWaitingToEnter |
| whether the pedestrian is waiting to start its walk More... | |
| WalkingAreaPath * | myWalkingAreaPath |
| the current walkingAreaPath or 0 More... | |
Container for pedestrian state and individual position update function.
Definition at line 227 of file MSPModel_Striping.h.
| MSPModel_Striping::PState::PState | ( | MSPerson * | person, |
| MSPerson::MSPersonStage_Walking * | stage, | ||
| const MSLane * | lane | ||
| ) |
Definition at line 789 of file MSPModel_Striping.cpp.
References MSPModel::BACKWARD, MSPModel::canTraverse(), PedestrianRouter< E, L, N, INTERNALROUTER >::compute(), DEBUGCOND, MSPModel::FORWARD, MSPerson::MSPersonStage_Walking::getArrivalPos(), MSLane::getEdge(), MSEdge::getFromJunction(), Named::getID(), MSTransportable::getID(), MSNet::getInstance(), MSPerson::MSPersonStage_Walking::getMaxSpeed(), MSPModel_Striping::getNextLane(), MSNet::getPedestrianRouter(), MSPerson::MSPersonStage_Walking::getRoute(), MSEdge::getToJunction(), MSEdge::isWalkingArea(), myDir, myNLI, myPerson, myRelX, myRelY, myStage, MSPModel_Striping::numStripes(), MSPModel_Striping::stripeWidth, and toString().
|
inline |
Definition at line 242 of file MSPModel_Striping.h.
| SUMOReal MSPModel_Striping::PState::distanceTo | ( | const Obstacle & | obs, |
| const bool | includeMinGap = true |
||
| ) | const |
calculate distance to the given obstacle, positive values mean in front of me in walking direction, negative behind me, 0 means overlap
Definition at line 1255 of file MSPModel_Striping.cpp.
References SUMOReal, MSPModel_Striping::Obstacle::xBack, and MSPModel_Striping::Obstacle::xFwd.
Referenced by MSPModel_Striping::getNeighboringObstacles(), and MSPModel_Striping::moveInDirectionOnLane().
| SUMOReal MSPModel_Striping::PState::distToLaneEnd | ( | ) | const |
the absolute distance to the end of the lane in walking direction (or to the arrivalPos)
Definition at line 913 of file MSPModel_Striping.cpp.
References MSPModel::FORWARD, POSITION_EPS, and SUMOReal.
Referenced by MSPModel_Striping::moveInDirection(), and MSPModel_Striping::moveInDirectionOnLane().
|
virtual |
return the direction in which the person faces in degrees
Implements PedestrianState.
Definition at line 1222 of file MSPModel_Striping.cpp.
References MSPModel::BACKWARD, M_PI, PositionVector::rotationAtOffset(), and SUMOReal.
|
virtual |
abstract methods inherited from PedestrianState
Implements PedestrianState.
Definition at line 1201 of file MSPModel_Striping.cpp.
returns the impatience
Definition at line 1193 of file MSPModel_Striping.cpp.
References MAX2(), MSPModel_Striping::MAX_WAIT_TOLERANCE, MIN2(), STEPS2TIME, and SUMOReal.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
| SUMOReal MSPModel_Striping::PState::getLength | ( | ) | const |
return the length of the pedestrian
Definition at line 864 of file MSPModel_Striping.cpp.
Referenced by MSPModel_Striping::blockedAtDist(), and MSPModel_Striping::moveInDirectionOnLane().
| SUMOReal MSPModel_Striping::PState::getMaxX | ( | const bool | includeMinGap = true | ) | const |
return the maximum position on the lane
Definition at line 854 of file MSPModel_Striping.cpp.
References MSPModel::FORWARD.
Referenced by MSPModel_Striping::Obstacle::Obstacle().
| SUMOReal MSPModel_Striping::PState::getMinGap | ( | ) | const |
return the minimum gap of the pedestrian
Definition at line 870 of file MSPModel_Striping.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
| SUMOReal MSPModel_Striping::PState::getMinX | ( | const bool | includeMinGap = true | ) | const |
return the minimum position on the lane
Definition at line 844 of file MSPModel_Striping.cpp.
References MSPModel::FORWARD.
Referenced by MSPModel_Striping::Obstacle::Obstacle().
|
virtual |
return the list of internal edges if the pedestrian is on an intersection
Implements PedestrianState.
Definition at line 1249 of file MSPModel_Striping.cpp.
|
virtual |
return the network coordinate of the person
Implements PedestrianState.
Definition at line 1207 of file MSPModel_Striping.cpp.
References MSTransportable::Stage::getLanePosition(), Position::INVALID, MSPModel_Striping::stripeWidth, and SUMOReal.
Referenced by MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirection().
|
virtual |
return the current speed of the person
Implements PedestrianState.
Definition at line 1243 of file MSPModel_Striping.cpp.
|
virtual |
return the time the person spent standing
Implements PedestrianState.
Definition at line 1237 of file MSPModel_Striping.cpp.
replace obstacles in the first vector with obstacles from the second if they are closer to me
Definition at line 1268 of file MSPModel_Striping.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
| bool MSPModel_Striping::PState::moveToNextLane | ( | SUMOTime | currentTime | ) |
return whether this pedestrian has passed the end of the current lane and update myRelX if so
Definition at line 924 of file MSPModel_Striping.cpp.
References MSPModel::BACKWARD, DEBUG1, DEBUGCOND, MSEdge::EDGEFUNCTION_NORMAL, OptionsCont::getBool(), Named::getID(), MSPModel_Striping::getNextLane(), OptionsCont::getOptions(), MSLane::getWidth(), MSPModel_Striping::myWalkingAreaPaths, SIMTIME, MSPModel_Striping::stripeWidth, SUMOReal, and MSPModel::UNDEFINED_DIRECTION.
Referenced by MSPModel_Striping::moveInDirection().
| int MSPModel_Striping::PState::otherStripe | ( | ) | const |
Definition at line 907 of file MSPModel_Striping.cpp.
References MAX2(), MIN2(), and MSPModel_Striping::numStripes().
Referenced by MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirectionOnLane().
| int MSPModel_Striping::PState::otherStripe | ( | const SUMOReal | relY | ) | const |
Definition at line 882 of file MSPModel_Striping.cpp.
References MAX2(), NUMERICAL_EPS, MSPModel_Striping::SQUEEZE, MSPModel_Striping::stripeWidth, and SUMOReal.
| int MSPModel_Striping::PState::stripe | ( | ) | const |
Definition at line 901 of file MSPModel_Striping.cpp.
References MAX2(), MIN2(), and MSPModel_Striping::numStripes().
Referenced by MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLaneObstacles(), and MSPModel_Striping::moveInDirectionOnLane().
| int MSPModel_Striping::PState::stripe | ( | const SUMOReal | relY | ) | const |
Definition at line 876 of file MSPModel_Striping.cpp.
References MSPModel_Striping::stripeWidth.
perform position update
Definition at line 1004 of file MSPModel_Striping.cpp.
References abs, MSPModel::BACKWARD, MSPModel_Striping::dawdling, MSPModel_Striping::DEBUG_PRINT(), DEBUGCOND, DELTA_T, DIST2SPEED, MSPModel::FORWARD, MSNet::getInstance(), MSNet::getPersonControl(), MSPModel_Striping::INAPPROPRIATE_PENALTY, MSPModel_Striping::jamTime, MSPModel_Striping::LATERAL_PENALTY, MSPModel_Striping::LATERAL_SPEED_FACTOR, MSPModel_Striping::LOOKAHEAD_ONCOMING, MSPModel_Striping::LOOKAHEAD_SAMEDIR, MAX2(), MIN2(), MIN3(), MSPModel_Striping::MIN_STARTUP_DIST, NUMERICAL_EPS, MSPModel_Striping::numStripes(), MSPModel_Striping::OBSTRUCTED_PENALTY, MSPModel_Striping::ONCOMING_CONFLICT_PENALTY, RandHelper::rand(), MSPersonControl::registerJammed(), MSPModel_Striping::RESERVE_FOR_ONCOMING_FACTOR, SIMTIME, SPEED2DIST, MSPModel_Striping::stripeWidth, SUMOReal, time2string(), toString(), and WRITE_WARNING.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
| bool MSPModel_Striping::PState::myAmJammed |
whether the person is jammed
Definition at line 264 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
| int MSPModel_Striping::PState::myDir |
the walking direction on the current lane (1 forward, -1 backward)
Definition at line 252 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::blockedAtDist(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::Obstacle::Obstacle(), and PState().
| const MSLane* MSPModel_Striping::PState::myLane |
the current lane of this pedestrian
Definition at line 246 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::moveInDirection(), and MSPModel_Striping::moveInDirectionOnLane().
| NextLaneInfo MSPModel_Striping::PState::myNLI |
information about the upcoming lane
Definition at line 260 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), and PState().
| MSPerson* MSPModel_Striping::PState::myPerson |
Definition at line 242 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::blockedAtDist(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::by_xpos_sorter::operator()(), and PState().
| SUMOReal MSPModel_Striping::PState::myRelX |
the advancement along the current lane
Definition at line 248 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::blockedAtDist(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::by_xpos_sorter::operator()(), and PState().
| SUMOReal MSPModel_Striping::PState::myRelY |
the orthogonal shift on the current lane
Definition at line 250 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirection(), and PState().
| SUMOReal MSPModel_Striping::PState::mySpeed |
the current walking speed
Definition at line 254 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::moveInDirection(), and MSPModel_Striping::Obstacle::Obstacle().
| MSPerson::MSPersonStage_Walking* MSPModel_Striping::PState::myStage |
Definition at line 244 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), and PState().
| SUMOTime MSPModel_Striping::PState::myWaitingTime |
the consecutive time spent at speed 0
Definition at line 258 of file MSPModel_Striping.h.
| bool MSPModel_Striping::PState::myWaitingToEnter |
whether the pedestrian is waiting to start its walk
Definition at line 256 of file MSPModel_Striping.h.
Referenced by MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::Obstacle::Obstacle().
| WalkingAreaPath* MSPModel_Striping::PState::myWalkingAreaPath |
the current walkingAreaPath or 0
Definition at line 262 of file MSPModel_Striping.h.
Referenced by GUIPerson::drawAction_drawWalkingareaPath(), MSPModel_Striping::moveInDirection(), and MSPModel_Striping::moveInDirectionOnLane().