![]() |
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Data Structures | |
class | MSContainerStage_Driving |
class | MSContainerStage_Tranship |
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 } |
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... | |
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... | |
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... | |
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 |
virtual double | getWaitingSeconds () const |
the time this transportable spent waiting in seconds More... | |
bool | isWaiting4Vehicle () const |
Whether the transportable waits for a vehicle. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the transportable waits for a vehicle of the line specified. More... | |
MSContainer (const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportablePlan *plan) | |
constructor More... | |
virtual bool | proceed (MSNet *net, SUMOTime time) |
void | removeStage (int next) |
removes the nth next stage More... | |
void | replaceVehicleType (MSVehicleType *type) |
Replaces the current vehicle type by the one given. More... | |
virtual void | routeOutput (OutputDevice &os) const |
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, MSTransportable *transportable) const |
Called on writing tripinfo output. More... | |
virtual | ~MSContainer () |
destructor More... | |
Protected Attributes | |
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 | |
MSContainer (const MSContainer &) | |
Invalidated copy constructor. More... | |
MSContainer & | operator= (const MSContainer &) |
Invalidated assignment operator. More... | |
The class holds a simulated container together with its movement stages
Definition at line 67 of file MSContainer.h.
|
inherited |
the structure holding the plan of a transportable
Definition at line 387 of file MSTransportable.h.
|
inherited |
Enumerator | |
---|---|
WAITING_FOR_DEPART | |
WAITING | |
MOVING_WITHOUT_VEHICLE | |
DRIVING |
Definition at line 64 of file MSTransportable.h.
MSContainer::MSContainer | ( | const SUMOVehicleParameter * | pars, |
MSVehicleType * | vtype, | ||
MSTransportablePlan * | plan | ||
) |
constructor
Definition at line 259 of file MSContainer.cpp.
|
virtual |
destructor
Definition at line 264 of file MSContainer.cpp.
|
private |
Invalidated copy constructor.
|
inherited |
Appends the given stage to the current plan.
Definition at line 466 of file MSTransportable.cpp.
References MSTransportable::getID(), MSTransportable::myPlan, MSTransportable::myStep, and toString().
Referenced by libsumo::Person::appendDrivingStage(), libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), MSTransportable::getVehicle(), MSTransportable::removeStage(), and MSPerson::reroute().
|
virtualinherited |
return the current angle of the transportable
Reimplemented in GUIContainer.
Definition at line 440 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), GUIContainer::getAngle(), MSTransportable::getBoundingBox(), GUIPerson::getNaviDegree(), GUIPerson::setFunctionalColor(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
returns the final arrival edge
Definition at line 535 of file MSTransportable.h.
References MSTransportable::getBoundingBox(), MSTransportable::getSingularType(), MSTransportable::myPlan, and MSTransportable::replaceVehicleType().
Referenced by libsumo::Person::appendWaitingStage(), and libsumo::Person::rerouteTraveltime().
|
inlineinherited |
returns the final arrival pos
Definition at line 530 of file MSTransportable.h.
References MSTransportable::myPlan.
Referenced by libsumo::Person::appendWaitingStage(), libsumo::Person::appendWalkingStage(), MSPerson::reroute(), and libsumo::Person::rerouteTraveltime().
|
inherited |
return the bounding box of the person
Definition at line 531 of file MSTransportable.cpp.
References PositionVector::append(), MSTransportable::getAngle(), MSVehicleType::getLength(), MSTransportable::getPosition(), MSTransportable::getVehicleType(), PositionVector::move2side(), POSITION_EPS, and PositionVector::reverse().
Referenced by MSTransportable::getArrivalEdge().
|
inlineinherited |
Return the current stage.
Definition at line 474 of file MSTransportable.h.
References MSTransportable::myStep.
Referenced by MSTransportableControl::abortWaitingForVehicle(), GUIPerson::drawAction_drawWalkingareaPath(), GUIPerson::drawGLAdditional(), libsumo::Person::moveToXY(), MSEdge::transportable_by_position_sorter::operator()(), and MSPerson::Influencer::postProcessRemoteControl().
|
inlineinherited |
Returns the current stage description as a string.
Definition at line 469 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), libsumo::Person::moveTo(), libsumo::Person::moveToXY(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
the current stage type of the transportable
Definition at line 457 of file MSTransportable.h.
Referenced by MSPModel_Striping::add(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPerson::drawGLAdditional(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), MSPerson::getNextEdgePtr(), GUIContainer::getPosition(), and libsumo::Person::rerouteTraveltime().
|
inherited |
Returns the desired departure time.
Definition at line 420 of file MSTransportable.cpp.
References SUMOVehicleParameter::depart, and MSTransportable::myParameter.
Referenced by MSTransportable::getVehicleType(), routeOutput(), tripInfoOutput(), and MSPerson::tripInfoOutput().
|
inlineinherited |
Returns the current destination.
Definition at line 417 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSDevice_Transportable::notifyLeave(), and MSDevice_Transportable::notifyMove().
|
inlineinherited |
Returns the current edge.
Definition at line 427 of file MSTransportable.h.
Referenced by MSPModel_Striping::add(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), GUIContainer::getPosition(), libsumo::Person::getRoadID(), libsumo::Person::moveToXY(), MSTransportable::removeStage(), and libsumo::Person::rerouteTraveltime().
|
virtualinherited |
Return the position on the edge.
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 430 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getEdgePos(), GUIPerson::getEdgePos(), libsumo::Person::getLanePosition(), libsumo::Person::moveToXY(), MSTransportable::removeStage(), MSPerson::reroute(), libsumo::Person::rerouteTraveltime(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Return the edges of the nth next stage.
Definition at line 479 of file MSTransportable.h.
References MSTransportable::Stage::getEdges(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::myPlan, MSTransportable::myStep, MSTransportable::Stage::routeOutput(), and MSTransportable::Stage::tripInfoOutput().
Referenced by libsumo::Person::getEdges(), and libsumo::Person::rerouteTraveltime().
|
inlineinherited |
Returns the departure edge.
Definition at line 432 of file MSTransportable.h.
References MSTransportable::Stage::getAngle(), MSTransportable::Stage::getEdgePos(), MSTransportable::Stage::getPosition(), MSTransportable::Stage::getSpeed(), and MSTransportable::getWaitingSeconds().
Referenced by GUIContainer::getParameterWindow(), and GUIPerson::getParameterWindow().
|
inherited |
returns the id of the transportable
Definition at line 415 of file MSTransportable.cpp.
References SUMOVehicleParameter::id, and MSTransportable::myParameter.
Referenced by MSTransportableControl::abortWaitingForVehicle(), MSPModel_Striping::add(), MSBaseVehicle::addContainer(), MSVehicle::addContainer(), MSBaseVehicle::addPerson(), MSVehicle::addPerson(), MSTransportable::appendStage(), libsumo::Person::appendWalkingStage(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), 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(), GUIPerson::getParameterWindow(), MSTransportable::getSingularType(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), libsumo::Person::moveToXY(), MSDevice_Transportable::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSPerson::reroute(), MSContainer::MSContainerStage_Driving::routeOutput(), routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), libsumo::Helper::setRemoteControlled(), tripInfoOutput(), MSPerson::tripInfoOutput(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Returns the destination after the current destination.
Definition at line 422 of file MSTransportable.h.
References MSTransportable::myStep.
|
inherited |
Return the number of remaining stages (including the current)
Definition at line 456 of file MSTransportable.cpp.
References MSTransportable::myPlan, and MSTransportable::myStep.
Referenced by libsumo::Person::getEdges(), MSTransportable::getEdges(), libsumo::Person::getRemainingStages(), libsumo::Person::getStage(), libsumo::Person::removeStage(), MSPerson::reroute(), and libsumo::Person::rerouteTraveltime().
|
inherited |
Return the total number stages in this persons plan.
Definition at line 461 of file MSTransportable.cpp.
References MSTransportable::myPlan.
Referenced by libsumo::Person::getEdges(), MSTransportable::getEdges(), and libsumo::Person::getStage().
|
inlineinherited |
Definition at line 402 of file MSTransportable.h.
References MSTransportable::myParameter.
Referenced by MSTransportableControl::add(), libsumo::Person::getColor(), libsumo::Person::getParameter(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), GUIContainer::setFunctionalColor(), GUIPerson::setFunctionalColor(), and libsumo::Person::setParameter().
|
virtualinherited |
Return the Network coordinate of the transportable.
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 435 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by MSTransportable::getBoundingBox(), MSLink::getLeaderInfo(), libsumo::Person::getPosition(), TraCIServerAPI_Person::getPosition(), GUIContainer::getPosition(), GUIPerson::getPosition(), libsumo::Person::moveToXY(), and MSFCDExport::writeTransportable().
|
inherited |
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 520 of file MSTransportable.cpp.
References MSVehicleType::buildSingularType(), MSVehicleType::getID(), MSTransportable::getID(), MSVehicleType::isVehicleSpecific(), MSTransportable::myVType, and MSTransportable::replaceVehicleType().
Referenced by MSTransportable::getArrivalEdge(), and libsumo::Person::getSingularVType().
|
virtualinherited |
the current speed of the transportable
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 450 of file MSTransportable.cpp.
Referenced by libsumo::Person::getSpeed(), GUIContainer::getSpeed(), GUIPerson::getSpeed(), and MSFCDExport::writeTransportable().
|
inlinevirtualinherited |
the current speed factor of the transportable (where applicable)
Reimplemented in MSPerson.
Definition at line 452 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow().
|
inlineinherited |
the stage type for the nth next stage
Definition at line 462 of file MSTransportable.h.
References MSTransportable::Stage::getStageType(), MSTransportable::myPlan, and MSTransportable::myStep.
Referenced by libsumo::Person::getStage(), libsumo::Person::moveToXY(), and MSPerson::Influencer::postProcessRemoteControl().
|
inlineinherited |
The vehicle associated with this transportable.
Definition at line 516 of file MSTransportable.h.
References MSTransportable::appendStage(), MSTransportable::removeStage(), and MSTransportable::Stage::setSpeed().
Referenced by libsumo::Person::getVehicle().
|
inlineinherited |
Definition at line 406 of file MSTransportable.h.
References MSTransportable::getDesiredDepart(), MSTransportable::myVType, and MSTransportable::Stage::setDeparted().
Referenced by MSStoppingPlace::addTransportable(), libsumo::Person::appendWalkingStage(), GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), MSTransportable::getBoundingBox(), GUIPerson::getCenteringBoundary(), MSPModel_Striping::PState::getImpatience(), MSLink::getLeaderInfo(), MSPModel_Striping::PState::getLength(), MSPerson::MSPersonStage_Walking::getMaxSpeed(), MSPModel_Striping::PState::getMinGap(), MSPModel_Striping::getNextLaneObstacles(), libsumo::Person::getTypeID(), MSPModel_Striping::PState::ignoreRed(), MSPModel_Striping::moveInDirectionOnLane(), libsumo::Person::moveToXY(), MSPModel_Striping::nextBlocking(), MSPModel_Striping::PState::otherStripe(), MSStoppingPlace::removeTransportable(), MSPerson::reroute(), libsumo::Person::rerouteTraveltime(), MSPerson::routeOutput(), GUIContainer::setFunctionalColor(), and GUIPerson::setFunctionalColor().
|
virtualinherited |
the time this transportable spent waiting in seconds
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 445 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by MSTransportable::getFromEdge(), GUIContainer::getWaitingSeconds(), GUIPerson::getWaitingSeconds(), libsumo::Person::getWaitingTime(), and MSPedestrianPushButton::isActiveForEdge().
|
inlineinherited |
Whether the transportable waits for a vehicle.
Definition at line 511 of file MSTransportable.h.
Referenced by GUIContainer::drawGL(), GUIPerson::drawGL(), GUIContainer::getColorValue(), and GUIPerson::getColorValue().
|
inlineinherited |
Whether the transportable waits for a vehicle of the line specified.
Definition at line 506 of file MSTransportable.h.
|
private |
Invalidated assignment operator.
Implements MSTransportable.
Definition at line 269 of file MSContainer.cpp.
References MSTransportable::Stage::getEdge(), MSTransportable::myPlan, MSTransportable::myStep, MSEdge::removeContainer(), and MSTransportable::Stage::setArrived().
|
inherited |
removes the nth next stage
Definition at line 482 of file MSTransportable.cpp.
References MSTransportable::appendStage(), MSTransportable::getEdge(), MSTransportable::getEdgePos(), MSNet::getInstance(), MSTransportable::myPlan, MSTransportable::myStep, and MSTransportable::proceed().
Referenced by MSTransportable::getVehicle(), libsumo::Person::removeStage(), and MSPerson::reroute().
|
inherited |
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 511 of file MSTransportable.cpp.
References MSNet::getInstance(), MSNet::getVehicleControl(), MSVehicleType::isVehicleSpecific(), MSTransportable::myVType, and MSVehicleControl::removeVType().
Referenced by MSTransportable::getArrivalEdge(), MSTransportable::getSingularType(), and libsumo::Person::setType().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 295 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSNet::getInstance(), OutputDevice::lf(), MSTransportable::myPlan, MSTransportable::myStep, OutputDevice::openTag(), SUMO_ATTR_DEPART, SUMO_ATTR_ID, SUMO_TAG_CONTAINER, time2string(), and OutputDevice::writeAttr().
|
inherited |
logs depart time of the current stage
Definition at line 425 of file MSTransportable.cpp.
Referenced by MSTransportableControl::abortWaitingForVehicle().
|
inherited |
sets the walking speed (ignored in other stages)
Definition at line 503 of file MSTransportable.cpp.
References MSTransportable::myPlan.
Referenced by libsumo::Person::setSpeed().
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 285 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::myPlan, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
protectedinherited |
the plan of the transportable
Definition at line 568 of file MSTransportable.h.
Referenced by MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::getParameter(), MSPerson::routeOutput(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the plan of the transportable
Definition at line 578 of file MSTransportable.h.
Referenced by MSTransportable::appendStage(), MSTransportable::getArrivalEdge(), MSTransportable::getArrivalPos(), MSTransportable::getEdges(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::getStageType(), MSTransportable::MSTransportable(), proceed(), MSPerson::proceed(), MSTransportable::removeStage(), routeOutput(), MSPerson::routeOutput(), MSTransportable::setSpeed(), tripInfoOutput(), MSPerson::tripInfoOutput(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the iterator over the route
Definition at line 581 of file MSTransportable.h.
Referenced by MSTransportable::appendStage(), MSTransportable::getCurrentStage(), MSTransportable::getEdges(), MSTransportable::getNextDestination(), MSTransportable::getNumRemainingStages(), MSTransportable::getStageType(), MSTransportable::MSTransportable(), proceed(), MSPerson::proceed(), MSTransportable::removeStage(), routeOutput(), and MSPerson::routeOutput().
|
protectedinherited |
This transportable's type. (mainly used for drawing related information Note sure if it is really necessary.
Definition at line 572 of file MSTransportable.h.
Referenced by MSTransportable::getSingularType(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSTransportable::getVehicleType(), MSTransportable::replaceVehicleType(), and MSTransportable::~MSTransportable().
|
protectedinherited |
Whether events shall be written.
Definition at line 575 of file MSTransportable.h.
|
staticprotectedinherited |
the offset for computing positions when standing at an edge
Definition at line 565 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().