SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Public Member Functions | |
virtual void | beginEventOutput (const MSContainer &container, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
virtual void | endEventOutput (const MSContainer &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... | |
MSContainerStop * | getDepartContainerStop () const |
returns the container stop from which the container departs More... | |
const MSEdge & | getDestination () const |
returns the destination edge 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 container 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 |
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, MSContainerStop *toCS, const std::vector< std::string > &lines) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSContainer *container, SUMOTime now, MSEdge *previousEdge, const SUMOReal at) |
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 | |
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... | |
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 | |
MSContainerStop * | myDepartContainerStop |
The container stop from which the container departs. More... | |
MSContainerStop * | myDestinationContainerStop |
The destination container stop. 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 205 of file MSContainer.h.
MSContainer::MSContainerStage_Driving::MSContainerStage_Driving | ( | const MSEdge & | destination, |
MSContainerStop * | toCS, | ||
const std::vector< std::string > & | lines | ||
) |
constructor
Definition at line 110 of file MSContainer.cpp.
MSContainer::MSContainerStage_Driving::~MSContainerStage_Driving | ( | ) |
destructor
Definition at line 116 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 MSContainer::MSContainerStage.
Definition at line 226 of file MSContainer.cpp.
References MSContainer::getEdge(), Named::getID(), MSContainer::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 MSContainer::MSContainerStage.
Definition at line 231 of file MSContainer.cpp.
References MSContainer::getEdge(), Named::getID(), MSContainer::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
the angle of the vehicle or the angle of the edge + 90deg
Implements MSContainer::MSContainerStage.
Definition at line 172 of file MSContainer.cpp.
References MSVehicle::getAngle().
|
virtual |
returns the container stop from which the container departs
Implements MSContainer::MSContainerStage.
Definition at line 210 of file MSContainer.cpp.
|
inherited |
returns the destination edge
Definition at line 68 of file MSContainer.cpp.
|
virtual |
Returns the current edge.
Implements MSContainer::MSContainerStage.
Definition at line 139 of file MSContainer.cpp.
|
inherited |
get angle of the edge at a certain position
Definition at line 100 of file MSContainer.cpp.
References MSEdge::getLanes(), and PositionVector::rotationDegreeAtOffset().
Referenced by CState::getAngle().
Implements MSContainer::MSContainerStage.
Definition at line 154 of file MSContainer.cpp.
References MSContainer::getEdge(), MSEdge::getLength(), and MIN2().
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 90 of file MSContainer.cpp.
References MSEdge::getLanes().
|
virtual |
Implements MSContainer::MSContainerStage.
Definition at line 148 of file MSContainer.cpp.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 95 of file MSContainer.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime().
returns the position of the container
Implements MSContainer::MSContainerStage.
Definition at line 163 of file MSContainer.cpp.
References MSContainer::ROADSIDE_OFFSET.
|
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 MSContainer::MSContainerStage.
Definition at line 200 of file MSContainer.cpp.
|
virtual |
returns the stage description as a string
Implements MSContainer::MSContainerStage.
Definition at line 205 of file MSContainer.cpp.
References MSContainer::isWaiting4Vehicle(), and joinToString().
|
inlineinherited |
Definition at line 108 of file MSContainer.h.
References MSContainer::MSContainerStage::myType.
time spent waiting for a ride
Implements MSContainer::MSContainerStage.
Definition at line 195 of file MSContainer.cpp.
References MSContainer::isWaiting4Vehicle().
|
virtual |
Whether the container waits for a vehicle.
Reimplemented from MSContainer::MSContainerStage.
Definition at line 190 of file MSContainer.cpp.
|
virtual |
Whether the container waits for a vehicle of the line specified.
Reimplemented from MSContainer::MSContainerStage.
Definition at line 185 of file MSContainer.cpp.
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSContainer::MSContainerStage.
Definition at line 119 of file MSContainer.cpp.
References MSInsertionControl::add(), MSEdge::addContainer(), MSContainerControl::addWaiting(), DEPART_CONTAINER_TRIGGERED, SUMOVehicleParameter::departProcedure, MSNet::getContainerControl(), MSContainer::getID(), MSNet::getInsertionControl(), SUMOVehicle::getParameter(), MSNet::getVehicleControl(), MSVehicleControl::getWaitingVehicle(), MSEdge::removeContainer(), MSVehicleControl::removeWaiting(), and MSVehicleControl::unregisterOneWaitingForContainer().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSContainer::MSContainerStage.
Definition at line 220 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSContainer::getDestination(), MSContainer::getFromEdge(), MSContainer::getID(), OutputDevice::openTag(), SUMO_ATTR_FROM, SUMO_ATTR_LINES, SUMO_ATTR_TO, and OutputDevice::writeAttr().
|
inherited |
logs end of the step
Definition at line 80 of file MSContainer.cpp.
|
inherited |
logs end of the step
Definition at line 73 of file MSContainer.cpp.
|
inline |
assign a vehicle to the container
Definition at line 252 of file MSContainer.h.
References myVehicle.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSContainer::MSContainerStage.
Definition at line 215 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
protectedinherited |
the time at which this stage ended
Definition at line 186 of file MSContainer.h.
|
private |
The container stop from which the container departs.
Definition at line 293 of file MSContainer.h.
|
protectedinherited |
the time at which this stage started
Definition at line 183 of file MSContainer.h.
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 180 of file MSContainer.h.
Referenced by MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting().
|
private |
The destination container stop.
Definition at line 290 of file MSContainer.h.
|
private |
the lines to choose from
Definition at line 284 of file MSContainer.h.
|
protectedinherited |
The type of this stage.
Definition at line 189 of file MSContainer.h.
Referenced by MSContainer::MSContainerStage::getStageType().
|
private |
|
private |
Definition at line 300 of file MSContainer.h.
|
private |
Definition at line 295 of file MSContainer.h.
|
private |
The time since which this container is waiting for a ride.
Definition at line 298 of file MSContainer.h.