|
SUMO - Simulation of Urban MObility
|
A vehicle as used by router. More...
#include <ROVehicle.h>
Public Member Functions | |
| virtual ROVehicle * | copy (const std::string &id, unsigned int depTime, RORouteDef *newRoute) |
| Returns a copy of the vehicle using a new id, departure time and route. | |
| SUMOTime | getDepartureTime () const |
| Returns the time the vehicle starts at. | |
| const std::string & | getID () const |
| Returns the id of the vehicle. | |
| SUMOReal | getMaxSpeed () const |
| Returns the vehicle's maximum speed. | |
| RORouteDef * | getRouteDefinition () const |
| Returns the definition of the route the vehicle takes. | |
| const SUMOVTypeParameter * | getType () const |
| Returns the type of the vehicle. | |
| SUMOVehicleClass | getVClass () const |
| ROVehicle (const SUMOVehicleParameter &pars, RORouteDef *route, SUMOVTypeParameter *type) | |
| Constructor. | |
| void | saveAllAsXML (SUMOAbstractRouter< ROEdge, ROVehicle > &router, OutputDevice &os, OutputDevice *const altos, OutputDevice *const typeos, bool withExitTimes) const |
| Saves the complete vehicle description. | |
| virtual | ~ROVehicle () |
| Destructor. | |
Protected Attributes | |
| SUMOVehicleParameter | myParameter |
| The vehicle's parameter. | |
| RORouteDef * | myRoute |
| The route the vehicle takes. | |
| SUMOVTypeParameter * | myType |
| The type of the vehicle. | |
Private Member Functions | |
| ROVehicle & | operator= (const ROVehicle &src) |
| Invalidated assignment operator. | |
| ROVehicle (const ROVehicle &src) | |
| Invalidated copy constructor. | |
A vehicle as used by router.
Definition at line 60 of file ROVehicle.h.
| ROVehicle::ROVehicle | ( | const SUMOVehicleParameter & | pars, |
| RORouteDef * | route, | ||
| SUMOVTypeParameter * | type | ||
| ) |
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 55 of file ROVehicle.cpp.
Referenced by copy().
|
virtual |
Destructor.
Definition at line 60 of file ROVehicle.cpp.
|
private |
Invalidated copy constructor.
|
virtual |
Returns a copy of the vehicle using a new id, departure time and route.
| [in] | id | the new id to use |
| [in] | depTime | The new vehicle's departure time |
| [in] | newRoute | The new vehicle's route |
Definition at line 107 of file ROVehicle.cpp.
References SUMOVehicleParameter::depart, SUMOVehicleParameter::id, myParameter, myType, and ROVehicle().
Referenced by RORDGenerator_ODAmounts::FlowDef::addSingleRoute().
|
inline |
Returns the time the vehicle starts at.
Definition at line 113 of file ROVehicle.h.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by ROLogitCalculator::calculateProbabilities(), RONet::computeRoute(), ROVehicleByDepartureComperator::operator()(), RONet::saveAndRemoveRoutesUntil(), RORouteDef_Complete::writeXMLDefinition(), RORouteDef_Alternatives::writeXMLDefinition(), and RORoute::writeXMLDefinition().
|
inline |
Returns the id of the vehicle.
Definition at line 104 of file ROVehicle.h.
References SUMOVehicleParameter::id, and myParameter.
Referenced by RORouteDef_Alternatives::addAlternative(), RONet::computeRoute(), ROVehicleCont::erase(), ROVehicleByDepartureComperator::operator()(), RORouteDef_Complete::preComputeCurrentRoute(), and RONet::saveAndRemoveRoutesUntil().
| SUMOReal ROVehicle::getMaxSpeed | ( | ) | const |
Returns the vehicle's maximum speed.
Definition at line 101 of file ROVehicle.cpp.
References SUMOVTypeParameter::maxSpeed, and myType.
|
inline |
Returns the definition of the route the vehicle takes.
Definition at line 84 of file ROVehicle.h.
References myRoute.
Referenced by RONet::computeRoute().
|
inline |
Returns the type of the vehicle.
Definition at line 95 of file ROVehicle.h.
References myType.
Referenced by ROEdge::getCO2Effort(), ROEdge::getCOEffort(), ROEdge::getEffort(), ROEdge::getFuelEffort(), ROEdge::getHCEffort(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getNOxEffort(), ROEdge::getPMxEffort(), and getVClass().
|
inline |
Definition at line 122 of file ROVehicle.h.
References DEFAULT_VEH_CLASS, getType(), and SUMOVTypeParameter::vehicleClass.
Referenced by ROEdge::prohibits().
| void ROVehicle::saveAllAsXML | ( | SUMOAbstractRouter< ROEdge, ROVehicle > & | router, |
| OutputDevice & | os, | ||
| OutputDevice *const | altos, | ||
| OutputDevice *const | typeos, | ||
| bool | withExitTimes | ||
| ) | const |
Saves the complete vehicle description.
Saves the vehicle type if it was not saved before. Saves the vehicle route if it was not saved before. Saves the vehicle itself.
| [in] | router | the router for cost recomputation |
| [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 |
| [in] | withExitTimes | whether exit times for the edges shall be written |
| IOError | If something fails (not yet implemented) |
Definition at line 64 of file ROVehicle.cpp.
References OutputDevice::closeTag(), OptionsCont::getOptions(), ReferencedItem::isSaved(), myParameter, myRoute, myType, SUMOVTypeParameter::saved, SUMOVTypeParameter::write(), SUMOVehicleParameter::writeAs(), and RORouteDef::writeXMLDefinition().
Referenced by RONet::saveAndRemoveRoutesUntil().
|
protected |
The vehicle's parameter.
Definition at line 159 of file ROVehicle.h.
Referenced by copy(), getDepartureTime(), getID(), and saveAllAsXML().
|
protected |
The route the vehicle takes.
Definition at line 165 of file ROVehicle.h.
Referenced by getRouteDefinition(), and saveAllAsXML().
|
protected |
The type of the vehicle.
Definition at line 162 of file ROVehicle.h.
Referenced by copy(), getMaxSpeed(), getType(), and saveAllAsXML().