Eclipse SUMO - Simulation of Urban MObility
ROPerson Class Reference

A person as used by router. More...

#include <ROPerson.h>

Inheritance diagram for ROPerson:
Collaboration diagram for ROPerson:

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 addRide (const ROEdge *const from, const ROEdge *const to, const std::string &lines, double arrivalPos, const std::string &destStop)
 
void addStop (const SUMOVehicleParameter::Stop &stopPar, const ROEdge *const stopEdge)
 
void addTrip (const ROEdge *const from, const ROEdge *const to, const SVCPermissions modeSet, const std::string &vTypes, const double departPos, const double arrivalPos, const std::string &busStop, double walkFactor)
 
void addWalk (const ConstROEdgeVector &edges, const double duration, const double speed, const double departPos, const double arrivalPos, const std::string &busStop)
 
void computeRoute (const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler)
 
SUMOTime getDepart () const
 Returns the time the vehicle starts at, -1 for triggered vehicles. More...
 
const ROEdgegetDepartEdge () const
 Returns the first edge the person takes. More...
 
const std::string & getID () const
 Returns the id of the routable. More...
 
double getMaxSpeed () const
 Returns the vehicle's maximum speed. More...
 
const SUMOVehicleParametergetParameter () const
 Returns the definition of the vehicle / person parameter. More...
 
std::vector< PlanItem * > & getPlan ()
 
bool getRoutingSuccess () const
 
const SUMOVTypeParametergetType () const
 Returns the type of the routable. More...
 
SUMOVehicleClass getVClass () const
 
bool isPartOfFlow () const
 
bool isPublicTransport () const
 
 ROPerson (const SUMOVehicleParameter &pars, const SUMOVTypeParameter *type)
 Constructor. More...
 
void saveAsXML (OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const
 Saves the complete person description. More...
 
void write (OutputDevice &os, OutputDevice *const altos, OutputDevice *const typeos, OptionsCont &options) const
 Saves the routable including the vehicle type (if it was not saved before). More...
 
virtual ~ROPerson ()
 Destructor. More...
 

Protected Attributes

bool myRoutingSuccess
 Whether the last routing was successful. More...
 

Private Member Functions

bool computeIntermodal (SUMOTime time, const RORouterProvider &provider, PersonTrip *const trip, const ROVehicle *const veh, MsgHandler *const errorHandler)
 
ROPersonoperator= (const ROPerson &src)
 Invalidated assignment operator. More...
 
 ROPerson (const ROPerson &src)
 Invalidated copy constructor. More...
 

Private Attributes

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

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.

◆ ~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.

Member Function Documentation

◆ addRide()

void ROPerson::addRide ( const ROEdge *const  from,
const ROEdge *const  to,
const std::string &  lines,
double  arrivalPos,
const std::string &  destStop 
)

Definition at line 100 of file ROPerson.cpp.

References myPlan.

Referenced by RORouteHandler::myStartElement().

◆ addStop()

void ROPerson::addStop ( const SUMOVehicleParameter::Stop stopPar,
const ROEdge *const  stopEdge 
)

Definition at line 118 of file ROPerson.cpp.

References myPlan.

Referenced by RORouteHandler::addStop().

◆ addTrip()

◆ addWalk()

void ROPerson::addWalk ( const ConstROEdgeVector edges,
const double  duration,
const double  speed,
const double  departPos,
const double  arrivalPos,
const std::string &  busStop 
)

Definition at line 109 of file ROPerson.cpp.

References myPlan.

Referenced by RORouteHandler::addWalk().

◆ 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 102 of file RORoutable.h.

References SUMOVehicleParameter::depart, and RORoutable::myParameter.

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

◆ 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 355 of file ROPerson.h.

References myPlan.

◆ getID()

◆ getMaxSpeed()

double RORoutable::getMaxSpeed ( ) const
inlineinherited

Returns the vehicle's maximum speed.

Definition at line 113 of file RORoutable.h.

References SUMOVTypeParameter::maxSpeed, and RORoutable::myType.

Referenced by RONet::createBulkRouteRequests().

◆ getParameter()

const SUMOVehicleParameter& RORoutable::getParameter ( ) const
inlineinherited

◆ getPlan()

◆ getRoutingSuccess()

bool RORoutable::getRoutingSuccess ( ) const
inlineinherited

Definition at line 153 of file RORoutable.h.

References RORoutable::myRoutingSuccess.

Referenced by RONet::saveAndRemoveRoutesUntil().

◆ getType()

const SUMOVTypeParameter* RORoutable::getType ( ) const
inlineinherited

◆ getVClass()

SUMOVehicleClass RORoutable::getVClass ( ) const
inlineinherited

◆ isPartOfFlow()

bool RORoutable::isPartOfFlow ( ) const
inlineinherited

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inlineinherited

◆ operator=()

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

Invalidated assignment operator.

◆ saveAsXML()

void ROPerson::saveAsXML ( OutputDevice os,
OutputDevice *const  typeos,
bool  asAlternatives,
OptionsCont options 
) 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 330 of file ROPerson.cpp.

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

◆ write()

void RORoutable::write ( OutputDevice os,
OutputDevice *const  altos,
OutputDevice *const  typeos,
OptionsCont options 
) 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 140 of file RORoutable.h.

References RORoutable::saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
privateinherited

◆ myPlan

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

The plan of the person.

Definition at line 388 of file ROPerson.h.

Referenced by addRide(), addStop(), addTrip(), addWalk(), computeRoute(), getDepartEdge(), getPlan(), saveAsXML(), and ~ROPerson().

◆ myRoutingSuccess

bool RORoutable::myRoutingSuccess
protectedinherited

Whether the last routing was successful.

Definition at line 181 of file RORoutable.h.

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

◆ myType

const SUMOVTypeParameter* const RORoutable::myType
privateinherited

The type of the vehicle.

Definition at line 177 of file RORoutable.h.

Referenced by RORoutable::getMaxSpeed(), and RORoutable::getType().


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