Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
LIBSUMO_NAMESPACE::Person Class Reference

#include <Person.h>

Data Structures

class  reservation_by_id_sorter
 clase for CW Sorter More...

Static Public Member Functions

LIBSUMO_ID_PARAMETER_API static LIBSUMO_VEHICLE_TYPE_GETTER void add (const std::string &personID, const std::string &edgeID, double pos, double depart=libsumo::DEPARTFLAG_NOW, const std::string typeID="DEFAULT_PEDTYPE")
static void appendDrivingStage (const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
static void appendStage (const std::string &personID, const libsumo::TraCIStage &stage)
static void appendWaitingStage (const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
static void appendWalkingStage (const std::string &personID, const std::vector< std::string > &edges, double arrivalPos, double duration=-1, double speed=-1, const std::string &stopID="")
static double getAngle (const std::string &personID)
static std::vector< std::string > getEdges (const std::string &personID, int nextStageIndex=0)
static std::string getLaneID (const std::string &personID)
static double getLanePosition (const std::string &personID)
static std::string getNextEdge (const std::string &personID)
static libsumo::TraCIPosition getPosition (const std::string &personID, const bool includeZ=false)
static libsumo::TraCIPosition getPosition3D (const std::string &personID)
static int getRemainingStages (const std::string &personID)
static std::string getRoadID (const std::string &personID)
static double getSlope (const std::string &personID)
static double getSpeed (const std::string &personID)
static libsumo::TraCIStage getStage (const std::string &personID, int nextStageIndex=0)
static std::vector< libsumo::TraCIReservationgetTaxiReservations (int onlyNew=0)
static std::string getTypeID (const std::string &personID)
static std::string getVehicle (const std::string &personID)
static double getWaitingTime (const std::string &personID)
static double getWalkingDistance (const std::string &personID, const std::string &edgeID, double pos, int laneIndex=0)
static double getWalkingDistance2D (const std::string &personID, double x, double y)
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper, tcpip::Storage *paramData)
static std::shared_ptr< VariableWrapper > makeWrapper ()
static void moveTo (const std::string &personID, const std::string &laneID, double pos, double posLat=libsumo::INVALID_DOUBLE_VALUE)
static void moveToXY (const std::string &personID, const std::string &edgeID, const double x, const double y, double angle=libsumo::INVALID_DOUBLE_VALUE, const int keepRoute=1, double matchThreshold=100)
static void remove (const std::string &personID, char reason=libsumo::REMOVE_VAPORIZED)
static void removeStage (const std::string &personID, int nextStageIndex)
static void replaceStage (const std::string &personID, const int stageIndex, const libsumo::TraCIStage &stage)
static void rerouteTraveltime (const std::string &personID)
static void setSpeed (const std::string &personID, double speed)
static void setType (const std::string &personID, const std::string &typeID)
static std::string splitTaxiReservation (std::string reservationID, const std::vector< std::string > &personIDs)
LIBSUMO_VEHICLE_TYPE_SETTER static LIBSUMO_SUBSCRIPTION_API void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container.

Private Member Functions

 Person ()=delete
 invalidated standard constructor

Static Private Member Functions

static MSStageconvertTraCIStage (const TraCIStage &stage, const std::string personID)
static bool filterReservation (int stateFilter, const Reservation *res, std::vector< libsumo::TraCIReservation > &reservations)
static MSPersongetPerson (const std::string &id)

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
static SubscriptionResults mySubscriptionResults

Detailed Description

Definition at line 45 of file Person.h.

Constructor & Destructor Documentation

◆ Person()

LIBSUMO_NAMESPACE::Person::Person ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ add()

void Person::add ( const std::string & personID,
const std::string & edgeID,
double pos,
double depart = libsumo::DEPARTFLAG_NOW,
const std::string typeID = "DEFAULT_PEDTYPE" )
static

◆ appendDrivingStage()

void Person::appendDrivingStage ( const std::string & personID,
const std::string & toEdge,
const std::string & lines,
const std::string & stopID = "" )
static

Definition at line 765 of file libsumo/Person.cpp.

References appendDrivingStage(), MSTransportable::appendStage(), MSEdge::dictionary(), MSNet::getInstance(), MSEdge::getLength(), getPerson(), and MSNet::getStoppingPlace().

Referenced by appendDrivingStage().

Here is the caller graph for this function:

◆ appendStage()

void Person::appendStage ( const std::string & personID,
const libsumo::TraCIStage & stage )
static

Definition at line 743 of file libsumo/Person.cpp.

References appendStage(), MSTransportable::appendStage(), convertTraCIStage(), and getPerson().

Referenced by appendStage().

Here is the caller graph for this function:

◆ appendWaitingStage()

void Person::appendWaitingStage ( const std::string & personID,
double duration,
const std::string & description = "waiting",
const std::string & stopID = "" )
static

Definition at line 786 of file libsumo/Person.cpp.

References MSTransportable::appendStage(), appendWaitingStage(), MSTransportable::getArrivalEdge(), MSTransportable::getArrivalPos(), MSNet::getInstance(), getPerson(), MSNet::getStoppingPlace(), SUMO_TAG_BUS_STOP, and TIME2STEPS.

Referenced by appendWaitingStage().

Here is the caller graph for this function:

◆ appendWalkingStage()

void Person::appendWalkingStage ( const std::string & personID,
const std::vector< std::string > & edges,
double arrivalPos,
double duration = -1,
double speed = -1,
const std::string & stopID = "" )
static

Definition at line 803 of file libsumo/Person.cpp.

References MSTransportable::appendStage(), appendWalkingStage(), MSTransportable::getArrivalPos(), Named::getID(), MSNet::getInstance(), getPerson(), MSNet::getStoppingPlace(), MSEdge::parseEdgesList(), SUMO_TAG_BUS_STOP, TIME2STEPS, and MSPModel::UNSPECIFIED_POS_LAT.

Referenced by appendWalkingStage().

Here is the caller graph for this function:

◆ convertTraCIStage()

◆ filterReservation()

bool Person::filterReservation ( int stateFilter,
const Reservation * res,
std::vector< libsumo::TraCIReservation > & reservations )
staticprivate

Definition at line 218 of file libsumo/Person.cpp.

References filterReservation(), Named::getID(), and STEPS2TIME.

Referenced by filterReservation(), and getTaxiReservations().

Here is the caller graph for this function:

◆ getAngle()

double Person::getAngle ( const std::string & personID)
static

Definition at line 96 of file libsumo/Person.cpp.

References getAngle(), getPerson(), and GeomHelper::naviDegree().

Referenced by getAngle(), and handleVariable().

Here is the caller graph for this function:

◆ getEdges()

std::vector< std::string > Person::getEdges ( const std::string & personID,
int nextStageIndex = 0 )
static

Definition at line 273 of file libsumo/Person.cpp.

References getEdges(), MSStage::getEdges(), MSTransportable::getNextStage(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), and getPerson().

Referenced by getEdges(), and handleVariable().

Here is the caller graph for this function:

◆ getLaneID()

std::string Person::getLaneID ( const std::string & personID)
static

Definition at line 127 of file libsumo/Person.cpp.

References Named::getIDSecure(), getLaneID(), and getPerson().

Referenced by getLaneID(), and handleVariable().

Here is the caller graph for this function:

◆ getLanePosition()

double Person::getLanePosition ( const std::string & personID)
static

Definition at line 133 of file libsumo/Person.cpp.

References getLanePosition(), and getPerson().

Referenced by getLanePosition(), and handleVariable().

Here is the caller graph for this function:

◆ getNextEdge()

std::string Person::getNextEdge ( const std::string & personID)
static

Definition at line 267 of file libsumo/Person.cpp.

References getNextEdge(), and getPerson().

Referenced by getNextEdge(), and handleVariable().

Here is the caller graph for this function:

◆ getPerson()

◆ getPosition()

libsumo::TraCIPosition Person::getPosition ( const std::string & personID,
const bool includeZ = false )
static

Definition at line 84 of file libsumo/Person.cpp.

References getPerson(), getPosition(), and libsumo::Helper::makeTraCIPosition().

Referenced by getPosition(), getPosition3D(), handleVariable(), and storeShape().

Here is the caller graph for this function:

◆ getPosition3D()

libsumo::TraCIPosition Person::getPosition3D ( const std::string & personID)
static

Definition at line 90 of file libsumo/Person.cpp.

References getPerson(), getPosition(), getPosition3D(), and libsumo::Helper::makeTraCIPosition().

Referenced by getPosition3D().

Here is the caller graph for this function:

◆ getRemainingStages()

int Person::getRemainingStages ( const std::string & personID)
static

Definition at line 367 of file libsumo/Person.cpp.

References getPerson(), and getRemainingStages().

Referenced by getRemainingStages(), and handleVariable().

Here is the caller graph for this function:

◆ getRoadID()

std::string Person::getRoadID ( const std::string & personID)
static

Definition at line 121 of file libsumo/Person.cpp.

References getPerson(), and getRoadID().

Referenced by getRoadID(), and handleVariable().

Here is the caller graph for this function:

◆ getSlope()

double Person::getSlope ( const std::string & personID)
static

Definition at line 102 of file libsumo/Person.cpp.

References MSTransportable::getEdge(), MSTransportable::getEdgePos(), MSEdge::getLanes(), getPerson(), MSLane::getShape(), getSidewalk(), getSlope(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::slopeDegreeAtOffset().

Referenced by getSlope(), and handleVariable().

Here is the caller graph for this function:

◆ getSpeed()

double Person::getSpeed ( const std::string & personID)
static

Definition at line 115 of file libsumo/Person.cpp.

References getPerson(), and getSpeed().

Referenced by getSpeed(), and handleVariable().

Here is the caller graph for this function:

◆ getStage()

◆ getTaxiReservations()

std::vector< libsumo::TraCIReservation > Person::getTaxiReservations ( int onlyNew = 0)
static

Definition at line 177 of file libsumo/Person.cpp.

References Reservation::ASSIGNED, filterReservation(), MSDevice_Taxi::getDispatchAlgorithm(), MSDispatch::getReservations(), MSDispatch::getRunningReservations(), getTaxiReservations(), Reservation::NEW, Reservation::ONBOARD, and Reservation::RETRIEVED.

Referenced by getTaxiReservations(), and handleVariable().

Here is the caller graph for this function:

◆ getTypeID()

std::string Person::getTypeID ( const std::string & personID)
static

Definition at line 255 of file libsumo/Person.cpp.

References getPerson(), and getTypeID().

Referenced by getTypeID(), and handleVariable().

Here is the caller graph for this function:

◆ getVehicle()

std::string Person::getVehicle ( const std::string & personID)
static

Definition at line 373 of file libsumo/Person.cpp.

References Named::getID(), getPerson(), and getVehicle().

Referenced by getVehicle(), and handleVariable().

Here is the caller graph for this function:

◆ getWaitingTime()

double Person::getWaitingTime ( const std::string & personID)
static

Definition at line 261 of file libsumo/Person.cpp.

References getPerson(), and getWaitingTime().

Referenced by getWaitingTime(), and handleVariable().

Here is the caller graph for this function:

◆ getWalkingDistance()

double Person::getWalkingDistance ( const std::string & personID,
const std::string & edgeID,
double pos,
int laneIndex = 0 )
static

◆ getWalkingDistance2D()

double Person::getWalkingDistance2D ( const std::string & personID,
double x,
double y )
static

Definition at line 168 of file libsumo/Person.cpp.

References libsumo::Helper::convertCartesianToRoadMap(), getPerson(), MSVehicleType::getVehicleClass(), MSTransportable::getVehicleType(), getWalkingDistance(), and getWalkingDistance2D().

Referenced by getWalkingDistance2D(), and handleVariable().

Here is the caller graph for this function:

◆ handleVariable()

bool Person::handleVariable ( const std::string & objID,
const int variable,
VariableWrapper * wrapper,
tcpip::Storage * paramData )
static

◆ makeWrapper()

std::shared_ptr< VariableWrapper > Person::makeWrapper ( )
static

Definition at line 1289 of file libsumo/Person.cpp.

References handleVariable(), makeWrapper(), myContextSubscriptionResults, and mySubscriptionResults.

Referenced by makeWrapper().

Here is the caller graph for this function:

◆ moveTo()

void Person::moveTo ( const std::string & personID,
const std::string & laneID,
double pos,
double posLat = libsumo::INVALID_DOUBLE_VALUE )
static

◆ moveToXY()

void Person::moveToXY ( const std::string & personID,
const std::string & edgeID,
const double x,
const double y,
double angle = libsumo::INVALID_DOUBLE_VALUE,
const int keepRoute = 1,
double matchThreshold = 100 )
static

Definition at line 923 of file libsumo/Person.cpp.

References Position::angleTo2D(), MSTransportable::appendStage(), PositionVector::distance2D(), Position::distanceTo2D(), MSLane::geometryPositionAtOffset(), MSTransportable::getAngle(), MSStage::getArrivalPos(), MSTransportable::getCurrentStage(), MSTransportable::getCurrentStageDescription(), MSLane::getEdge(), MSTransportable::getEdge(), MSTransportable::getEdgePos(), MSStageMoving::getEdges(), MSEdge::getFromJunction(), Named::getID(), Named::getIDSecure(), MSNet::getInstance(), MSTransportable::getNumRemainingStages(), getPerson(), MSTransportable::getPosition(), MSStageMoving::getRoute(), MSStageMoving::getRouteStep(), MSLane::getShape(), getSidewalk(), MSTransportable::getStageType(), MSEdge::getToJunction(), MSTransportable::getVClass(), MSTransportable::getVehicleType(), MSLane::getWidth(), MSVehicleType::getWidth(), MSGlobals::gLateralResolution, libsumo::INVALID_DOUBLE_VALUE, GeomHelper::INVALID_OFFSET, MSEdge::isNormal(), MSEdge::isWalkingArea(), MIN2(), PositionVector::move2side(), moveToXY(), libsumo::Helper::moveToXYMap(), libsumo::Helper::moveToXYMap_matchingRoutePosition(), GeomHelper::naviDegree(), MSTransportable::removeStage(), PositionVector::rotationAtOffset(), libsumo::Helper::setRemoteControlled(), SVC_IGNORING, TL, toString(), MSPModel::UNSPECIFIED_POS_LAT, WAITING, WAITING_FOR_DEPART, WALKING, and WRITE_WARNINGF.

Referenced by moveToXY().

Here is the caller graph for this function:

◆ remove()

void Person::remove ( const std::string & personID,
char reason = libsumo::REMOVE_VAPORIZED )
static

Definition at line 1255 of file libsumo/Person.cpp.

References MSTransportable::getNumRemainingStages(), getPerson(), remove(), and MSTransportable::removeStage().

Referenced by remove().

Here is the caller graph for this function:

◆ removeStage()

void Person::removeStage ( const std::string & personID,
int nextStageIndex )
static

Definition at line 832 of file libsumo/Person.cpp.

References MSTransportable::getNumRemainingStages(), getPerson(), removeStage(), and MSTransportable::removeStage().

Referenced by removeStage().

Here is the caller graph for this function:

◆ replaceStage()

void Person::replaceStage ( const std::string & personID,
const int stageIndex,
const libsumo::TraCIStage & stage )
static

Definition at line 751 of file libsumo/Person.cpp.

References MSTransportable::appendStage(), convertTraCIStage(), MSTransportable::getNumRemainingStages(), getPerson(), MSTransportable::removeStage(), and replaceStage().

Referenced by replaceStage().

Here is the caller graph for this function:

◆ rerouteTraveltime()

◆ setSpeed()

void Person::setSpeed ( const std::string & personID,
double speed )
static

Definition at line 534 of file libsumo/Person.cpp.

References getPerson(), and setSpeed().

Referenced by setSpeed().

Here is the caller graph for this function:

◆ setType()

void Person::setType ( const std::string & personID,
const std::string & typeID )
static

Definition at line 540 of file libsumo/Person.cpp.

References MSNet::getInstance(), getPerson(), MSNet::getVehicleControl(), MSVehicleControl::getVType(), and setType().

Referenced by setType().

Here is the caller graph for this function:

◆ splitTaxiReservation()

std::string Person::splitTaxiReservation ( std::string reservationID,
const std::vector< std::string > & personIDs )
static

Definition at line 206 of file libsumo/Person.cpp.

References MSDevice_Taxi::getDispatchAlgorithm(), MSDispatch_TraCI::splitReservation(), and splitTaxiReservation().

Referenced by handleVariable(), and splitTaxiReservation().

Here is the caller graph for this function:

◆ storeShape()

void Person::storeShape ( const std::string & id,
PositionVector & shape )
static

Saves the shape of the requested object in the given container.

Parameters
idThe id of the poi to retrieve
shapeThe container to fill

Definition at line 1283 of file libsumo/Person.cpp.

References getPerson(), getPosition(), and storeShape().

Referenced by storeShape().

Here is the caller graph for this function:

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Person::myContextSubscriptionResults
staticprivate

Definition at line 118 of file Person.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Person::mySubscriptionResults
staticprivate

Definition at line 117 of file Person.h.

Referenced by makeWrapper().


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