Eclipse SUMO - Simulation of Urban MObility
|
Holds pedestrian state and performs updates. More...
Public Member Functions | |
bool | advanceNextWaypoint () |
JPS_AgentId | getAgentId () const |
double | getAngle (const MSStageMoving &stage, SUMOTime now) const override |
return the direction in which the transportable faces in degrees More... | |
int | getDirection (const MSStageMoving &stage, SUMOTime now) const override |
return the walking direction (FORWARD, BACKWARD) More... | |
double | getEdgePos (const MSStageMoving &stage, SUMOTime now) const override |
return the offset from the start of the current edge measured in its natural direction More... | |
JPS_JourneyId | getJourneyId () const |
virtual const MSLane * | getLane () const |
the current lane of the transportable More... | |
const MSEdge * | getNextEdge (const MSStageMoving &stage) const override |
return the list of internal edges if the transportable is on an intersection More... | |
const MSPModel_JuPedSim::WaypointDesc * | getNextWaypoint (const int offset=0) const |
virtual double | getPathLength () const |
return the total length of the current lane (in particular for on a walkingarea) More... | |
MSPerson * | getPerson () const |
Position | getPosition (const MSStageMoving &stage, SUMOTime now) const override |
return the network coordinate of the transportable More... | |
Position | getPreviousPosition () const |
double | getSpeed (const MSStageMoving &stage) const override |
return the current speed of the transportable More... | |
MSStageMoving * | getStage () const |
JPS_StageId | getStageId () const |
first stage of the journey More... | |
SUMOTime | getWaitingTime (const MSStageMoving &stage, SUMOTime now) const override |
return the time the transportable spent standing More... | |
bool | isFinished () const override |
whether the transportable has finished walking More... | |
virtual bool | isJammed () const |
whether the transportable is jammed More... | |
bool | isWaitingToEnter () const |
virtual void | moveTo (MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t) |
try to move transportable to the given position More... | |
virtual void | moveToXY (MSPerson *p, Position pos, MSLane *lane, double lanePos, double lanePosLat, double angle, int routeOffset, const ConstMSEdgeVector &edges, SUMOTime t) |
try to move transportable to the given position More... | |
PState (MSPerson *person, MSStageMoving *stage, JPS_JourneyId journeyId, JPS_StageId stageId, const std::vector< WaypointDesc > &waypoints) | |
void | reinit (MSStageMoving *stage, JPS_JourneyId journeyId, JPS_StageId stageId, const std::vector< WaypointDesc > &waypoints) |
virtual void | saveState (std::ostringstream &out) |
Saves the current state into the given stream. More... | |
void | setAgentId (JPS_AgentId id) |
void | setAngle (double angle) |
void | setLanePosition (double lanePosition) |
void | setPosition (double x, double y) |
void | setPreviousPosition (Position previousPosition) |
void | setStage (MSStageMoving *const stage) |
~PState () override | |
Private Attributes | |
JPS_AgentId | myAgentId |
double | myAngle |
JPS_JourneyId | myJourneyId |
id of the journey, needed for modifying it More... | |
double | myLanePosition |
MSPerson * | myPerson |
Position | myPosition |
Position | myPreviousPosition |
MSStageMoving * | myStage |
JPS_StageId | myStageId |
bool | myWaitingToEnter |
whether the pedestrian is waiting to start its walk More... | |
std::vector< MSPModel_JuPedSim::WaypointDesc > | myWaypoints |
Holds pedestrian state and performs updates.
Definition at line 83 of file MSPModel_JuPedSim.h.
MSPModel_JuPedSim::PState::PState | ( | MSPerson * | person, |
MSStageMoving * | stage, | ||
JPS_JourneyId | journeyId, | ||
JPS_StageId | stageId, | ||
const std::vector< WaypointDesc > & | waypoints | ||
) |
Definition at line 1145 of file MSPModel_JuPedSim.cpp.
|
override |
Definition at line 1166 of file MSPModel_JuPedSim.cpp.
|
inline |
Definition at line 136 of file MSPModel_JuPedSim.h.
References myWaypoints.
Referenced by MSPModel_JuPedSim::execute().
JPS_AgentId MSPModel_JuPedSim::PState::getAgentId | ( | ) | const |
Definition at line 1247 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
|
overridevirtual |
return the direction in which the transportable faces in degrees
Implements MSTransportableStateAdapter.
Definition at line 1185 of file MSPModel_JuPedSim.cpp.
|
overridevirtual |
return the walking direction (FORWARD, BACKWARD)
Implements MSTransportableStateAdapter.
Definition at line 1221 of file MSPModel_JuPedSim.cpp.
References MSPModel::UNDEFINED_DIRECTION.
|
overridevirtual |
return the offset from the start of the current edge measured in its natural direction
Implements MSTransportableStateAdapter.
Definition at line 1216 of file MSPModel_JuPedSim.cpp.
|
inline |
Definition at line 123 of file MSPModel_JuPedSim.h.
References myJourneyId.
Referenced by MSPModel_JuPedSim::tryPedestrianInsertion().
|
inlinevirtualinherited |
the current lane of the transportable
Reimplemented in MSPModel_Striping::PState.
Definition at line 218 of file MSPModel.h.
Referenced by MSStageMoving::getLane(), and MSStageWalking::loadState().
|
overridevirtual |
return the list of internal edges if the transportable is on an intersection
Implements MSTransportableStateAdapter.
Definition at line 1236 of file MSPModel_JuPedSim.cpp.
References MSStageMoving::getNextRouteEdge().
const MSPModel_JuPedSim::WaypointDesc * MSPModel_JuPedSim::PState::getNextWaypoint | ( | const int | offset = 0 | ) | const |
Definition at line 1242 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::execute().
|
inlinevirtualinherited |
return the total length of the current lane (in particular for on a walkingarea)
Reimplemented in MSPModel_Striping::PState.
Definition at line 223 of file MSPModel.h.
Referenced by MSStageWalking::moveToNextEdge().
MSPerson * MSPModel_JuPedSim::PState::getPerson | ( | ) | const |
Definition at line 1206 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::execute(), and MSPModel_JuPedSim::tryPedestrianInsertion().
|
overridevirtual |
return the network coordinate of the transportable
Implements MSTransportableStateAdapter.
Definition at line 1170 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
Position MSPModel_JuPedSim::PState::getPreviousPosition | ( | ) | const |
|
overridevirtual |
return the current speed of the transportable
Implements MSTransportableStateAdapter.
Definition at line 1231 of file MSPModel_JuPedSim.cpp.
References DELTA_T, and STEPS2TIME.
MSStageMoving * MSPModel_JuPedSim::PState::getStage | ( | ) | const |
Definition at line 1195 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), MSPModel_JuPedSim::execute(), and MSPModel_JuPedSim::remove().
|
inline |
first stage of the journey
Definition at line 128 of file MSPModel_JuPedSim.h.
References myStageId.
Referenced by MSPModel_JuPedSim::tryPedestrianInsertion().
|
overridevirtual |
return the time the transportable spent standing
Implements MSTransportableStateAdapter.
Definition at line 1226 of file MSPModel_JuPedSim.cpp.
|
inlineoverridevirtual |
whether the transportable has finished walking
Reimplemented from MSTransportableStateAdapter.
Definition at line 114 of file MSPModel_JuPedSim.h.
References myWaypoints.
|
inlinevirtualinherited |
whether the transportable is jammed
Reimplemented in MSPModel_Striping::PState.
Definition at line 208 of file MSPModel.h.
Referenced by MSPerson::isJammed().
|
inline |
Definition at line 132 of file MSPModel_JuPedSim.h.
References myWaitingToEnter.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
|
inlinevirtualinherited |
try to move transportable to the given position
Reimplemented in MSPModel_Striping::PState.
Definition at line 182 of file MSPModel.h.
References TL, UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by LIBSUMO_NAMESPACE::Person::moveTo().
|
inlinevirtualinherited |
try to move transportable to the given position
Reimplemented in MSPModel_Striping::PState.
Definition at line 192 of file MSPModel.h.
References TL, UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by MSPerson::Influencer::postProcessRemoteControl().
void MSPModel_JuPedSim::PState::reinit | ( | MSStageMoving * | stage, |
JPS_JourneyId | journeyId, | ||
JPS_StageId | stageId, | ||
const std::vector< WaypointDesc > & | waypoints | ||
) |
Definition at line 1154 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add().
|
inlinevirtualinherited |
Saves the current state into the given stream.
Reimplemented in MSPModel_Striping::PState, and MSPModel_NonInteracting::PState.
Definition at line 229 of file MSPModel.h.
References UNUSED_PARAMETER.
Referenced by MSStageWalking::saveState().
|
inline |
Definition at line 118 of file MSPModel_JuPedSim.h.
References myAgentId, and myWaitingToEnter.
Referenced by MSPModel_JuPedSim::tryPedestrianInsertion().
void MSPModel_JuPedSim::PState::setAngle | ( | double | angle | ) |
Definition at line 1190 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
void MSPModel_JuPedSim::PState::setLanePosition | ( | double | lanePosition | ) |
Definition at line 1211 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
void MSPModel_JuPedSim::PState::setPosition | ( | double | x, |
double | y | ||
) |
Definition at line 1175 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
void MSPModel_JuPedSim::PState::setPreviousPosition | ( | Position | previousPosition | ) |
Definition at line 1180 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::add(), and MSPModel_JuPedSim::execute().
void MSPModel_JuPedSim::PState::setStage | ( | MSStageMoving *const | stage | ) |
Definition at line 1201 of file MSPModel_JuPedSim.cpp.
Referenced by MSPModel_JuPedSim::remove().
|
private |
Definition at line 148 of file MSPModel_JuPedSim.h.
Referenced by setAgentId().
|
private |
Definition at line 151 of file MSPModel_JuPedSim.h.
|
private |
id of the journey, needed for modifying it
Definition at line 145 of file MSPModel_JuPedSim.h.
Referenced by getJourneyId().
|
private |
Definition at line 152 of file MSPModel_JuPedSim.h.
|
private |
Definition at line 142 of file MSPModel_JuPedSim.h.
|
private |
Definition at line 149 of file MSPModel_JuPedSim.h.
|
private |
Definition at line 150 of file MSPModel_JuPedSim.h.
|
private |
Definition at line 143 of file MSPModel_JuPedSim.h.
|
private |
Definition at line 146 of file MSPModel_JuPedSim.h.
Referenced by getStageId().
|
private |
whether the pedestrian is waiting to start its walk
Definition at line 154 of file MSPModel_JuPedSim.h.
Referenced by isWaitingToEnter(), and setAgentId().
|
private |
Definition at line 147 of file MSPModel_JuPedSim.h.
Referenced by advanceNextWaypoint(), and isFinished().