Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
ROPerson Class Reference

A person as used by router. More...

#include <ROPerson.h>

Inheritance diagram for ROPerson:
[legend]
Collaboration diagram for ROPerson:
[legend]

Data Structures

class  PersonTrip
 A planItem can be a Trip which contains multiple tripItems. More...
class  PlanItem
 Every person has a plan comprising of multiple planItems. More...
class  Ride
 A ride is part of a trip, e.g., go from here to here by car or bus. More...
class  Stop
 A planItem can be a Stop. More...
class  TripItem
 A TripItem is part of a trip, e.g., go from here to here by car. More...
class  Walk
 A walk is part of a trip, e.g., go from here to here by foot. More...

Public Member Functions

void computeRoute (const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler)
SUMOTime getDepart () const
 Returns the time the vehicle starts at, -1 for triggered vehicles.
const ROEdgegetDepartEdge () const
 Returns the first edge the person takes.
const std::string & getID () const
 Returns the id of the routable.
double getMaxSpeed () const
 Returns the vehicle's maximum speed.
const SUMOVehicleParametergetParameter () const
 Returns the definition of the vehicle / person parameter.
std::vector< PlanItem * > & getPlan ()
bool getRoutingSuccess () const
const SUMOVTypeParametergetType () const
 Returns the type of the routable.
SUMOVehicleClass getVClass () const
bool ignoreTransientPermissions () const
 Returns whether this object is ignoring transient permission changes (during routing).
bool isPartOfFlow () const
bool isPublicTransport () const
 ROPerson (const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
 Constructor.
void saveAsXML (OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options, int cloneIndex=0) const
 Saves the complete person description.
void setDepart (SUMOTime t)
 update depart time (for triggered persons)
void write (OutputDevice *os, OutputDevice *const altos, OutputDevice *const typeos, OptionsCont &options, int quota) const
 Saves the routable including the vehicle type (if it was not saved before).
virtual ~ROPerson ()
 Destructor.

Static Public Member Functions

static void addRide (std::vector< PlanItem * > &plan, const ROEdge *const from, const ROEdge *const to, const std::string &lines, double arrivalPos, const std::string &destStop, const std::string &group)
static void addStop (std::vector< PlanItem * > &plan, const SUMOVehicleParameter::Stop &stopPar, const ROEdge *const stopEdge)
static void addTrip (std::vector< PlanItem * > &plan, const std::string &id, const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const std::string &vTypes, const double departPos, const std::string &stopOrigin, const double arrivalPos, const std::string &busStop, double walkFactor, const std::string &group)
static void addWalk (std::vector< PlanItem * > &plan, const ConstROEdgeVector &edges, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &busStop)

Protected Attributes

bool myRoutingSuccess
 Whether the last routing was successful.

Private Member Functions

bool computeIntermodal (SUMOTime time, const RORouterProvider &provider, const PersonTrip *const trip, const ROVehicle *const veh, std::vector< TripItem * > &resultItems, MsgHandler *const errorHandler)
ROPersonoperator= (const ROPerson &src)
 Invalidated assignment operator.
 ROPerson (const ROPerson &src)
 Invalidated copy constructor.

Private Attributes

SUMOVehicleParameter myParameter
 The vehicle's parameter.
std::vector< PlanItem * > myPlan
 The plan of the person.
const SUMOVTypeParameter *const myType
 The type of the vehicle.

Detailed Description

A person as used by router.

Definition at line 50 of file ROPerson.h.

Constructor & Destructor Documentation

◆ ROPerson() [1/2]

ROPerson::ROPerson ( const SUMOVehicleParameter & pars,
const SUMOVTypeParameter * type )

Constructor.

Parameters
[in]parsParameter of this person
[in]typeThe type of the person

Definition at line 48 of file ROPerson.cpp.

References RORoutable::RORoutable().

Referenced by operator=(), and ROPerson().

Here is the caller graph for this function:

◆ ~ROPerson()

ROPerson::~ROPerson ( )
virtual

Destructor.

Definition at line 53 of file ROPerson.cpp.

References myPlan.

◆ ROPerson() [2/2]

ROPerson::ROPerson ( const ROPerson & src)
private

Invalidated copy constructor.

References ROPerson().

Member Function Documentation

◆ addRide()

void ROPerson::addRide ( std::vector< PlanItem * > & plan,
const ROEdge *const from,
const ROEdge *const to,
const std::string & lines,
double arrivalPos,
const std::string & destStop,
const std::string & group )
static

Definition at line 116 of file ROPerson.cpp.

Referenced by RORouteHandler::addRide().

Here is the caller graph for this function:

◆ addStop()

void ROPerson::addStop ( std::vector< PlanItem * > & plan,
const SUMOVehicleParameter::Stop & stopPar,
const ROEdge *const stopEdge )
static

Definition at line 133 of file ROPerson.cpp.

References Stop.

Referenced by RORouteHandler::addStop().

Here is the caller graph for this function:

◆ addTrip()

void ROPerson::addTrip ( std::vector< PlanItem * > & plan,
const std::string & id,
const ROEdge *const from,
const ROEdge *const to,
const SVCPermissions modeSet,
const std::string & vTypes,
const double departPos,
const std::string & stopOrigin,
const double arrivalPos,
const std::string & busStop,
double walkFactor,
const std::string & group )
static

◆ addWalk()

void ROPerson::addWalk ( std::vector< PlanItem * > & plan,
const ConstROEdgeVector & edges,
const double duration,
const double speed,
const double departPos,
const double arrivalPos,
const std::string & busStop )
static

Definition at line 124 of file ROPerson.cpp.

Referenced by RORouteHandler::addWalk().

Here is the caller graph for this function:

◆ computeIntermodal()

◆ computeRoute()

void ROPerson::computeRoute ( const RORouterProvider & provider,
const bool removeLoops,
MsgHandler * errorHandler )
virtual

◆ getDepart()

SUMOTime RORoutable::getDepart ( ) const
inlineinherited

Returns the time the vehicle starts at, -1 for triggered vehicles.

Returns
The vehicle's depart time

Definition at line 100 of file RORoutable.h.

References myParameter.

Referenced by RONet::addPerson(), RONet::addVehicle(), and ROVehicleByDepartureComperator::operator()().

Here is the caller graph for this function:

◆ getDepartEdge()

const ROEdge * ROPerson::getDepartEdge ( ) const
inlinevirtual

Returns the first edge the person takes.

Returns
The person's departure edge

Implements RORoutable.

Definition at line 419 of file ROPerson.h.

References myPlan.

◆ getID()

const std::string & RORoutable::getID ( ) const
inlineinherited

Returns the id of the routable.

Returns
The id of the routable

Definition at line 91 of file RORoutable.h.

References myParameter.

Referenced by RORouteDef::addAlternative(), RONet::addPerson(), ROVehicle::addStop(), ROPerson::computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), RORoute::isPermitted(), RORoute::isValid(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), and RORouteDef::repairCurrentRoute().

