SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | arrival_finder |
Public Member Functions | |
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... | |
SUMOReal | 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... | |
SUMOReal | getEdgeAngle (const MSEdge *e, SUMOReal at) const |
get angle of the edge at a certain position More... | |
SUMOReal | getEdgePos (SUMOTime now) const |
Position | getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const |
get position on edge e at length at with orthogonal offset More... | |
const MSEdge * | getFromEdge () const |
Position | getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal 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... | |
SUMOReal | 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, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos) | |
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... | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
~MSPersonStage_Walking () | |
destructor More... | |
SUMOReal | getMaxSpeed () const |
accessors to be used by MSPModel More... | |
SUMOReal | getDepartPos () const |
SUMOReal | getArrivalPos () const |
const MSEdge * | getRouteEdge () const |
const MSEdge * | getNextRouteEdge () const |
const ConstMSEdgeVector & | getRoute () const |
PedestrianState * | getPedestrianState () const |
Protected Attributes | |
SUMOReal | 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 | |
SUMOReal | 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... | |
SUMOReal | myDepartPos |
PedestrianState * | myPedestrianState |
state that is to be manipulated by MSPModel More... | |
ConstMSEdgeVector | myRoute |
The route of the person. More... | |
ConstMSEdgeVector::iterator | myRouteStep |
SUMOReal | 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, | ||
SUMOReal | speed, | ||
SUMOReal | departPos, | ||
SUMOReal | arrivalPos | ||
) |
constructor
Definition at line 60 of file MSPerson.cpp.
References computeAverageSpeed(), SUMOVehicleParameter::interpretEdgePos(), myDepartPos, myRoute, mySpeed, and SUMO_ATTR_DEPARTPOS.
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking | ( | ) |
destructor
Definition at line 78 of file MSPerson.cpp.
|
private |
Invalidated copy constructor.
|
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 180 of file MSPerson.cpp.
References MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
private |
Definition at line 150 of file MSPerson.cpp.
References STEPS2TIME, and SUMOReal.
Referenced by MSPersonStage_Walking().
|
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 187 of file MSPerson.cpp.
References MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 111 of file MSPerson.cpp.
|
inline |
Definition at line 145 of file MSPerson.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 142 of file MSPerson.h.
References myDepartPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime().
|
inherited |
returns the destination edge
Definition at line 63 of file MSTransportable.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 83 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 83 of file MSPerson.cpp.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_NonInteracting::MoveToNextEdge::execute(), MSPModel_NonInteracting::PState::getAngle(), and MSPModel_NonInteracting::PState::getPosition().
get angle of the edge at a certain position
Definition at line 96 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().
Implements MSTransportable::Stage.
Definition at line 99 of file MSPerson.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 86 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 93 of file MSPerson.cpp.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 91 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
|
inline |
accessors to be used by MSPModel
Definition at line 139 of file MSPerson.h.
References mySpeed.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_NonInteracting::PState::getSpeed(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 152 of file MSPerson.h.
References myRoute, and myRouteStep.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_NonInteracting::PState::getNextEdge(), and MSPModel_Striping::getNextLane().
|
inline |
Definition at line 159 of file MSPerson.h.
References myPedestrianState.
Referenced by GUIPerson::drawAction_drawWalkingareaPath(), MSPModel_NonInteracting::MoveToNextEdge::execute(), and MSPerson::getNextEdgePtr().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 105 of file MSPerson.cpp.
|
inline |
Definition at line 155 of file MSPerson.h.
References myRoute.
Referenced by GUIPerson::drawGLAdditional(), MSPModel_Striping::getNextLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 149 of file MSPerson.h.
References myRouteStep.
|
virtual |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 123 of file MSPerson.cpp.
|
inlinevirtual |
return string representation of the current stage
Implements MSTransportable::Stage.
Definition at line 105 of file MSPerson.h.
|
inlineinherited |
Definition at line 103 of file MSTransportable.h.
References MSTransportable::Stage::myType.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 128 of file MSTransportable.h.
the time this transportable spent waiting
Implements MSTransportable::Stage.
Definition at line 117 of file MSPerson.cpp.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 123 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 81 of file MSTransportable.cpp.
bool MSPerson::MSPersonStage_Walking::moveToNextEdge | ( | MSPerson * | person, |
SUMOTime | currentTime, | ||
MSEdge * | nextInternal = 0 |
||
) |
move forward and return whether the person arrived
Definition at line 194 of file MSPerson.cpp.
References MSTransportableControl::erase(), MSTransportable::getEdge(), MSNet::getInstance(), MSNet::getPersonControl(), and MSPerson::proceed().
Referenced by MSPModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 129 of file MSPerson.cpp.
References MSPModel::add(), MSTransportableControl::erase(), MSTransportable::Stage::getEdge(), MSTransportable::Stage::getEdgePos(), MSNet::getInstance(), MSPModel::getModel(), MSNet::getPersonControl(), 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 168 of file MSPerson.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, time2string(), and OutputDevice::writeAttr().
|
inherited |
logs end of the step
Definition at line 76 of file MSTransportable.cpp.
Referenced by MSContainer::proceed(), and MSPerson::proceed().
|
inherited |
logs end of the step
Definition at line 69 of file MSTransportable.cpp.
|
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 162 of file MSPerson.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
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 179 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getArrivalPos(), getArrivalPos(), and MSContainer::MSContainerStage_Tranship::getArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 185 of file MSTransportable.h.
|
private |
The current internal edge this person is on or 0.
Definition at line 183 of file MSPerson.h.
|
protectedinherited |
the time at which this stage started
Definition at line 182 of file MSTransportable.h.
|
private |
Definition at line 185 of file MSPerson.h.
Referenced by getDepartPos(), and MSPersonStage_Walking().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 173 of file MSTransportable.h.
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 176 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop().
|
private |
state that is to be manipulated by MSPModel
Definition at line 189 of file MSPerson.h.
Referenced by getPedestrianState().
|
private |
The route of the person.
Definition at line 177 of file MSPerson.h.
Referenced by getNextRouteEdge(), getRoute(), and MSPersonStage_Walking().
|
private |
Definition at line 180 of file MSPerson.h.
Referenced by getNextRouteEdge(), and getRouteEdge().
|
private |
Definition at line 186 of file MSPerson.h.
Referenced by getMaxSpeed(), and MSPersonStage_Walking().
|
protectedinherited |
The type of this stage.
Definition at line 188 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().
|
private |
the time the person is walking
Definition at line 174 of file MSPerson.h.