![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSTransportable.h>
Public Member Functions | |
virtual void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
virtual void | beginEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0 |
Called for writing the events output (begin of an action) More... | |
virtual Stage * | clone () const =0 |
virtual void | endEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0 |
Called for writing the events output (end of an action) More... | |
virtual double | getAngle (SUMOTime now) const =0 |
returns the angle of the transportable More... | |
double | getArrivalPos () const |
SUMOTime | getDeparted () const |
get departure time of stage More... | |
const MSEdge * | getDestination () const |
returns the destination edge More... | |
MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) More... | |
virtual double | getDistance () const =0 |
get travel distance in this stage More... | |
virtual 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... | |
virtual double | getEdgePos (SUMOTime now) const |
Position | getEdgePosition (const MSEdge *e, double at, double offset) const |
get position on edge e at length at with orthogonal offset More... | |
virtual ConstMSEdgeVector | getEdges () const |
the edges of the current stage More... | |
virtual const MSEdge * | getFromEdge () const |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
virtual const MSStoppingPlace * | getOriginStop () const |
returns the origin stop (if any). only needed for Stage_Trip More... | |
virtual Position | getPosition (SUMOTime now) const =0 |
returns the position of the transportable More... | |
virtual double | getSpeed () const |
the speed of the transportable More... | |
virtual std::string | getStageDescription () const =0 |
return (brief) string representation of the current stage More... | |
virtual std::string | getStageSummary () const =0 |
return string summary of the current stage More... | |
StageType | getStageType () const |
virtual SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
virtual SUMOTime | getWaitingTime (SUMOTime now) const |
the time this transportable 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... | |
virtual void | proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous)=0 |
proceeds to this stage More... | |
virtual void | routeOutput (OutputDevice &os, const bool withRouteLength) const =0 |
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... | |
Stage (const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, StageType type) | |
constructor More... | |
virtual void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const =0 |
Called on writing tripinfo output. More... | |
virtual | ~Stage () |
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 | |
Stage & | operator= (const Stage &) |
Invalidated assignment operator. More... | |
Stage (const Stage &) | |
Invalidated copy constructor. More... | |
The "abstract" class for a single stage of a movement Contains the destination of the current movement step
Definition at line 73 of file MSTransportable.h.
MSTransportable::Stage::Stage | ( | const MSEdge * | destination, |
MSStoppingPlace * | toStop, | ||
const double | arrivalPos, | ||
StageType | type | ||
) |
constructor
Definition at line 51 of file MSTransportable.cpp.
|
virtual |
destructor
Definition at line 54 of file MSTransportable.cpp.
|
private |
Invalidated copy constructor.
|
inlinevirtual |
abort this stage (TraCI)
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, and MSTransportable::Stage_Waiting.
Definition at line 124 of file MSTransportable.h.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject().
|
pure virtual |
Called for writing the events output (begin of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Access.
|
pure virtual |
|
pure virtual |
Called for writing the events output (end of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Access.
|
pure virtual |
returns the angle of the transportable
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, and MSContainer::MSContainerStage_Tranship.
|
inline |
Definition at line 94 of file MSTransportable.h.
References myArrivalPos.
Referenced by libsumo::Person::getStage(), GUIPerson::getStageArrivalPos(), MSRouteHandler::parseWalkPositions(), MSTransportable::rerouteParkingArea(), libsumo::Person::rerouteTraveltime(), and MSTransportable::Stage_Trip::setArrived().
SUMOTime MSTransportable::Stage::getDeparted | ( | ) | const |
get departure time of stage
Definition at line 108 of file MSTransportable.cpp.
const MSEdge * MSTransportable::Stage::getDestination | ( | ) | const |
returns the destination edge
Definition at line 57 of file MSTransportable.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inline |
returns the destination stop (if any)
Definition at line 85 of file MSTransportable.h.
References myDestinationStop.
Referenced by libsumo::Person::getStage(), MSPModel_Striping::moveInDirectionOnLane(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSContainer::proceed(), MSPerson::proceed(), MSTransportable::rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
|
pure virtual |
get travel distance in this stage
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, and MSContainer::MSContainerStage_Tranship.
Referenced by libsumo::Person::getStage().
|
virtual |
Returns the current edge.
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Trip, and MSContainer::MSContainerStage_Tranship.
Definition at line 63 of file MSTransportable.cpp.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Walking::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSTransportable::Stage_Waiting::proceed(), MSContainer::proceed(), MSPerson::proceed(), and MSTransportable::Stage_Trip::setArrived().
double MSTransportable::Stage::getEdgeAngle | ( | const MSEdge * | e, |
double | at | ||
) | const |
get angle of the edge at a certain position
Definition at line 133 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by CState::getAngle(), and MSPModel_NonInteracting::PState::getAngle().
|
virtual |
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Trip, and MSContainer::MSContainerStage_Tranship.
Definition at line 75 of file MSTransportable.cpp.
Referenced by MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSContainer::MSContainerStage_Tranship::proceed(), MSPerson::MSPersonStage_Walking::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
Position MSTransportable::Stage::getEdgePosition | ( | const MSEdge * | e, |
double | at, | ||
double | offset | ||
) | const |
get position on edge e at length at with orthogonal offset
Definition at line 123 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtual |
the edges of the current stage
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, and MSContainer::MSContainerStage_Tranship.
Definition at line 93 of file MSTransportable.cpp.
References MSTransportable::getDestination().
Referenced by libsumo::Person::getStage(), and libsumo::Person::rerouteTraveltime().
|
virtual |
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, and MSContainer::MSContainerStage_Tranship.
Definition at line 69 of file MSTransportable.cpp.
Referenced by MSTransportable::rerouteParkingArea().
Position MSTransportable::Stage::getLanePosition | ( | const MSLane * | lane, |
double | at, | ||
double | offset | ||
) | const |
get position on lane at length at with orthogonal offset
Definition at line 128 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().
|
inlinevirtual |
returns the origin stop (if any). only needed for Stage_Trip
Reimplemented in MSTransportable::Stage_Trip.
Definition at line 90 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Driving::proceed().
returns the position of the transportable
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, and MSContainer::MSContainerStage_Tranship.
|
virtual |
the speed of the transportable
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, and MSContainer::MSContainerStage_Tranship.
Definition at line 87 of file MSTransportable.cpp.
|
pure virtual |
return (brief) string representation of the current stage
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSContainer::MSContainerStage_Driving.
Referenced by libsumo::Person::getStage().
|
pure virtual |
return string summary of the current stage
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSContainer::MSContainerStage_Driving.
|
inline |
Definition at line 110 of file MSTransportable.h.
References myType.
Referenced by libsumo::Person::getStage(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 147 of file MSTransportable.h.
Referenced by libsumo::Person::getStage().
the time this transportable spent waiting
Reimplemented in MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, and MSContainer::MSContainerStage_Tranship.
Definition at line 81 of file MSTransportable.cpp.
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 142 of file MSTransportable.h.
|
virtual |
Whether the transportable waits for the given vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 118 of file MSTransportable.cpp.
|
pure virtual |
|
pure virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
[in] | withRouteLength | whether route length shall be written |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Driving, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Access.
|
virtual |
logs end of the step
Reimplemented in MSTransportable::Stage_Driving, and MSTransportable::Stage_Trip.
Definition at line 113 of file MSTransportable.cpp.
Referenced by MSContainer::proceed(), MSPerson::proceed(), MSTransportable::Stage_Trip::setArrived(), and MSTransportable::Stage_Driving::setArrived().
void MSTransportable::Stage::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 101 of file MSTransportable.cpp.
void MSTransportable::Stage::setDestination | ( | const MSEdge * | newDestination, |
MSStoppingPlace * | newDestStop | ||
) |
Definition at line 139 of file MSTransportable.cpp.
References MSStoppingPlace::getBeginLanePosition(), and MSStoppingPlace::getEndLanePosition().
Referenced by MSTransportable::rerouteParkingArea().
|
inlinevirtual |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
Definition at line 127 of file MSTransportable.h.
|
pure virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSPerson::MSPersonStage_Walking, MSTransportable::Stage_Waiting, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSContainer::MSContainerStage_Driving.
|
protected |
the position at which we want to arrive
Definition at line 209 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Tranship::getArrivalPos(), getArrivalPos(), and MSPerson::MSPersonStage_Walking::getArrivalPos().
|
protected |
the time at which this stage ended
Definition at line 215 of file MSTransportable.h.
|
protected |
the time at which this stage started
Definition at line 212 of file MSTransportable.h.
|
protected |
the next edge to reach by getting transported
Definition at line 203 of file MSTransportable.h.
|
protected |
the stop to reach by getting transported (if any)
Definition at line 206 of file MSTransportable.h.
Referenced by getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().
|
protected |
The type of this stage.
Definition at line 218 of file MSTransportable.h.
Referenced by getStageType().