![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSTransportable.h>
Data Structures | |
class | Stage |
class | Stage_Driving |
class | Stage_Trip |
class | Stage_Waiting |
Public Types | |
typedef std::vector< MSTransportable::Stage * > | MSTransportablePlan |
the structure holding the plan of a transportable More... | |
enum | StageType { WAITING_FOR_DEPART = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2, DRIVING = 3, ACCESS = 4, TRIP = 5 } |
Public Member Functions | |
void | appendStage (Stage *stage, int next=-1) |
Appends the given stage to the current plan. More... | |
virtual double | getAngle () const |
return the current angle of the transportable More... | |
const MSEdge * | getArrivalEdge () const |
returns the final arrival edge More... | |
double | getArrivalPos () const |
returns the final arrival pos More... | |
PositionVector | getBoundingBox () const |
return the bounding box of the person More... | |
MSTransportable::Stage * | getCurrentStage () const |
Return the current stage. More... | |
std::string | getCurrentStageDescription () const |
Returns the current stage description as a string. More... | |
StageType | getCurrentStageType () const |
the current stage type of the transportable More... | |
SUMOTime | getDesiredDepart () const |
Returns the desired departure time. More... | |
const MSEdge * | getDestination () const |
Returns the current destination. More... | |
MSTransportableDevice * | getDevice (const std::type_info &type) const |
Returns a device of the given type if it exists or 0. More... | |
const std::vector< MSTransportableDevice * > & | getDevices () const |
Returns this vehicle's devices. More... | |
const MSEdge * | getEdge () const |
Returns the current edge. More... | |
virtual double | getEdgePos () const |
Return the position on the edge. More... | |
ConstMSEdgeVector | getEdges (int next) const |
Return the edges of the nth next stage. More... | |
const MSEdge * | getFromEdge () const |
Returns the departure edge. More... | |
const std::string & | getID () const |
returns the id of the transportable More... | |
const MSEdge * | getNextDestination () const |
Returns the destination after the current destination. More... | |
MSTransportable::Stage * | getNextStage (int next) const |
Return the current stage. More... | |
int | getNumRemainingStages () const |
Return the number of remaining stages (including the current) More... | |
int | getNumStages () const |
Return the total number stages in this persons plan. More... | |
const SUMOVehicleParameter & | getParameter () const |
virtual Position | getPosition () const |
Return the Network coordinate of the transportable. More... | |
MSVehicleType & | getSingularType () |
Replaces the current vehicle type with a new one used by this vehicle only. More... | |
virtual double | getSpeed () const |
the current speed of the transportable More... | |
virtual double | getSpeedFactor () const |
the current speed factor of the transportable (where applicable) More... | |
std::string | getStageSummary (int stageIndex) const |
return textual summary for the given stage More... | |
StageType | getStageType (int next) const |
the stage type for the nth next stage More... | |
SUMOVehicle * | getVehicle () const |
The vehicle associated with this transportable. More... | |
const MSVehicleType & | getVehicleType () const |
Returns the vehicle's type. More... | |
virtual double | getWaitingSeconds () const |
the time this transportable spent waiting in seconds More... | |
bool | hasArrived () const |
return whether the person has reached the end of its plan More... | |
bool | hasDeparted () const |
return whether the transportable has started it's plan More... | |
bool | isWaiting4Vehicle () const |
Whether the transportable waits for a vehicle. More... | |
bool | isWaitingFor (const SUMOVehicle *vehicle) const |
Whether the transportable waits for the given vehicle in the current step. More... | |
MSTransportable (const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan) | |
constructor More... | |
virtual bool | proceed (MSNet *net, SUMOTime time)=0 |
void | removeStage (int next) |
removes the nth next stage More... | |
void | replaceVehicleType (MSVehicleType *type) |
Replaces the current vehicle type by the one given. More... | |
void | rerouteParkingArea (MSStoppingPlace *orig, MSStoppingPlace *replacement) |
adapt plan when the vehicle reroutes and now stops at replacement instead of orig More... | |
virtual void | routeOutput (OutputDevice &os, const bool withRouteLength) const =0 |
Called on writing vehroute output. More... | |
void | setDeparted (SUMOTime now) |
logs depart time of the current stage More... | |
void | setSpeed (double speed) |
sets the walking speed (ignored in other stages) More... | |
virtual void | tripInfoOutput (OutputDevice &os) const =0 |
Called on writing tripinfo output. More... | |
virtual | ~MSTransportable () |
destructor More... | |
inherited from SUMOTrafficObject | |
bool | isVehicle () const |
Get the vehicle's ID. More... | |
bool | isStopped () const |
Returns whether the vehicle is at a stop. More... | |
double | getSlope () const |
Returns the slope of the road at vehicle's position. More... | |
double | getChosenSpeedFactor () const |
SUMOVehicleClass | getVClass () const |
Returns the vehicle's access class. More... | |
double | getMaxSpeed () const |
Returns the vehicle's maximum speed. More... | |
SUMOTime | getWaitingTime () const |
double | getPreviousSpeed () const |
Returns the vehicle's previous speed. More... | |
double | getAcceleration () const |
Returns the vehicle's acceleration. More... | |
double | getPositionOnLane () const |
Get the vehicle's position along the lane. More... | |
double | getBackPositionOnLane (const MSLane *) const |
Get the vehicle's back position along the given lane. More... | |
Position | getPosition (const double) const |
Return current position (x/y, cartesian) More... | |
Protected Attributes | |
std::vector< MSTransportableDevice * > | myDevices |
The devices this transportable has. More... | |
const SUMOVehicleParameter * | myParameter |
the plan of the transportable More... | |
MSTransportablePlan * | myPlan |
the plan of the transportable More... | |
MSTransportablePlan::iterator | myStep |
the iterator over the route More... | |
MSVehicleType * | myVType |
This transportable's type. (mainly used for drawing related information Note sure if it is really necessary. More... | |
bool | myWriteEvents |
Whether events shall be written. More... | |
Static Protected Attributes | |
static const double | ROADSIDE_OFFSET |
the offset for computing positions when standing at an edge More... | |
Private Member Functions | |
MSTransportable (const MSTransportable &) | |
Invalidated copy constructor. More... | |
MSTransportable & | operator= (const MSTransportable &) |
Invalidated assignment operator. More... | |
The class holds a simulated moveable object
Definition at line 58 of file MSTransportable.h.
typedef std::vector<MSTransportable::Stage*> MSTransportable::MSTransportablePlan |
the structure holding the plan of a transportable
Definition at line 587 of file MSTransportable.h.
Enumerator | |
---|---|
WAITING_FOR_DEPART | |
WAITING | |
MOVING_WITHOUT_VEHICLE | |
DRIVING | |
ACCESS | |
TRIP |
Definition at line 60 of file MSTransportable.h.
MSTransportable::MSTransportable | ( | const SUMOVehicleParameter * | pars, |
MSVehicleType * | vtype, | ||
MSTransportablePlan * | plan | ||
) |
constructor
Definition at line 667 of file MSTransportable.cpp.
References MSDevice::buildTransportableDevices(), myDevices, myPlan, and myStep.
|
virtual |
destructor
Definition at line 675 of file MSTransportable.cpp.
References DRIVING, getCurrentStageType(), MSNet::getInstance(), MSTransportable::Stage_Driving::getVehicle(), MSNet::getVehicleControl(), MSVehicleType::isVehicleSpecific(), myDevices, myParameter, myPlan, myStep, myVType, SUMOVehicle::removeTransportable(), and MSVehicleControl::removeVType().
|
private |
Invalidated copy constructor.
void MSTransportable::appendStage | ( | Stage * | stage, |
int | next = -1 |
||
) |
Appends the given stage to the current plan.
Definition at line 750 of file MSTransportable.cpp.
References getID(), myPlan, myStep, and toString().
Referenced by libsumo::Person::appendDrivingStage(), libsumo::Person::appendStage(), libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), removeStage(), libsumo::Person::replaceStage(), MSPerson::reroute(), rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
|
inlinevirtual |
Returns the vehicle's acceleration.
Implements SUMOTrafficObject.
Definition at line 569 of file MSTransportable.h.
|
virtual |
return the current angle of the transportable
Implements SUMOTrafficObject.
Reimplemented in GUIContainer.
Definition at line 724 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::drawGL(), GUIContainer::getAngle(), getBoundingBox(), GUIPerson::getNaviDegree(), GUIPerson::setFunctionalColor(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inline |
returns the final arrival edge
Definition at line 745 of file MSTransportable.h.
References myPlan.
Referenced by libsumo::Person::appendWaitingStage(), and libsumo::Person::convertTraCIStage().
|
inline |
returns the final arrival pos
Definition at line 740 of file MSTransportable.h.
References myPlan.
Referenced by libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), libsumo::Person::convertTraCIStage(), GUIContainer::getParameterWindow(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSPerson::reroute().
|
inlinevirtual |
Get the vehicle's back position along the given lane.
Implements SUMOTrafficObject.
Definition at line 577 of file MSTransportable.h.
References getEdgePos().
PositionVector MSTransportable::getBoundingBox | ( | ) | const |
return the bounding box of the person
Definition at line 815 of file MSTransportable.cpp.
References PositionVector::append(), getAngle(), MSVehicleType::getLength(), getPosition(), getVehicleType(), PositionVector::move2side(), POSITION_EPS, and PositionVector::reverse().
|
inlinevirtual |
Implements SUMOTrafficObject.
Definition at line 555 of file MSTransportable.h.
Referenced by GUISUMOViewParent::onUpdSpeedFactor().
|
inline |
Return the current stage.
Definition at line 677 of file MSTransportable.h.
References myStep.
Referenced by MSTransportableControl::abortAnyWaitingForVehicle(), GUIPerson::drawAction_drawWalkingareaPath(), GUIPerson::drawGLAdditional(), GUIContainer::getParameterWindow(), GUIPerson::getStageArrivalPos(), libsumo::Person::moveToXY(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSEdge::transportable_by_position_sorter::operator()(), and MSPerson::Influencer::postProcessRemoteControl().
|
inline |
Returns the current stage description as a string.
Definition at line 672 of file MSTransportable.h.
Referenced by GUIPerson::getParameterWindow(), GUIContainer::getParameterWindow(), libsumo::Person::moveTo(), libsumo::Person::moveToXY(), and MSXMLRawOut::writeTransportable().
|
inline |
the current stage type of the transportable
Definition at line 657 of file MSTransportable.h.
Referenced by MSPModel_Remote::add(), MSPModel_Striping::add(), GUIContainer::drawGL(), GUIPerson::drawGLAdditional(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), GUIPerson::getGUIPosition(), MSPerson::getNextEdgePtr(), GUIContainer::getPosition(), isStopped(), rerouteParkingArea(), libsumo::Person::rerouteTraveltime(), and ~MSTransportable().
SUMOTime MSTransportable::getDesiredDepart | ( | ) | const |
Returns the desired departure time.
Definition at line 704 of file MSTransportable.cpp.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by MSContainer::routeOutput(), MSContainer::tripInfoOutput(), and MSPerson::tripInfoOutput().
|
inline |
Returns the current destination.
Definition at line 617 of file MSTransportable.h.
Referenced by GUIPerson::getDestinationEdgeID(), MSTransportable::Stage::getEdges(), MSTransportable::Stage_Driving::getEdges(), GUIContainer::getParameterWindow(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Walking::getStageSummary(), MSContainer::MSContainerStage_Tranship::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Trip::getStageSummary(), MSTransportable::Stage_Waiting::getStageSummary(), MSDevice_Transportable::notifyLeave(), MSDevice_Transportable::notifyMove(), rerouteParkingArea(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSTransportable::Stage_Waiting::routeOutput().
MSTransportableDevice * MSTransportable::getDevice | ( | const std::type_info & | type | ) | const |
Returns a device of the given type if it exists or 0.
Definition at line 907 of file MSTransportable.cpp.
References myDevices.
Referenced by MSFCDExport::writeTransportable().
|
inline |
Returns this vehicle's devices.
Definition at line 788 of file MSTransportable.h.
References myDevices.
|
inlinevirtual |
Returns the current edge.
Implements SUMOTrafficObject.
Definition at line 627 of file MSTransportable.h.
Referenced by MSTransportableControl::abortWaitingForVehicle(), MSPModel_Striping::add(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), GUIPerson::getEdgeID(), MSTransportable::Stage_Driving::getEdgePos(), GUIContainer::getParameterWindow(), GUIContainer::getPosition(), libsumo::Person::getRoadID(), libsumo::TrafficLight::getServedPersonCount(), libsumo::Person::getSlope(), getSlope(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), libsumo::Person::moveToXY(), MSPerson::MSPersonStage_Walking::proceed(), MSPerson::MSPersonStage_Access::proceed(), removeStage(), libsumo::Person::rerouteTraveltime(), and MSPerson::MSPersonStage_Walking::setRouteIndex().
|
virtual |
Return the position on the edge.
Reimplemented in GUIContainer, and GUIPerson.
Definition at line 714 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by getBackPositionOnLane(), GUIPerson::getEdgePos(), GUIContainer::getEdgePos(), libsumo::Person::getLanePosition(), getPositionOnLane(), libsumo::Person::getSlope(), getSlope(), libsumo::Person::moveToXY(), removeStage(), libsumo::Person::rerouteTraveltime(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inline |
Return the edges of the nth next stage.
Definition at line 689 of file MSTransportable.h.
References myPlan, and myStep.
Referenced by libsumo::Person::getEdges(), and libsumo::Person::rerouteTraveltime().
|
inline |
Returns the departure edge.
Definition at line 632 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Driving::getEdges(), GUIPerson::getFromEdgeID(), GUIContainer::getParameterWindow(), MSContainer::MSContainerStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
virtual |
returns the id of the transportable
Implements SUMOTrafficObject.
Definition at line 699 of file MSTransportable.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSTransportableControl::abortAnyWaitingForVehicle(), MSPModel_Remote::add(), MSPModel_Striping::add(), MSVehicle::addContainer(), MSVehicle::addPerson(), appendStage(), libsumo::Person::appendWalkingStage(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSTransportableDevice_FCD::buildDevices(), MSTransportableDevice_Routing::buildDevices(), libsumo::Person::convertTraCIStage(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSTransportableControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getParameterWindow(), getSingularType(), MSPModel_Striping::getVehicleObstacles(), MSEdge::getWaitingVehicle(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), libsumo::Person::moveToXY(), MSDevice_Transportable::notifyLeave(), MSEdge::transportable_by_position_sorter::operator()(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSPerson::reroute(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSTransportable::Stage_Trip::setArrived(), libsumo::Helper::setRemoteControlled(), MSContainer::tripInfoOutput(), MSPerson::MSPersonStage_Access::tripInfoOutput(), MSPerson::tripInfoOutput(), MSFCDExport::writeTransportable(), MSXMLRawOut::writeTransportable(), and MSDevice_Transportable::~MSDevice_Transportable().
|
virtual |
Returns the vehicle's maximum speed.
Implements SUMOTrafficObject.
Definition at line 930 of file MSTransportable.cpp.
References MSVehicleType::getMaxSpeed(), getSpeedFactor(), and getVehicleType().
Referenced by MSTransportable::Stage_Trip::setArrived(), and MSPerson::MSPersonStage_Walking::tripInfoOutput().
|
inline |
Returns the destination after the current destination.
Definition at line 622 of file MSTransportable.h.
References myStep.
|
inline |
Return the current stage.
Definition at line 682 of file MSTransportable.h.
References myPlan, and myStep.
Referenced by libsumo::Person::getStage(), MSPerson::reroute(), libsumo::Person::rerouteTraveltime(), and MSTransportable::Stage_Trip::setArrived().
int MSTransportable::getNumRemainingStages | ( | ) | const |
Return the number of remaining stages (including the current)
Definition at line 740 of file MSTransportable.cpp.
References myPlan, and myStep.
Referenced by libsumo::Person::getEdges(), GUIContainer::getParameterWindow(), libsumo::Person::getRemainingStages(), libsumo::Person::getStage(), GUIPerson::getStageIndexDescription(), MSPerson::MSPersonStage_Driving::proceed(), libsumo::Person::removeStage(), libsumo::Person::replaceStage(), libsumo::Person::rerouteTraveltime(), and MSTransportable::Stage_Trip::setArrived().
int MSTransportable::getNumStages | ( | ) | const |
Return the total number stages in this persons plan.
Definition at line 745 of file MSTransportable.cpp.
References myPlan.
Referenced by libsumo::Person::getEdges(), GUIContainer::getParameterWindow(), libsumo::Person::getStage(), GUIPerson::getStageIndexDescription(), GUIContainer::GUIContainerPopupMenu::onCmdShowPlan(), GUIPerson::GUIPersonPopupMenu::onCmdShowPlan(), MSPerson::MSPersonStage_Driving::proceed(), and MSTransportable::Stage_Trip::setArrived().
|
inline |
Definition at line 602 of file MSTransportable.h.
References myParameter.
Referenced by MSTransportableControl::add(), MSTransportableDevice_Routing::buildDevices(), libsumo::Person::getParameter(), GUIPerson::getParameterWindow(), GUIContainer::getParameterWindow(), MSTransportableDevice_Routing::MSTransportableDevice_Routing(), MSPerson::MSPersonStage_Driving::proceed(), MSTransportable::Stage_Trip::setArrived(), GUIContainer::setFunctionalColor(), GUIPerson::setFunctionalColor(), and libsumo::Person::setParameter().
|
virtual |
Return the Network coordinate of the transportable.
Reimplemented in GUIContainer, and GUIPerson.
Definition at line 719 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by getBoundingBox(), GUIPerson::getGUIPosition(), GUIPerson::getPosition(), GUIContainer::getPosition(), and getPosition().
|
inlinevirtual |
Return current position (x/y, cartesian)
If the vehicle is not in the net, Position::INVALID.
[in] | offset | optional offset in longitudinal direction |
Implements SUMOTrafficObject.
Definition at line 581 of file MSTransportable.h.
References getPosition().
Referenced by MSLink::checkWalkingAreaFoe(), libsumo::Person::moveToXY(), and MSFCDExport::writeTransportable().
|
inlinevirtual |
Get the vehicle's position along the lane.
Implements SUMOTrafficObject.
Definition at line 573 of file MSTransportable.h.
References getEdgePos().
|
inlinevirtual |
Returns the vehicle's previous speed.
Implements SUMOTrafficObject.
Definition at line 565 of file MSTransportable.h.
References getSpeed().
MSVehicleType & MSTransportable::getSingularType | ( | ) |
Replaces the current vehicle type with a new one used by this vehicle only.
If the currently used vehicle type is already marked as being used by this vehicle only, no new type is created.
Definition at line 804 of file MSTransportable.cpp.
References MSVehicleType::buildSingularType(), MSVehicleType::getID(), getID(), MSVehicleType::isVehicleSpecific(), myVType, and replaceVehicleType().
Referenced by TraCIServerAPI_Person::processSet().
|
virtual |
Returns the slope of the road at vehicle's position.
Implements SUMOTrafficObject.
Definition at line 917 of file MSTransportable.cpp.
References getEdge(), getEdgePos(), and MSEdge::getLanes().
|
virtual |
the current speed of the transportable
Implements SUMOTrafficObject.
Reimplemented in GUIContainer, and GUIPerson.
Definition at line 734 of file MSTransportable.cpp.
Referenced by MSLink::checkWalkingAreaFoe(), getPreviousSpeed(), libsumo::Person::getSpeed(), GUIPerson::getSpeed(), GUIContainer::getSpeed(), and MSFCDExport::writeTransportable().
|
inlinevirtual |
the current speed factor of the transportable (where applicable)
Reimplemented in MSPerson.
Definition at line 652 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Walking::getMaxSpeed(), getMaxSpeed(), and GUIContainer::getParameterWindow().
std::string MSTransportable::getStageSummary | ( | int | stageIndex | ) | const |
return textual summary for the given stage
Definition at line 833 of file MSTransportable.cpp.
References myPlan.
Referenced by GUIContainer::GUIContainerPopupMenu::onCmdShowPlan(), and GUIPerson::GUIPersonPopupMenu::onCmdShowPlan().
|
inline |
the stage type for the nth next stage
Definition at line 662 of file MSTransportable.h.
References myPlan, and myStep.
Referenced by libsumo::Person::moveToXY(), MSPerson::Influencer::postProcessRemoteControl(), and libsumo::Person::rerouteTraveltime().
|
virtual |
Returns the vehicle's access class.
Implements SUMOTrafficObject.
Definition at line 935 of file MSTransportable.cpp.
References MSVehicleType::getVehicleClass(), and getVehicleType().
Referenced by libsumo::Person::moveToXY().
|
inline |
The vehicle associated with this transportable.
Definition at line 726 of file MSTransportable.h.
Referenced by libsumo::Person::getVehicle().
|
inlinevirtual |
Returns the vehicle's type.
Implements SUMOTrafficObject.
Definition at line 606 of file MSTransportable.h.
References myVType.
Referenced by libsumo::Person::appendWalkingStage(), MSLink::checkWalkingAreaFoe(), libsumo::Person::convertTraCIStage(), GUIContainer::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), GUIPerson::drawGL(), getBoundingBox(), GUIPerson::getCenteringBoundary(), MSPerson::MSPersonStage_Walking::getMaxSpeed(), getMaxSpeed(), MSPModel_Striping::getNextLaneObstacles(), libsumo::Person::getTypeID(), getVClass(), MSPModel_Striping::getVehicleObstacles(), libsumo::Person::moveToXY(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping::nextBlocking(), MSPerson::MSPersonStage_Access::proceed(), libsumo::Person::rerouteTraveltime(), MSPerson::routeOutput(), GUIContainer::setFunctionalColor(), GUIPerson::setFunctionalColor(), and MSPerson::tripInfoOutput().
|
virtual |
the time this transportable spent waiting in seconds
Reimplemented in GUIContainer, and GUIPerson.
Definition at line 729 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by GUIPerson::getWaitingSeconds(), GUIContainer::getWaitingSeconds(), libsumo::Person::getWaitingTime(), and MSPedestrianPushButton::isActiveForEdge().
|
virtual |
Implements SUMOTrafficObject.
Definition at line 925 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
|
virtual |
return whether the person has reached the end of its plan
Implements SUMOTrafficObject.
Definition at line 841 of file MSTransportable.cpp.
References myPlan, and myStep.
Referenced by MSPerson::routeOutput().
bool MSTransportable::hasDeparted | ( | ) | const |
return whether the transportable has started it's plan
Definition at line 846 of file MSTransportable.cpp.
References myPlan.
|
inlinevirtual |
Returns whether the vehicle is at a stop.
Implements SUMOTrafficObject.
Definition at line 549 of file MSTransportable.h.
References getCurrentStageType(), and WAITING.
|
inlinevirtual |
Get the vehicle's ID.
Implements SUMOTrafficObject.
Definition at line 545 of file MSTransportable.h.
|
inline |
Whether the transportable waits for a vehicle.
Definition at line 721 of file MSTransportable.h.
Referenced by GUIContainer::drawGL(), MSTransportable::Stage_Driving::getAngle(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), MSTransportable::Stage_Driving::getEdgePos(), GUIPerson::getGUIPosition(), MSTransportable::Stage_Driving::getPosition(), MSTransportable::Stage_Driving::getSpeed(), MSContainer::MSContainerStage_Driving::getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), MSContainer::MSContainerStage_Driving::getStageSummary(), MSPerson::MSPersonStage_Driving::getStageSummary(), MSTransportable::Stage_Driving::getWaitingDescription(), and MSTransportable::Stage_Driving::getWaitingTime().
|
inline |
Whether the transportable waits for the given vehicle in the current step.
Definition at line 716 of file MSTransportable.h.
Referenced by MSEdge::getWaitingVehicle().
|
private |
Invalidated assignment operator.
void MSTransportable::removeStage | ( | int | next | ) |
removes the nth next stage
Definition at line 766 of file MSTransportable.cpp.
References appendStage(), getEdge(), getEdgePos(), MSNet::getInstance(), myPlan, myStep, and proceed().
Referenced by libsumo::Person::removeStage(), libsumo::Person::replaceStage(), MSPerson::reroute(), and rerouteParkingArea().
void MSTransportable::replaceVehicleType | ( | MSVehicleType * | type | ) |
Replaces the current vehicle type by the one given.
If the currently used vehicle type is marked as being used by this vehicle only, it is deleted, first. The new, given type is then assigned to "myVType".
[in] | type | The new vehicle type |
Definition at line 795 of file MSTransportable.cpp.
References MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleType::isVehicleSpecific(), myVType, and MSVehicleControl::removeVType().
Referenced by getSingularType(), and libsumo::Person::setType().
void MSTransportable::rerouteParkingArea | ( | MSStoppingPlace * | orig, |
MSStoppingPlace * | replacement | ||
) |
adapt plan when the vehicle reroutes and now stops at replacement instead of orig
Definition at line 852 of file MSTransportable.cpp.
References appendStage(), DRIVING, MSTransportable::Stage::getArrivalPos(), getCurrentStageType(), MSTransportable::Stage::getDestination(), getDestination(), MSTransportable::Stage::getDestinationStop(), MSLane::getEdge(), MSTransportable::Stage::getFromEdge(), MSStoppingPlace::getLane(), MSTransportable::Stage_Driving::getLines(), MSTransportable::Stage::getStageType(), MSTransportable::Stage_Driving::getVehicle(), MOVING_WITHOUT_VEHICLE, myPlan, myStep, removeStage(), MSTransportable::Stage::setDestination(), TRIP, and WRITE_WARNING.
|
pure virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson, and MSContainer.
Referenced by MSTransportableControl::erase().
void MSTransportable::setDeparted | ( | SUMOTime | now | ) |
logs depart time of the current stage
Definition at line 709 of file MSTransportable.cpp.
void MSTransportable::setSpeed | ( | double | speed | ) |
sets the walking speed (ignored in other stages)
Definition at line 787 of file MSTransportable.cpp.
References myPlan.
Referenced by libsumo::Person::setSpeed().
|
pure virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson, and MSContainer.
Referenced by MSTransportableControl::erase().
|
protected |
The devices this transportable has.
Definition at line 813 of file MSTransportable.h.
Referenced by getDevice(), getDevices(), MSTransportable(), and ~MSTransportable().
|
protected |
the plan of the transportable
Definition at line 797 of file MSTransportable.h.
Referenced by getDesiredDepart(), getID(), getParameter(), MSPerson::routeOutput(), and ~MSTransportable().
|
protected |
the plan of the transportable
Definition at line 807 of file MSTransportable.h.
Referenced by appendStage(), getArrivalEdge(), getArrivalPos(), getEdges(), getNextStage(), getNumRemainingStages(), getNumStages(), getStageSummary(), getStageType(), hasArrived(), hasDeparted(), MSTransportable(), MSContainer::proceed(), MSPerson::proceed(), removeStage(), rerouteParkingArea(), MSContainer::routeOutput(), MSPerson::routeOutput(), setSpeed(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), and ~MSTransportable().
|
protected |
the iterator over the route
Definition at line 810 of file MSTransportable.h.
Referenced by appendStage(), getCurrentStage(), getEdges(), getNextDestination(), MSPerson::getNextEdgePtr(), getNextStage(), getNumRemainingStages(), getStageType(), hasArrived(), MSTransportable(), MSContainer::proceed(), MSPerson::proceed(), removeStage(), rerouteParkingArea(), MSContainer::routeOutput(), MSTransportable::Stage_Trip::setArrived(), and ~MSTransportable().
|
protected |
This transportable's type. (mainly used for drawing related information Note sure if it is really necessary.
Definition at line 801 of file MSTransportable.h.
Referenced by getSingularType(), GUIPerson::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), getVehicleType(), replaceVehicleType(), and ~MSTransportable().
|
protected |
Whether events shall be written.
Definition at line 804 of file MSTransportable.h.
|
staticprotected |
the offset for computing positions when standing at an edge
Definition at line 794 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Trip::getPosition(), MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().