|
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>


Public Member Functions | |
| virtual void | beginEventOutput (const MSTransportable &c, SUMOTime t, OutputDevice &os) const |
| Called for writing the events output. More... | |
| virtual void | endEventOutput (const MSTransportable &c, 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 container. More... | |
| SUMOReal | getArrivalPos () const |
| CState * | getContainerState () const |
| MSStoppingPlace * | getDepartContainerStop () const |
| returns the container stop from which the container departs More... | |
| SUMOReal | getDepartPos () 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 |
| Returns the offset from the start of the current edge measured in its natural direction. More... | |
| 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 |
| Returns first edge of the containers route. More... | |
| Position | getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const |
| get position on lane at length at with orthogonal offset More... | |
| SUMOReal | getMaxSpeed () const |
| accessors to be used by MSCModel_NonInteracting More... | |
| const MSEdge * | getNextRouteEdge () const |
| Position | getPosition (SUMOTime now) const |
| Returns the position of the container. More... | |
| SUMOReal | getSpeed () const |
| Returns the speed of the container. More... | |
| std::string | getStageDescription () const |
| Returns the current stage description as a string. More... | |
| StageType | getStageType () const |
| const MSEdge * | getToEdge () const |
| Returns last edge of the containers route. More... | |
| virtual SUMOVehicle * | getVehicle () const |
| Whether the transportable waits for a vehicle. More... | |
| SUMOTime | getWaitingTime (SUMOTime now) const |
| Returns the time the container spent waiting. More... | |
| virtual bool | isWaiting4Vehicle () const |
| Whether the transportable waits for a vehicle. More... | |
| virtual bool | isWaitingFor (const std::string &line) const |
| Whether the transportable waits for a vehicle of the line specified. More... | |
| bool | moveToNextEdge (MSTransportable *container, SUMOTime currentTime, MSEdge *nextInternal=0) |
| move forward and return whether the container arrived More... | |
| MSContainerStage_Tranship (const std::vector< const MSEdge * > &route, MSStoppingPlace *toStop, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos) | |
| 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... | |
| virtual void | tripInfoOutput (OutputDevice &os) const |
| Called on writing tripinfo output. More... | |
| ~MSContainerStage_Tranship () | |
| 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_Tranship (const MSContainerStage_Tranship &) | |
| Invalidated copy constructor. More... | |
| MSContainerStage_Tranship & | operator= (const MSContainerStage_Tranship &) |
| Invalidated assignment operator. More... | |
Private Attributes | |
| CState * | myContainerState |
| state that is to be manipulated by MSCModel More... | |
| MSEdge * | myCurrentInternalEdge |
| The current internal edge this container is on or 0. More... | |
| MSStoppingPlace * | myDepartContainerStop |
| The container stop from which the container departs. More... | |
| SUMOReal | myDepartPos |
| the depart position More... | |
| std::vector< const MSEdge * > | myRoute |
| The route of the container. More... | |
| std::vector< const MSEdge * >::iterator | myRouteStep |
| current step More... | |
| SUMOReal | mySpeed |
| the speed of the container More... | |
Friends | |
| class | MSCModel_NonInteracting |
A "real" stage performing the tranship of a container A container is in this stage if it gets transhipred between two stops that are assumed to be connected.
Definition at line 294 of file MSContainer.h.
| MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship | ( | const std::vector< const MSEdge * > & | route, |
| MSStoppingPlace * | toStop, | ||
| SUMOReal | speed, | ||
| SUMOReal | departPos, | ||
| SUMOReal | arrivalPos | ||
| ) |
constructor
Definition at line 293 of file MSContainer.cpp.
References SUMOVehicleParameter::interpretEdgePos(), myDepartPos, myRoute, and SUMO_ATTR_DEPARTPOS.
| MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship | ( | ) |
destructor
Definition at line 304 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 381 of file MSContainer.cpp.
References 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 388 of file MSContainer.cpp.
References MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Returns the angle of the container.
Implements MSTransportable::Stage.
Definition at line 347 of file MSContainer.cpp.
|
inline |
Definition at line 376 of file MSContainer.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by CState::computeTranshipTime().
|
inline |
Definition at line 384 of file MSContainer.h.
References myContainerState.
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
| MSStoppingPlace * MSContainer::MSContainerStage_Tranship::getDepartContainerStop | ( | ) | const |
returns the container stop from which the container departs
Definition at line 362 of file MSContainer.cpp.
|
inline |
Definition at line 372 of file MSContainer.h.
References myDepartPos.
Referenced by CState::computeTranshipTime().
|
inherited |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane().
|
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 MSPerson::MSPersonStage_Driving::proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 318 of file MSContainer.cpp.
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute(), and CState::getAngle().
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(), and CState::getAngle().
Returns the offset from the start of the current edge measured in its natural direction.
Implements MSTransportable::Stage.
Definition at line 337 of file MSContainer.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 77 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtual |
Returns first edge of the containers route.
Implements MSTransportable::Stage.
Definition at line 327 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 82 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
|
inline |
accessors to be used by MSCModel_NonInteracting
Definition at line 368 of file MSContainer.h.
References mySpeed.
Referenced by CState::computeTranshipTime(), CState::getPosition(), and CState::getSpeed().
|
inline |
Definition at line 380 of file MSContainer.h.
References myRoute, and myRouteStep.
Returns the position of the container.
Implements MSTransportable::Stage.
Definition at line 342 of file MSContainer.cpp.
|
virtual |
Returns the speed of the container.
Implements MSTransportable::Stage.
Definition at line 357 of file MSContainer.cpp.
|
inlinevirtual |
Returns the current stage description as a string.
Implements MSTransportable::Stage.
Definition at line 332 of file MSContainer.h.
|
inlineinherited |
Definition at line 99 of file MSTransportable.h.
References MSTransportable::Stage::myType.
| const MSEdge * MSContainer::MSContainerStage_Tranship::getToEdge | ( | ) | const |
Returns last edge of the containers route.
Definition at line 332 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 124 of file MSTransportable.h.
Returns the time the container spent waiting.
Implements MSTransportable::Stage.
Definition at line 352 of file MSContainer.cpp.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 119 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 72 of file MSTransportable.cpp.
| bool MSContainer::MSContainerStage_Tranship::moveToNextEdge | ( | MSTransportable * | container, |
| SUMOTime | currentTime, | ||
| MSEdge * | nextInternal = 0 |
||
| ) |
move forward and return whether the container arrived
Definition at line 394 of file MSContainer.cpp.
References MSContainerControl::erase(), MSNet::getContainerControl(), MSTransportable::getEdge(), MSNet::getInstance(), MSTransportable::proceed(), and MSContainerControl::unsetTranship().
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 308 of file MSContainer.cpp.
References MSCModel_NonInteracting::add(), MSNet::getContainerControl(), MSTransportable::Stage::getEdge(), MSTransportable::Stage::getEdgePos(), MSNet::getInstance(), MSCModel_NonInteracting::getModel(), MSEdge::removeContainer(), and MSContainerControl::setTranship().
|
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 373 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, and OutputDevice::writeAttr().
|
inherited |
logs end of the step
Definition at line 67 of file MSTransportable.cpp.
Referenced by MSPerson::proceed(), and MSContainer::proceed().
|
inherited |
logs end of the step
Definition at line 60 of file MSTransportable.cpp.
|
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 367 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
friend |
Definition at line 295 of file MSContainer.h.
|
protectedinherited |
the position at which we want to arrive
Definition at line 175 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), and getArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 181 of file MSTransportable.h.
|
private |
state that is to be manipulated by MSCModel
Definition at line 405 of file MSContainer.h.
Referenced by getContainerState().
|
private |
The current internal edge this container is on or 0.
Definition at line 408 of file MSContainer.h.
|
private |
The container stop from which the container departs.
Definition at line 399 of file MSContainer.h.
|
protectedinherited |
the time at which this stage started
Definition at line 178 of file MSTransportable.h.
|
private |
the depart position
Definition at line 396 of file MSContainer.h.
Referenced by getDepartPos(), and MSContainerStage_Tranship().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 169 of file MSTransportable.h.
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 172 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop().
|
private |
The route of the container.
Definition at line 390 of file MSContainer.h.
Referenced by getNextRouteEdge(), and MSContainerStage_Tranship().
|
private |
|
private |
the speed of the container
Definition at line 402 of file MSContainer.h.
Referenced by getMaxSpeed().
|
protectedinherited |
The type of this stage.
Definition at line 184 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().