|
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Public Member Functions | |
| virtual void | beginEventOutput (const MSContainer &c, SUMOTime t, OutputDevice &os) const |
| Called for writing the events output. More... | |
| virtual void | endEventOutput (const MSContainer &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 |
| MSContainerStop * | 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 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... | |
| SUMOTime | getWaitingTime (SUMOTime now) const |
| Returns the time the container spent waiting. More... | |
| virtual bool | isWaiting4Vehicle () const |
| Whether the container waits for a vehicle. More... | |
| virtual bool | isWaitingFor (const std::string &line) const |
| Whether the container waits for a vehicle of the line specified. More... | |
| bool | moveToNextEdge (MSContainer *container, SUMOTime currentTime, MSEdge *nextInternal=0) |
| move forward and return whether the container arrived More... | |
| MSContainerStage_Tranship (const std::vector< const MSEdge * > &route, MSContainerStop *toCS, SUMOReal speed, SUMOReal departPos, SUMOReal arrivalPos) | |
| 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... | |
| virtual void | tripInfoOutput (OutputDevice &os) const |
| Called on writing tripinfo output. More... | |
| ~MSContainerStage_Tranship () | |
| 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_Tranship (const MSContainerStage_Tranship &) | |
| Invalidated copy constructor. More... | |
| MSContainerStage_Tranship & | operator= (const MSContainerStage_Tranship &) |
| Invalidated assignment operator. More... | |
Private Attributes | |
| SUMOReal | myArrivalPos |
| the arrival position More... | |
| CState * | myContainerState |
| state that is to be manipulated by MSCModel More... | |
| MSEdge * | myCurrentInternalEdge |
| The current internal edge this container is on or 0. More... | |
| MSContainerStop * | myDepartContainerStop |
| The container stop from which the container departs. More... | |
| SUMOReal | myDepartPos |
| the depart position More... | |
| MSContainerStop * | myDestinationContainerStop |
| the destination container stop 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 420 of file MSContainer.h.
| MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship | ( | const std::vector< const MSEdge * > & | route, |
| MSContainerStop * | toCS, | ||
| SUMOReal | speed, | ||
| SUMOReal | departPos, | ||
| SUMOReal | arrivalPos | ||
| ) |
constructor
Definition at line 339 of file MSContainer.cpp.
References SUMOVehicleParameter::interpretEdgePos(), myArrivalPos, myDepartPos, myRoute, SUMO_ATTR_ARRIVALPOS, and SUMO_ATTR_DEPARTPOS.
| MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship | ( | ) |
destructor
Definition at line 352 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 431 of file MSContainer.cpp.
References 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 438 of file MSContainer.cpp.
References MSContainer::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
Returns the angle of the container.
Implements MSContainer::MSContainerStage.
Definition at line 397 of file MSContainer.cpp.
|
inline |
Definition at line 502 of file MSContainer.h.
References myArrivalPos.
Referenced by CState::computeTranshipTime().
|
inline |
Definition at line 510 of file MSContainer.h.
References myContainerState.
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
|
virtual |
returns the container stop from which the container departs
Implements MSContainer::MSContainerStage.
Definition at line 412 of file MSContainer.cpp.
|
inline |
Definition at line 498 of file MSContainer.h.
References myDepartPos.
Referenced by CState::computeTranshipTime().
|
inherited |
returns the destination edge
Definition at line 68 of file MSContainer.cpp.
|
virtual |
Returns the current edge.
Implements MSContainer::MSContainerStage.
Definition at line 368 of file MSContainer.cpp.
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute(), and CState::getAngle().
|
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().
Returns the offset from the start of the current edge measured in its natural direction.
Implements MSContainer::MSContainerStage.
Definition at line 387 of file MSContainer.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 90 of file MSContainer.cpp.
References MSEdge::getLanes().
|
virtual |
Returns first edge of the containers route.
Implements MSContainer::MSContainerStage.
Definition at line 377 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
|
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().
|
inline |
accessors to be used by MSCModel_NonInteracting
Definition at line 494 of file MSContainer.h.
References mySpeed.
Referenced by CState::computeTranshipTime(), CState::getPosition(), and CState::getSpeed().
|
inline |
Definition at line 506 of file MSContainer.h.
References myRoute, and myRouteStep.
Returns the position of the container.
Implements MSContainer::MSContainerStage.
Definition at line 392 of file MSContainer.cpp.
|
virtual |
Returns the speed of the container.
Implements MSContainer::MSContainerStage.
Definition at line 407 of file MSContainer.cpp.
|
inlinevirtual |
Returns the current stage description as a string.
Implements MSContainer::MSContainerStage.
Definition at line 458 of file MSContainer.h.
|
inlineinherited |
Definition at line 108 of file MSContainer.h.
References MSContainer::MSContainerStage::myType.
| const MSEdge * MSContainer::MSContainerStage_Tranship::getToEdge | ( | ) | const |
Returns last edge of the containers route.
Definition at line 382 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
Returns the time the container spent waiting.
Implements MSContainer::MSContainerStage.
Definition at line 402 of file MSContainer.cpp.
|
inlinevirtualinherited |
Whether the container waits for a vehicle.
Reimplemented in MSContainer::MSContainerStage_Driving.
Definition at line 128 of file MSContainer.h.
|
virtualinherited |
Whether the container waits for a vehicle of the line specified.
Reimplemented in MSContainer::MSContainerStage_Driving.
Definition at line 85 of file MSContainer.cpp.
| bool MSContainer::MSContainerStage_Tranship::moveToNextEdge | ( | MSContainer * | container, |
| SUMOTime | currentTime, | ||
| MSEdge * | nextInternal = 0 |
||
| ) |
move forward and return whether the container arrived
Definition at line 444 of file MSContainer.cpp.
References MSContainerControl::erase(), MSNet::getContainerControl(), MSContainer::getEdge(), MSNet::getInstance(), MSContainer::proceed(), and MSContainerControl::unsetTranship().
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSContainer::MSContainerStage.
Definition at line 356 of file MSContainer.cpp.
References MSCModel_NonInteracting::add(), MSNet::getContainerControl(), 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 MSContainer::MSContainerStage.
Definition at line 423 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 80 of file MSContainer.cpp.
|
inherited |
logs end of the step
Definition at line 73 of file MSContainer.cpp.
|
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 417 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
friend |
Definition at line 421 of file MSContainer.h.
|
private |
the arrival position
Definition at line 525 of file MSContainer.h.
Referenced by getArrivalPos(), and MSContainerStage_Tranship().
|
protectedinherited |
the time at which this stage ended
Definition at line 186 of file MSContainer.h.
|
private |
state that is to be manipulated by MSCModel
Definition at line 537 of file MSContainer.h.
Referenced by getContainerState().
|
private |
The current internal edge this container is on or 0.
Definition at line 540 of file MSContainer.h.
|
private |
The container stop from which the container departs.
Definition at line 531 of file MSContainer.h.
|
protectedinherited |
the time at which this stage started
Definition at line 183 of file MSContainer.h.
|
private |
the depart position
Definition at line 522 of file MSContainer.h.
Referenced by getDepartPos(), and MSContainerStage_Tranship().
|
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 528 of file MSContainer.h.
|
private |
The route of the container.
Definition at line 516 of file MSContainer.h.
Referenced by getNextRouteEdge(), and MSContainerStage_Tranship().
|
private |
|
private |
the speed of the container
Definition at line 534 of file MSContainer.h.
Referenced by getMaxSpeed().
|
protectedinherited |
The type of this stage.
Definition at line 189 of file MSContainer.h.
Referenced by MSContainer::MSContainerStage::getStageType().