![]() |
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 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 |
const MSEdge * | getDestination () const |
returns the destination edge More... | |
MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) 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 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 std::string &line) const |
Whether the transportable waits for a vehicle of the line specified. 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... | |
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 72 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 MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, and MSPerson::MSPersonStage_Walking.
Definition at line 118 of file MSTransportable.h.
|
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 MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Referenced by MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), MSTransportable::Stage_Driving::getVehicle(), and MSTransportable::Stage_Trip::setOrigin().
|
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 MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Referenced by MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), MSTransportable::Stage_Driving::getVehicle(), and MSTransportable::Stage_Trip::setOrigin().
|
pure virtual |
returns the angle of the transportable
Implemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), and MSTransportable::getFromEdge().
|
inline |
Definition at line 88 of file MSTransportable.h.
References getAngle(), getEdge(), getEdgePos(), getFromEdge(), getPosition(), and myArrivalPos.
Referenced by MSRouteHandler::parseWalkPositions(), libsumo::Person::rerouteTraveltime(), and MSTransportable::Stage_Trip::setArrived().
const MSEdge * MSTransportable::Stage::getDestination | ( | ) | const |
returns the destination edge
Definition at line 57 of file MSTransportable.cpp.
References myDestination.
Referenced by getEdges(), MSTransportable::Stage_Driving::getEdges(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSPerson::proceed(), MSTransportable::rerouteParkingArea(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSTransportable::Stage_Waiting::routeOutput().
|
inline |
returns the destination stop (if any)
Definition at line 84 of file MSTransportable.h.
References myDestinationStop.
Referenced by MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Access::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), MSTransportable::Stage_Trip::setArrived(), and MSPerson::MSPersonStage_Access::tripInfoOutput().
|
virtual |
Returns the current edge.
Reimplemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 63 of file MSTransportable.cpp.
References myDestination.
Referenced by MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), getArrivalPos(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), MSTransportable::Stage_Waiting::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 128 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), CState::getAngle(), MSTransportable::Stage_Waiting::getAngle(), MSTransportable::Stage_Driving::getAngle(), and getVehicle().
|
virtual |
Reimplemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 75 of file MSTransportable.cpp.
References myArrivalPos.
Referenced by getArrivalPos(), MSTransportable::getFromEdge(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::MSContainerStage_Tranship::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 118 of file MSTransportable.cpp.
References getLanePosition(), and MSEdge::getLanes().
Referenced by MSTransportable::Stage_Waiting::getPosition(), MSTransportable::Stage_Driving::getPosition(), and getVehicle().
|
virtual |
the edges of the current stage
Reimplemented in MSTransportable::Stage_Driving, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 93 of file MSTransportable.cpp.
References getDestination().
Referenced by MSTransportable::getEdges(), getVehicle(), MSTransportable::Stage_Driving::getVehicle(), and libsumo::Person::rerouteTraveltime().
|
virtual |
Reimplemented in MSTransportable::Stage_Driving, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 69 of file MSTransportable.cpp.
References myDestination.
Referenced by getArrivalPos().
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 123 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), MSPModel_Striping::PState::getPosition(), and getVehicle().
returns the position of the transportable
Implemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), and MSTransportable::getFromEdge().
|
virtual |
the speed of the transportable
Reimplemented in MSTransportable::Stage_Driving, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 87 of file MSTransportable.cpp.
Referenced by MSTransportable::getFromEdge(), getVehicle(), and MSTransportable::Stage_Driving::getVehicle().
|
pure virtual |
return (brief) string representation of the current stage
Implemented in MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by getStageType().
|
pure virtual |
return string summary of the current stage
Implemented in MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::Stage_Trip::getStageDescription(), MSTransportable::Stage_Waiting::getStageDescription(), getStageType(), and MSTransportable::getStageType().
|
inline |
Definition at line 104 of file MSTransportable.h.
References getStageDescription(), getStageSummary(), myType, and proceed().
Referenced by MSTransportable::getStageType(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 138 of file MSTransportable.h.
References beginEventOutput(), endEventOutput(), getEdgeAngle(), getEdgePosition(), getEdges(), getLanePosition(), getSpeed(), getWaitingTime(), routeOutput(), and tripInfoOutput().
the time this transportable spent waiting
Reimplemented in MSTransportable::Stage_Driving, MSTransportable::Stage_Waiting, MSContainer::MSContainerStage_Tranship, and MSPerson::MSPersonStage_Walking.
Definition at line 81 of file MSTransportable.cpp.
Referenced by getVehicle(), and MSTransportable::Stage_Driving::getVehicle().
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 133 of file MSTransportable.h.
|
virtual |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 113 of file MSTransportable.cpp.
Referenced by setSpeed().
|
pure virtual |
proceeds to this stage
Implemented in MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSTransportable::Stage_Trip, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::Stage_Waiting::getStageDescription(), getStageType(), and MSTransportable::Stage_Trip::setOrigin().
|
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 MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::getEdges(), MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), and MSTransportable::Stage_Trip::setOrigin().
|
virtual |
logs end of the step
Reimplemented in MSTransportable::Stage_Driving, and MSTransportable::Stage_Trip.
Definition at line 108 of file MSTransportable.cpp.
References myArrived.
Referenced by MSTransportable::Stage_Trip::getStageDescription(), MSTransportable::Stage_Driving::getVehicle(), MSContainer::proceed(), MSPerson::proceed(), MSTransportable::Stage_Trip::setArrived(), MSTransportable::Stage_Driving::setArrived(), and setSpeed().
void MSTransportable::Stage::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 101 of file MSTransportable.cpp.
References myDeparted.
Referenced by MSTransportable::getVehicleType(), and setSpeed().
|
inlinevirtual |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
Definition at line 121 of file MSTransportable.h.
References isWaitingFor(), setArrived(), and setDeparted().
Referenced by MSTransportable::getVehicle().
|
pure virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSTransportable::Stage_Waiting, MSPerson::MSPersonStage_Access, MSPerson::MSPersonStage_Driving, MSTransportable::Stage_Trip, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by MSTransportable::getEdges(), MSTransportable::Stage_Waiting::getStageDescription(), getVehicle(), and MSTransportable::Stage_Trip::setOrigin().
|
protected |
the position at which we want to arrive
Definition at line 193 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getAngle(), getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), getEdgePos(), MSTransportable::Stage_Waiting::getPosition(), MSTransportable::Stage_Trip::setArrived(), MSTransportable::Stage_Driving::setArrived(), MSTransportable::Stage_Driving::setDestination(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSTransportable::Stage_Waiting::tripInfoOutput(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
protected |
the time at which this stage ended
Definition at line 199 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Tranship::routeOutput(), setArrived(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Access::tripInfoOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().
|
protected |
the time at which this stage started
Definition at line 196 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Access::getPosition(), MSTransportable::Stage_Waiting::getWaitingTime(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::MSContainerStage_Tranship::proceed(), MSPerson::MSPersonStage_Access::proceed(), MSTransportable::Stage_Waiting::proceed(), MSContainer::MSContainerStage_Tranship::routeOutput(), setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Access::tripInfoOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().
|
protected |
the next edge to reach by getting transported
Definition at line 187 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getAngle(), getDestination(), getEdge(), getFromEdge(), MSTransportable::Stage_Waiting::getPosition(), MSTransportable::Stage_Trip::setArrived(), and MSTransportable::Stage_Driving::setDestination().
|
protected |
the stop to reach by getting transported (if any)
Definition at line 190 of file MSTransportable.h.
Referenced by getDestinationStop(), MSTransportable::Stage_Driving::getWaitingDescription(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSPerson::MSPersonStage_Access::MSPersonStage_Access(), MSPerson::MSPersonStage_Access::proceed(), MSPerson::MSPersonStage_Walking::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSTransportable::Stage_Trip::setArrived(), and MSTransportable::Stage_Driving::setDestination().
|
protected |
The type of this stage.
Definition at line 202 of file MSTransportable.h.
Referenced by getStageType(), MSTransportable::Stage_Waiting::routeOutput(), and MSTransportable::Stage_Waiting::tripInfoOutput().