Eclipse SUMO - Simulation of Urban MObility
|
Helper methods for parsing vehicle attributes. More...
#include <SUMOVehicleParserHelper.h>
Static Public Member Functions | |
static SUMOVTypeParameter * | beginVTypeParsing (const SUMOSAXAttributes &attrs, const bool hardFail, const std::string &file) |
Starts to parse a vehicle type. | |
static bool | isInternalRouteID (const std::string &id) |
Checks whether the route ID uses the syntax of internal routes. | |
static bool | parseAngleTimesMap (SUMOVTypeParameter *vtype, const std::string) |
Parse string containing AngleTimes triplets (angle, entry time, exit time) | |
static int | parseCarWalkTransfer (const OptionsCont &oc, const bool hasTaxi=false) |
static bool | parseCFMParams (SUMOVTypeParameter *into, const SumoXMLTag element, const SUMOSAXAttributes &attrs, const bool nestedCFM) |
Parses Car Following Mode params. | |
static SUMOVehicleParameter * | parseFlowAttributes (SumoXMLTag tag, const SUMOSAXAttributes &attrs, const bool hardFail, const bool needID, const SUMOTime beginDefault, const SUMOTime endDefault, const bool allowInternalRoutes=false) |
Parses a flow's attributes. | |
static SUMOVehicleShape | parseGuiShape (const SUMOSAXAttributes &attrs, const std::string &id) |
Parses the vehicle class. | |
static bool | parseJMParams (SUMOVTypeParameter *into, const SUMOSAXAttributes &attrs) |
Parses junction model attributes. | |
static bool | parseLCParams (SUMOVTypeParameter *into, LaneChangeModel model, const SUMOSAXAttributes &attrs) |
Parses lane change model attributes. | |
static SUMOVehicleParameter * | parseVehicleAttributes (int element, const SUMOSAXAttributes &attrs, const bool hardFail, const bool optionalID=false, const bool skipDepart=false, const bool allowInternalRoutes=false) |
Parses a vehicle's attributes. | |
static SUMOVehicleClass | parseVehicleClass (const SUMOSAXAttributes &attrs, const std::string &id) |
Parses the vehicle class. | |
static double | parseWalkPos (SumoXMLAttr attr, const bool hardFail, const std::string &id, double maxPos, const std::string &val, SumoRNG *rng=0) |
parse departPos or arrivalPos for a walk | |
static SUMOTime | processActionStepLength (double given) |
Checks and converts given value for the action step length from seconds to miliseconds assuring it being a positive multiple of the simulation step width. | |
Private Types | |
typedef std::map< SumoXMLTag, std::set< SumoXMLAttr > > | CFAttrMap |
Car-Following attributes map. | |
typedef std::map< LaneChangeModel, std::set< SumoXMLAttr > > | LCAttrMap |
Lane-Change-Model attributes map. | |
Static Private Member Functions | |
static const CFAttrMap & | getAllowedCFModelAttrs () |
returns allowed attrs for each known CF-model (init on first use) | |
static SUMOVehicleParameter * | handleVehicleError (const bool hardFail, SUMOVehicleParameter *vehicleParameter, const std::string message="") |
handle error loading SUMOVehicleParameter | |
static SUMOVTypeParameter * | handleVehicleTypeError (const bool hardFail, SUMOVTypeParameter *vehicleTypeParameter, const std::string message="") |
handle error loading SUMOVTypeParameter | |
static void | parseCommonAttributes (const SUMOSAXAttributes &attrs, SUMOVehicleParameter *ret, SumoXMLTag tag, const bool allowInternalRoutes=false) |
Parses attributes common to vehicles and flows. | |
static std::string | parseID (const SUMOSAXAttributes &attrs, const SumoXMLTag element) |
parse ID | |
Static Private Attributes | |
static CFAttrMap | allowedCFModelAttrs |
allowed attrs for each known CF-model | |
static LCAttrMap | allowedLCModelAttrs |
allowed attrs for each known LC-model | |
Helper methods for parsing vehicle attributes.
This class supports helper methods for parsing a vehicle's attributes.
Definition at line 49 of file SUMOVehicleParserHelper.h.
|
private |
Car-Following attributes map.
Definition at line 202 of file SUMOVehicleParserHelper.h.
|
private |
Lane-Change-Model attributes map.
Definition at line 205 of file SUMOVehicleParserHelper.h.
|
static |
Starts to parse a vehicle type.
[in] | attr | The SAX-attributes to get vehicle parameter from |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
[in] | file | The name of the file being parsed (for resolving paths) |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
ProcessError | If an attribute's value is invalid and hardFail is enabled |
Definition at line 756 of file SUMOVehicleParserHelper.cpp.
References SUMOVTypeParameter::actionStepLength, SUMOVTypeParameter::boardingDuration, SUMOVTypeParameter::boardingFactor, SUMOXMLDefinitions::CarFollowModels, SUMOVTypeParameter::cfModel, SUMOVTypeParameter::color, SUMOVTypeParameter::containerCapacity, SUMOVTypeParameter::defaultProbability, SUMOVTypeParameter::desiredMaxSpeed, SUMOVTypeParameter::emissionClass, StringBijection< T >::get(), SUMOSAXAttributes::get(), PollutantsInterface::getClassByName(), FileHelpers::getConfigurationRelative(), SUMOSAXAttributes::getOpt(), OptionsCont::getOptions(), Distribution_Parameterized::getParameter(), SUMOSAXAttributes::getSUMOTimeReporting(), handleVehicleTypeError(), SUMOSAXAttributes::hasAttribute(), SUMOVTypeParameter::height, SUMOVTypeParameter::id, SUMOVTypeParameter::imgFile, SUMOVTypeParameter::impatience, FileHelpers::isAbsolute(), Distribution_Parameterized::isValid(), SUMOXMLDefinitions::LaneChangeModels, SUMOVTypeParameter::latAlignmentOffset, SUMOVTypeParameter::latAlignmentProcedure, SUMOVTypeParameter::lcModel, SUMOVTypeParameter::length, SUMOVTypeParameter::loadingDuration, SUMOVTypeParameter::mass, MAX2(), SUMOVTypeParameter::VClassDefaultValues::maxSpeed, SUMOVTypeParameter::maxSpeed, SUMOVTypeParameter::maxSpeedLat, SUMOVTypeParameter::minGap, SUMOVTypeParameter::minGapLat, SUMOVTypeParameter::osgFile, SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::parkingBadges, Distribution_Parameterized::parse(), parseAngleTimesMap(), parseCFMParams(), parseGuiShape(), parseID(), parseJMParams(), SUMOVTypeParameter::parseLatAlignment(), parseLCParams(), parseVehicleClass(), SUMOVTypeParameter::personCapacity, processActionStepLength(), SUMOVTypeParameter::scale, SUMOVTypeParameter::shape, SUMOVTypeParameter::speedFactor, SUMOVTypeParameter::speedFactorPremature, SUMO_ATTR_ACTIONSTEPLENGTH, SUMO_ATTR_BOARDING_DURATION, SUMO_ATTR_BOARDING_FACTOR, SUMO_ATTR_CAR_FOLLOW_MODEL, SUMO_ATTR_COLOR, SUMO_ATTR_CONTAINER_CAPACITY, SUMO_ATTR_DESIRED_MAXSPEED, SUMO_ATTR_EMISSIONCLASS, SUMO_ATTR_GUISHAPE, SUMO_ATTR_HEIGHT, SUMO_ATTR_IMGFILE, SUMO_ATTR_IMPATIENCE, SUMO_ATTR_LANE_CHANGE_MODEL, SUMO_ATTR_LATALIGNMENT, SUMO_ATTR_LENGTH, SUMO_ATTR_LOADING_DURATION, SUMO_ATTR_MANEUVER_ANGLE_TIMES, SUMO_ATTR_MASS, SUMO_ATTR_MAXSPEED, SUMO_ATTR_MAXSPEED_LAT, SUMO_ATTR_MINGAP, SUMO_ATTR_MINGAP_LAT, SUMO_ATTR_OSGFILE, SUMO_ATTR_PARKING_BADGES, SUMO_ATTR_PERSON_CAPACITY, SUMO_ATTR_PROB, SUMO_ATTR_SCALE, SUMO_ATTR_SPEEDDEV, SUMO_ATTR_SPEEDFACTOR, SUMO_ATTR_SPEEDFACTOR_PREMATURE, SUMO_ATTR_TIME_TO_TELEPORT, SUMO_ATTR_TIME_TO_TELEPORT_BIDI, SUMO_ATTR_VCLASS, SUMO_ATTR_WIDTH, SUMO_TAG_VTYPE, SVC_BICYCLE, SVC_PASSENGER, SVC_PEDESTRIAN, SUMOVTypeParameter::timeToTeleport, SUMOVTypeParameter::timeToTeleportBidi, TL, toString(), UNKNOWN, VTYPEPARS_ACTIONSTEPLENGTH_SET, VTYPEPARS_BOARDING_DURATION, VTYPEPARS_BOARDING_FACTOR_SET, VTYPEPARS_CAR_FOLLOW_MODEL, VTYPEPARS_COLOR_SET, VTYPEPARS_CONTAINER_CAPACITY, VTYPEPARS_DESIRED_MAXSPEED_SET, VTYPEPARS_EMISSIONCLASS_SET, VTYPEPARS_HEIGHT_SET, VTYPEPARS_IMGFILE_SET, VTYPEPARS_IMPATIENCE_SET, VTYPEPARS_LANE_CHANGE_MODEL_SET, VTYPEPARS_LATALIGNMENT_SET, VTYPEPARS_LENGTH_SET, VTYPEPARS_LOADING_DURATION, VTYPEPARS_MANEUVER_ANGLE_TIMES_SET, VTYPEPARS_MASS_SET, VTYPEPARS_MAXSPEED_LAT_SET, VTYPEPARS_MAXSPEED_SET, VTYPEPARS_MINGAP_LAT_SET, VTYPEPARS_MINGAP_SET, VTYPEPARS_OSGFILE_SET, VTYPEPARS_PARKING_BADGES_SET, VTYPEPARS_PERSON_CAPACITY, VTYPEPARS_PROBABILITY_SET, VTYPEPARS_SCALE_SET, VTYPEPARS_SHAPE_SET, VTYPEPARS_SPEEDFACTOR_PREMATURE_SET, VTYPEPARS_SPEEDFACTOR_SET, VTYPEPARS_TTT_BIDI_SET, VTYPEPARS_TTT_SET, VTYPEPARS_VEHICLECLASS_SET, VTYPEPARS_WIDTH_SET, SUMOVTypeParameter::width, WRITE_WARNING, WRITE_WARNINGF, and RGBColor::YELLOW.
Referenced by SUMORouteHandler::myStartElement(), and RouteHandler::parseVType().
|
staticprivate |
returns allowed attrs for each known CF-model (init on first use)
Definition at line 1338 of file SUMOVehicleParserHelper.cpp.
References allowedCFModelAttrs, SUMO_ATTR_ACCEL, SUMO_ATTR_APPARENTDECEL, SUMO_ATTR_APPLYDRIVERSTATE, SUMO_ATTR_CA_GAIN_GAP_CACC, SUMO_ATTR_CA_GAIN_GAP_DOT_CACC, SUMO_ATTR_CA_GAIN_SPACE, SUMO_ATTR_CA_GAIN_SPEED, SUMO_ATTR_CA_OVERRIDE, SUMO_ATTR_CF_CC_C1, SUMO_ATTR_CF_CC_CCACCEL, SUMO_ATTR_CF_CC_CCDECEL, SUMO_ATTR_CF_CC_CONSTSPACING, SUMO_ATTR_CF_CC_FLATBED_D, SUMO_ATTR_CF_CC_FLATBED_H, SUMO_ATTR_CF_CC_FLATBED_KA, SUMO_ATTR_CF_CC_FLATBED_KP, SUMO_ATTR_CF_CC_FLATBED_KV, SUMO_ATTR_CF_CC_KP, SUMO_ATTR_CF_CC_LAMBDA, SUMO_ATTR_CF_CC_LANES_COUNT, SUMO_ATTR_CF_CC_OMEGAN, SUMO_ATTR_CF_CC_PLOEG_H, SUMO_ATTR_CF_CC_PLOEG_KD, SUMO_ATTR_CF_CC_PLOEG_KP, SUMO_ATTR_CF_CC_TAU, SUMO_ATTR_CF_CC_XI, SUMO_ATTR_CF_EIDM_C_COOLNESS, SUMO_ATTR_CF_EIDM_EPSILON_ACC, SUMO_ATTR_CF_EIDM_JERK_MAX, SUMO_ATTR_CF_EIDM_M_BEGIN, SUMO_ATTR_CF_EIDM_M_FLATNESS, SUMO_ATTR_CF_EIDM_MAX_VEH_PREVIEW, SUMO_ATTR_CF_EIDM_SIG_ERROR, SUMO_ATTR_CF_EIDM_SIG_GAP, SUMO_ATTR_CF_EIDM_SIG_LEADER, SUMO_ATTR_CF_EIDM_T_ACC_MAX, SUMO_ATTR_CF_EIDM_T_LOOK_AHEAD, SUMO_ATTR_CF_EIDM_T_PERSISTENCE_DRIVE, SUMO_ATTR_CF_EIDM_T_PERSISTENCE_ESTIMATE, SUMO_ATTR_CF_EIDM_T_REACTION, SUMO_ATTR_CF_EIDM_USEVEHDYNAMICS, SUMO_ATTR_CF_IDM_DELTA, SUMO_ATTR_CF_IDM_STEPPING, SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, SUMO_ATTR_CF_IDMM_ADAPT_TIME, SUMO_ATTR_CF_KERNER_PHI, SUMO_ATTR_CF_PWAGNER2009_APPROB, SUMO_ATTR_CF_PWAGNER2009_TAULAST, SUMO_ATTR_CF_W99_CC1, SUMO_ATTR_CF_W99_CC2, SUMO_ATTR_CF_W99_CC3, SUMO_ATTR_CF_W99_CC4, SUMO_ATTR_CF_W99_CC5, SUMO_ATTR_CF_W99_CC6, SUMO_ATTR_CF_W99_CC7, SUMO_ATTR_CF_W99_CC8, SUMO_ATTR_CF_W99_CC9, SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, SUMO_ATTR_CF_WIEDEMANN_SECURITY, SUMO_ATTR_COLLISION_MINGAP_FACTOR, SUMO_ATTR_DECEL, SUMO_ATTR_EMERGENCYDECEL, SUMO_ATTR_GC_GAIN_GAP_CACC, SUMO_ATTR_GC_GAIN_GAP_DOT_CACC, SUMO_ATTR_GC_GAIN_SPACE, SUMO_ATTR_GC_GAIN_SPEED, SUMO_ATTR_GCC_GAIN_GAP_CACC, SUMO_ATTR_GCC_GAIN_GAP_DOT_CACC, SUMO_ATTR_GCC_GAIN_SPACE, SUMO_ATTR_GCC_GAIN_SPEED, SUMO_ATTR_HEADWAY_TIME_CACC_TO_ACC, SUMO_ATTR_K, SUMO_ATTR_MASSFACTOR, SUMO_ATTR_MAXPOWER, SUMO_ATTR_MAXTRACTION, SUMO_ATTR_RESISTANCE_COEFFICIENT_CONSTANT, SUMO_ATTR_RESISTANCE_COEFFICIENT_LINEAR, SUMO_ATTR_RESISTANCE_COEFFICIENT_QUADRATIC, SUMO_ATTR_RESISTANCE_TABLE, SUMO_ATTR_SC_GAIN, SUMO_ATTR_SC_GAIN_CACC, SUMO_ATTR_SC_MIN_GAP, SUMO_ATTR_SIGMA, SUMO_ATTR_SIGMA_STEP, SUMO_ATTR_SPEED_TABLE, SUMO_ATTR_STARTUP_DELAY, SUMO_ATTR_TAU, SUMO_ATTR_TMP1, SUMO_ATTR_TMP2, SUMO_ATTR_TMP3, SUMO_ATTR_TMP4, SUMO_ATTR_TMP5, SUMO_ATTR_TRACTION_TABLE, SUMO_ATTR_TRAIN_TYPE, SUMO_TAG_CF_ACC, SUMO_TAG_CF_BKERNER, SUMO_TAG_CF_CACC, SUMO_TAG_CF_CC, SUMO_TAG_CF_DANIEL1, SUMO_TAG_CF_EIDM, SUMO_TAG_CF_IDM, SUMO_TAG_CF_IDMM, SUMO_TAG_CF_KRAUSS, SUMO_TAG_CF_KRAUSS_ORIG1, SUMO_TAG_CF_KRAUSS_PLUS_SLOPE, SUMO_TAG_CF_KRAUSSX, SUMO_TAG_CF_PWAGNER2009, SUMO_TAG_CF_RAIL, SUMO_TAG_CF_SMART_SK, SUMO_TAG_CF_W99, SUMO_TAG_CF_WIEDEMANN, and SUMO_TAG_NOTHING.
Referenced by parseCFMParams().
|
staticprivate |
handle error loading SUMOVehicleParameter
Definition at line 1828 of file SUMOVehicleParserHelper.cpp.
References WRITE_ERROR.
Referenced by parseCommonAttributes(), parseFlowAttributes(), parseVehicleAttributes(), and parseWalkPos().
|
staticprivate |
handle error loading SUMOVTypeParameter
Definition at line 1842 of file SUMOVehicleParserHelper.cpp.
References WRITE_ERROR.
Referenced by beginVTypeParsing().
|
static |
Checks whether the route ID uses the syntax of internal routes.
[in] | id | The route ID to check. |
Definition at line 1772 of file SUMOVehicleParserHelper.cpp.
Referenced by LIBSUMO_NAMESPACE::Vehicle::add(), parseCommonAttributes(), and LIBSUMO_NAMESPACE::Vehicle::setRouteID().
|
static |
Parse string containing AngleTimes triplets (angle, entry time, exit time)
[in] | vtype | - the vtype element constructed in the parser |
[in] | string | - containing , separated AngleTimes triplets "angle entry time exit time" |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
ProcessError | If an attribute's value is invalid |
Definition at line 1203 of file SUMOVehicleParserHelper.cpp.
References StringTokenizer::get(), StringTokenizer::hasNext(), SUMOVTypeParameter::id, SUMOVTypeParameter::myManoeuverAngleTimes, StringTokenizer::next(), StringTokenizer::size(), string2time(), TL, StringUtils::toInt(), and WRITE_ERRORF.
Referenced by beginVTypeParsing().
|
static |
Definition at line 1778 of file SUMOVehicleParserHelper.cpp.
References ALL_JUNCTIONS, OptionsCont::getStringVector(), PARKING_AREAS, PT_STOPS, TAXI_DROPOFF_ANYWHERE, TAXI_DROPOFF_PARKING_AREAS, TAXI_DROPOFF_PT, TAXI_PICKUP_ANYWHERE, TAXI_PICKUP_PARKING_AREAS, TAXI_PICKUP_PT, TL, and WRITE_ERRORF.
Referenced by computeRoutes(), MSNet::getIntermodalRouter(), and MSRoutingEngine::initRouter().
|
static |
Parses Car Following Mode params.
[in,filled] | into The structure to fill with parsed values | |
[in] | element | The id of the currently parsed XML-element |
[in] | attr | The SAX-attributes to get vehicle parameter from |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
[in] | nestedCFM | Whether the attributes are nested |
ProcessError | If an attribute's value is invalid |
Definition at line 1239 of file SUMOVehicleParserHelper.cpp.
References SUMOVTypeParameter::cfModel, SUMOVTypeParameter::cfParameter, SUMOSAXAttributes::get(), getAllowedCFModelAttrs(), SUMOSAXAttributes::hasAttribute(), SUMOVTypeParameter::id, SUMOVTypeParameter::parametersSet, SUMO_ATTR_ACCEL, SUMO_ATTR_APPARENTDECEL, SUMO_ATTR_CF_IDM_STEPPING, SUMO_ATTR_DECEL, SUMO_ATTR_EMERGENCYDECEL, SUMO_ATTR_RESISTANCE_TABLE, SUMO_ATTR_SIGMA, SUMO_ATTR_SPEED_TABLE, SUMO_ATTR_TAU, SUMO_ATTR_TRACTION_TABLE, SUMO_ATTR_TRAIN_TYPE, SUMOXMLDefinitions::Tags, TL, StringUtils::toDouble(), toString(), SUMOXMLDefinitions::TrainTypes, VTYPEPARS_CAR_FOLLOW_MODEL, WRITE_ERROR, and WRITE_ERRORF.
Referenced by beginVTypeParsing(), SUMORouteHandler::myStartElement(), and RouteHandler::parseNestedCFM().
|
staticprivate |
Parses attributes common to vehicles and flows.
Parses all attributes stored in "SUMOVehicleParameter".
[in] | attr | The SAX-attributes to get vehicle parameter from |
[out] | ret | The parameter to parse into |
[in] | element | The name of the element (vehicle or flow) |
[in] | allowInternalRoutes | Whether internal routes are valid in this context |
ProcessError | If an attribute's value is invalid |
Definition at line 416 of file SUMOVehicleParserHelper.cpp.
References SUMOVehicleParameter::arrivalEdge, SUMOVehicleParameter::arrivalEdgeProcedure, SUMOVehicleParameter::arrivalLane, SUMOVehicleParameter::arrivalLaneProcedure, SUMOVehicleParameter::arrivalPos, SUMOVehicleParameter::arrivalPosLat, SUMOVehicleParameter::arrivalPosLatProcedure, SUMOVehicleParameter::arrivalPosProcedure, SUMOVehicleParameter::arrivalSpeed, SUMOVehicleParameter::arrivalSpeedProcedure, SUMOVehicleParameter::calibratorSpeed, SUMOVehicleParameter::color, SUMOVehicleParameter::containerNumber, RGBColor::DEFAULT_COLOR, SUMOVehicleParameter::departEdge, SUMOVehicleParameter::departEdgeProcedure, SUMOVehicleParameter::departLane, SUMOVehicleParameter::departLaneProcedure, SUMOVehicleParameter::departPos, SUMOVehicleParameter::departPosLat, SUMOVehicleParameter::departPosLatProcedure, SUMOVehicleParameter::departPosProcedure, SUMOVehicleParameter::departSpeed, SUMOVehicleParameter::departSpeedProcedure, SUMOVehicleParameter::fromTaz, SUMOSAXAttributes::get(), handleVehicleError(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::id, SUMOVehicleParameter::insertionChecks, isInternalRouteID(), SUMOVehicleParameter::line, SUMOVehicleParameter::modes, SUMOVehicleParameter::parametersSet, SUMOVehicleParameter::parkingBadges, SUMOVehicleParameter::parseArrivalLane(), SUMOVehicleParameter::parseArrivalPos(), SUMOVehicleParameter::parseArrivalPosLat(), SUMOVehicleParameter::parseArrivalSpeed(), SUMOVehicleParameter::parseDepartLane(), SUMOVehicleParameter::parseDepartPos(), SUMOVehicleParameter::parseDepartPosLat(), SUMOVehicleParameter::parseDepartSpeed(), SUMOVehicleParameter::parseInsertionChecks(), SUMOVehicleParameter::parsePersonModes(), SUMOVehicleParameter::parseRouteIndex(), SUMOVehicleParameter::personNumber, SUMOVehicleParameter::routeid, SUMOVehicleParameter::speedFactor, SUMO_ATTR_ARRIVALEDGE, SUMO_ATTR_ARRIVALLANE, SUMO_ATTR_ARRIVALPOS, SUMO_ATTR_ARRIVALPOS_LAT, SUMO_ATTR_ARRIVALSPEED, SUMO_ATTR_COLOR, SUMO_ATTR_CONTAINER_NUMBER, SUMO_ATTR_DEPARTEDGE, SUMO_ATTR_DEPARTLANE, SUMO_ATTR_DEPARTPOS, SUMO_ATTR_DEPARTPOS_LAT, SUMO_ATTR_DEPARTSPEED, SUMO_ATTR_FROM_TAZ, SUMO_ATTR_INSERTIONCHECKS, SUMO_ATTR_LINE, SUMO_ATTR_MODES, SUMO_ATTR_PARKING_BADGES, SUMO_ATTR_PERSON_NUMBER, SUMO_ATTR_REROUTE, SUMO_ATTR_ROUTE, SUMO_ATTR_SPEED, SUMO_ATTR_SPEEDFACTOR, SUMO_ATTR_TO_TAZ, SUMO_ATTR_TYPE, SUMO_ATTR_VTYPES, SUMO_TAG_FLOW, TL, toString(), SUMOVehicleParameter::toTaz, VEHPARS_ARRIVALEDGE_SET, VEHPARS_ARRIVALLANE_SET, VEHPARS_ARRIVALPOS_SET, VEHPARS_ARRIVALPOSLAT_SET, VEHPARS_ARRIVALSPEED_SET, VEHPARS_CALIBRATORSPEED_SET, VEHPARS_COLOR_SET, VEHPARS_CONTAINER_NUMBER_SET, VEHPARS_DEPARTEDGE_SET, VEHPARS_DEPARTLANE_SET, VEHPARS_DEPARTPOS_SET, VEHPARS_DEPARTPOSLAT_SET, VEHPARS_DEPARTSPEED_SET, VEHPARS_FORCE_REROUTE, VEHPARS_FROM_TAZ_SET, VEHPARS_INSERTION_CHECKS_SET, VEHPARS_LINE_SET, VEHPARS_PARKING_BADGES_SET, VEHPARS_PERSON_NUMBER_SET, VEHPARS_ROUTE_SET, VEHPARS_SPEEDFACTOR_SET, VEHPARS_TO_TAZ_SET, VEHPARS_VTYPE_SET, SUMOVehicleParameter::vtypeid, SUMOVehicleParameter::vTypes, and WRITE_WARNINGF.
Referenced by parseFlowAttributes(), and parseVehicleAttributes().
|
static |
Parses a flow's attributes.
Parses all attributes stored in "SUMOVehicleParameter".
[in] | tag | SumoXMLTag (used in netedit) |
[in] | attr | The SAX-attributes to get vehicle parameter from |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
[in] | needID | check if flow needs an Id (used by Calibrator flows) |
[in] | allowInternalRoutes | whether references to internal routes are allowed in this context |
ProcessError | If an attribute's value is invalid |
Definition at line 57 of file SUMOVehicleParserHelper.cpp.
References DEFAULT_CONTAINERTYPE_ID, DEFAULT_PEDTYPE_ID, SUMOVehicleParameter::depart, SUMOVehicleParameter::departProcedure, SUMOSAXAttributes::get(), SUMOSAXAttributes::getName(), SUMOSAXAttributes::getSUMOTimeReporting(), handleVehicleError(), SUMOSAXAttributes::hasAttribute(), SUMOVehicleParameter::id, SUMOXMLDefinitions::isValidVehicleID(), SUMOVehicleParameter::parametersSet, parseCommonAttributes(), SUMOVehicleParameter::parseDepart(), parseID(), SUMOVehicleParameter::poissonRate, SUMOVehicleParameter::repetitionEnd, SUMOVehicleParameter::repetitionNumber, SUMOVehicleParameter::repetitionOffset, SUMOVehicleParameter::repetitionProbability, SUMO_ATTR_BEGIN, SUMO_ATTR_CONTAINERSPERHOUR, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_ATTR_NUMBER, SUMO_ATTR_PERHOUR, SUMO_ATTR_PERIOD, SUMO_ATTR_PERSONSPERHOUR, SUMO_ATTR_PROB, SUMO_ATTR_VEHSPERHOUR, SUMO_TAG_CONTAINERFLOW, SUMO_TAG_PERSONFLOW, SUMOTime_MAX, SUMOVehicleParameter::tag, TIME2STEPS, TL, StringUtils::toDouble(), toString(), TRIGGERED, VEHPARS_END_SET, VEHPARS_NUMBER_SET, VEHPARS_PERIOD_SET, VEHPARS_PROB_SET, VEHPARS_VPH_SET, SUMOVehicleParameter::vtypeid, WRITE_WARNING, and WRITE_WARNINGF.
Referenced by GNEContainerFrame::buildContainer(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::buildVehicleOverRoute(), GNEVehicleFrame::createPath(), ROJTRTurnDefLoader::myStartElement(), MSStateHandler::myStartElement(), SUMORouteHandler::myStartElement(), RouteHandler::parseContainerFlow(), RouteHandler::parseFlow(), and RouteHandler::parsePersonFlow().
|
static |
Parses the vehicle class.
When given, the vehicle class is parsed using getVehicleShapeID. Exceptions occuring within this process are catched and reported.
If no vehicle class is available in the attributes, the default class (SVS_UNKNOWN) is returned.
[in] | attrs | The attributes to read the class from |
[in] | id | The id of the parsed element, for error message generation |
Definition at line 1714 of file SUMOVehicleParserHelper.cpp.
References SUMOSAXAttributes::getObjectType(), SUMOSAXAttributes::getOpt(), SUMO_ATTR_GUISHAPE, SumoVehicleShapeStrings, TL, UNKNOWN, WRITE_ERRORF, and WRITE_WARNING.
Referenced by beginVTypeParsing().
|
staticprivate |
parse ID
Definition at line 393 of file SUMOVehicleParserHelper.cpp.
References SUMOSAXAttributes::get(), SUMOSAXAttributes::hasAttribute(), SUMOXMLDefinitions::isValidVehicleID(), SUMO_ATTR_ID, TL, toString(), WRITE_ERROR, and WRITE_ERRORF.
Referenced by beginVTypeParsing(), parseFlowAttributes(), and parseVehicleAttributes().
|
static |
Parses junction model attributes.
Definition at line 1647 of file SUMOVehicleParserHelper.cpp.
References SUMOVTypeParameter::AllowedJMAttrs, SUMOSAXAttributes::get(), SUMOSAXAttributes::hasAttribute(), SUMOVTypeParameter::id, SUMOVTypeParameter::jmParameter, SUMO_ATTR_JM_SIGMA_MINOR, TL, StringUtils::toDouble(), toString(), and WRITE_ERRORF.
Referenced by beginVTypeParsing().
|
static |
Parses lane change model attributes.
Definition at line 1530 of file SUMOVehicleParserHelper.cpp.
References allowedLCModelAttrs, DEFAULT, DK2008, SUMOSAXAttributes::get(), SUMOSAXAttributes::hasAttribute(), SUMOVTypeParameter::id, LC2013, SUMOVTypeParameter::lcParameter, SL2015, SUMO_ATTR_LCA_ACCEL_LAT, SUMO_ATTR_LCA_ASSERTIVE, SUMO_ATTR_LCA_CONTRIGHT, SUMO_ATTR_LCA_COOPERATIVE_PARAM, SUMO_ATTR_LCA_COOPERATIVE_ROUNDABOUT, SUMO_ATTR_LCA_COOPERATIVE_SPEED, SUMO_ATTR_LCA_EXPERIMENTAL1, SUMO_ATTR_LCA_IMPATIENCE, SUMO_ATTR_LCA_KEEPRIGHT_ACCEPTANCE_TIME, SUMO_ATTR_LCA_KEEPRIGHT_PARAM, SUMO_ATTR_LCA_LANE_DISCIPLINE, SUMO_ATTR_LCA_LOOKAHEADLEFT, SUMO_ATTR_LCA_MAXDISTLATSTANDING, SUMO_ATTR_LCA_MAXSPEEDLATFACTOR, SUMO_ATTR_LCA_MAXSPEEDLATSTANDING, SUMO_ATTR_LCA_OPPOSITE_PARAM, SUMO_ATTR_LCA_OVERTAKE_DELTASPEED_FACTOR, SUMO_ATTR_LCA_OVERTAKE_RIGHT, SUMO_ATTR_LCA_PUSHY, SUMO_ATTR_LCA_PUSHYGAP, SUMO_ATTR_LCA_SIGMA, SUMO_ATTR_LCA_SPEEDGAIN_LOOKAHEAD, SUMO_ATTR_LCA_SPEEDGAIN_PARAM, SUMO_ATTR_LCA_SPEEDGAIN_REMAIN_TIME, SUMO_ATTR_LCA_SPEEDGAINRIGHT, SUMO_ATTR_LCA_STRATEGIC_LOOKAHEAD, SUMO_ATTR_LCA_STRATEGIC_PARAM, SUMO_ATTR_LCA_SUBLANE_PARAM, SUMO_ATTR_LCA_TIME_TO_IMPATIENCE, SUMO_ATTR_LCA_TURN_ALIGNMENT_DISTANCE, TL, StringUtils::toDouble(), toString(), and WRITE_ERRORF.
Referenced by beginVTypeParsing().
|
static |
Parses a vehicle's attributes.
Parses all attributes stored in "SUMOVehicleParameter".
[in] | attr | The SAX-attributes to get vehicle parameter from |
[in] | hardFail | enable or disable hard fails if a parameter is invalid |
[in] | optionalID | Whether the id shall be skipped (Used only in Calibrator Flows) |
[in] | skipDepart | Whether parsing the departure time shall be skipped |
[in] | allowInternalRoutes | whether references to internal routes are allowed in this context |
ProcessError | If an attribute's value is invalid |
Definition at line 334 of file SUMOVehicleParserHelper.cpp.
References DEFAULT_CONTAINERTYPE_ID, DEFAULT_PEDTYPE_ID, SUMOVehicleParameter::depart, SUMOVehicleParameter::departProcedure, SUMOSAXAttributes::get(), SUMOSAXAttributes::getOpt(), handleVehicleError(), SUMOVehicleParameter::id, parseCommonAttributes(), SUMOVehicleParameter::parseDepart(), parseID(), SUMO_ATTR_DEPART, SUMO_ATTR_ID, SUMO_TAG_CONTAINER, SUMO_TAG_PERSON, SUMOVehicleParameter::tag, toString(), and SUMOVehicleParameter::vtypeid.
Referenced by GNEContainerFrame::buildContainer(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::buildVehicleOverRoute(), GNEVehicleFrame::createPath(), ROMARouteHandler::myStartElement(), MSCalibrator::myStartElement(), SUMORouteHandler::myStartElement(), AdditionalHandler::parseCalibratorFlowAttributes(), RouteHandler::parseContainer(), RouteHandler::parsePerson(), RouteHandler::parseTrip(), and RouteHandler::parseVehicle().
|
static |
Parses the vehicle class.
When given, the vehicle class is parsed using getVehicleClassID. Exceptions occuring within this process are catched and reported.
If no vehicle class is available in the attributes, the default class (SVC_IGNORING) is returned.
[in] | attrs | The attributes to read the class from |
[in] | id | The id of the parsed element, for error message generation |
Definition at line 1692 of file SUMOVehicleParserHelper.cpp.
References SUMOSAXAttributes::getObjectType(), SUMOSAXAttributes::getOpt(), getVehicleClassID(), SUMO_ATTR_VCLASS, SumoVehicleClassStrings, SVC_IGNORING, TL, WRITE_ERRORF, and WRITE_WARNING.
Referenced by beginVTypeParsing(), and RouteHandler::parseRoute().
|
static |
parse departPos or arrivalPos for a walk
Definition at line 1732 of file SUMOVehicleParserHelper.cpp.
References CENTER, DEFAULT, handleVehicleError(), SUMOVehicleParameter::interpretEdgePos(), MAX, SUMOVehicleParameter::parseArrivalPos(), RandHelper::rand(), RANDOM, SUMO_TAG_WALK, and toString().
Referenced by RORouteHandler::addWalk(), MSRouteHandler::parseWalkPositions(), and RORouteHandler::parseWalkPositions().
|
static |
Checks and converts given value for the action step length from seconds to miliseconds assuring it being a positive multiple of the simulation step width.
[in] | given | The value parsed from the configuration (seconds). |
Definition at line 1752 of file SUMOVehicleParserHelper.cpp.
References DELTA_T, MAX2(), STEPS2TIME, TIME2STEPS, toString(), and WRITE_WARNING.
Referenced by beginVTypeParsing(), MSVehicle::setActionStepLength(), and MSFrame::setMSGlobals().
|
staticprivate |
allowed attrs for each known CF-model
Definition at line 211 of file SUMOVehicleParserHelper.h.
Referenced by getAllowedCFModelAttrs().
|
staticprivate |
allowed attrs for each known LC-model
Definition at line 214 of file SUMOVehicleParserHelper.h.
Referenced by parseLCParams().