![]() |
SUMO - Simulation of Urban MObility
|
#include <MSTransportable.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... | |
virtual std::string | getStageDescription () const =0 |
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... | |
virtual void | proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)=0 |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os) const =0 |
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) |
Stage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, const std::vector< std::string > &lines) | |
constructor More... | |
virtual void | tripInfoOutput (OutputDevice &os) const =0 |
Called on writing tripinfo output. More... | |
virtual | ~Stage_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... | |
const std::set< std::string > | myLines |
the lines to choose from More... | |
Position | myStopWaitPos |
StageType | myType |
The type of this stage. More... | |
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... | |
Private Member Functions | |
Stage_Driving & | operator= (const Stage_Driving &) |
Invalidated assignment operator. More... | |
Stage_Driving (const Stage_Driving &) | |
Invalidated copy constructor. 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 285 of file MSTransportable.h.
MSTransportable::Stage_Driving::Stage_Driving | ( | const MSEdge & | destination, |
MSStoppingPlace * | toStop, | ||
const SUMOReal | arrivalPos, | ||
const std::vector< std::string > & | lines | ||
) |
constructor
Definition at line 222 of file MSTransportable.cpp.
|
virtual |
destructor
Definition at line 228 of file MSTransportable.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 307 of file MSTransportable.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
|
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 313 of file MSTransportable.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 269 of file MSTransportable.cpp.
References MSVehicle::getAngle(), MSTransportable::Stage::getEdgeAngle(), isWaiting4Vehicle(), M_PI, myVehicle, myWaitingEdge, and myWaitingPos.
|
inlineinherited |
|
inherited |
returns the destination edge
Definition at line 63 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by 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 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 232 of file MSTransportable.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 96 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), CState::getAngle(), MSTransportable::Stage_Waiting::getAngle(), getAngle(), and MSTransportable::Stage::getVehicle().
Implements MSTransportable::Stage.
Definition at line 247 of file MSTransportable.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 86 of file MSTransportable.cpp.
References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().
Referenced by MSTransportable::Stage_Waiting::getPosition(), getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 241 of file MSTransportable.cpp.
References myWaitingEdge, and SUMOReal.
Referenced by MSContainer::MSContainerStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 91 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 257 of file MSTransportable.cpp.
References MSTransportable::Stage::getEdgePosition(), SUMOVehicle::getPosition(), Position::INVALID, isWaiting4Vehicle(), myStopWaitPos, myVehicle, myWaitingEdge, myWaitingPos, MSTransportable::ROADSIDE_OFFSET, and SUMOReal.
|
virtual |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 301 of file MSTransportable.cpp.
References SUMOVehicle::getSpeed(), isWaiting4Vehicle(), and myVehicle.
|
pure virtualinherited |
return string representation of the current stage
Implemented in MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::Stage::getStageType().
|
inlineinherited |
|
inlinevirtual |
The vehicle the person is riding or 0.
Reimplemented from MSTransportable::Stage.
Definition at line 311 of file MSTransportable.h.
References MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), and SUMOReal.
time spent waiting for a ride
Implements MSTransportable::Stage.
Definition at line 295 of file MSTransportable.cpp.
References isWaiting4Vehicle(), myWaitingSince, and SUMOReal.
|
virtual |
Whether the person waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 289 of file MSTransportable.cpp.
References myVehicle.
Referenced by getAngle(), getEdgePos(), getPosition(), getSpeed(), MSContainer::MSContainerStage_Driving::getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), and getWaitingTime().
|
virtual |
Whether the person waits for a vehicle of the line specified.
Reimplemented from MSTransportable::Stage.
Definition at line 283 of file MSTransportable.cpp.
References myLines.
|
private |
Invalidated assignment operator.
|
pure virtualinherited |
proceeds to the next step
Implemented in MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::Stage_Waiting::getStageDescription(), and MSTransportable::Stage::getStageType().
|
pure virtualinherited |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::getCurrentStage(), MSTransportable::Stage_Waiting::getStageDescription(), and MSTransportable::Stage::getVehicle().
|
inherited |
logs end of the step
Definition at line 76 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrived.
Referenced by MSTransportable::Stage::getStageType(), MSContainer::proceed(), and MSPerson::proceed().
|
inherited |
logs end of the step
Definition at line 69 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::Stage::getStageType(), and MSTransportable::getVehicleType().
|
inline |
Definition at line 320 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), and MSTransportable::Stage::endEventOutput().
|
pure virtualinherited |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::getCurrentStage(), MSTransportable::Stage_Waiting::getStageDescription(), and MSTransportable::Stage::getVehicle().
|
protectedinherited |
the position at which we want to arrive
Definition at line 179 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Walking::computeAverageSpeed(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::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 185 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the time at which this stage started
Definition at line 182 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 173 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 176 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
protected |
the lines to choose from
Definition at line 338 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Driving::getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), isWaitingFor(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSContainer::MSContainerStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
protected |
Definition at line 347 of file MSTransportable.h.
Referenced by getPosition(), and MSPerson::MSPersonStage_Driving::proceed().
|
protectedinherited |
The type of this stage.
Definition at line 188 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType(), MSTransportable::Stage_Waiting::routeOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().
|
protected |
The taken vehicle.
Definition at line 341 of file MSTransportable.h.
Referenced by getAngle(), getEdge(), getEdgePos(), getPosition(), getSpeed(), isWaiting4Vehicle(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
protected |
Definition at line 346 of file MSTransportable.h.
Referenced by getAngle(), getEdge(), getFromEdge(), getPosition(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
protected |
Definition at line 343 of file MSTransportable.h.
Referenced by getAngle(), getEdgePos(), getPosition(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
protected |
The time since which this person is waiting for a ride.
Definition at line 345 of file MSTransportable.h.
Referenced by getWaitingTime(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().