Here is the caller graph for this function:

◆ getMaxSpeed()

double RORoutable::getMaxSpeed ( ) const
inlineinherited

Returns the vehicle's maximum speed.

Definition at line 121 of file RORoutable.h.

References Parameterised::getParameter(), getType(), and MIN2().

Referenced by ROPerson::computeIntermodal(), RONet::createBulkRouteRequests(), ROEdge::getEffort(), ROEdge::getNoiseEffort(), and ROEdge::getTravelTime().

Here is the caller graph for this function:

◆ getParameter()

const SUMOVehicleParameter & RORoutable::getParameter ( ) const
inlineinherited

Returns the definition of the vehicle / person parameter.

Returns
The vehicle / person's parameter

Definition at line 71 of file RORoutable.h.

References myParameter.

Referenced by RONet::adaptIntermodalRouter(), ROVehicle::addStop(), RONet::addVehicle(), ROVehicle::collectJumps(), ROPerson::computeRoute(), ROVehicle::computeRoute(), ROVehicle::getDepartureTime(), ROVehicle::ROVehicle(), ROPerson::saveAsXML(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ getPlan()

std::vector< PlanItem * > & ROPerson::getPlan ( )
inline

Definition at line 440 of file ROPerson.h.

References myPlan.

Referenced by RORouteHandler::addFlowPerson(), and RORouteHandler::closePerson().

Here is the caller graph for this function:

◆ getRoutingSuccess()

bool RORoutable::getRoutingSuccess ( ) const
inlineinherited

Definition at line 165 of file RORoutable.h.

References myRoutingSuccess.

Referenced by RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

◆ getType()

const SUMOVTypeParameter * RORoutable::getType ( ) const
inlineinherited

Returns the type of the routable.

Returns
The routable's type
Todo
Why not return a reference?

Definition at line 82 of file RORoutable.h.

References myType.

Referenced by ROPerson::computeIntermodal(), ROVehicle::getChosenSpeedFactor(), ROEdge::getEmissionEffort(), ROVehicle::getLength(), getMaxSpeed(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getTravelTime(), getVClass(), ROVehicle::getVTypeParameter(), ROEdge::restricts(), ROPerson::saveAsXML(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ getVClass()

SUMOVehicleClass RORoutable::getVClass ( ) const
inlineinherited

◆ ignoreTransientPermissions()

bool RORoutable::ignoreTransientPermissions ( ) const
inlineinherited

Returns whether this object is ignoring transient permission changes (during routing).

Definition at line 116 of file RORoutable.h.

◆ isPartOfFlow()

bool RORoutable::isPartOfFlow ( ) const
inlineinherited

Definition at line 133 of file RORoutable.h.

References myParameter.

Referenced by RONet::addVehicle(), RONet::saveAndRemoveRoutesUntil(), ROPerson::saveAsXML(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inlineinherited

Definition at line 129 of file RORoutable.h.

References myParameter.

Referenced by RONet::addVehicle(), and RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

◆ operator=()

ROPerson & ROPerson::operator= ( const ROPerson & src)
private

Invalidated assignment operator.

References ROPerson().

◆ saveAsXML()

void ROPerson::saveAsXML ( OutputDevice & os,
OutputDevice *const typeos,
bool asAlternatives,
OptionsCont & options,
int cloneIndex = 0 ) const
virtual

Saves the complete person description.

Saves the person itself including the trips and stops.

Parameters
[in]osThe routes or alternatives output device to store the routable's description into
[in]typeosThe types - output device to store additional types into
[in]asAlternativesWhether the route shall be saved as route alternatives
[in]optionsto find out about defaults and whether exit times for the edges shall be written
Exceptions
IOErrorIf something fails (not yet implemented)

Implements RORoutable.

Definition at line 461 of file ROPerson.cpp.

References OutputDevice::closeTag(), OptionsCont::exists(), OptionsCont::getBool(), RORoutable::getParameter(), OptionsCont::getString(), RORoutable::getType(), SUMOVehicleParameter::id, RORoutable::isPartOfFlow(), myPlan, SUMOVTypeParameter::saved, SUMO_TAG_PERSON, SUMO_TAG_PERSONFLOW, toString(), SUMOVehicleParameter::write(), SUMOVTypeParameter::write(), and Parameterised::writeParams().

◆ setDepart()

void RORoutable::setDepart ( SUMOTime t)
inlineinherited

update depart time (for triggered persons)

Definition at line 105 of file RORoutable.h.

References myParameter.

◆ write()

void RORoutable::write ( OutputDevice * os,
OutputDevice *const altos,
OutputDevice *const typeos,
OptionsCont & options,
int quota ) const
inlineinherited

Saves the routable including the vehicle type (if it was not saved before).

Parameters
[in]osThe routes - output device to store the vehicle's description into
[in]altosThe route alternatives - output device to store the vehicle's description into
[in]typeosThe types - output device to store the vehicle types into
Exceptions
IOErrorIf something fails (not yet implemented)

Definition at line 148 of file RORoutable.h.

References saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
privateinherited

The vehicle's parameter.

Definition at line 186 of file RORoutable.h.

Referenced by getDepart(), getID(), getParameter(), isPartOfFlow(), isPublicTransport(), RORoutable(), and setDepart().

◆ myPlan

std::vector<PlanItem*> ROPerson::myPlan
private

The plan of the person.

Definition at line 453 of file ROPerson.h.

Referenced by computeIntermodal(), computeRoute(), getDepartEdge(), getPlan(), saveAsXML(), and ~ROPerson().

◆ myRoutingSuccess

bool RORoutable::myRoutingSuccess
protectedinherited

Whether the last routing was successful.

Definition at line 193 of file RORoutable.h.

Referenced by ROPerson::computeIntermodal(), ROPerson::computeRoute(), ROVehicle::computeRoute(), getRoutingSuccess(), and RORoutable().

◆ myType

const SUMOVTypeParameter* const RORoutable::myType
privateinherited

The type of the vehicle.

Definition at line 189 of file RORoutable.h.

Referenced by getType(), and RORoutable().


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