SUMO - Simulation of Urban MObility

SUMOVehicleParameter Class Reference

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 throw ()
 Returns whether the defaults shall be used.
 SUMOVehicleParameter () throw ()
 Constructor.
bool wasSet (int what) const throw ()
 Returns whether the given parameter was set.
void writeAs (const std::string &xmlElem, OutputDevice &dev, const OptionsCont &oc) const throw (IOError)
 Writes the parameters as a beginning element.

Static Public Member Functions

Depart/arrival-attributes verification
static bool departlaneValidate (const std::string &val) throw ()
 Validates a given departlane value.
static bool departposValidate (const std::string &val) throw ()
 Validates a given departpos value.
static bool departspeedValidate (const std::string &val) throw ()
 Validates a given departspeed value.
static bool arrivallaneValidate (const std::string &val) throw ()
 Validates a given arrivallane value.
static bool arrivalposValidate (const std::string &val) throw ()
 Validates a given arrivalpos value.
static bool arrivalspeedValidate (const std::string &val) throw ()
 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.

Detailed Description

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.

See also:
DepartLaneDefinition
DepartPosDefinition
DepartSpeedDefinition

Definition at line 208 of file SUMOVehicleParameter.h.


Constructor & Destructor Documentation

SUMOVehicleParameter::SUMOVehicleParameter ( ) throw ()

Constructor.

Initialises the structure with default values

Definition at line 45 of file SUMOVehicleParameter.cpp.


Member Function Documentation

bool SUMOVehicleParameter::arrivallaneValidate ( const std::string &  val) throw () [static]

Validates a given arrivallane value.

Parameters:
[in]valThe arrivallane value to validate
Returns:
Whether the given value is a valid arrivallane definition

Definition at line 292 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2int(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::arrivalposValidate ( const std::string &  val) throw () [static]

Validates a given arrivalpos value.

Parameters:
[in]valThe arrivalpos value to validate
Returns:
Whether the given value is a valid arrivalpos definition

Definition at line 308 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2SUMOReal(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::arrivalspeedValidate ( const std::string &  val) throw () [static]

Validates a given arrivalspeed value.

Parameters:
[in]valThe arrivalspeed value to validate
Returns:
Whether the given value is a valid arrivalspeed definition

Definition at line 324 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2SUMOReal(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::defaultOptionOverrides ( const OptionsCont &  oc,
const std::string &  optionName 
) const throw ()

Returns whether the defaults shall be used.

Parameters:
[in]ocThe options to get the options from
[in]optionNameThe name of the option to determine whether its value shall be used
Returns:
Whether the option is set and --defaults-override was set

Definition at line 60 of file SUMOVehicleParameter.cpp.

bool SUMOVehicleParameter::departlaneValidate ( const std::string &  val) throw () [static]

Validates a given departlane value.

Parameters:
[in]valThe departlane value to validate
Returns:
Whether the given value is a valid departlane definition

Definition at line 244 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2int(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::departposValidate ( const std::string &  val) throw () [static]

Validates a given departpos value.

Parameters:
[in]valThe departpos value to validate
Returns:
Whether the given value is a valid departpos definition

Definition at line 260 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2SUMOReal(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::departspeedValidate ( const std::string &  val) throw () [static]

Validates a given departspeed value.

Parameters:
[in]valThe departspeed value to validate
Returns:
Whether the given value is a valid departspeed definition

Definition at line 276 of file SUMOVehicleParameter.cpp.

References TplConvert< E >::_2SUMOReal(), and WRITE_ERROR.

Referenced by ROJTRFrame::checkOptions(), RODUAFrame::checkOptions(), and checkOptions().

bool SUMOVehicleParameter::wasSet ( int  what) const throw () [inline]

Returns whether the given parameter was set.

Parameters:
[in]whatThe parameter which one asks for
Returns:
Whether the given parameter was set

Definition at line 221 of file SUMOVehicleParameter.h.

References setParameter.

Referenced by RORDGenerator_ODAmounts::myEndFlowAmountDef().


Field Documentation

(optional) The lane the vehicle shall arrive on (not used yet)

Definition at line 330 of file SUMOVehicleParameter.h.

Referenced by MSVehicle::getBestLanes().

Information how the vehicle shall choose the lane to arrive on.

Definition at line 332 of file SUMOVehicleParameter.h.

Referenced by MSVehicle::getBestLanes().

(optional) The position the vehicle shall arrive on

Definition at line 334 of file SUMOVehicleParameter.h.

Referenced by MSBaseVehicle::calculateArrivalPos().

Information how the vehicle shall choose the arrival position.

Definition at line 336 of file SUMOVehicleParameter.h.

Referenced by MSBaseVehicle::calculateArrivalPos().

(optional) The final speed of the vehicle (not used yet)

Definition at line 338 of file SUMOVehicleParameter.h.

Referenced by MSVehicle::moveRegardingCritical(), and MSVehicle::vsafeCriticalCont().

Information how the vehicle's end speed shall be chosen.

Definition at line 340 of file SUMOVehicleParameter.h.

Referenced by MSVehicle::moveRegardingCritical(), and MSVehicle::vsafeCriticalCont().

(optional) The lane the vehicle shall depart from (index in edge)

Definition at line 312 of file SUMOVehicleParameter.h.

Referenced by TraCIServerAPI_Vehicle::processSet().

Information how the vehicle shall choose the lane to depart from.

Definition at line 314 of file SUMOVehicleParameter.h.

Referenced by TraCIServerAPI_Vehicle::processSet().

(optional) The position the vehicle shall depart from

Definition at line 316 of file SUMOVehicleParameter.h.

Referenced by MSLane::insertVehicle(), MSEdge::insertVehicle(), and TraCIServerAPI_Vehicle::processSet().

Information how the vehicle shall choose the departure position.

Definition at line 318 of file SUMOVehicleParameter.h.

Referenced by MSLane::insertVehicle(), MSEdge::insertVehicle(), and TraCIServerAPI_Vehicle::processSet().

(optional) The initial speed of the vehicle

Definition at line 320 of file SUMOVehicleParameter.h.

Referenced by MSLane::insertVehicle(), and TraCIServerAPI_Vehicle::processSet().

Information how the vehicle's initial speed shall be chosen.

Definition at line 322 of file SUMOVehicleParameter.h.

Referenced by MSLane::insertVehicle(), and TraCIServerAPI_Vehicle::processSet().

The vehicle's origin zone (district)

Definition at line 364 of file SUMOVehicleParameter.h.

Referenced by MSDevice_Vehroutes::generateOutput().

The vehicle's line (mainly for public transport)

Definition at line 361 of file SUMOVehicleParameter.h.

Referenced by MSVehicleControl::getWaitingVehicle().

The number of times the vehicle was already inserted.

Definition at line 350 of file SUMOVehicleParameter.h.

Referenced by MSInsertionControl::checkFlows(), and MSRouteHandler::closeFlow().

Information for the router which parameter were set.

Definition at line 397 of file SUMOVehicleParameter.h.

Referenced by SUMOVehicleParserHelper::parseFlowAttributes(), SUMOVehicleParserHelper::parseVehicleAttributes(), and wasSet().

List of the stops the vehicle will make.

Definition at line 394 of file SUMOVehicleParameter.h.

The vehicle's destination zone (district)

Definition at line 367 of file SUMOVehicleParameter.h.

Referenced by MSDevice_Vehroutes::generateOutput().


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines