SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | arrival_finder |
Public Member Functions | |
virtual void | beginEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. | |
virtual void | endEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output (end of an action) | |
SUMOReal | getAngle (SUMOTime now) const |
const MSEdge & | getDestination () const |
returns the destination edge | |
const MSEdge * | getEdge () const |
Returns the current edge. | |
SUMOReal | getEdgeAngle (const MSEdge *e, SUMOReal at) const |
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 | |
const MSEdge * | getFromEdge () const |
Position | getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const |
get position on lane at length at with orthogonal offset | |
Position | getPosition (SUMOTime now) const |
SUMOReal | getSpeed () const |
the time this person spent waiting | |
std::string | getStageDescription () const |
return string representation of the current stage | |
StageType | getStageType () const |
SUMOTime | getWaitingTime (SUMOTime now) const |
the time this person spent waiting | |
virtual bool | isWaiting4Vehicle () const |
Whether the person waits for a vehicle. | |
virtual bool | isWaitingFor (const std::string &line) const |
Whether the person waits for a vehicle of the line specified. | |
bool | moveToNextEdge (MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=0) |
move forward and return whether the person arrived | |
MSPersonStage_Walking (const std::vector< const MSEdge * > &route, MSBusStop *toBS, SUMOTime walkingTime, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos) | |
constructor | |
virtual void | proceed (MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at) |
proceeds to the next step | |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. | |
void | setArrived (SUMOTime now) |
logs end of the step | |
void | setDeparted (SUMOTime now) |
logs end of the step | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. | |
~MSPersonStage_Walking () | |
destructor | |
SUMOReal | getMaxSpeed () const |
accessors to be used by MSPModel | |
SUMOReal | getDepartPos () const |
SUMOReal | getArrivalPos () const |
const MSEdge * | getRouteEdge () const |
const MSEdge * | getNextRouteEdge () const |
const std::vector< const MSEdge * > & | getRoute () const |
PedestrianState * | getPedestrianState () const |
Protected Attributes | |
SUMOTime | myArrived |
the time at which this stage ended | |
SUMOTime | myDeparted |
the time at which this stage started | |
const MSEdge & | myDestination |
the next edge to reach (either by walking or driving) | |
StageType | myType |
The type of this stage. |
Private Member Functions | |
SUMOReal | computeAverageSpeed () const |
MSPersonStage_Walking (const MSPersonStage_Walking &) | |
Invalidated copy constructor. | |
MSPersonStage_Walking & | operator= (const MSPersonStage_Walking &) |
Invalidated assignment operator. |
Private Attributes | |
SUMOReal | myArrivalPos |
MSEdge * | myCurrentInternalEdge |
The current internal edge this person is on or 0. | |
SUMOReal | myDepartPos |
A vector of computed times an edge is reached. | |
MSBusStop * | myDestinationBusStop |
PedestrianState * | myPedestrianState |
state that is to be manipulated by MSPModel | |
std::vector< const MSEdge * > | myRoute |
The route of the person. | |
std::vector< const MSEdge * > ::iterator | myRouteStep |
SUMOReal | mySpeed |
SUMOTime | myWalkingTime |
the time the person is walking |
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 194 of file MSPerson.h.
MSPerson::MSPersonStage_Walking::MSPersonStage_Walking | ( | const std::vector< const MSEdge * > & | route, |
MSBusStop * | toBS, | ||
SUMOTime | walkingTime, | ||
SUMOReal | speed, | ||
SUMOReal | departPos, | ||
SUMOReal | arrivalPos | ||
) |
constructor
Definition at line 119 of file MSPerson.cpp.
References computeAverageSpeed(), SUMOVehicleParameter::interpretEdgePos(), myArrivalPos, myDepartPos, myRoute, mySpeed, SUMO_ATTR_ARRIVALPOS, and SUMO_ATTR_DEPARTPOS.
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking | ( | ) |
destructor
Definition at line 138 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 MSPerson::MSPersonStage.
Definition at line 242 of file MSPerson.cpp.
References MSPerson::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
private |
Definition at line 212 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 MSPerson::MSPersonStage.
Definition at line 249 of file MSPerson.cpp.
References MSPerson::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Implements MSPerson::MSPersonStage.
Definition at line 171 of file MSPerson.cpp.
|
inline |
Definition at line 262 of file MSPerson.h.
References myArrivalPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 259 of file MSPerson.h.
References myDepartPos.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime().
|
inherited |
returns the destination edge
Definition at line 70 of file MSPerson.cpp.
|
virtual |
Returns the current edge.
Implements MSPerson::MSPersonStage.
Definition at line 143 of file MSPerson.cpp.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_NonInteracting::MoveToNextEdge::execute(), MSPModel_NonInteracting::PState::getAngle(), and MSPModel_NonInteracting::PState::getPosition().
Definition at line 108 of file MSPerson.cpp.
References MSEdge::getLanes(), and PositionVector::rotationDegreeAtOffset().
Referenced by MSPModel_NonInteracting::PState::getAngle().
Implements MSPerson::MSPersonStage.
Definition at line 159 of file MSPerson.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 96 of file MSPerson.cpp.
References MSEdge::getLanes().
|
virtual |
Implements MSPerson::MSPersonStage.
Definition at line 153 of file MSPerson.cpp.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 102 of file MSPerson.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
|
inline |
accessors to be used by MSPModel
Definition at line 256 of file MSPerson.h.
References mySpeed.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_NonInteracting::PState::getSpeed(), MSPModel_Striping::moveInDirection(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 269 of file MSPerson.h.
References myRoute, and myRouteStep.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), and MSPModel_Striping::getNextLane().
|
inline |
Definition at line 276 of file MSPerson.h.
References myPedestrianState.
Referenced by GUIPerson::drawGL(), and MSPModel_NonInteracting::MoveToNextEdge::execute().
Implements MSPerson::MSPersonStage.
Definition at line 165 of file MSPerson.cpp.
|
inline |
Definition at line 272 of file MSPerson.h.
References myRoute.
Referenced by MSPModel_Striping::getNextLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 266 of file MSPerson.h.
References myRouteStep.
|
virtual |
the time this person spent waiting
Implements MSPerson::MSPersonStage.
Definition at line 183 of file MSPerson.cpp.
|
inlinevirtual |
return string representation of the current stage
Implements MSPerson::MSPersonStage.
Definition at line 222 of file MSPerson.h.
|
inlineinherited |
Definition at line 104 of file MSPerson.h.
References MSPerson::MSPersonStage::myType.
the time this person spent waiting
Implements MSPerson::MSPersonStage.
Definition at line 177 of file MSPerson.cpp.
|
inlinevirtualinherited |
Whether the person waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving.
Definition at line 124 of file MSPerson.h.
|
virtualinherited |
Whether the person waits for a vehicle of the line specified.
Reimplemented in MSPerson::MSPersonStage_Driving.
Definition at line 90 of file MSPerson.cpp.
bool MSPerson::MSPersonStage_Walking::moveToNextEdge | ( | MSPerson * | person, |
SUMOTime | currentTime, | ||
MSEdge * | nextInternal = 0 |
||
) |
move forward and return whether the person arrived
Definition at line 256 of file MSPerson.cpp.
References MSPersonControl::erase(), MSPerson::getEdge(), MSNet::getInstance(), MSNet::getPersonControl(), MSPerson::proceed(), and MSPersonControl::unsetWalking().
Referenced by MSPModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSPerson::MSPersonStage.
Definition at line 189 of file MSPerson.cpp.
References MSPModel::add(), MSPersonControl::erase(), MSNet::getInstance(), MSPModel::getModel(), MSNet::getPersonControl(), MSPerson::proceed(), MSEdge::removePerson(), and MSPersonControl::setWalking().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSPerson::MSPersonStage.
Definition at line 230 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 84 of file MSPerson.cpp.
|
inherited |
logs end of the step
Definition at line 76 of file MSPerson.cpp.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSPerson::MSPersonStage.
Definition at line 224 of file MSPerson.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
friend |
Definition at line 196 of file MSPerson.h.
|
friend |
Definition at line 195 of file MSPerson.h.
|
private |
Definition at line 306 of file MSPerson.h.
Referenced by getArrivalPos(), and MSPersonStage_Walking().
|
protectedinherited |
the time at which this stage ended
Definition at line 175 of file MSPerson.h.
|
private |
The current internal edge this person is on or 0.
Definition at line 300 of file MSPerson.h.
|
protectedinherited |
the time at which this stage started
Definition at line 172 of file MSPerson.h.
|
private |
A vector of computed times an edge is reached.
Definition at line 305 of file MSPerson.h.
Referenced by getDepartPos(), and MSPersonStage_Walking().
|
protectedinherited |
the next edge to reach (either by walking or driving)
Definition at line 169 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting().
|
private |
Definition at line 307 of file MSPerson.h.
|
private |
state that is to be manipulated by MSPModel
Definition at line 311 of file MSPerson.h.
Referenced by getPedestrianState().
|
private |
The route of the person.
Definition at line 294 of file MSPerson.h.
Referenced by getNextRouteEdge(), getRoute(), and MSPersonStage_Walking().
|
private |
Definition at line 297 of file MSPerson.h.
Referenced by getNextRouteEdge(), and getRouteEdge().
|
private |
Definition at line 308 of file MSPerson.h.
Referenced by getMaxSpeed(), and MSPersonStage_Walking().
|
protectedinherited |
The type of this stage.
Definition at line 178 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage::getStageType().
|
private |
the time the person is walking
Definition at line 291 of file MSPerson.h.