![]() |
SUMO - Simulation of Urban MObility
|
A vehicle as used by router. More...
#include <ROVehicle.h>
Public Member Functions | |
void | computeRoute (const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler) |
double | getChosenSpeedFactor () const |
Returns an upper bound for the speed factor of this vehicle. More... | |
SUMOTime | getDepart () const |
Returns the time the vehicle starts at, -1 for triggered vehicles. More... | |
const ROEdge * | getDepartEdge () const |
Returns the first edge the vehicle takes. More... | |
SUMOTime | getDepartureTime () const |
Returns the time the vehicle starts at, 0 for triggered vehicles. More... | |
const std::string & | getID () const |
Returns the id of the routable. More... | |
ConstROEdgeVector | getMandatoryEdges (const ROEdge *requiredStart, const ROEdge *requiredEnd) const |
compute mandatory edges More... | |
double | getMaxSpeed () const |
Returns the vehicle's maximum speed. More... | |
const SUMOVehicleParameter & | getParameter () const |
Returns the definition of the vehicle / person parameter. More... | |
RORouteDef * | getRouteDefinition () const |
Returns the definition of the route the vehicle takes. More... | |
bool | getRoutingSuccess () const |
const ConstROEdgeVector & | getStopEdges () const |
const SUMOVTypeParameter * | getType () const |
Returns the type of the routable. More... | |
SUMOVehicleClass | getVClass () const |
bool | isPartOfFlow () const |
bool | isPublicTransport () const |
ROVehicle (const SUMOVehicleParameter &pars, RORouteDef *route, const SUMOVTypeParameter *type, const RONet *net, MsgHandler *errorHandler=0) | |
Constructor. More... | |
void | saveAsXML (OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const |
Saves the complete vehicle 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 | ~ROVehicle () |
Destructor. More... | |
Protected Attributes | |
bool | myRoutingSuccess |
Whether the last routing was successful. More... | |
Private Member Functions | |
void | addStop (const SUMOVehicleParameter::Stop &stopPar, const RONet *net, MsgHandler *errorHandler) |
Adds a stop to this vehicle. More... | |
ROVehicle & | operator= (const ROVehicle &src) |
Invalidated assignment operator. More... | |
ROVehicle (const ROVehicle &src) | |
Invalidated copy constructor. More... | |
Private Attributes | |
RORouteDef *const | myRoute |
The route the vehicle takes. More... | |
ConstROEdgeVector | myStopEdges |
The edges where the vehicle stops. More... | |
A vehicle as used by router.
Definition at line 53 of file ROVehicle.h.
ROVehicle::ROVehicle | ( | const SUMOVehicleParameter & | pars, |
RORouteDef * | route, | ||
const SUMOVTypeParameter * | type, | ||
const RONet * | net, | ||
MsgHandler * | errorHandler = 0 |
||
) |
Constructor.
[in] | pars | Parameter of this vehicle |
[in] | route | The definition of the route the vehicle shall use |
[in] | type | The type of the vehicle |
Definition at line 45 of file ROVehicle.cpp.
References addStop(), RONet::getEdge(), RORouteDef::getFirstRoute(), RORoutable::getParameter(), RORoute::getStops(), myStopEdges, SUMOVehicleParameter::stops, and SUMOVehicleParameter::via.
|
virtual |
Destructor.
Definition at line 114 of file ROVehicle.cpp.
|
private |
Invalidated copy constructor.
|
private |
Adds a stop to this vehicle.
[in] | stopPar | the stop paramters |
[in] | net | pointer to the network, used for edge retrieval |
Definition at line 71 of file ROVehicle.cpp.
References SUMOVehicleParameter::Stop::endPos, RONet::getEdgeForLaneID(), RORoute::getEdgeVector(), RORouteDef::getFirstRoute(), Named::getID(), RORoutable::getID(), RORoutable::getParameter(), SUMOVehicleParameter::Stop::index, MsgHandler::inform(), SUMOVehicleParameter::Stop::lane, myRoute, myStopEdges, ROEdge::prohibits(), STOP_INDEX_END, STOP_INDEX_FIT, and SUMOVehicleParameter::stops.
Referenced by getChosenSpeedFactor(), and ROVehicle().
|
virtual |
Implements RORoutable.
Definition at line 124 of file ROVehicle.cpp.
References RORouteDef::addAlternative(), ARRIVAL_LANE_GIVEN, ARRIVAL_POS_GIVEN, SUMOVehicleParameter::arrivalLaneProcedure, SUMOVehicleParameter::arrivalPosProcedure, RORouteDef::buildCurrentRoute(), DEPART_LANE_GIVEN, DEPART_POS_GIVEN, SUMOVehicleParameter::departLaneProcedure, SUMOVehicleParameter::departPosProcedure, getDepartureTime(), RORoute::getEdgeVector(), RORoutable::getID(), getMandatoryEdges(), RORoutable::getParameter(), getRouteDefinition(), RouterProvider< E, L, N, V >::getVehicleRouter(), MsgHandler::inform(), RORoutable::myRoutingSuccess, RORoute::recheckForLoops(), and RORoute::size().
Referenced by getRouteDefinition().
|
inline |
Returns an upper bound for the speed factor of this vehicle.
Definition at line 112 of file ROVehicle.h.
References addStop(), Distribution_Parameterized::getMax(), RORoutable::getType(), saveAsXML(), and SUMOVTypeParameter::speedFactor.
Referenced by ROEdge::getMinimumTravelTime().
|
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()().
|
virtual |
Returns the first edge the vehicle takes.
Implements RORoutable.
Definition at line 118 of file ROVehicle.cpp.
References RORoute::getFirst(), RORouteDef::getFirstRoute(), and myRoute.
Referenced by getRouteDefinition().
|
inline |
Returns the time the vehicle starts at, 0 for triggered vehicles.
Definition at line 95 of file ROVehicle.h.
References RORoutable::getParameter(), and MAX2().
Referenced by RORouteDef::addAlternative(), computeRoute(), and RORoute::writeXMLDefinition().
|
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(), addStop(), ROPerson::addTrip(), ROPerson::computeIntermodal(), computeRoute(), RONet::createBulkRouteRequests(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), and RORouteDef::repairCurrentRoute().
ConstROEdgeVector ROVehicle::getMandatoryEdges | ( | const ROEdge * | requiredStart, |
const ROEdge * | requiredEnd | ||
) | const |
compute mandatory edges
Definition at line 164 of file ROVehicle.cpp.
References ROEdge::getNormalAfter(), ROEdge::getNormalBefore(), and getStopEdges().
Referenced by computeRoute(), getStopEdges(), and RORouteDef::repairCurrentRoute().
|
inlineinherited |
Returns the vehicle's maximum speed.
Definition at line 114 of file RORoutable.h.
References RORoutable::getDepartEdge(), 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::addPersonTrip(), addStop(), ROPerson::computeIntermodal(), computeRoute(), getDepartureTime(), ROVehicle(), saveAsXML(), and ROPerson::saveAsXML().
|
inline |
Returns the definition of the route the vehicle takes.
Definition at line 76 of file ROVehicle.h.
References computeRoute(), getDepartEdge(), and myRoute.
Referenced by ROPerson::computeIntermodal(), computeRoute(), RONet::saveAndRemoveRoutesUntil(), and RONet::~RONet().
|
inlineinherited |
Definition at line 154 of file RORoutable.h.
References RORoutable::myRoutingSuccess, and RORoutable::saveAsXML().
Referenced by RONet::saveAndRemoveRoutesUntil().
|
inline |
Definition at line 100 of file ROVehicle.h.
References getMandatoryEdges(), and myStopEdges.
Referenced by getMandatoryEdges().
|
inlineinherited |
Returns the type of the routable.
Definition at line 85 of file RORoutable.h.
References RORoutable::myType.
Referenced by ROPerson::computeIntermodal(), getChosenSpeedFactor(), ROEdge::getEffort(), ROEdge::getEmissionEffort(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getTravelTime(), RORoutable::getVClass(), saveAsXML(), and ROPerson::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::computeRoute(), 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 vehicle description.
Saves the vehicle itself including the route and stops.
[in] | os | The routes or alternatives output device to store the vehicle's description into |
[in] | typeos | The types - output device to store 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 194 of file ROVehicle.cpp.
References OutputDevice::closeTag(), OptionsCont::getBool(), RORoutable::getParameter(), RORoutable::getType(), myRoute, SUMOVTypeParameter::saved, SUMOVehicleParameter::stops, SUMOVTypeParameter::write(), SUMOVehicleParameter::write(), Parameterised::writeParams(), and RORouteDef::writeXMLDefinition().
Referenced by getChosenSpeedFactor().
|
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().
|
private |
The route the vehicle takes.
Definition at line 141 of file ROVehicle.h.
Referenced by addStop(), getDepartEdge(), getRouteDefinition(), and saveAsXML().
|
protectedinherited |
Whether the last routing was successful.
Definition at line 182 of file RORoutable.h.
Referenced by ROPerson::computeIntermodal(), computeRoute(), ROPerson::computeRoute(), and RORoutable::getRoutingSuccess().
|
private |
The edges where the vehicle stops.
Definition at line 144 of file ROVehicle.h.
Referenced by addStop(), getStopEdges(), and ROVehicle().