![]() |
SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
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... | |
SUMOReal | getArrivalPos () const |
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 |
SUMOVehicle * | getVehicle () const |
The vehicle the person is riding or 0. More... | |
SUMOTime | getWaitingTime (SUMOTime now) const |
time spent waiting for a ride More... | |
bool | isWaiting4Vehicle () const |
Whether the person waits for a vehicle. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the person waits for a vehicle of the line specified. More... | |
MSPersonStage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, const std::vector< std::string > &lines) | |
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 | setVehicle (SUMOVehicle *v) |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
~MSPersonStage_Driving () | |
destructor More... | |
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 | |
MSPersonStage_Driving (const MSPersonStage_Driving &) | |
Invalidated copy constructor. More... | |
MSPersonStage_Driving & | operator= (const MSPersonStage_Driving &) |
Invalidated assignment operator. More... | |
Private Attributes | |
const std::set< std::string > | myLines |
the lines to choose from More... | |
Position | myStopWaitPos |
SUMOVehicle * | myVehicle |
The taken vehicle. More... | |
const MSEdge * | myWaitingEdge |
SUMOReal | myWaitingPos |
SUMOTime | myWaitingSince |
The time since which this person is waiting for a ride. More... | |
A "real" stage performing the travelling by a transport system The given route will be chosen. The travel time is computed by the simulation
Definition at line 219 of file MSPerson.h.
MSPerson::MSPersonStage_Driving::MSPersonStage_Driving | ( | const MSEdge & | destination, |
MSStoppingPlace * | toStop, | ||
const SUMOReal | arrivalPos, | ||
const std::vector< std::string > & | lines | ||
) |
constructor
Definition at line 225 of file MSPerson.cpp.
MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving | ( | ) |
destructor
Definition at line 231 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 357 of file MSPerson.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
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 363 of file MSPerson.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 272 of file MSPerson.cpp.
References MSVehicle::getAngle(), MSTransportable::Stage::getEdgeAngle(), isWaiting4Vehicle(), M_PI, myVehicle, myWaitingEdge, and myWaitingPos.
|
inlineinherited |
|
inherited |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), routeOutput(), and MSPerson::MSPersonStage_Waiting::routeOutput().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 79 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::proceed(), and proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 235 of file MSPerson.cpp.
References SUMOVehicle::getEdge(), myVehicle, and myWaitingEdge.
Referenced by beginEventOutput(), endEventOutput(), and getEdgePos().
get angle of the edge at a certain position
Definition at line 87 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), MSContainer::MSContainerStage_Driving::getAngle(), CState::getAngle(), MSContainer::MSContainerStage_Waiting::getAngle(), getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), and MSTransportable::Stage::getVehicle().
Implements MSTransportable::Stage.
Definition at line 250 of file MSPerson.cpp.
References getEdge(), MSEdge::getLength(), SUMOVehicle::getPositionOnLane(), isWaiting4Vehicle(), MIN2(), myVehicle, and myWaitingPos.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 77 of file MSTransportable.cpp.
References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().
Referenced by MSContainer::MSContainerStage_Driving::getPosition(), MSContainer::MSContainerStage_Waiting::getPosition(), getPosition(), MSPerson::MSPersonStage_Waiting::getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 244 of file MSPerson.cpp.
References myWaitingEdge, and SUMOReal.
Referenced by routeOutput().
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 82 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), PositionVector::positionAtOffset(), and SUMOReal.
Referenced by CState::computeTranshipTime(), MSTransportable::Stage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), MSPModel_Striping::PState::getPosition(), and MSTransportable::Stage::getVehicle().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 260 of file MSPerson.cpp.
References MSTransportable::Stage::getEdgePosition(), SUMOVehicle::getPosition(), Position::INVALID, isWaiting4Vehicle(), myStopWaitPos, myVehicle, myWaitingEdge, myWaitingPos, MSPModel::SIDEWALK_OFFSET, and SUMOReal.
|
virtual |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 332 of file MSPerson.cpp.
References SUMOVehicle::getSpeed(), isWaiting4Vehicle(), and myVehicle.
|
virtual |
return string representation of the current stage
Implements MSTransportable::Stage.
Definition at line 338 of file MSPerson.cpp.
References isWaiting4Vehicle(), joinToString(), and myLines.
|
inlineinherited |
|
inlinevirtual |
The vehicle the person is riding or 0.
Reimplemented from MSTransportable::Stage.
Definition at line 250 of file MSPerson.h.
References MSPerson::MSPersonStage_Walking::getSpeed(), MSPerson::MSPersonStage_Walking::getWaitingTime(), and SUMOReal.
time spent waiting for a ride
Implements MSTransportable::Stage.
Definition at line 326 of file MSPerson.cpp.
References isWaiting4Vehicle(), myWaitingSince, and SUMOReal.
|
virtual |
Whether the person waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 320 of file MSPerson.cpp.
References myVehicle.
Referenced by getAngle(), getEdgePos(), getPosition(), getSpeed(), getStageDescription(), and getWaitingTime().
|
virtual |
Whether the person waits for a vehicle of the line specified.
Reimplemented from MSTransportable::Stage.
Definition at line 314 of file MSPerson.cpp.
References myLines.
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 287 of file MSPerson.cpp.
References MSInsertionControl::add(), SUMOVehicle::addPerson(), MSEdge::addPerson(), MSPersonControl::addWaiting(), DEPART_TRIGGERED, SUMOVehicleParameter::departProcedure, MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage::getEdge(), MSLane::getEdge(), MSTransportable::Stage::getEdgePos(), MSTransportable::getID(), MSNet::getInsertionControl(), MSStoppingPlace::getLane(), SUMOVehicle::getParameter(), MSNet::getPersonControl(), MSNet::getVehicleControl(), MSVehicleControl::getWaitingVehicle(), MSStoppingPlace::getWaitPosition(), Position::INVALID, myLines, myStopWaitPos, myVehicle, myWaitingEdge, myWaitingPos, myWaitingSince, MSEdge::removePerson(), MSVehicleControl::removeWaiting(), and MSVehicleControl::unregisterOneWaitingForPerson().
|
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 350 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::getDestination(), getFromEdge(), MSTransportable::getID(), myLines, OutputDevice::openTag(), SUMO_ATTR_FROM, SUMO_ATTR_LINES, SUMO_ATTR_TO, and OutputDevice::writeAttr().
|
inherited |
logs end of the step
Definition at line 67 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrived.
Referenced by MSTransportable::Stage::getStageType(), MSPerson::proceed(), and MSContainer::proceed().
|
inherited |
logs end of the step
Definition at line 60 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::Stage::getStageType(), and MSTransportable::getVehicleType().
|
inline |
Definition at line 259 of file MSPerson.h.
References MSPerson::MSPersonStage_Walking::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSPerson::MSPersonStage_Walking::routeOutput(), and MSPerson::MSPersonStage_Walking::tripInfoOutput().
|
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 344 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::myArrived, MSTransportable::Stage::myDeparted, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
protectedinherited |
the position at which we want to arrive
Definition at line 175 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Walking::computeAverageSpeed(), MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), MSContainer::MSContainerStage_Waiting::getEdgePos(), MSPerson::MSPersonStage_Waiting::getEdgePos(), MSContainer::MSContainerStage_Waiting::getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protectedinherited |
the time at which this stage ended
Definition at line 181 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Waiting::tripInfoOutput(), tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), and MSPerson::MSPersonStage_Waiting::tripInfoOutput().
|
protectedinherited |
the time at which this stage started
Definition at line 178 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 169 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), MSTransportable::Stage::getDestination(), MSContainer::MSContainerStage_Waiting::getEdge(), MSPerson::MSPersonStage_Waiting::getEdge(), MSContainer::MSContainerStage_Waiting::getFromEdge(), MSPerson::MSPersonStage_Waiting::getFromEdge(), MSContainer::MSContainerStage_Waiting::getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 172 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
private |
the lines to choose from
Definition at line 291 of file MSPerson.h.
Referenced by getStageDescription(), isWaitingFor(), proceed(), and routeOutput().
|
private |
Definition at line 300 of file MSPerson.h.
Referenced by getPosition(), and proceed().
|
protectedinherited |
The type of this stage.
Definition at line 184 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().
|
private |
The taken vehicle.
Definition at line 294 of file MSPerson.h.
Referenced by getAngle(), getEdge(), getEdgePos(), getPosition(), getSpeed(), isWaiting4Vehicle(), and proceed().
|
private |
Definition at line 299 of file MSPerson.h.
Referenced by getAngle(), getEdge(), getFromEdge(), getPosition(), and proceed().
|
private |
Definition at line 296 of file MSPerson.h.
Referenced by getAngle(), getEdgePos(), getPosition(), and proceed().
|
private |
The time since which this person is waiting for a ride.
Definition at line 298 of file MSPerson.h.
Referenced by getWaitingTime(), and proceed().