![]() |
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
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... | |
double | 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... | |
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 |
returns the stage description as a string More... | |
StageType | getStageType () const |
SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
std::string | getWaitingDescription () const |
Return where the person waits and for what. 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... | |
MSContainerStage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSTransportable *container, 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) |
marks arrival time and records driven distance More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
virtual void | setSpeed (double) |
sets the walking speed (ignored in other stages) More... | |
void | setVehicle (SUMOVehicle *v) |
virtual void | tripInfoOutput (OutputDevice &os, MSTransportable *transportable) const |
Called on writing tripinfo output. More... | |
~MSContainerStage_Driving () | |
destructor More... | |
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... | |
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... | |
double | myVehicleDistance |
std::string | myVehicleID |
cached vehicle data for output after the vehicle has been removed More... | |
std::string | myVehicleLine |
SUMOVehicleClass | myVehicleVClass |
const MSEdge * | myWaitingEdge |
double | 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 A container is in this stage if it is on a ride or if its waiting for a ride. The given route will be chosen. The travel time is computed by the simulation
Definition at line 76 of file MSContainer.h.
MSContainer::MSContainerStage_Driving::MSContainerStage_Driving | ( | const MSEdge & | destination, |
MSStoppingPlace * | toStop, | ||
const double | arrivalPos, | ||
const std::vector< std::string > & | lines | ||
) |
constructor
Definition at line 54 of file MSContainer.cpp.
MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving | ( | ) |
destructor
Definition at line 63 of file MSContainer.cpp.
|
virtualinherited |
abort this stage (TraCI)
Reimplemented from MSTransportable::Stage.
Definition at line 361 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::myVehicle.
|
virtualinherited |
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 380 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
|
virtualinherited |
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 386 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
|
virtualinherited |
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 290 of file MSTransportable.cpp.
References MSVehicle::getAngle(), MSTransportable::Stage::getEdgeAngle(), MSNet::getInstance(), MSTransportable::Stage_Driving::isWaiting4Vehicle(), MSNet::lefthand(), M_PI, MSTransportable::Stage_Driving::myVehicle, MSTransportable::Stage_Driving::myWaitingEdge, and MSTransportable::Stage_Driving::myWaitingPos.
|
inlineinherited |
Definition at line 91 of file MSTransportable.h.
References MSTransportable::Stage::getAngle(), MSTransportable::Stage::getEdge(), MSTransportable::Stage::getEdgePos(), MSTransportable::Stage::getFromEdge(), MSTransportable::Stage::getPosition(), and MSTransportable::Stage::myArrivalPos.
Referenced by MSRouteHandler::parseWalkPositions().
|
inherited |
returns the destination edge
Definition at line 60 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by MSTransportable::Stage_Waiting::getEdges(), MSTransportable::Stage_Driving::getEdges(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSTransportable::Stage_Waiting::routeOutput().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 87 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
virtualinherited |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 252 of file MSTransportable.cpp.
References MSLane::getEdge(), SUMOVehicle::getLane(), MSTransportable::Stage_Driving::myVehicle, and MSTransportable::Stage_Driving::myWaitingEdge.
Referenced by MSTransportable::Stage_Driving::beginEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), and MSTransportable::Stage_Driving::getEdgePos().
|
inherited |
get angle of the edge at a certain position
Definition at line 93 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().
|
virtualinherited |
Implements MSTransportable::Stage.
Definition at line 267 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::getEdge(), MSEdge::getLength(), SUMOVehicle::getPositionOnLane(), MSTransportable::Stage_Driving::isWaiting4Vehicle(), MIN2(), MSTransportable::Stage_Driving::myVehicle, and MSTransportable::Stage_Driving::myWaitingPos.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 83 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().
|
virtualinherited |
the edges of the current stage
Implements MSTransportable::Stage.
Definition at line 328 of file MSTransportable.cpp.
References MSTransportable::Stage::getDestination(), and MSTransportable::Stage_Driving::getFromEdge().
|
virtualinherited |
Implements MSTransportable::Stage.
Definition at line 261 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::myWaitingEdge.
Referenced by MSTransportable::Stage_Driving::getEdges(), routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 88 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().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 277 of file MSTransportable.cpp.
References MSTransportable::Stage::getEdgePosition(), MSNet::getInstance(), SUMOVehicle::getPosition(), Position::INVALID, MSTransportable::Stage_Driving::isWaiting4Vehicle(), MSTransportable::Stage_Driving::myStopWaitPos, MSTransportable::Stage_Driving::myVehicle, MSTransportable::Stage_Driving::myWaitingEdge, MSTransportable::Stage_Driving::myWaitingPos, and MSTransportable::ROADSIDE_OFFSET.
|
virtualinherited |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 322 of file MSTransportable.cpp.
References SUMOVehicle::getSpeed(), MSTransportable::Stage_Driving::isWaiting4Vehicle(), and MSTransportable::Stage_Driving::myVehicle.
|
virtual |
returns the stage description as a string
Implements MSTransportable::Stage.
Definition at line 91 of file MSContainer.cpp.
References MSTransportable::Stage_Driving::isWaiting4Vehicle(), joinToString(), and MSTransportable::Stage_Driving::myLines.
|
inlineinherited |
Definition at line 107 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 from MSTransportable::Stage.
Definition at line 331 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), MSTransportable::Stage::endEventOutput(), MSTransportable::Stage::getEdges(), MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), and MSTransportable::Stage::setArrived().
|
inherited |
Return where the person waits and for what.
Definition at line 370 of file MSTransportable.cpp.
References Named::getID(), MSTransportable::Stage_Driving::isWaiting4Vehicle(), joinToString(), MSTransportable::Stage::myDestinationStop, MSTransportable::Stage_Driving::myLines, and MSTransportable::Stage_Driving::myWaitingEdge.
Referenced by MSTransportableControl::abortWaitingForVehicle().
time spent waiting for a ride
Implements MSTransportable::Stage.
Definition at line 316 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::isWaiting4Vehicle(), and MSTransportable::Stage::myDeparted.
|
virtualinherited |
Whether the person waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 310 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::myVehicle.
Referenced by MSTransportable::Stage_Driving::getAngle(), MSTransportable::Stage_Driving::getEdgePos(), MSTransportable::Stage_Driving::getPosition(), MSTransportable::Stage_Driving::getSpeed(), getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), MSTransportable::Stage_Driving::getWaitingDescription(), and MSTransportable::Stage_Driving::getWaitingTime().
|
virtualinherited |
Whether the person waits for a vehicle of the line specified.
Reimplemented from MSTransportable::Stage.
Definition at line 304 of file MSTransportable.cpp.
References MSTransportable::Stage_Driving::myLines.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 67 of file MSContainer.cpp.
References MSInsertionControl::add(), SUMOVehicle::addContainer(), MSEdge::addContainer(), MSTransportableControl::addWaiting(), DEPART_CONTAINER_TRIGGERED, SUMOVehicleParameter::departProcedure, MSNet::getContainerControl(), MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage::getEdge(), MSLane::getEdge(), MSTransportable::Stage::getEdgePos(), MSTransportable::getID(), MSNet::getInsertionControl(), MSStoppingPlace::getLane(), SUMOVehicle::getParameter(), MSNet::getVehicleControl(), MSVehicleControl::getWaitingVehicle(), SUMOVehicle::hasDeparted(), MSTransportable::Stage_Driving::myLines, MSTransportable::Stage_Driving::myVehicle, MSTransportable::Stage_Driving::myWaitingEdge, MSTransportable::Stage_Driving::myWaitingPos, MSTransportable::Stage_Driving::myWaitingSince, MSVehicleControl::removeWaiting(), MSTransportable::Stage_Driving::setVehicle(), and MSVehicleControl::unregisterOneWaiting().
|
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 111 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::getDestination(), MSTransportable::Stage_Driving::getFromEdge(), MSTransportable::getID(), MSTransportable::Stage_Driving::myLines, OutputDevice::openTag(), SUMO_ATTR_FROM, SUMO_ATTR_LINES, SUMO_ATTR_TO, and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
|
virtualinherited |
marks arrival time and records driven distance
Reimplemented from MSTransportable::Stage.
Definition at line 336 of file MSTransportable.cpp.
References MSRoute::begin(), SUMOVehicle::getCurrentRouteEdge(), SUMOVehicle::getDepartPos(), MSRoute::getDistanceBetween(), SUMOVehicle::getPositionOnLane(), SUMOVehicle::getRoute(), MSTransportable::Stage_Driving::myVehicle, MSTransportable::Stage_Driving::myVehicleDistance, and MSTransportable::Stage::setArrived().
|
inherited |
logs end of the step
Definition at line 66 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::getVehicleType(), and MSTransportable::Stage::setSpeed().
|
inlinevirtualinherited |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
Definition at line 121 of file MSTransportable.h.
References MSTransportable::Stage::isWaitingFor(), MSTransportable::Stage::setArrived(), and MSTransportable::Stage::setDeparted().
Referenced by MSTransportable::getVehicle().
|
inherited |
Definition at line 349 of file MSTransportable.cpp.
References MSRoute::begin(), SUMOVehicle::getCurrentRouteEdge(), SUMOVehicle::getDepartPos(), MSRoute::getDistanceBetween(), SUMOVehicle::getID(), SUMOVehicle::getParameter(), SUMOVehicle::getPositionOnLane(), SUMOVehicle::getRoute(), SUMOVehicle::getVClass(), SUMOVehicleParameter::line, MSTransportable::Stage_Driving::myVehicle, MSTransportable::Stage_Driving::myVehicleDistance, MSTransportable::Stage_Driving::myVehicleID, MSTransportable::Stage_Driving::myVehicleLine, and MSTransportable::Stage_Driving::myVehicleVClass.
Referenced by proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
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 97 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::myArrivalPos, MSTransportable::Stage::myArrived, MSTransportable::Stage::myDeparted, MSTransportable::Stage_Driving::myVehicleDistance, MSTransportable::Stage_Driving::myVehicleID, MSTransportable::Stage_Driving::myWaitingSince, OutputDevice::openTag(), time2string(), toString(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Tranship::getStageDescription().
|
protectedinherited |
the position at which we want to arrive
Definition at line 192 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), MSTransportable::Stage_Waiting::getEdgePos(), MSTransportable::Stage_Waiting::getPosition(), tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
protectedinherited |
the time at which this stage ended
Definition at line 198 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), 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 195 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getWaitingTime(), MSTransportable::Stage_Driving::getWaitingTime(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::MSContainerStage_Tranship::proceed(), MSTransportable::Stage_Waiting::proceed(), MSTransportable::Stage::setDeparted(), tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 186 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 189 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage_Driving::getWaitingDescription(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSPerson::MSPersonStage_Walking::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
protectedinherited |
the lines to choose from
Definition at line 361 of file MSTransportable.h.
Referenced by getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), MSTransportable::Stage_Driving::getWaitingDescription(), MSTransportable::Stage_Driving::isWaitingFor(), proceed(), MSPerson::MSPersonStage_Driving::proceed(), routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
protectedinherited |
Definition at line 375 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getPosition(), and MSPerson::MSPersonStage_Driving::proceed().
|
protectedinherited |
The type of this stage.
Definition at line 201 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType(), MSTransportable::Stage_Waiting::routeOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().
|
protectedinherited |
The taken vehicle.
Definition at line 364 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::abort(), MSTransportable::Stage_Driving::getAngle(), MSTransportable::Stage_Driving::getEdge(), MSTransportable::Stage_Driving::getEdgePos(), MSTransportable::Stage_Driving::getPosition(), MSTransportable::Stage_Driving::getSpeed(), MSTransportable::Stage_Driving::isWaiting4Vehicle(), proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSTransportable::Stage_Driving::setArrived(), and MSTransportable::Stage_Driving::setVehicle().
|
protectedinherited |
Definition at line 369 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::setArrived(), MSTransportable::Stage_Driving::setVehicle(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
cached vehicle data for output after the vehicle has been removed
Definition at line 366 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::setVehicle(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
Definition at line 367 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::setVehicle(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
Definition at line 368 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::setVehicle(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
Definition at line 374 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getAngle(), MSTransportable::Stage_Driving::getEdge(), MSTransportable::Stage_Driving::getFromEdge(), MSTransportable::Stage_Driving::getPosition(), MSTransportable::Stage_Driving::getWaitingDescription(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
protectedinherited |
Definition at line 371 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getAngle(), MSTransportable::Stage_Driving::getEdgePos(), MSTransportable::Stage_Driving::getPosition(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
protectedinherited |
The time since which this person is waiting for a ride.
Definition at line 373 of file MSTransportable.h.
Referenced by proceed(), MSPerson::MSPersonStage_Driving::proceed(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().