![]() |
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Public Member Functions | |
virtual void | beginEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
virtual void | endEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const |
Called for writing the events output (end of an action) More... | |
SUMOReal | getAngle (SUMOTime now) const |
the angle of the vehicle or the angle of the edge + 90deg More... | |
SUMOReal | getArrivalPos () const |
MSStoppingPlace * | getDepartContainerStop () const |
returns the container stop from which the container departs 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 container More... | |
std::string | getStageDescription () const |
returns the stage description as a string 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 container waits for a vehicle. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the container waits for a vehicle of the line specified. More... | |
MSContainerStage_Driving (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal 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) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setVehicle (SUMOVehicle *v) |
assign a vehicle to the container More... | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
~MSContainerStage_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 | |
MSContainerStage_Driving (const MSContainerStage_Driving &) | |
Invalidated copy constructor. More... | |
MSContainerStage_Driving & | operator= (const MSContainerStage_Driving &) |
Invalidated assignment operator. More... | |
Private Attributes | |
MSStoppingPlace * | myDepartContainerStop |
The container stop from which the container departs. More... | |
const std::set< std::string > | myLines |
the lines to choose from More... | |
SUMOVehicle * | myVehicle |
The taken vehicle. More... | |
const MSEdge * | myWaitingEdge |
SUMOReal | myWaitingPos |
SUMOTime | myWaitingSince |
The time since which this container 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 79 of file MSContainer.h.
MSContainer::MSContainerStage_Driving::MSContainerStage_Driving | ( | const MSEdge & | destination, |
MSStoppingPlace * | toStop, | ||
const SUMOReal | arrivalPos, | ||
const std::vector< std::string > & | lines | ||
) |
constructor
Definition at line 63 of file MSContainer.cpp.
MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving | ( | ) |
destructor
Definition at line 69 of file MSContainer.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 183 of file MSContainer.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription(), MSContainer::MSContainerStage_Tranship::getStageDescription(), and setVehicle().
|
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 188 of file MSContainer.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription(), MSContainer::MSContainerStage_Tranship::getStageDescription(), and setVehicle().
the angle of the vehicle or the angle of the edge + 90deg
Implements MSTransportable::Stage.
Definition at line 129 of file MSContainer.cpp.
References MSVehicle::getAngle(), MSTransportable::Stage::getEdgeAngle(), M_PI, myVehicle, myWaitingEdge, and myWaitingPos.
|
inlineinherited |
MSStoppingPlace * MSContainer::MSContainerStage_Driving::getDepartContainerStop | ( | ) | const |
returns the container stop from which the container departs
Definition at line 167 of file MSContainer.cpp.
References myDepartContainerStop.
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription(), MSContainer::MSContainerStage_Tranship::getStageDescription(), and getVehicle().
|
inherited |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::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(), proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 96 of file MSContainer.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(), getAngle(), CState::getAngle(), MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Driving::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), and MSTransportable::Stage::getVehicle().
Implements MSTransportable::Stage.
Definition at line 111 of file MSContainer.cpp.
References getEdge(), MSEdge::getLength(), SUMOVehicle::getPositionOnLane(), 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 getPosition(), MSContainer::MSContainerStage_Waiting::getPosition(), MSPerson::MSPersonStage_Driving::getPosition(), MSPerson::MSPersonStage_Waiting::getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 105 of file MSContainer.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 120 of file MSContainer.cpp.
References SUMOVehicle::getEdge(), MSTransportable::Stage::getEdgePosition(), MSEdge::getLanes(), SUMOVehicle::getPositionOnLane(), myVehicle, myWaitingEdge, myWaitingPos, MSContainer::ROADSIDE_OFFSET, and SUMOReal.
|
virtual |
the speed of the container
If the container is still waiting for a ride zero will be returned. If the container is on a ride the speed of the corresponding vehicle will be returned.
Implements MSTransportable::Stage.
Definition at line 157 of file MSContainer.cpp.
References SUMOVehicle::getSpeed(), and myVehicle.
Referenced by getVehicle().
|
virtual |
returns the stage description as a string
Implements MSTransportable::Stage.
Definition at line 162 of file MSContainer.cpp.
References isWaiting4Vehicle(), joinToString(), and myLines.
|
inlineinherited |
|
inlinevirtual |
The vehicle the person is riding or 0.
Reimplemented from MSTransportable::Stage.
Definition at line 109 of file MSContainer.h.
References getDepartContainerStop(), getSpeed(), getWaitingTime(), isWaiting4Vehicle(), myVehicle, and SUMOReal.
time spent waiting for a ride
Implements MSTransportable::Stage.
Definition at line 152 of file MSContainer.cpp.
References isWaiting4Vehicle(), myWaitingSince, and SUMOReal.
Referenced by getVehicle().
|
virtual |
Whether the container waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 147 of file MSContainer.cpp.
References myVehicle.
Referenced by getStageDescription(), getVehicle(), and getWaitingTime().
|
virtual |
Whether the container waits for a vehicle of the line specified.
Reimplemented from MSTransportable::Stage.
Definition at line 142 of file MSContainer.cpp.
References myLines.
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 72 of file MSContainer.cpp.
References MSInsertionControl::add(), SUMOVehicle::addContainer(), MSEdge::addContainer(), MSContainerControl::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(), myLines, myVehicle, myWaitingEdge, myWaitingPos, myWaitingSince, MSEdge::removeContainer(), MSVehicleControl::removeWaiting(), and MSVehicleControl::unregisterOneWaitingForContainer().
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription().
|
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 177 of file MSContainer.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().
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription(), MSContainer::MSContainerStage_Tranship::getStageDescription(), and setVehicle().
|
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 |
assign a vehicle to the container
Definition at line 131 of file MSContainer.h.
References beginEventOutput(), endEventOutput(), myVehicle, routeOutput(), and 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 172 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::myArrived, MSTransportable::Stage::myDeparted, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Referenced by MSContainer::MSContainerStage_Waiting::getStageDescription(), MSContainer::MSContainerStage_Tranship::getStageDescription(), and setVehicle().
|
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(), tripInfoOutput(), MSContainer::MSContainerStage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), and MSPerson::MSPersonStage_Waiting::tripInfoOutput().
|
private |
The container stop from which the container departs.
Definition at line 169 of file MSContainer.h.
Referenced by getDepartContainerStop().
|
protectedinherited |
the time at which this stage started
Definition at line 178 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setDeparted(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::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 163 of file MSContainer.h.
Referenced by getStageDescription(), isWaitingFor(), proceed(), and routeOutput().
|
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 166 of file MSContainer.h.
Referenced by getAngle(), getEdge(), getEdgePos(), getPosition(), getSpeed(), getVehicle(), isWaiting4Vehicle(), proceed(), and setVehicle().
|
private |
Definition at line 176 of file MSContainer.h.
Referenced by getAngle(), getEdge(), getFromEdge(), getPosition(), and proceed().
|
private |
Definition at line 171 of file MSContainer.h.
Referenced by getAngle(), getEdgePos(), getPosition(), and proceed().
|
private |
The time since which this container is waiting for a ride.
Definition at line 174 of file MSContainer.h.
Referenced by getWaitingTime(), and proceed().