![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Public Member Functions | |
void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
virtual void | beginEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
Stage * | clone () const |
virtual void | endEventOutput (const MSTransportable &p, 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 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... | |
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... | |
ConstMSEdgeVector | getEdges () const |
the edges of the current stage More... | |
const MSEdge * | getFromEdge () const |
SUMOTime | getIntendedDepart () const |
std::string | getIntendedVehicleID () const |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
const std::set< std::string > & | getLines () 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 transportable More... | |
double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription () const |
returns the stage description as a string More... | |
std::string | getStageSummary () const |
return string summary of the current stage More... | |
StageType | getStageType () const |
SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
std::string | getWaitingDescription () const |
Return where the person waits and for what. More... | |
SUMOTime | getWaitingTime (SUMOTime now) const |
time spent waiting for a ride More... | |
bool | isWaiting4Vehicle () const |
Whether the person waits for a vehicle. More... | |
bool | isWaitingFor (const SUMOVehicle *vehicle) const |
Whether the person waits for the given vehicle. More... | |
MSPersonStage_Driving (const MSEdge *destination, MSStoppingPlace *toStop, const double arrivalPos, const std::vector< std::string > &lines, const std::string &intendedVeh="", SUMOTime intendedDepart=-1) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSTransportable *person, 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... | |
void | setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now) |
marks arrival time and records driven distance 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... | |
void | setVehicle (SUMOVehicle *v) |
virtual void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const |
Called on writing tripinfo output. More... | |
~MSPersonStage_Driving () | |
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... | |
SUMOTime | myIntendedDepart |
std::string | myIntendedVehicleID |
const std::set< std::string > | myLines |
the lines to choose from More... | |
Position | myStopWaitPos |
StageType | myType |
The type of this stage. More... | |
SUMOVehicle * | myVehicle |
The taken vehicle. More... | |
double | myVehicleDistance |
std::string | myVehicleID |
cached vehicle data for output after the vehicle has been removed More... | |
std::string | myVehicleLine |
SUMOVehicleClass | myVehicleVClass |
const MSEdge * | myWaitingEdge |
double | myWaitingPos |
SUMOTime | myWaitingSince |
The time since which this person is waiting for a ride. More... | |
A "real" stage performing the travelling by a transport system The given route will be chosen. The travel time is computed by the simulation
Definition at line 245 of file MSPerson.h.
MSPerson::MSPersonStage_Driving::MSPersonStage_Driving | ( | const MSEdge * | destination, |
MSStoppingPlace * | toStop, | ||
const double | arrivalPos, | ||
const std::vector< std::string > & | lines, | ||
const std::string & | intendedVeh = "" , |
||
SUMOTime | intendedDepart = -1 |
||
) |
constructor
Definition at line 395 of file MSPerson.cpp.
MSPerson::MSPersonStage_Driving::~MSPersonStage_Driving | ( | ) |
destructor
Definition at line 406 of file MSPerson.cpp.
|
virtualinherited |
abort this stage (TraCI)
Reimplemented from MSTransportable::Stage.
Definition at line 628 of file MSTransportable.cpp.
References MSTransportableControl::abortWaitingForVehicle(), MSNet::getContainerControl(), MSNet::getInstance(), and MSNet::getPersonControl().
|
virtualinherited |
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 652 of file MSTransportable.cpp.
References OutputDevice::closeTag(), MSTransportable::getEdge(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 409 of file MSPerson.cpp.
|
virtualinherited |
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 658 of file MSTransportable.cpp.
References OutputDevice::closeTag(), MSTransportable::getEdge(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtualinherited |
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 550 of file MSTransportable.cpp.
References MSVehicle::getAngle(), MSNet::getInstance(), MSTransportable::isWaiting4Vehicle(), MSNet::lefthand(), and M_PI.
|
inlineinherited |
Definition at line 94 of file MSTransportable.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by libsumo::Person::getStage(), GUIPerson::getStageArrivalPos(), MSRouteHandler::parseWalkPositions(), MSTransportable::rerouteParkingArea(), libsumo::Person::rerouteTraveltime(), and MSTransportable::Stage_Trip::setArrived().
|
inherited |
get departure time of stage
Definition at line 108 of file MSTransportable.cpp.
|
inherited |
returns the destination edge
Definition at line 57 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 85 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(), proceed(), MSPerson::proceed(), MSTransportable::rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
|
inlinevirtualinherited |
get travel distance in this stage
Implements MSTransportable::Stage.
Definition at line 459 of file MSTransportable.h.
References MSTransportable::Stage_Driving::myVehicleDistance.
|
virtualinherited |
Returns the current edge.
Reimplemented from MSTransportable::Stage.
Definition at line 509 of file MSTransportable.cpp.
|
inherited |
get angle of the edge at a certain position
Definition at line 133 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().
|
virtualinherited |
Reimplemented from MSTransportable::Stage.
Definition at line 527 of file MSTransportable.cpp.
References MSTransportable::getEdge(), MSTransportable::isWaiting4Vehicle(), and MIN2().
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 123 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtualinherited |
the edges of the current stage
Reimplemented from MSTransportable::Stage.
Definition at line 593 of file MSTransportable.cpp.
References MSTransportable::getDestination(), and MSTransportable::getFromEdge().
|
virtualinherited |
Reimplemented from MSTransportable::Stage.
Definition at line 521 of file MSTransportable.cpp.
|
inlineinherited |
Definition at line 508 of file MSTransportable.h.
References MSTransportable::Stage_Driving::myIntendedDepart.
|
inlineinherited |
Definition at line 504 of file MSTransportable.h.
References MSTransportable::Stage_Driving::myIntendedVehicleID.
|
inherited |
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().
|
inlineinherited |
Definition at line 500 of file MSTransportable.h.
References MSTransportable::Stage_Driving::myLines.
Referenced by MSTransportable::rerouteParkingArea().
|
inlinevirtualinherited |
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 proceed().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 537 of file MSTransportable.cpp.
References MSNet::getInstance(), Position::INVALID, MSTransportable::isWaiting4Vehicle(), and MSTransportable::ROADSIDE_OFFSET.
|
virtualinherited |
the speed of the transportable
Reimplemented from MSTransportable::Stage.
Definition at line 587 of file MSTransportable.cpp.
References MSTransportable::isWaiting4Vehicle().
|
virtual |
returns the stage description as a string
Implements MSTransportable::Stage.
Definition at line 457 of file MSPerson.cpp.
References MSTransportable::isWaiting4Vehicle(), and joinToString().
|
virtual |
return string summary of the current stage
Implements MSTransportable::Stage.
Definition at line 463 of file MSPerson.cpp.
References MSTransportable::getDestination(), Named::getID(), MSTransportable::isWaiting4Vehicle(), joinToString(), and time2string().
|
inlineinherited |
Definition at line 110 of file MSTransportable.h.
References MSTransportable::Stage::myType.
Referenced by libsumo::Person::getStage(), proceed(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 472 of file MSTransportable.h.
References MSTransportable::Stage_Driving::myVehicle.
Referenced by MSTransportable::rerouteParkingArea(), and MSTransportable::~MSTransportable().
|
inherited |
Return where the person waits and for what.
Definition at line 642 of file MSTransportable.cpp.
References MSTransportable::isWaiting4Vehicle(), and joinToString().
Referenced by MSTransportableControl::abortAnyWaitingForVehicle().
time spent waiting for a ride
Reimplemented from MSTransportable::Stage.
Definition at line 581 of file MSTransportable.cpp.
References MSTransportable::isWaiting4Vehicle().
|
virtualinherited |
Whether the person waits for a vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 575 of file MSTransportable.cpp.
|
virtualinherited |
Whether the person waits for the given vehicle.
Reimplemented from MSTransportable::Stage.
Definition at line 564 of file MSTransportable.cpp.
References SUMOTrafficObject::getID(), SUMOVehicle::getParameter(), SUMOVehicleParameter::line, SUMOVehicle::stopsAt(), and SUMOVehicle::stopsAtEdge().
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 415 of file MSPerson.cpp.
References MSInsertionControl::add(), MSTransportableControl::addWaiting(), DEPART_TRIGGERED, SUMOVehicleParameter::departProcedure, MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage::getEdge(), MSLane::getEdge(), MSTransportable::Stage::getEdgePos(), MSTransportable::getID(), MSNet::getInsertionControl(), MSStoppingPlace::getLane(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::Stage::getOriginStop(), SUMOVehicle::getParameter(), MSTransportable::getParameter(), MSNet::getPersonControl(), MSTransportable::Stage::getStageType(), MSVehicleControl::getVehicle(), MSNet::getVehicleControl(), MSStoppingPlace::getWaitingPositionOnLane(), MSStoppingPlace::getWaitPosition(), SUMOVehicle::hasDeparted(), Position::INVALID, MSTransportable::TRIP, and MSVehicleControl::unregisterOneWaiting().
|
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 |
Implements MSTransportable::Stage.
Definition at line 498 of file MSPerson.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), MSTransportable::getDestination(), MSTransportable::getFromEdge(), MSTransportable::getID(), OutputDevice::openTag(), SUMO_ATTR_BUS_STOP, SUMO_ATTR_DEPART, SUMO_ATTR_FROM, SUMO_ATTR_INTENDED, SUMO_ATTR_LINES, SUMO_ATTR_TO, time2string(), and OutputDevice::writeAttr().
|
virtualinherited |
marks arrival time and records driven distance
Reimplemented from MSTransportable::Stage.
Definition at line 601 of file MSTransportable.cpp.
References MSTransportable::Stage::setArrived().
|
inherited |
logs end of the step
Definition at line 101 of file MSTransportable.cpp.
|
inherited |
Definition at line 139 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 127 of file MSTransportable.h.
|
inherited |
Definition at line 617 of file MSTransportable.cpp.
References SUMOTrafficObject::getID(), SUMOVehicle::getParameter(), SUMOTrafficObject::getVClass(), and SUMOVehicleParameter::line.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
[in] | transportable | The person to write information about |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 478 of file MSPerson.cpp.
References MSDevice_Tripinfo::addRideData(), OutputDevice::closeTag(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), OutputDevice::openTag(), time2string(), toString(), and OutputDevice::writeAttr().
|
protectedinherited |
the position at which we want to arrive
Definition at line 209 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), and MSContainer::MSContainerStage_Tranship::getArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 215 of file MSTransportable.h.
|
protectedinherited |
the time at which this stage started
Definition at line 212 of file MSTransportable.h.
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 203 of file MSTransportable.h.
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 206 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().
|
protectedinherited |
Definition at line 532 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getIntendedDepart().
|
protectedinherited |
Definition at line 531 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getIntendedVehicleID().
|
protectedinherited |
the lines to choose from
Definition at line 514 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getLines().
|
protectedinherited |
Definition at line 529 of file MSTransportable.h.
|
protectedinherited |
The type of this stage.
Definition at line 218 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().
|
protectedinherited |
The taken vehicle.
Definition at line 517 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getVehicle().
|
protectedinherited |
Definition at line 523 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getDistance().
|
protectedinherited |
cached vehicle data for output after the vehicle has been removed
Definition at line 519 of file MSTransportable.h.
|
protectedinherited |
Definition at line 520 of file MSTransportable.h.
|
protectedinherited |
Definition at line 522 of file MSTransportable.h.
|
protectedinherited |
Definition at line 528 of file MSTransportable.h.
|
protectedinherited |
Definition at line 525 of file MSTransportable.h.
|
protectedinherited |
The time since which this person is waiting for a ride.
Definition at line 527 of file MSTransportable.h.