Eclipse SUMO - Simulation of Urban MObility
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. 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 ignoreTransientPermissions () const
 Returns whether this object is ignoring transient permission changes (during routing) More...
 
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 setDepart (SUMOTime t)
 update depart time (for triggered persons) 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...
 

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. More...
 

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. 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 ( 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 SUMOVehicleParameter::depart, and RORoutable::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 SUMOVehicleParameter::id, and RORoutable::myParameter.

Referenced by RORouteDef::addAlternative(), RONet::addPerson(), ROVehicle::addStop(), computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), 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(), RORoutable::getType(), and MIN2().

Referenced by 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 RORoutable::myParameter.

Referenced by RONet::adaptIntermodalRouter(), ROVehicle::addStop(), RONet::addVehicle(), ROVehicle::collectJumps(), computeRoute(), ROVehicle::computeRoute(), ROVehicle::getDepartureTime(), ROVehicle::ROVehicle(), 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 163 of file RORoutable.h.

References RORoutable::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 RORoutable::myType.

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

Here is the caller graph for this function:

◆ getVClass()

SUMOVehicleClass RORoutable::getVClass ( ) const
inlineinherited

Definition at line 109 of file RORoutable.h.

References RORoutable::getType(), SVC_IGNORING, and SUMOVTypeParameter::vehicleClass.

Referenced by computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), RORoute::isValid(), ROEdge::prohibits(), RORouteDef::repairCurrentRoute(), and ROVehicle::saveAsXML().

Here is the caller graph for this function:

◆ 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 RORoutable::myParameter, and SUMOVehicleParameter::repetitionNumber.

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

Here is the caller graph for this function:

◆ isPublicTransport()

bool RORoutable::isPublicTransport ( ) const
inlineinherited

Definition at line 129 of file RORoutable.h.

References SUMOVehicleParameter::line, and RORoutable::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.

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

◆ setDepart()

void RORoutable::setDepart ( SUMOTime  t)
inlineinherited

update depart time (for triggered persons)

Definition at line 105 of file RORoutable.h.

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

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

References RORoutable::saveAsXML().

Referenced by RONet::saveAndRemoveRoutesUntil().

Here is the caller graph for this function:

Field Documentation

◆ myParameter

SUMOVehicleParameter RORoutable::myParameter
privateinherited

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

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

◆ myType

const SUMOVTypeParameter* const RORoutable::myType
privateinherited

The type of the vehicle.

Definition at line 187 of file RORoutable.h.

Referenced by RORoutable::getType().


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