Eclipse SUMO - Simulation of Urban MObility
|
implementation of callbacks to retrieve various state information from the model More...
Public Member Functions | |
virtual SUMOTime | computeDuration (const MSEdge *prev, const MSStageMoving &stage, SUMOTime currentTime) |
compute walking time on edge and update state members | |
MoveToNextEdge * | getCommand () const |
SUMOTime | getEventTime () const |
virtual const MSLane * | getLane () const |
the current lane of the transportable | |
virtual double | getPathLength () const |
return the total length of the current lane (in particular for on a walkingarea) | |
virtual bool | isFinished () const |
whether the transportable has finished walking | |
virtual bool | isJammed () const |
whether the transportable is jammed | |
virtual void | moveTo (MSPerson *p, MSLane *lane, double lanePos, double lanePosLat, SUMOTime t) |
try to move transportable to the given position | |
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 | |
PState (MoveToNextEdge *cmd, std::istringstream *in=nullptr) | |
void | saveState (std::ostringstream &out) |
Saves the current state into the given stream. | |
double | getEdgePos (SUMOTime now) const |
abstract methods inherited from PedestrianState | |
int | getDirection () const |
return the walking direction (FORWARD, BACKWARD, UNDEFINED_DIRECTION) | |
virtual Position | getPosition (const MSStageMoving &stage, SUMOTime now) const |
return the network coordinate of the transportable | |
virtual double | getAngle (const MSStageMoving &stage, SUMOTime now) const |
return the direction in which the transportable faces in degrees | |
SUMOTime | getWaitingTime () const |
return the time the transportable spent standing | |
double | getSpeed (const MSStageMoving &stage) const |
return the current speed of the transportable | |
const MSEdge * | getNextEdge (const MSStageMoving &stage) const |
return the list of internal edges if the transportable is on an intersection | |
Protected Attributes | |
MoveToNextEdge * | myCommand |
double | myCurrentBeginPos |
SUMOTime | myCurrentDuration |
double | myCurrentEndPos |
SUMOTime | myLastEntryTime |
implementation of callbacks to retrieve various state information from the model
Definition at line 106 of file MSPModel_NonInteracting.h.
MSPModel_NonInteracting::PState::PState | ( | MoveToNextEdge * | cmd, |
std::istringstream * | in = nullptr |
||
) |
Definition at line 111 of file MSPModel_NonInteracting.cpp.
References myCurrentDuration, and myLastEntryTime.
|
virtual |
compute walking time on edge and update state members
Reimplemented in MSPModel_NonInteracting::CState.
Definition at line 119 of file MSPModel_NonInteracting.cpp.
References MSPModel::BACKWARD, DELTA_T, MSPModel::FORWARD, MSStage::getArrivalPos(), MSStageMoving::getDepartPos(), MSStageMoving::getEdge(), MSEdge::getFromJunction(), MSEdge::getLength(), MSStageMoving::getMaxSpeed(), MSStageMoving::getNextRouteEdge(), MSEdge::getToJunction(), MAX2(), TIME2STEPS, and MSPModel::UNDEFINED_DIRECTION.
Referenced by MSPModel_NonInteracting::add().
|
virtual |
return the direction in which the transportable faces in degrees
Implements MSTransportableStateAdapter.
Reimplemented in MSPModel_NonInteracting::CState.
Definition at line 186 of file MSPModel_NonInteracting.cpp.
References MSStageMoving::getEdge(), MSStage::getEdgeAngle(), and M_PI.
|
inline |
Definition at line 126 of file MSPModel_NonInteracting.h.
References myCommand.
|
virtual |
return the walking direction (FORWARD, BACKWARD, UNDEFINED_DIRECTION)
Implements MSTransportableStateAdapter.
Definition at line 159 of file MSPModel_NonInteracting.cpp.
References MSPModel::BACKWARD, MSPModel::FORWARD, and MSPModel::UNDEFINED_DIRECTION.
|
virtual |
abstract methods inherited from PedestrianState
return the offset from the start of the current edge measured in its natural direction
Implements MSTransportableStateAdapter.
Definition at line 153 of file MSPModel_NonInteracting.cpp.
|
inline |
Definition at line 130 of file MSPModel_NonInteracting.h.
References myCurrentDuration, and myLastEntryTime.
Referenced by MSPModel_NonInteracting::loadState().
|
inlinevirtualinherited |
the current lane of the transportable
Reimplemented in MSPModel_InteractingState.
Definition at line 216 of file MSPModel.h.
Referenced by MSStageMoving::getLane(), MSStageWalking::loadState(), and MSPModel_Interacting::remove().
|
virtual |
return the list of internal edges if the transportable is on an intersection
Implements MSTransportableStateAdapter.
Definition at line 203 of file MSPModel_NonInteracting.cpp.
References MSStageMoving::getNextRouteEdge().
|
inlinevirtualinherited |
return the total length of the current lane (in particular for on a walkingarea)
Reimplemented in MSPModel_Striping::PState.
Definition at line 221 of file MSPModel.h.
Referenced by MSStageWalking::moveToNextEdge().
|
virtual |
return the network coordinate of the transportable
Implements MSTransportableStateAdapter.
Reimplemented in MSPModel_NonInteracting::CState.
Definition at line 169 of file MSPModel_NonInteracting.cpp.
References MSLane::allowsVehicleClass(), MSStageMoving::getEdge(), MSStage::getLanePosition(), MSEdge::getLanes(), MSGlobals::gLefthand, MSPModel::SIDEWALK_OFFSET, and SVC_PEDESTRIAN.
|
virtual |
return the current speed of the transportable
Implements MSTransportableStateAdapter.
Definition at line 197 of file MSPModel_NonInteracting.cpp.
References MSStageMoving::getMaxSpeed().
|
inlinevirtual |
return the time the transportable spent standing
Implements MSTransportableStateAdapter.
Definition at line 117 of file MSPModel_NonInteracting.h.
|
inlinevirtualinherited |
whether the transportable has finished walking
Reimplemented in MSPModel_JuPedSim::PState.
Definition at line 211 of file MSPModel.h.
Referenced by MSStageMoving::~MSStageMoving().
|
inlinevirtualinherited |
whether the transportable is jammed
Reimplemented in MSPModel_InteractingState.
Definition at line 206 of file MSPModel.h.
Referenced by MSPerson::isJammed().
|
inlinevirtualinherited |
try to move transportable to the given position
Reimplemented in MSPModel_Striping::PState.
Definition at line 180 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 190 of file MSPModel.h.
References TL, UNUSED_PARAMETER, and WRITE_WARNING.
Referenced by MSPerson::Influencer::postProcessRemoteControl().
|
virtual |
Saves the current state into the given stream.
Reimplemented from MSTransportableStateAdapter.
Definition at line 209 of file MSPModel_NonInteracting.cpp.
|
protected |
Definition at line 143 of file MSPModel_NonInteracting.h.
Referenced by getCommand().
|
protected |
Definition at line 141 of file MSPModel_NonInteracting.h.
|
protected |
Definition at line 140 of file MSPModel_NonInteracting.h.
Referenced by getEventTime(), and PState().
|
protected |
Definition at line 142 of file MSPModel_NonInteracting.h.
|
protected |
Definition at line 139 of file MSPModel_NonInteracting.h.
Referenced by getEventTime(), and PState().