Eclipse SUMO - Simulation of Urban MObility
|
A vehicle as used by router. More...
#include <ROVehicle.h>
Public Member Functions | |
void | collectJumps (const ConstROEdgeVector &mandatory, std::set< ConstROEdgeVector::const_iterator > &jumpStarts) const |
collect mandatory-edge iterators that define jumps in the route | |
void | computeRoute (const RORouterProvider &provider, const bool removeLoops, MsgHandler *errorHandler) |
double | getChosenSpeedFactor () const |
Returns an upper bound for the speed factor of this vehicle. | |
SUMOTime | getDepart () const |
Returns the time the vehicle starts at, -1 for triggered vehicles. | |
const ROEdge * | getDepartEdge () const |
Returns the first edge the vehicle takes. | |
SUMOTime | getDepartureTime () const |
Returns the time the vehicle starts at, 0 for triggered vehicles. | |
const std::string & | getID () const |
Returns the id of the routable. | |
SUMOTime | getJumpTime () const |
double | getLength () const |
Returns the vehicle's length. | |
ConstROEdgeVector | getMandatoryEdges (const ROEdge *requiredStart, const ROEdge *requiredEnd) const |
compute mandatory edges | |
double | getMaxSpeed () const |
Returns the vehicle's maximum speed. | |
const SUMOVehicleParameter & | getParameter () const |
Returns the definition of the vehicle / person parameter. | |
RORouteDef * | getRouteDefinition () const |
Returns the definition of the route the vehicle takes. | |
bool | getRoutingSuccess () const |
const ConstROEdgeVector & | getStopEdges () const |
const SUMOVTypeParameter * | getType () const |
Returns the type of the routable. | |
SUMOVehicleClass | getVClass () const |
const SUMOVTypeParameter & | getVehicleType () const |
Returns the vehicle's type definition. | |
bool | hasJumps () const |
bool | ignoreTransientPermissions () const |
Returns whether this object is ignoring transient permission changes (during routing) | |
bool | isPartOfFlow () const |
bool | isPublicTransport () const |
ROVehicle (const SUMOVehicleParameter &pars, RORouteDef *route, const SUMOVTypeParameter *type, const RONet *net, MsgHandler *errorHandler=0) | |
Constructor. | |
void | saveAsXML (OutputDevice &os, OutputDevice *const typeos, bool asAlternatives, OptionsCont &options) const |
Saves the complete vehicle description. | |
void | setDepart (SUMOTime t) |
update depart time (for triggered persons) | |
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). | |
virtual | ~ROVehicle () |
Destructor. | |
Protected Attributes | |
bool | myRoutingSuccess |
Whether the last routing was successful. | |
Private Member Functions | |
void | addStop (const SUMOVehicleParameter::Stop &stopPar, const RONet *net, MsgHandler *errorHandler) |
Adds a stop to this vehicle. | |
ROVehicle & | operator= (const ROVehicle &src) |
Invalidated assignment operator. | |
ROVehicle (const ROVehicle &src) | |
Invalidated copy constructor. | |
Private Attributes | |
SUMOTime | myJumpTime |
Whether this vehicle has any jumps defined. | |
SUMOVehicleParameter | myParameter |
The vehicle's parameter. | |
RORouteDef *const | myRoute |
The route the vehicle takes. | |
ConstROEdgeVector | myStopEdges |
The edges where the vehicle stops. | |
const SUMOVTypeParameter *const | myType |
The type of the vehicle. | |
Static Private Attributes | |
static std::map< ConstROEdgeVector, std::string > | mySavedRoutes |
map of all routes that were already saved with a name | |
A vehicle as used by router.
Definition at line 50 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 49 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 132 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 77 of file ROVehicle.cpp.
References SUMOVehicleParameter::Stop::edge, SUMOVehicleParameter::Stop::endPos, RONet::getEdge(), RORoute::getEdgeVector(), RORouteDef::getFirstRoute(), RORoutable::getID(), Named::getID(), RORoutable::getParameter(), SUMOVehicleParameter::Stop::index, MsgHandler::inform(), ROEdge::isInternal(), SUMOVehicleParameter::Stop::jump, myJumpTime, myRoute, myStopEdges, ROEdge::prohibits(), STOP_INDEX_END, STOP_INDEX_FIT, and SUMOVehicleParameter::stops.
Referenced by ROVehicle().
void ROVehicle::collectJumps | ( | const ConstROEdgeVector & | mandatory, |
std::set< ConstROEdgeVector::const_iterator > & | jumpStarts | ||
) | const |
collect mandatory-edge iterators that define jumps in the route
Definition at line 214 of file ROVehicle.cpp.
References RORoutable::getParameter(), and SUMOVehicleParameter::stops.
Referenced by RORouteDef::repairCurrentRoute().
|
virtual |
Implements RORoutable.
Definition at line 142 of file ROVehicle.cpp.
References RORouteDef::addAlternative(), SUMOVehicleParameter::arrivalLaneProcedure, SUMOVehicleParameter::arrivalPosProcedure, RORouteDef::buildCurrentRoute(), SUMOVehicleParameter::departLaneProcedure, SUMOVehicleParameter::departPosProcedure, RORouteDef::discardSilent(), getDepartureTime(), RORoute::getEdgeVector(), RORoutable::getID(), getMandatoryEdges(), RORoutable::getParameter(), getRouteDefinition(), RORoutable::getVClass(), RouterProvider< E, L, N, V >::getVehicleRouter(), GIVEN, MsgHandler::inform(), RORoutable::myRoutingSuccess, RORoute::recheckForLoops(), and RORoute::size().
|
inline |
Returns an upper bound for the speed factor of this vehicle.
Definition at line 109 of file ROVehicle.h.
References Distribution_Parameterized::getMax(), RORoutable::getType(), and SUMOVTypeParameter::speedFactor.
Referenced by ROEdge::getMinimumTravelTime().
|
inlineinherited |
Returns the time the vehicle starts at, -1 for triggered vehicles.
Definition at line 100 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 136 of file ROVehicle.cpp.
References RORoute::getFirst(), RORouteDef::getFirstRoute(), and myRoute.
|
inline |
Returns the time the vehicle starts at, 0 for triggered vehicles.
Definition at line 92 of file ROVehicle.h.
References RORoutable::getParameter(), and MAX2().
Referenced by RORouteDef::addAlternative(), RONet::addVehicle(), computeRoute(), and RORoute::writeXMLDefinition().
|
inlineinherited |
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(), addStop(), ROPerson::computeIntermodal(), computeRoute(), RONet::createBulkRouteRequests(), RORoute::isValid(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), and RORouteDef::repairCurrentRoute().
|
inline |
Definition at line 129 of file ROVehicle.h.
References myJumpTime.
Referenced by RORouteDef::addAlternative().
|
inline |
Returns the vehicle's length.
Definition at line 121 of file ROVehicle.h.
References RORoutable::getType(), and SUMOVTypeParameter::length.
ConstROEdgeVector ROVehicle::getMandatoryEdges | ( | const ROEdge * | requiredStart, |
const ROEdge * | requiredEnd | ||
) | const |
compute mandatory edges
Definition at line 184 of file ROVehicle.cpp.
References ROEdge::getNormalAfter(), ROEdge::getNormalBefore(), and getStopEdges().
Referenced by computeRoute(), and RORouteDef::repairCurrentRoute().
|
inlineinherited |
Returns the vehicle's maximum speed.
Definition at line 121 of file RORoutable.h.
References Parameterised::getParameter(), RORoutable::getType(), and MIN2().
Referenced by ROPerson::computeIntermodal(), RONet::createBulkRouteRequests(), ROEdge::getEffort(), ROEdge::getNoiseEffort(), and ROEdge::getTravelTime().
|
inlineinherited |
Returns the definition of the vehicle / person parameter.
Definition at line 71 of file RORoutable.h.
References RORoutable::myParameter.
Referenced by addStop(), RONet::addVehicle(), collectJumps(), ROPerson::computeRoute(), computeRoute(), getDepartureTime(), ROVehicle(), ROPerson::saveAsXML(), and saveAsXML().
|
inline |
Returns the definition of the route the vehicle takes.
Definition at line 73 of file ROVehicle.h.
References myRoute.
Referenced by ROPerson::computeIntermodal(), computeRoute(), RONet::saveAndRemoveRoutesUntil(), and RONet::~RONet().
|
inlineinherited |
Definition at line 163 of file RORoutable.h.
References RORoutable::myRoutingSuccess.
|
inline |
Definition at line 97 of file ROVehicle.h.
References myStopEdges.
Referenced by getMandatoryEdges().
|
inlineinherited |
Returns the type of the routable.
Definition at line 82 of file RORoutable.h.
References RORoutable::myType.
Referenced by getChosenSpeedFactor(), ROEdge::getEmissionEffort(), getLength(), RORoutable::getMaxSpeed(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getTravelTime(), RORoutable::getVClass(), getVehicleType(), ROEdge::restricts(), ROPerson::saveAsXML(), and saveAsXML().
|
inlineinherited |
Definition at line 109 of file RORoutable.h.
References RORoutable::getType(), SVC_IGNORING, and SUMOVTypeParameter::vehicleClass.
Referenced by ROPerson::computeIntermodal(), computeRoute(), RONet::createBulkRouteRequests(), RORoute::isValid(), ROEdge::prohibits(), RORouteDef::repairCurrentRoute(), and saveAsXML().
|
inline |
Returns the vehicle's type definition.
Definition at line 116 of file ROVehicle.h.
References RORoutable::getType().
|
inline |
Definition at line 125 of file ROVehicle.h.
References myJumpTime.
Referenced by RORouteDef::addAlternative(), and RORouteDef::repairCurrentRoute().
|
inlineinherited |
Returns whether this object is ignoring transient permission changes (during routing)
Definition at line 116 of file RORoutable.h.
|
inlineinherited |
Definition at line 133 of file RORoutable.h.
References RORoutable::myParameter, and SUMOVehicleParameter::repetitionNumber.
Referenced by RONet::addVehicle().
|
inlineinherited |
Definition at line 129 of file RORoutable.h.
References SUMOVehicleParameter::line, and RORoutable::myParameter.
Referenced by RONet::addVehicle().
|
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 239 of file ROVehicle.cpp.
References GeoConvHelper::cartesian2geo(), OutputDevice::closeTag(), OptionsCont::exists(), OptionsCont::getBool(), RONet::getEdge(), RORoute::getEdgeVector(), GeoConvHelper::getFinal(), RORouteDef::getFirstRoute(), ROEdge::getFromJunction(), Named::getID(), RONet::getInstance(), ROEdge::getLanes(), RORoute::getNormalEdges(), RORoutable::getParameter(), ROEdge::getPredecessors(), ROEdge::getSuccessors(), ROEdge::getToJunction(), RORoutable::getType(), RORouteDef::getUsedRoute(), RORoutable::getVClass(), gPrecision, gPrecisionGeo, ROEdge::isTazConnector(), myRoute, mySavedRoutes, SUMOVTypeParameter::saved, OutputDevice::setPrecision(), SUMOVehicleParameter::stops, SUMO_ATTR_FROM, SUMO_ATTR_FROM_JUNCTION, SUMO_ATTR_FROMLONLAT, SUMO_ATTR_FROMXY, SUMO_ATTR_ROUTE, SUMO_ATTR_TO, SUMO_ATTR_TO_JUNCTION, SUMO_ATTR_TOLONLAT, SUMO_ATTR_TOXY, SUMO_ATTR_VIA, SUMO_ATTR_VIAJUNCTIONS, SUMO_ATTR_VIALONLAT, SUMO_ATTR_VIAXY, SUMO_TAG_TRIP, SUMO_TAG_VEHICLE, toString(), GeoConvHelper::usingGeoProjection(), SUMOVehicleParameter::via, SUMOVTypeParameter::write(), SUMOVehicleParameter::write(), OutputDevice::writeAttr(), Parameterised::writeParams(), RORouteDef::writeXMLDefinition(), and RORoute::writeXMLDefinition().
|
inlineinherited |
update depart time (for triggered persons)
Definition at line 105 of file RORoutable.h.
References SUMOVehicleParameter::depart, and RORoutable::myParameter.
|
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 148 of file RORoutable.h.
References RORoutable::saveAsXML().
|
private |
Whether this vehicle has any jumps defined.
Definition at line 166 of file ROVehicle.h.
Referenced by addStop(), getJumpTime(), and hasJumps().
|
privateinherited |
The vehicle's parameter.
Definition at line 184 of file RORoutable.h.
Referenced by RORoutable::getDepart(), RORoutable::getID(), RORoutable::getParameter(), RORoutable::isPartOfFlow(), RORoutable::isPublicTransport(), and RORoutable::setDepart().
|
private |
The route the vehicle takes.
Definition at line 160 of file ROVehicle.h.
Referenced by addStop(), getDepartEdge(), getRouteDefinition(), and saveAsXML().
|
protectedinherited |
Whether the last routing was successful.
Definition at line 191 of file RORoutable.h.
Referenced by ROPerson::computeIntermodal(), ROPerson::computeRoute(), computeRoute(), and RORoutable::getRoutingSuccess().
|
staticprivate |
map of all routes that were already saved with a name
Definition at line 169 of file ROVehicle.h.
Referenced by saveAsXML().
|
private |
The edges where the vehicle stops.
Definition at line 163 of file ROVehicle.h.
Referenced by addStop(), getStopEdges(), and ROVehicle().
|
privateinherited |
The type of the vehicle.
Definition at line 187 of file RORoutable.h.
Referenced by RORoutable::getType().