![]() |
SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | arrival_finder |
Public Member Functions | |
void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
virtual void | beginEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
virtual void | endEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output (end of an action) More... | |
double | getAngle (SUMOTime now) const |
returns the angle of the transportable More... | |
const MSEdge & | getDestination () const |
returns the destination edge More... | |
const MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) More... | |
const MSEdge * | getEdge () const |
Returns the current edge. More... | |
double | getEdgeAngle (const MSEdge *e, double at) const |
get angle of the edge at a certain position More... | |
double | getEdgePos (SUMOTime now) const |
Position | getEdgePosition (const MSEdge *e, double at, double offset) const |
get position on edge e at length at with orthogonal offset More... | |
ConstMSEdgeVector | getEdges () const |
the edges of the current stage More... | |
const MSEdge * | getFromEdge () const |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
Position | getPosition (SUMOTime now) const |
returns the position of the transportable More... | |
double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription () const |
return string representation of the current stage More... | |
StageType | getStageType () const |
virtual SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
SUMOTime | getWaitingTime (SUMOTime now) const |
the time this transportable spent waiting More... | |
virtual bool | isWaiting4Vehicle () const |
Whether the transportable waits for a vehicle. More... | |
virtual bool | isWaitingFor (const std::string &line) const |
Whether the transportable waits for a vehicle of the line specified. More... | |
bool | moveToNextEdge (MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0) |
move forward and return whether the person arrived More... | |
MSPersonStage_Walking (const ConstMSEdgeVector &route, MSStoppingPlace *toStop, SUMOTime walkingTime, double speed, double departPos, double arrivalPos, double departPosLat) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous) |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
void | setArrived (SUMOTime now) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setSpeed (double speed) |
sets the walking speed (ignored in other stages) More... | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
~MSPersonStage_Walking () | |
destructor More... | |
double | getMaxSpeed () const |
accessors to be used by MSPModel More... | |
double | getDepartPos () const |
double | getDepartPosLat () const |
double | getArrivalPos () const |
const MSEdge * | getRouteEdge () const |
const MSEdge * | getNextRouteEdge () const |
const ConstMSEdgeVector & | getRoute () const |
PedestrianState * | getPedestrianState () const |
Protected Attributes | |
double | myArrivalPos |
the position at which we want to arrive More... | |
SUMOTime | myArrived |
the time at which this stage ended More... | |
SUMOTime | myDeparted |
the time at which this stage started More... | |
const MSEdge & | myDestination |
the next edge to reach by getting transported More... | |
MSStoppingPlace *const | myDestinationStop |
the stop to reach by getting transported (if any) More... | |
StageType | myType |
The type of this stage. More... | |
Private Member Functions | |
double | computeAverageSpeed () const |
MSPersonStage_Walking (const MSPersonStage_Walking &) | |
Invalidated copy constructor. More... | |
MSPersonStage_Walking & | operator= (const MSPersonStage_Walking &) |
Invalidated assignment operator. More... | |
Private Attributes | |
MSEdge * | myCurrentInternalEdge |
The current internal edge this person is on or 0. More... | |
double | myDepartPos |
double | myDepartPosLat |
PedestrianState * | myPedestrianState |
state that is to be manipulated by MSPModel More... | |
ConstMSEdgeVector | myRoute |
The route of the person. More... | |
ConstMSEdgeVector::iterator | myRouteStep |
double | mySpeed |
SUMOTime | myWalkingTime |
the time the person is walking More... | |
Friends | |
class | GUIPerson |
class | MSPModel |
A "real" stage performing the walking to an edge The walking does not need any route as it is not simulated. Only the duration is needed
Definition at line 77 of file MSPerson.h.
MSPerson::MSPersonStage_Walking::MSPersonStage_Walking | ( | const ConstMSEdgeVector & | route, |
MSStoppingPlace * | toStop, | ||
SUMOTime | walkingTime, | ||
double | speed, | ||
double | departPos, | ||
double | arrivalPos, | ||
double | departPosLat | ||
) |
constructor
Definition at line 56 of file MSPerson.cpp.
References computeAverageSpeed(), SUMOVehicleParameter::interpretEdgePos(), myDepartPos, myRoute, mySpeed, and SUMO_ATTR_DEPARTPOS.
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking | ( | ) |
destructor
Definition at line 75 of file MSPerson.cpp.
|
private |
Invalidated copy constructor.
|
virtual |
abort this stage (TraCI)
Reimplemented from MSTransportable::Stage.
Definition at line 151 of file MSPerson.cpp.
References MSPModel::getModel(), myPedestrianState, and MSPModel::remove().
|
virtual |
Called for writing the events output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 193 of file MSPerson.cpp.
References MSTransportable::getID(), myRoute, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by getStageDescription().
|
private |
Definition at line 163 of file MSPerson.cpp.
References MSTransportable::Stage::myArrivalPos, myDepartPos, myRoute, myWalkingTime, and STEPS2TIME.
Referenced by getPedestrianState(), MSPersonStage_Walking(), and proceed().
|
virtual |
Called for writing the events output (end of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 200 of file MSPerson.cpp.
References MSTransportable::getID(), myRoute, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by getStageDescription().
|
virtual |
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 108 of file MSPerson.cpp.
References PedestrianState::getAngle(), and myPedestrianState.
|
inline |
Definition at line 160 of file MSPerson.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::PState::distToLaneEnd(), MSPModel_Striping::getNextLane(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 152 of file MSPerson.h.
References myDepartPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime().
|
inline |
Definition at line 156 of file MSPerson.h.
References myDepartPosLat.
|
inherited |
returns the destination edge
Definition at line 59 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by MSTransportable::Stage_Waiting::getEdges(), MSTransportable::Stage_Driving::getEdges(), MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 85 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 80 of file MSPerson.cpp.
References myCurrentInternalEdge, and myRouteStep.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_NonInteracting::PState::getAngle(), MSPModel_NonInteracting::PState::getPosition(), moveToNextEdge(), and MSPModel_Striping::PState::walk().
|
inherited |
get angle of the edge at a certain position
Definition at line 92 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), CState::getAngle(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage_Driving::getAngle(), and MSTransportable::Stage::getVehicle().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 96 of file MSPerson.cpp.
References PedestrianState::getEdgePos(), and myPedestrianState.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 82 of file MSTransportable.cpp.
References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().
Referenced by MSTransportable::Stage_Waiting::getPosition(), MSTransportable::Stage_Driving::getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
the edges of the current stage
Implements MSTransportable::Stage.
Definition at line 126 of file MSPerson.cpp.
References myRoute.
|
virtual |
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 87 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), MSTransportable::Stage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), MSPModel_Striping::PState::getPosition(), and MSTransportable::Stage::getVehicle().
|
inline |
accessors to be used by MSPModel
Definition at line 149 of file MSPerson.h.
References mySpeed.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_NonInteracting::PState::getSpeed(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::PState(), and MSPModel_Striping::PState::walk().
|
inline |
Definition at line 167 of file MSPerson.h.
References myRoute, and myRouteStep.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::PState::distToLaneEnd(), MSPModel_NonInteracting::PState::getNextEdge(), and MSPModel_Striping::getNextLane().
|
inline |
Definition at line 174 of file MSPerson.h.
References computeAverageSpeed(), and myPedestrianState.
Referenced by GUIPerson::drawAction_drawWalkingareaPath(), and MSPerson::getNextEdgePtr().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 102 of file MSPerson.cpp.
References PedestrianState::getPosition(), and myPedestrianState.
|
inline |
Definition at line 170 of file MSPerson.h.
References myRoute.
Referenced by GUIPerson::drawGLAdditional(), MSPModel_Striping::getNextLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 164 of file MSPerson.h.
References myRouteStep.
|
virtual |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 120 of file MSPerson.cpp.
References PedestrianState::getSpeed(), and myPedestrianState.
|
inlinevirtual |
return string representation of the current stage
Implements MSTransportable::Stage.
Definition at line 115 of file MSPerson.h.
References beginEventOutput(), endEventOutput(), moveToNextEdge(), routeOutput(), and tripInfoOutput().
|
inlineinherited |
Definition at line 105 of file MSTransportable.h.
References MSTransportable::Stage::getStageDescription(), MSTransportable::Stage::myType, and MSTransportable::Stage::proceed().
Referenced by MSTransportable::getStageType().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 136 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), MSTransportable::Stage::endEventOutput(), MSTransportable::Stage::getEdgeAngle(), MSTransportable::Stage::getEdgePosition(), MSTransportable::Stage::getEdges(), MSTransportable::Stage::getLanePosition(), MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), MSTransportable::Stage::routeOutput(), and MSTransportable::Stage::tripInfoOutput().
the time this transportable spent waiting
Implements MSTransportable::Stage.
Definition at line 114 of file MSPerson.cpp.
References PedestrianState::getWaitingTime(), and myPedestrianState.
Referenced by MSPModel_Striping::PState::getImpatience(), and MSPModel_Striping::PState::walk().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 131 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 77 of file MSTransportable.cpp.
Referenced by MSTransportable::Stage::setSpeed().
bool MSPerson::MSPersonStage_Walking::moveToNextEdge | ( | MSPerson * | person, |
SUMOTime | currentTime, | ||
MSEdge * | nextInternal = 0 |
||
) |
move forward and return whether the person arrived
Definition at line 207 of file MSPerson.cpp.
References MSStoppingPlace::addTransportable(), MSTransportableControl::erase(), getEdge(), MSNet::getInstance(), MSNet::getPersonControl(), myCurrentInternalEdge, MSTransportable::Stage::myDestinationStop, myRoute, myRouteStep, and MSPerson::proceed().
Referenced by getStageDescription(), and MSPModel_Striping::PState::moveToNextLane().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 131 of file MSPerson.cpp.
References MSPModel::add(), computeAverageSpeed(), MSTransportableControl::erase(), MSTransportable::Stage::getEdge(), MSTransportable::Stage::getEdgePos(), MSNet::getInstance(), MSPModel::getModel(), MSNet::getPersonControl(), myDepartPos, myPedestrianState, myRoute, myRouteStep, mySpeed, myWalkingTime, MSTransportable::proceed(), and MSEdge::removePerson().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 181 of file MSPerson.cpp.
References OutputDevice::closeTag(), myRoute, mySpeed, myWalkingTime, OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, time2string(), and OutputDevice::writeAttr().
Referenced by getStageDescription().
|
inherited |
logs end of the step
Definition at line 72 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrived.
Referenced by MSContainer::proceed(), MSPerson::proceed(), and MSTransportable::Stage::setSpeed().
|
inherited |
logs end of the step
Definition at line 65 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::getVehicleType(), and MSTransportable::Stage::setSpeed().
|
virtual |
sets the walking speed (ignored in other stages)
Reimplemented from MSTransportable::Stage.
Definition at line 157 of file MSPerson.cpp.
References mySpeed.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 175 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::myArrived, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by getStageDescription().
|
friend |
Definition at line 79 of file MSPerson.h.
|
friend |
Definition at line 78 of file MSPerson.h.
|
protectedinherited |
the position at which we want to arrive
Definition at line 190 of file MSTransportable.h.
Referenced by computeAverageSpeed(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage::getArrivalPos(), getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), MSTransportable::Stage_Waiting::getEdgePos(), and MSTransportable::Stage_Waiting::getPosition().
|
protectedinherited |
the time at which this stage ended
Definition at line 196 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
private |
The current internal edge this person is on or 0.
Definition at line 198 of file MSPerson.h.
Referenced by getEdge(), and moveToNextEdge().
|
protectedinherited |
the time at which this stage started
Definition at line 193 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
private |
Definition at line 200 of file MSPerson.h.
Referenced by computeAverageSpeed(), getDepartPos(), MSPersonStage_Walking(), and proceed().
|
private |
Definition at line 201 of file MSPerson.h.
Referenced by getDepartPosLat().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 184 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage::getDestination(), MSTransportable::Stage_Waiting::getEdge(), MSTransportable::Stage_Waiting::getFromEdge(), and MSTransportable::Stage_Waiting::getPosition().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 187 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
private |
state that is to be manipulated by MSPModel
Definition at line 205 of file MSPerson.h.
Referenced by abort(), getAngle(), getEdgePos(), getPedestrianState(), getPosition(), getSpeed(), getWaitingTime(), and proceed().
|
private |
The route of the person.
Definition at line 192 of file MSPerson.h.
Referenced by beginEventOutput(), computeAverageSpeed(), endEventOutput(), getEdges(), getFromEdge(), getNextRouteEdge(), getRoute(), moveToNextEdge(), MSPersonStage_Walking(), proceed(), and routeOutput().
|
private |
Definition at line 195 of file MSPerson.h.
Referenced by getEdge(), getNextRouteEdge(), getRouteEdge(), moveToNextEdge(), and proceed().
|
private |
Definition at line 202 of file MSPerson.h.
Referenced by getMaxSpeed(), MSPersonStage_Walking(), proceed(), routeOutput(), and setSpeed().
|
protectedinherited |
The type of this stage.
Definition at line 199 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType(), MSTransportable::Stage_Waiting::routeOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().
|
private |
the time the person is walking
Definition at line 189 of file MSPerson.h.
Referenced by computeAverageSpeed(), proceed(), and routeOutput().