![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Public Member Functions | |
virtual void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
virtual void | beginEventOutput (const MSTransportable &c, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
Stage * | clone () const |
virtual void | endEventOutput (const MSTransportable &c, 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 container. More... | |
double | getArrivalPos () const |
CState * | getContainerState () const |
SUMOTime | getDeparted () const |
get departure time of stage More... | |
double | getDepartPos () const |
const MSEdge * | getDestination () const |
returns the destination edge More... | |
MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) More... | |
double | getDistance () const |
get travel distance in this stage 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 |
Returns the offset from the start of the current edge measured in its natural direction. More... | |
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 |
Returns first edge of the containers route. More... | |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
double | getMaxSpeed () const |
accessors to be used by MSCModel_NonInteracting More... | |
const MSEdge * | getNextRouteEdge () const |
virtual const MSStoppingPlace * | getOriginStop () const |
returns the origin stop (if any). only needed for Stage_Trip More... | |
Position | getPosition (SUMOTime now) const |
Returns the position of the container. More... | |
double | getSpeed () const |
Returns the speed of the container. More... | |
std::string | getStageDescription () const |
Returns the current stage description as a string. More... | |
std::string | getStageSummary () const |
return string summary of the current stage 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 SUMOVehicle *vehicle) const |
Whether the transportable waits for the given vehicle. 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, double speed, double departPos, double 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 bool withRouteLength) const |
Called on writing vehroute output. More... | |
virtual void | setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop) |
virtual void | setSpeed (double) |
sets the walking speed (ignored in other stages) More... | |
virtual void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const |
Called on writing tripinfo output. More... | |
~MSContainerStage_Tranship () | |
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 * | 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... | |
double | 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... | |
double | 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 108 of file MSContainer.h.
MSContainer::MSContainerStage_Tranship::MSContainerStage_Tranship | ( | const std::vector< const MSEdge * > & | route, |
MSStoppingPlace * | toStop, | ||
double | speed, | ||
double | departPos, | ||
double | arrivalPos | ||
) |
constructor
Definition at line 137 of file MSContainer.cpp.
References SUMOVehicleParameter::interpretEdgePos(), myDepartPos, myRoute, and SUMO_ATTR_DEPARTPOS.
MSContainer::MSContainerStage_Tranship::~MSContainerStage_Tranship | ( | ) |
destructor
Definition at line 151 of file MSContainer.cpp.
|
private |
Invalidated copy constructor.
|
inlinevirtualinherited |
abort this stage (TraCI)
Reimplemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, and MSPerson::MSPersonStage_Walking.
Definition at line 125 of file MSTransportable.h.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject().
|
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 257 of file MSContainer.cpp.
References MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 155 of file MSContainer.cpp.
|
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 264 of file MSContainer.cpp.
References MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
Returns the angle of the container.
Implements MSTransportable::Stage.
Definition at line 201 of file MSContainer.cpp.
|
inline |
Definition at line 196 of file MSContainer.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by CState::computeTranshipTime().
|
inline |
Definition at line 204 of file MSContainer.h.
References myContainerState.
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
|
inherited |
get departure time of stage
Definition at line 109 of file MSTransportable.cpp.
|
inline |
Definition at line 192 of file MSContainer.h.
References myDepartPos.
Referenced by CState::computeTranshipTime().
|
inherited |
returns the destination edge
Definition at line 58 of file MSTransportable.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 86 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by libsumo::Person::getStage(), MSPModel_Striping::moveInDirectionOnLane(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::proceed(), MSContainer::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), MSTransportable::rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
|
virtual |
get travel distance in this stage
Implements MSTransportable::Stage.
Definition at line 222 of file MSContainer.cpp.
References STEPS2TIME.
|
virtual |
Returns the current edge.
Reimplemented from MSTransportable::Stage.
Definition at line 172 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 134 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().
|
virtual |
Returns the offset from the start of the current edge measured in its natural direction.
Reimplemented from MSTransportable::Stage.
Definition at line 191 of file MSContainer.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 124 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtual |
the edges of the current stage
Reimplemented from MSTransportable::Stage.
Definition at line 217 of file MSContainer.cpp.
|
virtual |
Returns first edge of the containers route.
Reimplemented from MSTransportable::Stage.
Definition at line 181 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 129 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 188 of file MSContainer.h.
References mySpeed.
Referenced by CState::computeTranshipTime(), CState::getPosition(), and CState::getSpeed().
|
inline |
Definition at line 200 of file MSContainer.h.
References myRoute, and myRouteStep.
|
inlinevirtualinherited |
returns the origin stop (if any). only needed for Stage_Trip
Reimplemented in MSTransportable::Stage_Trip.
Definition at line 91 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Driving::proceed().
Returns the position of the container.
Implements MSTransportable::Stage.
Definition at line 196 of file MSContainer.cpp.
|
virtual |
Returns the speed of the container.
Reimplemented from MSTransportable::Stage.
Definition at line 211 of file MSContainer.cpp.
|
inlinevirtual |
Returns the current stage description as a string.
Implements MSTransportable::Stage.
Definition at line 154 of file MSContainer.h.
|
virtual |
return string summary of the current stage
Implements MSTransportable::Stage.
Definition at line 293 of file MSContainer.cpp.
References MSTransportable::getDestination(), and Named::getID().
|
inlineinherited |
Definition at line 111 of file MSTransportable.h.
References MSTransportable::Stage::myType.
Referenced by libsumo::Person::getStage(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
const MSEdge * MSContainer::MSContainerStage_Tranship::getToEdge | ( | ) | const |
Returns last edge of the containers route.
Definition at line 186 of file MSContainer.cpp.
Referenced by CState::computeTranshipTime().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 148 of file MSTransportable.h.
Referenced by libsumo::Person::getStage().
Returns the time the container spent waiting.
Reimplemented from MSTransportable::Stage.
Definition at line 206 of file MSContainer.cpp.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 143 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for the given vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 119 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 270 of file MSContainer.cpp.
References MSTransportableControl::erase(), MSNet::getContainerControl(), MSTransportable::getEdge(), MSNet::getInstance(), and MSTransportable::proceed().
Referenced by MSCModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 160 of file MSContainer.cpp.
References MSCModel_NonInteracting::add(), MSTransportable::Stage::getEdgePos(), and MSCModel_NonInteracting::getModel().
|
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 246 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, and OutputDevice::writeAttr().
|
virtualinherited |
logs end of the step
Reimplemented in MSTransportable::Stage_Driving, and MSTransportable::Stage_Trip.
Definition at line 114 of file MSTransportable.cpp.
Referenced by MSContainer::proceed(), MSPerson::proceed(), MSTransportable::Stage_Trip::setArrived(), and MSTransportable::Stage_Driving::setArrived().
|
inherited |
logs end of the step
Definition at line 102 of file MSTransportable.cpp.
|
inherited |
Definition at line 140 of file MSTransportable.cpp.
References MSStoppingPlace::getBeginLanePosition(), and MSStoppingPlace::getEndLanePosition().
Referenced by MSTransportable::rerouteParkingArea().
|
inlinevirtualinherited |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
Definition at line 128 of file MSTransportable.h.
|
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 232 of file MSContainer.cpp.
References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
friend |
Definition at line 109 of file MSContainer.h.
|
protectedinherited |
the position at which we want to arrive
Definition at line 210 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 216 of file MSTransportable.h.
|
private |
state that is to be manipulated by MSCModel
Definition at line 222 of file MSContainer.h.
Referenced by getContainerState().
|
private |
The current internal edge this container is on or 0.
Definition at line 225 of file MSContainer.h.
|
protectedinherited |
the time at which this stage started
Definition at line 213 of file MSTransportable.h.
|
private |
the depart position
Definition at line 216 of file MSContainer.h.
Referenced by getDepartPos(), and MSContainerStage_Tranship().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 204 of file MSTransportable.h.
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 207 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().
|
private |
The route of the container.
Definition at line 210 of file MSContainer.h.
Referenced by getNextRouteEdge(), and MSContainerStage_Tranship().
|
private |
|
private |
the speed of the container
Definition at line 219 of file MSContainer.h.
Referenced by getMaxSpeed().
|
protectedinherited |
The type of this stage.
Definition at line 219 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().