SUMO - Simulation of Urban MObility
|
Structure representing possible vehicle parameter. More...
#include <SUMOVehicleParameter.h>
Data Structures | |
struct | Stop |
Definition of vehicle stop (position and duration) More... | |
Public Member Functions | |
bool | defaultOptionOverrides (const OptionsCont &oc, const std::string &optionName) const |
Returns whether the defaults shall be used. | |
SUMOVehicleParameter () | |
Constructor. | |
bool | wasSet (int what) const |
Returns whether the given parameter was set. | |
void | writeAs (const std::string &xmlElem, OutputDevice &dev, const OptionsCont &oc) const |
Writes the parameters as a beginning element. | |
Static Public Member Functions | |
Depart/arrival-attributes verification | |
static bool | departlaneValidate (const std::string &val) |
Validates a given departlane value. | |
static bool | departposValidate (const std::string &val) |
Validates a given departpos value. | |
static bool | departspeedValidate (const std::string &val) |
Validates a given departspeed value. | |
static bool | arrivallaneValidate (const std::string &val) |
Validates a given arrivallane value. | |
static bool | arrivalposValidate (const std::string &val) |
Validates a given arrivalpos value. | |
static bool | arrivalspeedValidate (const std::string &val) |
Validates a given arrivalspeed value. | |
Data Fields | |
RGBColor | color |
The vehicle's color. | |
std::string | fromTaz |
The vehicle's origin zone (district) | |
std::string | id |
The vehicle's id. | |
std::string | line |
The vehicle's line (mainly for public transport) | |
std::string | routeid |
The vehicle's route id. | |
int | setParameter |
Information for the router which parameter were set. | |
std::vector< Stop > | stops |
List of the stops the vehicle will make. | |
std::string | toTaz |
The vehicle's destination zone (district) | |
std::string | vtypeid |
The vehicle's type id. | |
Departure definition | |
SUMOTime | depart |
The vehicle's departure time. | |
DepartDefinition | departProcedure |
Information how the vehicle shall choose the depart time. | |
int | departLane |
(optional) The lane the vehicle shall depart from (index in edge) | |
DepartLaneDefinition | departLaneProcedure |
Information how the vehicle shall choose the lane to depart from. | |
SUMOReal | departPos |
(optional) The position the vehicle shall depart from | |
DepartPosDefinition | departPosProcedure |
Information how the vehicle shall choose the departure position. | |
SUMOReal | departSpeed |
(optional) The initial speed of the vehicle | |
DepartSpeedDefinition | departSpeedProcedure |
Information how the vehicle's initial speed shall be chosen. | |
Arrival definition | |
int | arrivalLane |
(optional) The lane the vehicle shall arrive on (not used yet) | |
ArrivalLaneDefinition | arrivalLaneProcedure |
Information how the vehicle shall choose the lane to arrive on. | |
SUMOReal | arrivalPos |
(optional) The position the vehicle shall arrive on | |
ArrivalPosDefinition | arrivalPosProcedure |
Information how the vehicle shall choose the arrival position. | |
SUMOReal | arrivalSpeed |
(optional) The final speed of the vehicle (not used yet) | |
ArrivalSpeedDefinition | arrivalSpeedProcedure |
Information how the vehicle's end speed shall be chosen. | |
Repetition definition | |
int | repetitionNumber |
The number of times the vehicle shall be repeatedly inserted. | |
int | repetitionsDone |
The number of times the vehicle was already inserted. | |
SUMOReal | repetitionOffset |
The time offset between vehicle reinsertions. |
Structure representing possible vehicle parameter.
The fields yielding with "Procedure" describe whether the according value shall be used or another procedure is used to choose the value.
Definition at line 220 of file SUMOVehicleParameter.h.
Constructor.
Initialises the structure with default values
Definition at line 48 of file SUMOVehicleParameter.cpp.
References DEFAULT_VTYPE_ID.
bool SUMOVehicleParameter::arrivallaneValidate | ( | const std::string & | val | ) | [static] |
Validates a given arrivallane value.
[in] | val | The arrivallane value to validate |
Definition at line 295 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::arrivalposValidate | ( | const std::string & | val | ) | [static] |
Validates a given arrivalpos value.
[in] | val | The arrivalpos value to validate |
Definition at line 311 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::arrivalspeedValidate | ( | const std::string & | val | ) | [static] |
Validates a given arrivalspeed value.
[in] | val | The arrivalspeed value to validate |
Definition at line 327 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::defaultOptionOverrides | ( | const OptionsCont & | oc, |
const std::string & | optionName | ||
) | const |
Returns whether the defaults shall be used.
[in] | oc | The options to get the options from |
[in] | optionName | The name of the option to determine whether its value shall be used |
Definition at line 63 of file SUMOVehicleParameter.cpp.
References OptionsCont::getBool(), and OptionsCont::isSet().
Referenced by writeAs().
bool SUMOVehicleParameter::departlaneValidate | ( | const std::string & | val | ) | [static] |
Validates a given departlane value.
[in] | val | The departlane value to validate |
Definition at line 247 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::departposValidate | ( | const std::string & | val | ) | [static] |
Validates a given departpos value.
[in] | val | The departpos value to validate |
Definition at line 263 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::departspeedValidate | ( | const std::string & | val | ) | [static] |
Validates a given departspeed value.
[in] | val | The departspeed value to validate |
Definition at line 279 of file SUMOVehicleParameter.cpp.
References WRITE_ERROR.
Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().
bool SUMOVehicleParameter::wasSet | ( | int | what | ) | const [inline] |
Returns whether the given parameter was set.
[in] | what | The parameter which one asks for |
Definition at line 233 of file SUMOVehicleParameter.h.
References setParameter.
Referenced by MSDevice_Routing::buildVehicleDevices(), RORDLoader_SUMOBase::myCharacters(), RORDLoader_TripDefs::myEndElement(), RORDGenerator_ODAmounts::myEndFlowAmountDef(), MSRouteHandler::myStartElement(), and writeAs().
void SUMOVehicleParameter::writeAs | ( | const std::string & | xmlElem, |
OutputDevice & | dev, | ||
const OptionsCont & | oc | ||
) | const |
Writes the parameters as a beginning element.
[in] | xmlElem | The name of the element to write |
[in,out] | dev | The device to write into |
[in] | oc | The options to get defaults from |
IOError | not yet implemented |
Definition at line 69 of file SUMOVehicleParameter.cpp.
References ARRIVAL_LANE_CURRENT, ARRIVAL_LANE_DEFAULT, ARRIVAL_LANE_GIVEN, ARRIVAL_POS_DEFAULT, ARRIVAL_POS_GIVEN, ARRIVAL_POS_MAX, ARRIVAL_POS_RANDOM, ARRIVAL_SPEED_CURRENT, ARRIVAL_SPEED_DEFAULT, ARRIVAL_SPEED_GIVEN, arrivalLane, arrivalLaneProcedure, arrivalPos, arrivalPosProcedure, arrivalSpeed, arrivalSpeedProcedure, OutputDevice::closeOpener(), color, defaultOptionOverrides(), depart, DEPART_LANE_ALLOWED_FREE, DEPART_LANE_BEST_FREE, DEPART_LANE_DEFAULT, DEPART_LANE_FREE, DEPART_LANE_GIVEN, DEPART_LANE_RANDOM, DEPART_POS_BASE, DEPART_POS_DEFAULT, DEPART_POS_FREE, DEPART_POS_GIVEN, DEPART_POS_MAX_SPEED_GAP, DEPART_POS_PWAG_GENERIC, DEPART_POS_PWAG_SIMPLE, DEPART_POS_RANDOM, DEPART_POS_RANDOM_FREE, DEPART_SPEED_DEFAULT, DEPART_SPEED_GIVEN, DEPART_SPEED_MAX, DEPART_SPEED_RANDOM, departLane, departLaneProcedure, departPos, departPosProcedure, departSpeed, departSpeedProcedure, fromTaz, OptionsCont::getString(), OptionsCont::isSet(), line, OutputDevice::openTag(), repetitionNumber, repetitionOffset, SUMO_ATTR_ARRIVALLANE, SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_ARRIVALSPEED, SUMO_ATTR_COLOR, SUMO_ATTR_DEPART, SUMO_ATTR_DEPARTLANE, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DEPARTSPEED, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_ID, SUMO_ATTR_LINE, SUMO_ATTR_PERIOD, SUMO_ATTR_REPNUMBER, SUMO_ATTR_TO_TAZ, SUMO_ATTR_TYPE, time2string(), toString(), toTaz, VEHPARS_ARRIVALLANE_SET, VEHPARS_ARRIVALPOS_SET, VEHPARS_ARRIVALSPEED_SET, VEHPARS_COLOR_SET, VEHPARS_DEPARTLANE_SET, VEHPARS_DEPARTPOS_SET, VEHPARS_DEPARTSPEED_SET, VEHPARS_LINE_SET, VEHPARS_PERIODFREQ_SET, VEHPARS_PERIODNUM_SET, VEHPARS_TAZ_SET, VEHPARS_VTYPE_SET, vtypeid, wasSet(), and OutputDevice::writeAttr().
Referenced by ROVehicle::saveAllAsXML().
(optional) The lane the vehicle shall arrive on (not used yet)
Definition at line 342 of file SUMOVehicleParameter.h.
Referenced by MSVehicle::getBestLanes(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().
Information how the vehicle shall choose the lane to arrive on.
Definition at line 344 of file SUMOVehicleParameter.h.
Referenced by MSVehicle::getBestLanes(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().
(optional) The position the vehicle shall arrive on
Definition at line 346 of file SUMOVehicleParameter.h.
Referenced by MSBaseVehicle::calculateArrivalPos(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().
Information how the vehicle shall choose the arrival position.
Definition at line 348 of file SUMOVehicleParameter.h.
Referenced by MSBaseVehicle::calculateArrivalPos(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().
(optional) The final speed of the vehicle (not used yet)
Definition at line 350 of file SUMOVehicleParameter.h.
Referenced by MSVehicle::moveRegardingCritical(), SUMOVehicleParserHelper::parseCommonAttributes(), MSVehicle::vsafeCriticalCont(), and writeAs().
Information how the vehicle's end speed shall be chosen.
Definition at line 352 of file SUMOVehicleParameter.h.
Referenced by MSVehicle::moveRegardingCritical(), SUMOVehicleParserHelper::parseCommonAttributes(), MSVehicle::vsafeCriticalCont(), and writeAs().
RGBColor SUMOVehicleParameter::color [mutable] |
The vehicle's color.
Definition at line 313 of file SUMOVehicleParameter.h.
Referenced by RORDLoader_TripDefs::myEndElement(), RORDGenerator_ODAmounts::myEndFlowAmountDef(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
The vehicle's departure time.
Definition at line 320 of file SUMOVehicleParameter.h.
Referenced by MSVehicleContainer::add(), MSInsertionControl::checkFlows(), SUMORouteHandler::checkLastDepart(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closeVehicle(), RORDLoader_SUMOBase::closeVehicle(), traci::TraCIServer::commandAddVehicle(), ROVehicle::copy(), MSDevice_Tripinfo::generateOutput(), ROVehicle::getDepartureTime(), MSPerson::getDesiredDepart(), MSDevice_Routing::MSDevice_Routing(), MSRouteHandler::myStartElement(), RORDLoader_SUMOBase::myStartElement(), SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), TraCIServerAPI_Vehicle::processSet(), SUMORouteHandler::registerLastDepart(), MSInsertionControl::tryInsert(), MSVehicleControl::vehicleDeparted(), and writeAs().
(optional) The lane the vehicle shall depart from (index in edge)
Definition at line 324 of file SUMOVehicleParameter.h.
Referenced by MSEdge::getDepartLane(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
Information how the vehicle shall choose the lane to depart from.
Definition at line 326 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::add(), MSEdge::getDepartLane(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
(optional) The position the vehicle shall depart from
Definition at line 328 of file SUMOVehicleParameter.h.
Referenced by MSLane::insertVehicle(), MSEdge::insertVehicle(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
Information how the vehicle shall choose the departure position.
Definition at line 330 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::add(), MSLane::insertVehicle(), MSEdge::insertVehicle(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
Information how the vehicle shall choose the depart time.
Definition at line 322 of file SUMOVehicleParameter.h.
Referenced by SUMORouteHandler::checkLastDepart(), MSRouteHandler::closeVehicle(), SUMOVehicleParserHelper::parseVehicleAttributes(), MSPerson::MSPersonStage_Driving::proceed(), TraCIServerAPI_Vehicle::processSet(), and SUMORouteHandler::registerLastDepart().
(optional) The initial speed of the vehicle
Definition at line 332 of file SUMOVehicleParameter.h.
Referenced by MSLane::insertVehicle(), MSVehicle::MSVehicle(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
Information how the vehicle's initial speed shall be chosen.
Definition at line 334 of file SUMOVehicleParameter.h.
Referenced by MSLane::insertVehicle(), MSVehicle::MSVehicle(), SUMOVehicleParserHelper::parseCommonAttributes(), TraCIServerAPI_Vehicle::processSet(), and writeAs().
std::string SUMOVehicleParameter::fromTaz |
The vehicle's origin zone (district)
Definition at line 376 of file SUMOVehicleParameter.h.
Referenced by MSDevice_Routing::buildVehicleDevices(), MSDevice_Vehroutes::generateOutput(), RORDLoader_SUMOBase::myCharacters(), MSRouteHandler::myStartElement(), SUMOVehicleParserHelper::parseCommonAttributes(), MSDevice_Routing::preInsertionReroute(), MSBaseVehicle::reroute(), and writeAs().
std::string SUMOVehicleParameter::id |
The vehicle's id.
Definition at line 306 of file SUMOVehicleParameter.h.
Referenced by MSRouteHandler::addStop(), MSPersonControl::boardAnyWaiting(), MSInsertionControl::checkFlows(), SUMORouteHandler::checkLastDepart(), MSRouteHandler::closeFlow(), MSRouteHandler::closePerson(), MSRouteHandler::closeRoute(), MSRouteHandler::closeVehicle(), RORDLoader_SUMOBase::closeVehicle(), traci::TraCIServer::commandAddVehicle(), ROVehicle::copy(), MSVehicle::enterLaneAtLaneChange(), MSBaseVehicle::getID(), ROVehicle::getID(), MSPerson::getID(), MSVehicle::moveChecked(), MSVehicle::moveRegardingCritical(), MSVehicle::MSVehicle(), RORDLoader_SUMOBase::myCharacters(), RORDLoader_TripDefs::myEndElement(), RORDGenerator_ODAmounts::myEndFlowAmountDef(), RORDLoader_TripDefs::myStartElement(), SUMORouteHandler::myStartElement(), MSRouteHandler::myStartElement(), MSRouteHandler::openRoute(), MSRouteHandler::openRouteDistribution(), SUMOVehicleParserHelper::parseCommonAttributes(), RORDGenerator_ODAmounts::parseFlowAmountDef(), SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), TraCIServerAPI_Vehicle::processSet(), RORDLoader_SUMOBase::startAlternative(), and RORDLoader_SUMOBase::startRoute().
std::string SUMOVehicleParameter::line |
The vehicle's line (mainly for public transport)
Definition at line 373 of file SUMOVehicleParameter.h.
Referenced by MSPersonControl::boardAnyWaiting(), MSVehicleControl::getWaitingVehicle(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().
The number of times the vehicle shall be repeatedly inserted.
Definition at line 360 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeFlow(), MSRouteHandler::closeRoute(), GUIVehicle::getParameterWindow(), SUMORouteHandler::myEndElement(), SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), and writeAs().
The time offset between vehicle reinsertions.
Definition at line 367 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeFlow(), SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), and writeAs().
The number of times the vehicle was already inserted.
Definition at line 362 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::checkFlows(), and MSRouteHandler::closeFlow().
std::string SUMOVehicleParameter::routeid |
The vehicle's route id.
Definition at line 309 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::add(), MSInsertionControl::checkFlows(), MSRouteHandler::closeFlow(), MSRouteHandler::closeVehicle(), RORDLoader_SUMOBase::closeVehicle(), and SUMOVehicleParserHelper::parseCommonAttributes().
Information for the router which parameter were set.
Definition at line 409 of file SUMOVehicleParameter.h.
Referenced by SUMORouteHandler::myStartElement(), SUMOVehicleParserHelper::parseCommonAttributes(), SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), and wasSet().
std::vector<Stop> SUMOVehicleParameter::stops |
List of the stops the vehicle will make.
Definition at line 406 of file SUMOVehicleParameter.h.
Referenced by MSRouteHandler::addStop(), and MSVehicle::MSVehicle().
std::string SUMOVehicleParameter::toTaz |
The vehicle's destination zone (district)
Definition at line 379 of file SUMOVehicleParameter.h.
Referenced by MSDevice_Routing::buildVehicleDevices(), MSDevice_Vehroutes::generateOutput(), RORDLoader_SUMOBase::myCharacters(), SUMOVehicleParserHelper::parseCommonAttributes(), MSDevice_Routing::preInsertionReroute(), MSBaseVehicle::reroute(), and writeAs().
std::string SUMOVehicleParameter::vtypeid |
The vehicle's type id.
Definition at line 311 of file SUMOVehicleParameter.h.
Referenced by MSInsertionControl::add(), MSInsertionControl::checkFlows(), MSRouteHandler::closeFlow(), MSRouteHandler::closeVehicle(), RORDLoader_SUMOBase::closeVehicle(), RORDLoader_TripDefs::myEndElement(), RORDGenerator_ODAmounts::myEndFlowAmountDef(), SUMOVehicleParserHelper::parseCommonAttributes(), and writeAs().