SUMO - Simulation of Urban MObility
GUIPerson Class Reference

#include <GUIPerson.h>

Inheritance diagram for GUIPerson:
Inheritance graph
Collaboration diagram for GUIPerson:
Collaboration graph

Data Structures

class  GUIPersonPopupMenu
 

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 }
 
enum  VisualisationFeatures { VO_SHOW_WALKINGAREA_PATH = 1, VO_SHOW_ROUTE = 2, VO_TRACKED = 8 }
 Additional visualisation feature ids. More...
 

Public Member Functions

void appendStage (Stage *stage, int next=-1)
 Appends the given stage to the current plan. More...
 
void drawName (const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
 draw name of item More...
 
virtual double getAngle () const
 return the current angle of the transportable More...
 
const MSEdgegetArrivalEdge () 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::StagegetCurrentStage () 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 MSEdgegetDestination () const
 Returns the current destination. More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
ConstMSEdgeVector getEdges (int next) const
 Return the edges of the nth next stage. More...
 
const MSEdgegetFromEdge () const
 Returns the departure edge. More...
 
const std::string & getID () const
 returns the id of the transportable More...
 
InfluencergetInfluencer ()
 Returns the velocity/lane influencer. More...
 
const InfluencergetInfluencer () const
 
const MSEdgegetNextDestination () const
 Returns the destination after the current destination. More...
 
const std::string & getNextEdge () const
 return the list of internal edges if this person is walking and the pedestrian model allows it More...
 
const MSEdgegetNextEdgePtr () const
 returns the next edge ptr if this person is walking and the pedestrian model allows it 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 SUMOVehicleParametergetParameter () const
 
MSVehicleTypegetSingularType ()
 Replaces the current vehicle type with a new one used by this vehicle only. More...
 
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...
 
SUMOVehiclegetVehicle () const
 The vehicle associated with this transportable. More...
 
const MSVehicleTypegetVehicleType () const
 
 GUIPerson (const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, const double speedFactor)
 Constructor. More...
 
bool hasInfluencer () const
 
bool isSelected () const
 whether this person is selected in the GUI 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...
 
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...
 
void reroute (ConstMSEdgeVector &newEdges)
 set new walk 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 setPositionInVehicle (const Position &pos)
 
void setRemoteState (Position xyPos)
 sets position outside the road network 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...
 
 ~GUIPerson ()
 destructor More...
 
inherited from GUIGlObject
GUIGLObjectPopupMenugetPopUpMenu (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own popup-menu. More...
 
GUIParameterTableWindowgetParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own parameter window. More...
 
GUIParameterTableWindowgetTypeParameterWindow (GUIMainWindow &app, GUISUMOAbstractView &parent)
 Returns an own type parameter window. More...
 
Boundary getCenteringBoundary () const
 Returns the boundary to which the view shall be centered in order to show the object. More...
 
void drawGL (const GUIVisualizationSettings &s) const
 Draws the object. More...
 
virtual void drawGLAdditional (GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
 Draws additionally triggered visualisations. More...
 
inherited from MSPerson with added locking
double getEdgePos () const
 return the offset from the start of the current edge More...
 
Position getPosition () const
 return the Network coordinate of the person More...
 
double getNaviDegree () const
 return the current angle of the person More...
 
double getWaitingSeconds () const
 the time this person spent waiting in seconds More...
 
double getSpeed () const
 the current speed of the person More...
 
Additional visualisations
bool hasActiveAddVisualisation (GUISUMOAbstractView *const parent, int which) const
 Returns whether the named feature is enabled in the given view. More...
 
void addActiveAddVisualisation (GUISUMOAbstractView *const parent, int which)
 Adds the named visualisation feature to the given view. More...
 
void removeActiveAddVisualisation (GUISUMOAbstractView *const parent, int which)
 Adds the named visualisation feature to the given view. More...
 
Atomar getter methods

Returns the full name appearing in the tool tip

Returns
This object's typed id
const std::string & getFullName () const
 
virtual const std::string & getParentName () const
 Returns the name of the parent object (if any) More...
 
GUIGlID getGlID () const
 Returns the numerical id of the object. More...
 
interfaces to be implemented by derived classes
virtual const std::string & getMicrosimID () const
 Returns the id of the object as known to microsim. More...
 
virtual void setMicrosimID (const std::string &newID)
 Changes the microsimID of the object. More...
 
GUIGlObjectType getType () const
 Returns the type of the object as coded in GUIGlObjectType. More...
 
Parameter table window I/O

Lets this object know a parameter window showing the object's values was opened

Parameters
[in]wThe opened parameter window
void addParameterTable (GUIParameterTableWindow *w)
 
void removeParameterTable (GUIParameterTableWindow *w)
 Lets this object know a parameter window showing the object's values was closed. More...
 

Data Fields

std::map< GUISUMOAbstractView *, int > myAdditionalVisualizations
 Enabled visualisations, per view. More...
 

Static Public Attributes

static const GUIGlID INVALID_ID = 0
 
static StringBijection< GUIGlObjectTypeTypeNames
 associates object types with strings More...
 

Protected Member Functions

void buildAdditionalsPopupOptions (GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
 build basic additional popup options. Used to unify pop-ups menu in netedit and SUMO-GUI More...
 
void buildShapePopupOptions (GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
 build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI More...
 
void setPrefix (const std::string &prefix)
 usually names are prefixed by a type-specific string. this method can be used to change the default More...
 
helper methods for building popup-menus
void buildPopupHeader (GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
 Builds the header. More...
 
void buildCenterPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to center to the object. More...
 
void buildNameCopyPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds entries which allow to copy the name / typed name into the clipboard. More...
 
void buildSelectionPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to (de)select the object. More...
 
void buildShowParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the parameter window. More...
 
void buildShowTypeParamsPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the type parameter window. More...
 
void buildPositionCopyEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position. More...
 
void buildShowManipulatorPopupEntry (GUIGLObjectPopupMenu *ret, bool addSeparator=true)
 Builds an entry which allows to open the manipulator window. More...
 

Protected Attributes

const SUMOVehicleParametermyParameter
 the plan of the transportable More...
 
MSTransportablePlanmyPlan
 the plan of the transportable More...
 
MSTransportablePlan::iterator myStep
 the iterator over the route More...
 
MSVehicleTypemyVType
 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

double getColorValue (int activeScheme) const
 gets the color value according to the current scheme index More...
 
void setColor (const GUIVisualizationSettings &s) const
 sets the color according to the currente settings More...
 
bool setFunctionalColor (int activeScheme) const
 sets the color according to the current scheme index and some vehicle function More...
 
drawing helper methods
void drawAction_drawAsTriangle (const GUIVisualizationSettings &s) const
 
void drawAction_drawAsPoly (const GUIVisualizationSettings &s) const
 
void drawAction_drawAsImage (const GUIVisualizationSettings &s) const
 
void drawAction_drawWalkingareaPath (const GUIVisualizationSettings &s) const
 

Private Attributes

MFXMutex myLock
 The mutex used to avoid concurrent updates of the vehicle buffer. More...
 
Position myPositionInVehicle
 The position of a person while riding a vehicle. More...
 

Detailed Description

Definition at line 60 of file GUIPerson.h.

Member Typedef Documentation

◆ MSTransportablePlan

the structure holding the plan of a transportable

Definition at line 387 of file MSTransportable.h.

Member Enumeration Documentation

◆ StageType

Enumerator
WAITING_FOR_DEPART 
WAITING 
MOVING_WITHOUT_VEHICLE 
DRIVING 

Definition at line 64 of file MSTransportable.h.

◆ VisualisationFeatures

Additional visualisation feature ids.

Enumerator
VO_SHOW_WALKINGAREA_PATH 

show the current walkingarea path

VO_SHOW_ROUTE 

show persons's current route

VO_TRACKED 

track person

Definition at line 203 of file GUIPerson.h.

Constructor & Destructor Documentation

◆ GUIPerson()

GUIPerson::GUIPerson ( const SUMOVehicleParameter pars,
MSVehicleType vtype,
MSTransportable::MSTransportablePlan plan,
const double  speedFactor 
)

Constructor.

Definition at line 153 of file GUIPerson.cpp.

◆ ~GUIPerson()

GUIPerson::~GUIPerson ( )

Member Function Documentation

◆ addActiveAddVisualisation()

void GUIPerson::addActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
)

Adds the named visualisation feature to the given view.

Parameters
[in]parentThe view for which the feature shall be enabled
[in]whichThe visualisation feature to enable
See also
GUISUMOAbstractView::addAdditionalGLVisualisation

Definition at line 527 of file GUIPerson.cpp.

References GUISUMOAbstractView::addAdditionalGLVisualisation(), and myAdditionalVisualizations.

Referenced by GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), and GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath().

◆ addParameterTable()

void GUIGlObject::addParameterTable ( GUIParameterTableWindow w)
inherited

◆ appendStage()

void MSTransportable::appendStage ( Stage stage,
int  next = -1 
)
inherited

◆ buildAdditionalsPopupOptions()

void GUIGlObject::buildAdditionalsPopupOptions ( GUIMainWindow app,
GUIGLObjectPopupMenu ret,
const std::string &  type 
)
protectedinherited

◆ buildCenterPopupEntry()

◆ buildNameCopyPopupEntry()

◆ buildPopupHeader()

◆ buildPositionCopyEntry()

◆ buildSelectionPopupEntry()

◆ buildShapePopupOptions()

void GUIGlObject::buildShapePopupOptions ( GUIMainWindow app,
GUIGLObjectPopupMenu ret,
const std::string &  type 
)
protectedinherited

◆ buildShowManipulatorPopupEntry()

void GUIGlObject::buildShowManipulatorPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the manipulator window.

Parameters

Definition at line 246 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_MANIP, and MID_MANIP.

Referenced by GUILaneSpeedTrigger::getPopUpMenu(), and GUITriggeredRerouter::getPopUpMenu().

◆ buildShowParamsPopupEntry()

◆ buildShowTypeParamsPopupEntry()

void GUIGlObject::buildShowTypeParamsPopupEntry ( GUIGLObjectPopupMenu ret,
bool  addSeparator = true 
)
protectedinherited

Builds an entry which allows to open the type parameter window.

Parameters

Definition at line 225 of file GUIGlObject.cpp.

References GUIIconSubSys::getIcon(), ICON_APP_TABLE, and MID_SHOWTYPEPARS.

Referenced by getPopUpMenu(), and GUIBaseVehicle::getPopUpMenu().

◆ drawAction_drawAsImage()

◆ drawAction_drawAsPoly()

◆ drawAction_drawAsTriangle()

void GUIPerson::drawAction_drawAsTriangle ( const GUIVisualizationSettings s) const
private

◆ drawAction_drawWalkingareaPath()

◆ drawGL()

◆ drawGLAdditional()

◆ drawName()

◆ getAngle()

double MSTransportable::getAngle ( ) const
virtualinherited

◆ getArrivalEdge()

const MSEdge* MSTransportable::getArrivalEdge ( ) const
inlineinherited

◆ getArrivalPos()

double MSTransportable::getArrivalPos ( ) const
inlineinherited

◆ getBoundingBox()

◆ getCenteringBoundary()

Boundary GUIPerson::getCenteringBoundary ( ) const
virtual

Returns the boundary to which the view shall be centered in order to show the object.

Returns
The boundary the object is within
See also
GUIGlObject::getCenteringBoundary

Implements GUIGlObject.

Definition at line 247 of file GUIPerson.cpp.

References Boundary::add(), getPosition(), MSTransportable::getVehicleType(), Boundary::grow(), and MAX2().

◆ getColorValue()

double GUIPerson::getColorValue ( int  activeScheme) const
private

gets the color value according to the current scheme index

Definition at line 396 of file GUIPerson.cpp.

References MSTransportable::getCurrentStageType(), GUIGlObject::getGlID(), getSpeed(), getWaitingSeconds(), GLO_PERSON, gSelected, GUISelectedStorage::isSelected(), and MSTransportable::isWaiting4Vehicle().

Referenced by setColor().

◆ getCurrentStage()

◆ getCurrentStageDescription()

std::string MSTransportable::getCurrentStageDescription ( ) const
inlineinherited

Returns the current stage description as a string.

Definition at line 469 of file MSTransportable.h.

Referenced by GUIContainer::getParameterWindow(), getParameterWindow(), libsumo::Person::moveTo(), libsumo::Person::moveToXY(), and MSXMLRawOut::writeTransportable().

◆ getCurrentStageType()

StageType MSTransportable::getCurrentStageType ( ) const
inlineinherited

◆ getDesiredDepart()

SUMOTime MSTransportable::getDesiredDepart ( ) const
inherited

◆ getDestination()

const MSEdge& MSTransportable::getDestination ( ) const
inlineinherited

◆ getEdge()

◆ getEdgePos()

double GUIPerson::getEdgePos ( ) const
virtual

return the offset from the start of the current edge

Reimplemented from MSTransportable.

Definition at line 416 of file GUIPerson.cpp.

References MSTransportable::getEdgePos(), and myLock.

Referenced by getParameterWindow(), and setPositionInVehicle().

◆ getEdges()

◆ getFromEdge()

◆ getFullName()

◆ getGlID()

GUIGlID GUIGlObject::getGlID ( ) const
inherited

Returns the numerical id of the object.

Returns
This object's gl-id

Definition at line 120 of file GUIGlObject.cpp.

References GUIGlObject::myGlID.

Referenced by GNEEdge::addConnection(), GNENet::addReversedEdge(), GUIMessageWindow::appendMsg(), GNEAdditionalHandler::buildCalibrator(), GNEAdditionalHandler::buildRouteProbe(), GUIGlObject::buildSelectionPopupEntry(), GNEAdditionalHandler::buildVaporizer(), GUINet::createTLWrapper(), GNENet::deleteConnection(), GNENet::deleteCrossing(), GNENet::deleteEdge(), GNENet::deleteJunction(), GNENet::deleteLane(), GNENet::deleteSingleEdge(), GNENet::deleteSingleJunction(), GUIVehicle::drawAction_drawPersonsAndContainers(), GNEDetectorE1::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GNEContainerStop::drawGL(), GNEBusStop::drawGL(), GNEDetectorE2::drawGL(), GNEVaporizer::drawGL(), GNECrossing::drawGL(), GNEJunction::drawGL(), GNEInternalLane::drawGL(), GNEDetectorE3::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GUIPolygon::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GNELane::drawGL(), GUIContainer::drawGL(), GUICalibrator::drawGL(), GNERouteProbe::drawGL(), drawGL(), GNEChargingStation::drawGL(), GUIJunctionWrapper::drawGL(), GUIPointOfInterest::drawGL(), GNEConnection::drawGL(), GNEVariableSpeedSign::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GUIChargingStation::drawGL(), GNERerouter::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIParkingArea::drawGL(), GUIEdge::drawGL(), GNEEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), GUIContainer::drawGLAdditional(), drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GUILane::drawLinkRule(), GUIBaseVehicle::drawOnPos(), GUIMEVehicle::getColorValue(), GUIVehicle::getColorValue(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GUIContainer::getColorValue(), getColorValue(), GNEJunction::getColorValue(), GNEPOI::getGlID(), GNEPOILane::getGlID(), GNEPoly::getGlID(), GUIEdge::getIDs(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), getPopUpMenu(), GNELane::getPopUpMenu(), GUIBaseVehicle::getPopUpMenu(), GUIEdge::getScaleValue(), GUIDialog_GLObjChooser::GUIDialog_GLObjChooser(), GNESelectorFrame::handleIDs(), GNETLSEditorFrame::handleMultiChange(), GNEAdditional::isAdditionalSelected(), GUILane::isLaneOrEdgeSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GUIVehicle::isSelected(), isSelected(), GNEViewParent::isSelected(), GUILane::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUIViewTraffic::onCmdAddRerouter(), GUIGLObjectPopupMenu::onCmdAddSelected(), GUIGLObjectPopupMenu::onCmdCenter(), GNEDeleteFrame::onCmdCenterChildItem(), GNEInspectorFrame::onCmdCenterItem(), GNEViewNet::onCmdClearConnections(), GUIViewTraffic::onCmdCloseEdge(), GUIViewTraffic::onCmdCloseLane(), GNEViewNet::onCmdDuplicateLane(), GUIApplicationWindow::onCmdEditChosen(), GUIGLObjectPopupMenu::onCmdRemoveSelected(), GNEViewNet::onCmdResetConnections(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GNEViewNet::onCmdSmoothEdges(), GNEViewNet::onCmdSmoothEdgesElevation(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GNEViewNet::onCmdStraightenEdges(), GNEViewNet::onCmdStraightenEdgesElevation(), GNEViewNet::onLeftBtnPress(), GNEAdditionalFrame::removeAdditional(), GLObjectValuePassConnector< std::pair< SUMOTime, MSPhaseDefinition > >::removeObject(), GNENet::replaceIncomingEdge(), GUIVehicle::selectBlockingFoes(), GNEJunction::setColor(), GUIMessageWindow::setCursorPos(), GNELane::setLaneColor(), GUIBaseVehicle::~GUIBaseVehicle(), GUIGlObject::~GUIGlObject(), and ~GUIPerson().

◆ getID()

const std::string & MSTransportable::getID ( ) const
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(), 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(), MSContainer::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), libsumo::Helper::setRemoteControlled(), MSContainer::tripInfoOutput(), MSPerson::tripInfoOutput(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().

◆ getInfluencer() [1/2]

MSPerson::Influencer & MSPerson::getInfluencer ( )
inherited

Returns the velocity/lane influencer.

If no influencer was existing before, one is built, first

Returns
Reference to this vehicle's speed influencer

Definition at line 513 of file MSPerson.cpp.

References MSPerson::myInfluencer.

Referenced by libsumo::Helper::setRemoteControlled().

◆ getInfluencer() [2/2]

const MSPerson::Influencer * MSPerson::getInfluencer ( ) const
inherited

Definition at line 522 of file MSPerson.cpp.

References MSPerson::myInfluencer.

◆ getMicrosimID()

const std::string & GUIGlObject::getMicrosimID ( ) const
virtualinherited

◆ getNaviDegree()

double GUIPerson::getNaviDegree ( ) const

return the current angle of the person

Definition at line 430 of file GUIPerson.cpp.

References MSTransportable::getAngle(), myLock, and GeomHelper::naviDegree().

Referenced by getParameterWindow(), and setPositionInVehicle().

◆ getNextDestination()

const MSEdge& MSTransportable::getNextDestination ( ) const
inlineinherited

Returns the destination after the current destination.

Definition at line 422 of file MSTransportable.h.

References MSTransportable::myStep.

◆ getNextEdge()

const std::string & MSPerson::getNextEdge ( ) const
inherited

return the list of internal edges if this person is walking and the pedestrian model allows it

Definition at line 437 of file MSPerson.cpp.

References StringUtils::emptyString, Named::getID(), and MSPerson::getNextEdgePtr().

Referenced by libsumo::Person::getNextEdge().

◆ getNextEdgePtr()

const MSEdge * MSPerson::getNextEdgePtr ( ) const
inherited

returns the next edge ptr if this person is walking and the pedestrian model allows it

Definition at line 456 of file MSPerson.cpp.

References MSTransportable::getCurrentStageType(), PedestrianState::getNextEdge(), MSPerson::MSPersonStage_Walking::getPedestrianState(), and MSTransportable::MOVING_WITHOUT_VEHICLE.

Referenced by MSPerson::getNextEdge(), and MSPedestrianPushButton::isActiveForEdge().

◆ getNumRemainingStages()

int MSTransportable::getNumRemainingStages ( ) const
inherited

◆ getNumStages()

int MSTransportable::getNumStages ( ) const
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().

◆ getParameter()

◆ getParameterWindow()

GUIParameterTableWindow * GUIPerson::getParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window
See also
GUIGlObject::getParameterWindow

Implements GUIGlObject.

Definition at line 206 of file GUIPerson.cpp.

References GUIParameterTableWindow::closeBuilding(), MSTransportable::getCurrentStageDescription(), MSTransportable::getDestination(), MSTransportable::getEdge(), getEdgePos(), MSTransportable::getFromEdge(), MSTransportable::getID(), getNaviDegree(), MSTransportable::getParameter(), getSpeed(), MSPerson::getSpeedFactor(), getWaitingSeconds(), GUIParameterTableWindow::mkItem(), and time2string().

◆ getParentName()

const std::string & GUIGlObject::getParentName ( ) const
virtualinherited

Returns the name of the parent object (if any)

Returns
This object's parent id

Reimplemented in GNEAdditional, GNECalibrator, GNEPoly, GNERerouter, GNEPOILane, GNEVariableSpeedSign, GNENetElement, GNEPOI, GNERouteProbe, GNEStoppingPlace, GNEDetector, GUILane, GNEDetectorE3, GNEVaporizer, and GNELane.

Definition at line 114 of file GUIGlObject.cpp.

References StringUtils::emptyString.

Referenced by GUIGLObjectPopupMenu::onCmdCopyEdgeName().

◆ getPopUpMenu()

◆ getPosition()

Position GUIPerson::getPosition ( ) const
virtual

return the Network coordinate of the person

Reimplemented from MSTransportable.

Definition at line 423 of file GUIPerson.cpp.

References MSTransportable::getPosition(), and myLock.

Referenced by drawGL(), getCenteringBoundary(), and setPositionInVehicle().

◆ getSingularType()

MSVehicleType & MSTransportable::getSingularType ( )
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.

Returns
The new modifiable vehicle type
See also
MSTransportable::myVType

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().

◆ getSpeed()

double GUIPerson::getSpeed ( ) const
virtual

the current speed of the person

Reimplemented from MSTransportable.

Definition at line 444 of file GUIPerson.cpp.

References MSTransportable::getSpeed(), and myLock.

Referenced by getColorValue(), getParameterWindow(), and setPositionInVehicle().

◆ getSpeedFactor()

double MSPerson::getSpeedFactor ( ) const
inlinevirtualinherited

the current speed factor of the transportable (where applicable)

Reimplemented from MSTransportable.

Definition at line 302 of file MSPerson.h.

References MSPerson::myChosenSpeedFactor, and MSPerson::reroute().

Referenced by MSPerson::MSPersonStage_Walking::getMaxSpeed(), and getParameterWindow().

◆ getStageType()

StageType MSTransportable::getStageType ( int  next) const
inlineinherited

◆ getType()

GUIGlObjectType GUIGlObject::getType ( ) const
inherited

Returns the type of the object as coded in GUIGlObjectType.

See also
GUIGlObjectType

Definition at line 147 of file GUIGlObject.cpp.

References GUIGlObject::myGLObjectType.

Referenced by GUIGlObject::buildSelectionPopupEntry(), GUIVehicle::drawAction_drawLinkItems(), GUIVehicle::drawAction_drawPersonsAndContainers(), GUIVehicle::drawAction_drawRailCarriages(), drawAction_drawWalkingareaPath(), GNEAdditional::drawChildConnections(), GNEDetectorE1::drawGL(), GNEDetectorEntry::drawGL(), GNEDetectorExit::drawGL(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEDetectorE2::drawGL(), GNEVaporizer::drawGL(), GNECrossing::drawGL(), GNEJunction::drawGL(), GNEDetectorE3::drawGL(), GUIMEInductLoop::MyWrapper::drawGL(), GUIInstantInductLoop::MyWrapper::drawGL(), GUILaneSpeedTrigger::drawGL(), GNELane::drawGL(), GUIContainer::drawGL(), GUICalibrator::drawGL(), GNERouteProbe::drawGL(), drawGL(), GNEChargingStation::drawGL(), GUIJunctionWrapper::drawGL(), GNEVariableSpeedSign::drawGL(), GNEConnection::drawGL(), GUIE3Collector::MyWrapper::drawGL(), GNERerouter::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GUIParkingArea::drawGL(), GNEEdge::drawGL(), GUIE2Collector::MyWrapper::drawGL(), GNECalibrator::drawGL(), GUIInductLoop::MyWrapper::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GUILane::drawGL(), drawGLAdditional(), GUIBaseVehicle::drawGLAdditional(), GNEAdditional::drawLockIcon(), GUIBaseVehicle::drawOnPos(), GNEJunction::getAttribute(), GUIJunctionWrapper::getColorValue(), GUIEdge::getColorValue(), GNELane::getColorValue(), GNEJunction::getColorValue(), GNEViewNet::getConnectionAtPopupPosition(), GNEViewNet::getCrossingAtPopupPosition(), GNEViewNet::getEdgeAtPopupPosition(), GNEViewNet::getEdgesAtPopupPosition(), GNEViewNet::getJunctionAtPopupPosition(), GNEViewNet::getLaneAtPopupPosition(), GUISUMOAbstractView::getObjectAtPosition(), GUISUMOAbstractView::getObjectsAtPosition(), GUIEdge::getScaleValue(), GNESelectorFrame::handleIDs(), GNEAdditional::isAdditionalSelected(), GUIGlChildWindow::isSelected(), GUISUMOViewParent::isSelected(), GNEViewParent::isSelected(), GUISelectedStorage::loadIDs(), GNEViewNet::mergeJunctions(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdBegin2TrackPhases(), GNEConnectorFrame::onCmdClearSelectedConnections(), GUIGLObjectPopupMenu::onCmdCopyEdgeName(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdHideLFLinkItems(), GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowAllRoutes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowBestLanes(), GUIPerson::GUIPersonPopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowCurrentRoute(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowFoes(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdShowLFLinkItems(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdShowPhases(), GUIPerson::GUIPersonPopupMenu::onCmdShowWalkingareaPath(), GUIPerson::GUIPersonPopupMenu::onCmdStartTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStartTrack(), GUIPerson::GUIPersonPopupMenu::onCmdStopTrack(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdStopTrack(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLS2Off(), GUITrafficLightLogicWrapper::GUITrafficLightLogicWrapperPopupMenu::onCmdSwitchTLSLogic(), GNEViewNet::onLeftBtnPress(), GNEDeleteFrame::removeAttributeCarrier(), GNENet::retrieveAttributeCarriers(), LayeredRTree::selectLayer(), GNEJunction::setAttribute(), GNEJunction::setColor(), GNELane::setLaneColor(), GNEDeleteFrame::showChildsOfMarkedAttributeCarrier(), and GUISelectedStorage::toggleSelection().

◆ getTypeParameterWindow()

GUIParameterTableWindow * GUIPerson::getTypeParameterWindow ( GUIMainWindow app,
GUISUMOAbstractView parent 
)
virtual

Returns an own type parameter window.

Parameters
[in]appThe application needed to build the parameter window
[in]parentThe parent window needed to build the parameter window
Returns
The built parameter window

Reimplemented from GUIGlObject.

Definition at line 228 of file GUIPerson.cpp.

References GUIParameterTableWindow::closeBuilding(), MSVehicleType::getHeight(), MSVehicleType::getID(), MSVehicleType::getLength(), Parameterised::getMap(), MSVehicleType::getMaxSpeed(), MSVehicleType::getMinGap(), MSVehicleType::getParameter(), MSVehicleType::getWidth(), GUIParameterTableWindow::mkItem(), and MSTransportable::myVType.

◆ getVehicle()

SUMOVehicle* MSTransportable::getVehicle ( ) const
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().

◆ getVehicleType()

◆ getWaitingSeconds()

double GUIPerson::getWaitingSeconds ( ) const
virtual

the time this person spent waiting in seconds

Reimplemented from MSTransportable.

Definition at line 437 of file GUIPerson.cpp.

References MSTransportable::getWaitingSeconds(), and myLock.

Referenced by getColorValue(), getParameterWindow(), and setPositionInVehicle().

◆ hasActiveAddVisualisation()

bool GUIPerson::hasActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
) const

Returns whether the named feature is enabled in the given view.

Parameters
[in]parentThe view for which the feature may be enabled
[in]whichThe visualisation feature
Returns
see comment

Definition at line 521 of file GUIPerson.cpp.

References myAdditionalVisualizations.

Referenced by drawGLAdditional(), and getPopUpMenu().

◆ hasInfluencer()

bool MSPerson::hasInfluencer ( ) const
inlineinherited

Definition at line 359 of file MSPerson.h.

References MSPerson::myInfluencer, and MSPerson::setRemoteState().

◆ isSelected()

bool GUIPerson::isSelected ( ) const
virtual

whether this person is selected in the GUI

Reimplemented from MSPerson.

Definition at line 543 of file GUIPerson.cpp.

References GUIGlObject::getGlID(), GLO_PERSON, gSelected, and GUISelectedStorage::isSelected().

Referenced by setPositionInVehicle().

◆ isWaiting4Vehicle()

bool MSTransportable::isWaiting4Vehicle ( ) const
inlineinherited

Whether the transportable waits for a vehicle.

Definition at line 511 of file MSTransportable.h.

Referenced by GUIContainer::drawGL(), drawGL(), GUIContainer::getColorValue(), and getColorValue().

◆ isWaitingFor()

bool MSTransportable::isWaitingFor ( const std::string &  line) const
inlineinherited

Whether the transportable waits for a vehicle of the line specified.

Definition at line 506 of file MSTransportable.h.

◆ proceed()

◆ removeActiveAddVisualisation()

void GUIPerson::removeActiveAddVisualisation ( GUISUMOAbstractView *const  parent,
int  which 
)

Adds the named visualisation feature to the given view.

Parameters
[in]parentThe view for which the feature shall be enabled
[in]whichThe visualisation feature to enable
See also
GUISUMOAbstractView::removeAdditionalGLVisualisation

Definition at line 537 of file GUIPerson.cpp.

References myAdditionalVisualizations, and GUISUMOAbstractView::removeAdditionalGLVisualisation().

Referenced by GUIPerson::GUIPersonPopupMenu::onCmdHideCurrentRoute(), and GUIPerson::GUIPersonPopupMenu::onCmdHideWalkingareaPath().

◆ removeParameterTable()

void GUIGlObject::removeParameterTable ( GUIParameterTableWindow w)
inherited

Lets this object know a parameter window showing the object's values was closed.

Parameters
[in]wThe closed parameter window

Definition at line 261 of file GUIGlObject.cpp.

References GUIGlObject::myParamWindows.

Referenced by GUIParameterTableWindow::~GUIParameterTableWindow().

◆ removeStage()

◆ replaceVehicleType()

void MSTransportable::replaceVehicleType ( MSVehicleType type)
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".

Parameters
[in]typeThe new vehicle type
See also
MSTransportable::myVType

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().

◆ reroute()

◆ routeOutput()

void MSPerson::routeOutput ( OutputDevice os) const
virtualinherited

◆ setColor()

◆ setDeparted()

void MSTransportable::setDeparted ( SUMOTime  now)
inherited

logs depart time of the current stage

Definition at line 425 of file MSTransportable.cpp.

Referenced by MSTransportableControl::abortWaitingForVehicle().

◆ setFunctionalColor()

bool GUIPerson::setFunctionalColor ( int  activeScheme) const
private

sets the color according to the current scheme index and some vehicle function

Definition at line 351 of file GUIPerson.cpp.

References RGBColor::fromHSV(), MSTransportable::getAngle(), MSTransportable::getParameter(), MSTransportable::getVehicleType(), GeomHelper::naviDegree(), GLHelper::setColor(), VEHPARS_COLOR_SET, and VTYPEPARS_COLOR_SET.

Referenced by setColor().

◆ setMicrosimID()

void GUIGlObject::setMicrosimID ( const std::string &  newID)
virtualinherited

Changes the microsimID of the object.

Note
happens in NETEDIT

Reimplemented in GNEEdge.

Definition at line 140 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myMicrosimID.

Referenced by GNEAdditional::changeAdditionalID(), GNENet::renameJunction(), GNELane::setIndex(), GNEEdge::setMicrosimID(), and GNEConnection::updateID().

◆ setPositionInVehicle()

void GUIPerson::setPositionInVehicle ( const Position pos)
inline

◆ setPrefix()

void GUIGlObject::setPrefix ( const std::string &  prefix)
protectedinherited

usually names are prefixed by a type-specific string. this method can be used to change the default

Definition at line 270 of file GUIGlObject.cpp.

References GUIGlObject::createFullName(), GUIGlObject::myFullName, and GUIGlObject::myPrefix.

◆ setRemoteState()

void MSPerson::setRemoteState ( Position  xyPos)
inherited

sets position outside the road network

Referenced by MSPerson::hasInfluencer().

◆ setSpeed()

void MSTransportable::setSpeed ( double  speed)
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().

◆ tripInfoOutput()

void MSPerson::tripInfoOutput ( OutputDevice os,
MSTransportable transportable 
) const
virtualinherited

Called on writing tripinfo output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSTransportable.

Definition at line 469 of file MSPerson.cpp.

References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::myPlan, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Field Documentation

◆ INVALID_ID

const GUIGlID GUIGlObject::INVALID_ID = 0
staticinherited

◆ myAdditionalVisualizations

std::map<GUISUMOAbstractView*, int> GUIPerson::myAdditionalVisualizations

Enabled visualisations, per view.

Definition at line 213 of file GUIPerson.h.

Referenced by addActiveAddVisualisation(), getPopUpMenu(), hasActiveAddVisualisation(), removeActiveAddVisualisation(), and ~GUIPerson().

◆ myLock

MFXMutex GUIPerson::myLock
mutableprivate

The mutex used to avoid concurrent updates of the vehicle buffer.

Definition at line 246 of file GUIPerson.h.

Referenced by getEdgePos(), getNaviDegree(), getPosition(), getSpeed(), getWaitingSeconds(), and ~GUIPerson().

◆ myParameter

const SUMOVehicleParameter* MSTransportable::myParameter
protectedinherited

◆ myPlan

◆ myPositionInVehicle

Position GUIPerson::myPositionInVehicle
private

The position of a person while riding a vehicle.

Definition at line 249 of file GUIPerson.h.

Referenced by drawGL(), and setPositionInVehicle().

◆ myStep

◆ myVType

MSVehicleType* MSTransportable::myVType
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(), getTypeParameterWindow(), MSTransportable::getVehicleType(), MSTransportable::replaceVehicleType(), and MSTransportable::~MSTransportable().

◆ myWriteEvents

bool MSTransportable::myWriteEvents
protectedinherited

Whether events shall be written.

Definition at line 575 of file MSTransportable.h.

◆ ROADSIDE_OFFSET

const double MSTransportable::ROADSIDE_OFFSET
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().

◆ TypeNames

StringBijection< GUIGlObjectType > GUIGlObject::TypeNames
staticinherited

associates object types with strings

Definition at line 75 of file GUIGlObject.h.


The documentation for this class was generated from the following files: