![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSStage.h>
Public Member Functions | |
virtual void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
MSStage * | clone () const |
double | getAngle (SUMOTime now) const |
returns the angle of the transportable More... | |
virtual double | getArrivalPos () const |
SUMOTime | getArrived () const |
get arrival time of stage More... | |
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... | |
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 |
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 |
const std::string & | getGroup () const |
return the id of the group of transportables traveling together More... | |
virtual const MSLane * | getLane () const |
Returns the current lane (if applicable) More... | |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
MSStoppingPlace * | getOriginStop () const |
returns the origin stop (if any). only needed for MSStageTrip More... | |
Position | getPosition (SUMOTime now) const |
returns the position of the transportable More... | |
virtual double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription (const bool isPerson) const |
return (brief) string representation of the current stage More... | |
std::string | getStageSummary (const bool isPerson) const |
return string summary of the current stage More... | |
MSStageType | 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 | loadState (MSTransportable *transportable, std::istringstream &state) |
Reconstructs the current state, standard implementation does nothing. More... | |
MSStageTrip (const MSEdge *origin, MSStoppingPlace *fromStop, const MSEdge *destination, MSStoppingPlace *toStop, const SUMOTime duration, const SVCPermissions modeSet, const std::string &vTypes, const double speed, const double walkFactor, const std::string &group, const double departPosLat, const bool hasArrivalPos, const double arrivalPos) | |
constructor More... | |
void | proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous) |
proceeds to the next step More... | |
void | routeOutput (const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const |
Called on writing vehroute output. More... | |
virtual void | saveState (std::ostringstream &out) |
Saves the current state into the given stream, standard implementation does nothing. More... | |
void | setArrivalPos (double arrivalPos) |
const std::string | setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop) |
void | setOrigin (const MSEdge *origin) |
change origin for parking area rerouting More... | |
virtual void | setSpeed (double) |
sets the walking speed (ignored in other stages) More... | |
void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const |
Called on writing tripinfo output. More... | |
virtual | ~MSStageTrip () |
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... | |
MSStageType | myType |
The type of this stage. More... | |
Static Protected Attributes | |
static const double | ROADSIDE_OFFSET |
the offset for computing positions when standing at an edge More... | |
Private Member Functions | |
MSStageTrip (const MSStageTrip &) | |
Invalidated copy constructor. More... | |
MSStageTrip & | operator= (const MSStageTrip &) |
Invalidated assignment operator. More... | |
Private Attributes | |
double | myDepartPos |
The depart position. More... | |
const double | myDepartPosLat |
The lateral depart position. More... | |
SUMOTime | myDuration |
the time the trip should take (applies to only walking) More... | |
std::string | myGroup |
The group for this personTrip. More... | |
const bool | myHaveArrivalPos |
whether an arrivalPos was in the input More... | |
const SVCPermissions | myModeSet |
The allowed modes of transportation. More... | |
const MSEdge * | myOrigin |
the origin edge More... | |
MSStoppingPlace * | myOriginStop |
the origin edge More... | |
const double | mySpeed |
The walking speed. More... | |
const std::string | myVTypes |
The possible vehicles to use. More... | |
const double | myWalkFactor |
The factor to apply to walking durations. More... | |
A "placeholder" stage storing routing info which will result in real stages when routed
MSStageTrip::MSStageTrip | ( | const MSEdge * | origin, |
MSStoppingPlace * | fromStop, | ||
const MSEdge * | destination, | ||
MSStoppingPlace * | toStop, | ||
const SUMOTime | duration, | ||
const SVCPermissions | modeSet, | ||
const std::string & | vTypes, | ||
const double | speed, | ||
const double | walkFactor, | ||
const std::string & | group, | ||
const double | departPosLat, | ||
const bool | hasArrivalPos, | ||
const double | arrivalPos | ||
) |
constructor
Definition at line 172 of file MSStage.cpp.
References TRIP.
Referenced by clone().
|
virtual |
destructor
Definition at line 192 of file MSStage.cpp.
|
private |
Invalidated copy constructor.
|
inlinevirtualinherited |
abort this stage (TraCI)
Reimplemented in MSStageDriving, MSStageWaiting, and MSPerson::MSPersonStage_Walking.
Definition at line 133 of file MSStage.h.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject().
|
virtual |
Implements MSStage.
Definition at line 195 of file MSStage.cpp.
References MSStageTrip(), MSStage::myArrivalPos, myDepartPosLat, MSStage::myDestination, MSStage::myDestinationStop, myDuration, myGroup, myHaveArrivalPos, myModeSet, myOrigin, myOriginStop, mySpeed, myVTypes, and myWalkFactor.
|
virtual |
returns the angle of the transportable
Implements MSStage.
Definition at line 210 of file MSStage.cpp.
References MSStage::getEdgeAngle(), MSGlobals::gLefthand, M_PI, myDepartPos, and myOrigin.
|
inlinevirtualinherited |
Reimplemented in MSStageTranship, MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 89 of file MSStage.h.
References MSStage::myArrivalPos.
Referenced by MSPModel_NonInteracting::PState::computeDuration(), MSPModel_NonInteracting::CState::computeDuration(), MSPModel_Striping::getNextLane(), LIBSUMO_NAMESPACE::Person::getStage(), GUIPerson::getStageArrivalPos(), MSPModel_Striping::moveInDirectionOnLane(), LIBSUMO_NAMESPACE::Person::moveToXY(), MSRouteHandler::parseWalkPositions(), MSPModel_Striping::PState::PState(), MSTransportable::rerouteParkingArea(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), MSStageWaiting::routeOutput(), and setArrived().
|
inherited |
get arrival time of stage
Definition at line 126 of file MSStage.cpp.
References MSStage::myArrived.
Referenced by LIBSUMO_NAMESPACE::Person::getStage().
|
inherited |
get departure time of stage
Definition at line 121 of file MSStage.cpp.
References MSStage::myDeparted.
Referenced by LIBSUMO_NAMESPACE::Person::getStage().
|
inherited |
returns the destination edge
Definition at line 70 of file MSStage.cpp.
References MSStage::myDestination.
Referenced by MSPerson::checkAccess(), MSStageDriving::getArrivalPos(), MSStage::getEdges(), MSStageDriving::getEdges(), getStageSummary(), MSStageWaiting::getStageSummary(), MSStageDriving::getStageSummary(), MSStageTranship::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), MSStageWaiting::routeOutput(), MSStageDriving::routeOutput(), and setArrived().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 80 of file MSStage.h.
References MSStage::myDestinationStop.
Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::getStageSummary(), MSStageTranship::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSRouteHandler::parseWalkPositions(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), and setArrived().
|
inlinevirtual |
|
virtual |
Returns the current edge.
Reimplemented from MSStage.
Definition at line 217 of file MSStage.cpp.
References myOrigin.
|
inherited |
get angle of the edge at a certain position
Definition at line 153 of file MSStage.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), MSPModel_NonInteracting::CState::getAngle(), getAngle(), MSStageWaiting::getAngle(), and MSStageDriving::getAngle().
|
virtual |
get position on edge e at length at with orthogonal offset
Definition at line 142 of file MSStage.cpp.
References MSStage::getLanePosition(), and MSEdge::getLanes().
Referenced by getPosition(), MSStageWaiting::getPosition(), and MSStageDriving::getPosition().
|
virtualinherited |
the edges of the current stage
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 106 of file MSStage.cpp.
References MSStage::getDestination().
Referenced by LIBSUMO_NAMESPACE::Person::getStage(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), and setArrived().
|
virtualinherited |
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 82 of file MSStage.cpp.
References MSStage::myDestination.
Referenced by MSTransportable::rerouteParkingArea().
|
inlineinherited |
return the id of the group of transportables traveling together
Definition at line 119 of file MSStage.h.
References MSStage::myGroup.
|
inlinevirtualinherited |
Returns the current lane (if applicable)
Reimplemented in MSStageMoving.
get position on lane at length at with orthogonal offset
Definition at line 147 of file MSStage.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by MSPModel_NonInteracting::CState::computeDuration(), MSStage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
|
inlinevirtual |
returns the origin stop (if any). only needed for MSStageTrip
Reimplemented from MSStage.
Definition at line 271 of file MSStage.h.
References myOriginStop.
returns the position of the transportable
Implements MSStage.
Definition at line 203 of file MSStage.cpp.
References MSStage::getEdgePosition(), MSGlobals::gLefthand, myDepartPos, myOrigin, and MSStage::ROADSIDE_OFFSET.
|
virtualinherited |
the speed of the transportable
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 100 of file MSStage.cpp.
|
inlinevirtual |
return (brief) string representation of the current stage
Implements MSStage.
Definition at line 286 of file MSStage.h.
References UNUSED_PARAMETER.
|
virtual |
return string summary of the current stage
Implements MSStage.
Definition at line 399 of file MSStage.cpp.
References MSStage::getDestination(), Named::getID(), and myOrigin.
|
inlineinherited |
Definition at line 114 of file MSStage.h.
References MSStage::myType.
Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), and MSStageDriving::routeOutput().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSStageDriving.
the time this transportable spent waiting
Reimplemented in MSStageDriving, MSStageMoving, and MSStageWaiting.
Definition at line 94 of file MSStage.cpp.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSStageDriving.
|
virtualinherited |
Whether the transportable waits for the given vehicle.
Reimplemented in MSStageDriving.
Definition at line 137 of file MSStage.cpp.
|
inlinevirtualinherited |
Reconstructs the current state, standard implementation does nothing.
Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 211 of file MSStage.h.
References UNUSED_PARAMETER.
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSStage.
Definition at line 392 of file MSStage.cpp.
References MSTransportable::proceed().
|
inlinevirtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSStage.
Definition at line 319 of file MSStage.h.
References UNUSED_PARAMETER.
|
inlinevirtualinherited |
Saves the current state into the given stream, standard implementation does nothing.
Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 205 of file MSStage.h.
References UNUSED_PARAMETER.
|
inlineinherited |
Definition at line 93 of file MSStage.h.
References MSStage::myArrivalPos.
Referenced by setArrived().
|
virtual |
logs end of the step
Reimplemented from MSStage.
Definition at line 229 of file MSStage.cpp.
References MSVehicleControl::addVehicle(), MSTransportable::appendStage(), MSVehicleControl::buildVehicle(), IntermodalRouter< E, L, N, V >::compute(), DEFAULT_BIKETYPE_ID, DEFAULT_TAXITYPE_ID, MSVehicleControl::deleteVehicle(), SUMOVehicleParameter::depart, DEPART_TRIGGERED, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, MSGlobals::gCheckRoutes, MSStoppingPlace::getAccessPos(), MSStage::getArrivalPos(), MSNet::getCurrentTimeStep(), MSStage::getDestination(), MSStage::getDestinationStop(), MSStage::getEdges(), MSEdge::getFromJunction(), MSVehicleType::getID(), Named::getID(), MSNet::getInstance(), MSNet::getIntermodalRouter(), MSEdge::getLength(), MSTransportable::getMaxSpeed(), MSTransportable::getNextStage(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::getParameter(), MSEdge::getPermissions(), MSEdge::getPredecessors(), MSNet::getStoppingPlace(), MSEdge::getSuccessors(), MSEdge::getToJunction(), MSVehicleType::getVehicleClass(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), GIVEN, StringTokenizer::hasNext(), MSEdge::isTazConnector(), MAX2(), MIN2(), MSStage::myArrivalPos, myDepartPos, myDepartPosLat, MSStage::myDestination, MSStage::myDestinationStop, myDuration, myGroup, myHaveArrivalPos, myModeSet, myOrigin, mySpeed, myVTypes, myWalkFactor, RandHelper::rand(), RANDOM, SUMOVehicle::replaceRouteEdges(), MSStage::setArrivalPos(), SUMOVehicle::setArrivalPos(), MSStage::setArrived(), SUMO_TAG_BUS_STOP, SVC_BICYCLE, SVC_IGNORING, SVC_PASSENGER, SVC_TAXI, TIME2STEPS, toString(), VEHPARS_DEPARTPOS_SET, VEHPARS_VTYPE_SET, and WRITE_WARNING.
|
inherited |
|
inherited |
Definition at line 159 of file MSStage.cpp.
References MSStoppingPlace::getBeginLanePosition(), MSStoppingPlace::getEndLanePosition(), MSStage::myArrivalPos, MSStage::myDestination, and MSStage::myDestinationStop.
Referenced by MSTransportable::rerouteParkingArea().
|
inline |
|
inlinevirtualinherited |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
|
inlinevirtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSStage.
Definition at line 309 of file MSStage.h.
References UNUSED_PARAMETER.
|
protectedinherited |
the position at which we want to arrive
Definition at line 224 of file MSStage.h.
Referenced by clone(), MSStageWaiting::clone(), MSStageDriving::clone(), MSStageTranship::clone(), MSStageWaiting::getAngle(), MSStageDriving::getAngle(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSStage::getArrivalPos(), MSStageDriving::getArrivalPos(), MSStageTranship::getArrivalPos(), MSStage::getEdgePos(), MSStageDriving::getEdgePos(), MSStageWaiting::getPosition(), MSStageDriving::getPosition(), MSPerson::MSPersonStage_Walking::MSPersonStage_Walking(), MSStageTranship::MSStageTranship(), MSStageDriving::routeOutput(), MSStage::setArrivalPos(), setArrived(), MSStageDriving::setArrived(), MSStage::setDestination(), MSStageWaiting::tripInfoOutput(), MSStageTranship::tripInfoOutput(), and MSStageDriving::unspecifiedArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 230 of file MSStage.h.
Referenced by MSStageDriving::getAngle(), MSStage::getArrived(), MSStageTranship::getDistance(), MSStageDriving::getEdge(), MSStageDriving::getEdgePos(), MSStageDriving::getPosition(), MSStageDriving::isWaiting4Vehicle(), MSStageDriving::loadState(), MSStageTranship::routeOutput(), MSStageDriving::saveState(), MSStage::setArrived(), MSStageWaiting::tripInfoOutput(), MSStageDriving::tripInfoOutput(), and MSStageTranship::tripInfoOutput().
|
protectedinherited |
the time at which this stage started
Definition at line 227 of file MSStage.h.
Referenced by MSStage::getDeparted(), MSStageTranship::getDistance(), MSStageWaiting::getWaitingTime(), MSStageDriving::loadState(), MSStageWaiting::proceed(), MSStageTranship::proceed(), MSStageTranship::routeOutput(), MSStageDriving::saveState(), MSStage::setDeparted(), MSStageWaiting::tripInfoOutput(), MSStageDriving::tripInfoOutput(), and MSStageTranship::tripInfoOutput().
|
private |
The depart position.
Definition at line 352 of file MSStage.h.
Referenced by getAngle(), getEdgePos(), getPosition(), and setArrived().
|
private |
The lateral depart position.
Definition at line 355 of file MSStage.h.
Referenced by clone(), and setArrived().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 218 of file MSStage.h.
Referenced by MSStageDriving::abort(), clone(), MSStageWaiting::clone(), MSStageDriving::clone(), MSStageWaiting::getAngle(), MSStageDriving::getAngle(), MSStage::getDestination(), MSStage::getEdge(), MSStageDriving::getEdge(), MSStage::getFromEdge(), MSStageWaiting::getPosition(), MSStageDriving::getPosition(), MSStageDriving::isWaitingFor(), setArrived(), and MSStage::setDestination().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 221 of file MSStage.h.
Referenced by MSStageDriving::abort(), clone(), MSStageWaiting::clone(), MSStageDriving::clone(), MSStageTranship::clone(), MSStage::getDestinationStop(), MSStageDriving::getWaitingDescription(), MSStageDriving::isWaitingFor(), MSStageTranship::moveToNextEdge(), MSPerson::MSPersonStage_Access::MSPersonStage_Access(), MSStageWaiting::proceed(), MSStageWaiting::routeOutput(), MSStageDriving::routeOutput(), setArrived(), and MSStage::setDestination().
|
private |
the time the trip should take (applies to only walking)
Definition at line 334 of file MSStage.h.
Referenced by clone(), and setArrived().
|
private |
The group for this personTrip.
Definition at line 349 of file MSStage.h.
Referenced by clone(), and setArrived().
|
private |
whether an arrivalPos was in the input
Definition at line 358 of file MSStage.h.
Referenced by clone(), and setArrived().
|
private |
The allowed modes of transportation.
Definition at line 337 of file MSStage.h.
Referenced by clone(), and setArrived().
|
private |
the origin edge
Definition at line 328 of file MSStage.h.
Referenced by clone(), getAngle(), getEdge(), getPosition(), getStageSummary(), setArrived(), and setOrigin().
|
private |
the origin edge
Definition at line 331 of file MSStage.h.
Referenced by clone(), and getOriginStop().
|
private |
The walking speed.
Definition at line 343 of file MSStage.h.
Referenced by clone(), and setArrived().
|
protectedinherited |
The type of this stage.
Definition at line 233 of file MSStage.h.
Referenced by MSStageWaiting::clone(), MSStage::getStageType(), MSStageWaiting::routeOutput(), and MSStageWaiting::tripInfoOutput().
|
private |
The possible vehicles to use.
Definition at line 340 of file MSStage.h.
Referenced by clone(), and setArrived().
|
private |
The factor to apply to walking durations.
Definition at line 346 of file MSStage.h.
Referenced by clone(), and setArrived().
|
staticprotectedinherited |
the offset for computing positions when standing at an edge
Definition at line 239 of file MSStage.h.
Referenced by getPosition(), MSStageWaiting::getPosition(), and MSStageDriving::getPosition().