SUMO - Simulation of Urban MObility
|
abstract base class for managing callbacks to retrieve various state information from the model More...
Public Member Functions | |
SUMOTime | computeWalkingTime (const MSEdge *prev, const MSPerson::MSPersonStage_Walking &stage, SUMOTime currentTime) |
compute walking time on edge and update state members | |
PState () | |
SUMOReal | getEdgePos (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
abstract methods inherited from PedestrianState | |
Position | getPosition (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
return the network coordinate of the person | |
SUMOReal | getAngle (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
return the direction in which the person faces in degrees | |
SUMOTime | getWaitingTime (const MSPerson::MSPersonStage_Walking &stage, SUMOTime now) const |
return the time the person spent standing | |
SUMOReal | getSpeed (const MSPerson::MSPersonStage_Walking &stage) const |
return the current speed of the person |
Private Attributes | |
SUMOReal | myCurrentBeginPos |
SUMOTime | myCurrentDuration |
SUMOReal | myCurrentEndPos |
SUMOTime | myLastEntryTime |
abstract base class for managing callbacks to retrieve various state information from the model
Definition at line 86 of file MSPModel_NonInteracting.h.
|
inline |
Definition at line 88 of file MSPModel_NonInteracting.h.
SUMOTime MSPModel_NonInteracting::PState::computeWalkingTime | ( | const MSEdge * | prev, |
const MSPerson::MSPersonStage_Walking & | stage, | ||
SUMOTime | currentTime | ||
) |
compute walking time on edge and update state members
Definition at line 110 of file MSPModel_NonInteracting.cpp.
References MSPModel::BACKWARD, MSPModel::FORWARD, MSPerson::MSPersonStage_Walking::getArrivalPos(), MSPerson::MSPersonStage_Walking::getDepartPos(), MSPerson::MSPersonStage_Walking::getEdge(), MSEdge::getFromJunction(), MSEdge::getLength(), MSPerson::MSPersonStage_Walking::getMaxSpeed(), MSPerson::MSPersonStage_Walking::getNextRouteEdge(), MSEdge::getToJunction(), MAX2(), TIME2STEPS, and MSPModel::UNDEFINED_DIRECTION.
Referenced by MSPModel_NonInteracting::add(), and MSPModel_NonInteracting::MoveToNextEdge::execute().
|
virtual |
return the direction in which the person faces in degrees
Implements PedestrianState.
Definition at line 154 of file MSPModel_NonInteracting.cpp.
References MSPerson::MSPersonStage_Walking::getEdge(), MSPerson::MSPersonStage::getEdgeAngle(), and SUMOReal.
|
virtual |
abstract methods inherited from PedestrianState
Implements PedestrianState.
Definition at line 139 of file MSPModel_NonInteracting.cpp.
|
virtual |
return the network coordinate of the person
Implements PedestrianState.
Definition at line 146 of file MSPModel_NonInteracting.cpp.
References MSLane::allowsVehicleClass(), MSPerson::MSPersonStage_Walking::getEdge(), MSPerson::MSPersonStage::getLanePosition(), MSPModel::getSidewalk(), MSPModel::SIDEWALK_OFFSET, SUMOReal, and SVC_PEDESTRIAN.
|
virtual |
return the current speed of the person
Implements PedestrianState.
Definition at line 171 of file MSPModel_NonInteracting.cpp.
References MSPerson::MSPersonStage_Walking::getMaxSpeed().
|
virtual |
return the time the person spent standing
Implements PedestrianState.
Definition at line 165 of file MSPModel_NonInteracting.cpp.
|
private |
Definition at line 106 of file MSPModel_NonInteracting.h.
|
private |
Definition at line 105 of file MSPModel_NonInteracting.h.
|
private |
Definition at line 107 of file MSPModel_NonInteracting.h.
|
private |
Definition at line 104 of file MSPModel_NonInteracting.h.