SUMO - Simulation of Urban MObility
|
A vehicle as used by router. More...
#include <ROVehicle.h>
Public Member Functions | |
SUMOTime | getDepartureTime () const |
Returns the time the vehicle starts at. More... | |
const std::string & | getID () const |
Returns the id of the vehicle. More... | |
SUMOReal | getMaxSpeed () const |
Returns the vehicle's maximum speed. More... | |
RORouteDef * | getRouteDefinition () const |
Returns the definition of the route the vehicle takes. More... | |
const std::vector< const ROEdge * > & | getStopEdges () const |
const SUMOVTypeParameter * | getType () const |
Returns the type of the vehicle. More... | |
SUMOVehicleClass | getVClass () const |
ROVehicle (const SUMOVehicleParameter &pars, RORouteDef *route, const SUMOVTypeParameter *type, const RONet *net) | |
Constructor. More... | |
void | saveAllAsXML (OutputDevice &os, OutputDevice *const altos, OutputDevice *const typeos, bool withExitTimes) const |
Saves the complete vehicle description. More... | |
virtual | ~ROVehicle () |
Destructor. More... | |
Protected Attributes | |
SUMOVehicleParameter | myParameter |
The vehicle's parameter. More... | |
RORouteDef *const | myRoute |
The route the vehicle takes. More... | |
std::vector< const ROEdge * > | myStopEdges |
The edges where the vehicle stops. More... | |
const SUMOVTypeParameter *const | myType |
The type of the vehicle. More... | |
Private Member Functions | |
void | addStop (const SUMOVehicleParameter::Stop &stopPar, const RONet *net) |
Adds a stop to this vehicle. More... | |
ROVehicle & | operator= (const ROVehicle &src) |
Invalidated assignment operator. More... | |
ROVehicle (const ROVehicle &src) | |
Invalidated copy constructor. More... | |
A vehicle as used by router.
Definition at line 59 of file ROVehicle.h.
ROVehicle::ROVehicle | ( | const SUMOVehicleParameter & | pars, |
RORouteDef * | route, | ||
const SUMOVTypeParameter * | type, | ||
const RONet * | net | ||
) |
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 56 of file ROVehicle.cpp.
References addStop(), RORouteDef::getFirstRoute(), RORoute::getStops(), myParameter, and SUMOVehicleParameter::stops.
|
virtual |
Destructor.
Definition at line 112 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 72 of file ROVehicle.cpp.
References SUMOVehicleParameter::Stop::endPos, RONet::getEdge(), RORoute::getEdgeVector(), RORouteDef::getFirstRoute(), SUMOVehicleParameter::Stop::index, SUMOVehicleParameter::Stop::lane, myParameter, myRoute, myStopEdges, STOP_INDEX_END, STOP_INDEX_FIT, and SUMOVehicleParameter::stops.
Referenced by ROVehicle().
|
inline |
Returns the time the vehicle starts at.
Definition at line 111 of file ROVehicle.h.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by RORouteDef::addAlternative(), RONet::computeRoute(), ROVehicleByDepartureComperator::operator()(), RONet::saveAndRemoveRoutesUntil(), and RORoute::writeXMLDefinition().
|
inline |
Returns the id of the vehicle.
Definition at line 102 of file ROVehicle.h.
References SUMOVehicleParameter::id, and myParameter.
Referenced by RORouteDef::addAlternative(), RONet::computeRoute(), ROVehicleCont::erase(), ROVehicleByDepartureComperator::operator()(), RORouteDef::preComputeCurrentRoute(), RORouteDef::repairCurrentRoute(), and RONet::saveAndRemoveRoutesUntil().
SUMOReal ROVehicle::getMaxSpeed | ( | ) | const |
Returns the vehicle's maximum speed.
Definition at line 157 of file ROVehicle.cpp.
References SUMOVTypeParameter::maxSpeed, and myType.
|
inline |
Returns the definition of the route the vehicle takes.
Definition at line 82 of file ROVehicle.h.
References myRoute.
Referenced by RONet::computeRoute(), and RONet::saveAndRemoveRoutesUntil().
|
inline |
Definition at line 115 of file ROVehicle.h.
References myStopEdges.
Referenced by RORouteDef::repairCurrentRoute().
|
inline |
Returns the type of the vehicle.
Definition at line 93 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(), ROEdge::getTravelTime(), and getVClass().
|
inline |
Definition at line 123 of file ROVehicle.h.
References getType(), SVC_IGNORING, and SUMOVTypeParameter::vehicleClass.
Referenced by ROEdge::prohibits().
void ROVehicle::saveAllAsXML | ( | 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] | 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 116 of file ROVehicle.cpp.
References OutputDevice::closeTag(), OptionsCont::getOptions(), ReferencedItem::isSaved(), myParameter, myRoute, myType, SUMOVTypeParameter::saved, SUMOVTypeParameter::write(), SUMOVehicleParameter::write(), SUMOVehicleParameter::writeStops(), and RORouteDef::writeXMLDefinition().
Referenced by RONet::saveAndRemoveRoutesUntil().
|
protected |
The vehicle's parameter.
Definition at line 155 of file ROVehicle.h.
Referenced by addStop(), getDepartureTime(), getID(), ROVehicle(), and saveAllAsXML().
|
protected |
The route the vehicle takes.
Definition at line 161 of file ROVehicle.h.
Referenced by addStop(), getRouteDefinition(), and saveAllAsXML().
|
protected |
The edges where the vehicle stops.
Definition at line 164 of file ROVehicle.h.
Referenced by addStop(), and getStopEdges().
|
protected |
The type of the vehicle.
Definition at line 158 of file ROVehicle.h.
Referenced by getMaxSpeed(), getType(), and saveAllAsXML().