![]() |
Eclipse SUMO - Simulation of Urban MObility
|
A person as used by router. More...
#include <ROPerson.h>
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 ROEdge * | getDepartEdge () 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 SUMOVehicleParameter & | getParameter () const |
Returns the definition of the vehicle / person parameter. More... | |
std::vector< PlanItem * > & | getPlan () |
bool | getRoutingSuccess () const |
const SUMOVTypeParameter * | getType () 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) |
ROPerson & | operator= (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... | |
A person as used by router.
Definition at line 51 of file ROPerson.h.
ROPerson::ROPerson | ( | const SUMOVehicleParameter & | pars, |
const SUMOVTypeParameter * | type | ||
) |
Constructor.
[in] | pars | Parameter of this person |
[in] | type | The type of the person |
Definition at line 49 of file ROPerson.cpp.
|
virtual |
|
private |
Invalidated copy constructor.
void ROPerson::addRide | ( | const ROEdge *const | from, |
const ROEdge *const | to, | ||
const std::string & | lines, | ||
double | arrivalPos, | ||
const std::string & | destStop | ||
) |
Definition at line 101 of file ROPerson.cpp.
References myPlan.
Referenced by RORouteHandler::myStartElement().
void ROPerson::addStop | ( | const SUMOVehicleParameter::Stop & | stopPar, |
const ROEdge *const | stopEdge | ||
) |
Definition at line 119 of file ROPerson.cpp.
References myPlan.
Referenced by RORouteHandler::addStop().
void ROPerson::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 | ||
) |
Definition at line 62 of file ROPerson.cpp.
References ROPerson::PersonTrip::addVehicle(), DEFAULT_BIKETYPE_ID, DEFAULT_VTYPE_ID, DEPART_POS_GIVEN, DEPART_TRIGGERED, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosProcedure, SUMOVehicleParameter::departProcedure, RORoutable::getID(), RONet::getInstance(), ROPerson::PersonTrip::getVehicles(), RONet::getVehicleTypeSecure(), StringTokenizer::hasNext(), SUMOVehicleParameter::id, myPlan, SUMOVehicleParameter::parametersSet, SVC_BICYCLE, SVC_PASSENGER, toString(), VEHPARS_DEPARTPOS_SET, VEHPARS_VTYPE_SET, and SUMOVehicleParameter::vtypeid.
Referenced by RORouteHandler::addPersonTrip().
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 110 of file ROPerson.cpp.
References myPlan.
Referenced by RORouteHandler::addWalk().
|
private |
Definition at line 276 of file ROPerson.cpp.
References RORouteDef::addLoadedAlternative(), ROPerson::PersonTrip::addTripItem(), ROPerson::PersonTrip::getArrivalPos(), ROPerson::PersonTrip::getDepartPos(), ROPerson::PersonTrip::getDestination(), RORoutable::getID(), RouterProvider< E, L, N, V >::getIntermodalRouter(), ROPerson::PersonTrip::getModes(), ROPerson::PersonTrip::getOrigin(), ROVehicle::getRouteDefinition(), ROPerson::PersonTrip::getStopDest(), RORoutable::getType(), ROPerson::PersonTrip::getWalkFactor(), MsgHandler::inform(), SUMOVTypeParameter::maxSpeed, RORoutable::myRoutingSuccess, and TIME2STEPS.
Referenced by computeRoute().
|
virtual |
Implements RORoutable.
Definition at line 308 of file ROPerson.cpp.
References computeIntermodal(), SUMOVehicleParameter::depart, RORoutable::getParameter(), ROPerson::PersonTrip::getVehicles(), myPlan, and RORoutable::myRoutingSuccess.
|
inlineinherited |
Returns the time the vehicle starts at, -1 for triggered vehicles.
Definition at line 103 of file RORoutable.h.
References SUMOVehicleParameter::depart, and RORoutable::myParameter.
Referenced by RONet::addPerson(), RONet::addVehicle(), and ROVehicleByDepartureComperator::operator()().
|
inlinevirtual |
Returns the first edge the person takes.
Implements RORoutable.
Definition at line 356 of file ROPerson.h.
References myPlan.
|
inlineinherited |
Returns the id of the routable.
Definition at line 94 of file RORoutable.h.
References SUMOVehicleParameter::id, and RORoutable::myParameter.
Referenced by RORouteDef::addAlternative(), RONet::addPerson(), ROVehicle::addStop(), addTrip(), computeIntermodal(), ROVehicle::computeRoute(), RONet::createBulkRouteRequests(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), and RORouteDef::repairCurrentRoute().
|
inlineinherited |
Returns the vehicle's maximum speed.
Definition at line 114 of file RORoutable.h.
References SUMOVTypeParameter::maxSpeed, and RORoutable::myType.
Referenced by RONet::createBulkRouteRequests().
|
inlineinherited |
Returns the definition of the vehicle / person parameter.
Definition at line 74 of file RORoutable.h.
References RORoutable::myParameter.
Referenced by RONet::adaptIntermodalRouter(), RORouteHandler::addFlowPerson(), RORouteHandler::addPersonTrip(), ROVehicle::addStop(), ROVehicle::computeRoute(), computeRoute(), ROVehicle::getDepartureTime(), ROVehicle::ROVehicle(), ROVehicle::saveAsXML(), and saveAsXML().
|
inline |
Definition at line 377 of file ROPerson.h.
References myPlan.
Referenced by RORouteHandler::addFlowPerson(), RORouteHandler::addPersonTrip(), RORouteHandler::closePerson(), RORouteHandler::closePersonFlow(), and RORouteHandler::myStartElement().
|
inlineinherited |
Definition at line 154 of file RORoutable.h.
References RORoutable::myRoutingSuccess.
Referenced by RONet::saveAndRemoveRoutesUntil().
|
inlineinherited |
Returns the type of the routable.
Definition at line 85 of file RORoutable.h.
References RORoutable::myType.
Referenced by RORouteHandler::addFlowPerson(), computeIntermodal(), ROVehicle::getChosenSpeedFactor(), ROEdge::getEffort(), ROEdge::getEmissionEffort(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getTravelTime(), RORoutable::getVClass(), ROVehicle::saveAsXML(), and saveAsXML().
|
inlineinherited |
Definition at line 108 of file RORoutable.h.
References RORoutable::getType(), SVC_IGNORING, and SUMOVTypeParameter::vehicleClass.
Referenced by RONet::createBulkRouteRequests(), ROEdge::isConnectedTo(), and ROEdge::prohibits().
|
inlineinherited |
Definition at line 126 of file RORoutable.h.
References RORoutable::myParameter, and SUMOVehicleParameter::repetitionNumber.
Referenced by RONet::addVehicle(), and RONet::saveAndRemoveRoutesUntil().
|
inlineinherited |
Definition at line 122 of file RORoutable.h.
References SUMOVehicleParameter::line, and RORoutable::myParameter.
Referenced by RONet::addVehicle(), and RONet::saveAndRemoveRoutesUntil().
|
virtual |
Saves the complete person description.
Saves the person itself including the trips and stops.
[in] | os | The routes or alternatives output device to store the routable's description into |
[in] | typeos | The types - output device to store additional types into |
[in] | asAlternatives | Whether the route shall be saved as route alternatives |
[in] | options | to find out about defaults and whether exit times for the edges shall be written |
IOError | If something fails (not yet implemented) |
Implements RORoutable.
Definition at line 334 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().
|
inlineinherited |
Saves the routable including the vehicle type (if it was not saved before).
[in] | os | The routes - output device to store the vehicle's description into |
[in] | altos | The route alternatives - output device to store the vehicle's description into |
[in] | typeos | The types - output device to store the vehicle types into |
IOError | If something fails (not yet implemented) |
Definition at line 141 of file RORoutable.h.
References RORoutable::saveAsXML().
Referenced by RONet::saveAndRemoveRoutesUntil().
|
privateinherited |
The vehicle's parameter.
Definition at line 175 of file RORoutable.h.
Referenced by RORoutable::getDepart(), RORoutable::getID(), RORoutable::getParameter(), RORoutable::isPartOfFlow(), and RORoutable::isPublicTransport().
|
private |
The plan of the person.
Definition at line 389 of file ROPerson.h.
Referenced by addRide(), addStop(), addTrip(), addWalk(), computeRoute(), getDepartEdge(), getPlan(), saveAsXML(), and ~ROPerson().
|
protectedinherited |
Whether the last routing was successful.
Definition at line 182 of file RORoutable.h.
Referenced by computeIntermodal(), ROVehicle::computeRoute(), computeRoute(), and RORoutable::getRoutingSuccess().
|
privateinherited |
The type of the vehicle.
Definition at line 178 of file RORoutable.h.
Referenced by RORoutable::getMaxSpeed(), and RORoutable::getType().