SUMO - Simulation of Urban MObility
|
#include <config.h>
#include <string>
#include <set>
#include <limits>
#include <utils/common/UtilExceptions.h>
#include <utils/common/StringBijection.h>
#include <utils/xml/SUMOXMLDefinitions.h>
Go to the source code of this file.
Typedefs | |
typedef int | SVCPermissions |
Functions | |
bool | canParseVehicleClasses (const std::string &classes) |
Checks whether the given string contains only known vehicle classes. More... | |
std::string | getAllowedVehicleClassNames (SVCPermissions permissions) |
Returns the ids of the given classes, divided using a ' '. More... | |
std::vector< std::string > | getAllowedVehicleClassNamesList (SVCPermissions permissions) |
Returns the ids of the given classes, divided using a ' '. More... | |
std::pair< std::string, bool > | getPermissionEncoding (SVCPermissions permissions) |
returns the shorter encoding of the given permissions (selects automatically wether to use allow or disallow attribute) More... | |
int | getVehicleClassCompoundID (const std::string &name) |
Returns the OR'ed id of the compound class given by its name. More... | |
std::string | getVehicleClassCompoundName (int id) |
SUMOVehicleClass | getVehicleClassID (const std::string &name) |
Returns the class id of the abstract class given by its name. More... | |
SUMOEmissionClass | getVehicleEmissionTypeID (const std::string &name) |
Returns the class id of the emission class given by its name. More... | |
std::string | getVehicleEmissionTypeName (SUMOEmissionClass id) |
Returns the class name of the emission class given by its id. More... | |
SUMOVehicleShape | getVehicleShapeID (const std::string &name) |
Returns the class id of the shape class given by its name. More... | |
std::string | getVehicleShapeName (SUMOVehicleShape id) |
Returns the class name of the shape class given by its id. More... | |
bool | isRailway (SVCPermissions permissions) |
Returns whether an edge with the given permission is a railway edge. More... | |
SVCPermissions | parseVehicleClasses (const std::string &allowedS) |
Parses the given definition of allowed vehicle classes into the given containers. More... | |
SVCPermissions | parseVehicleClasses (const std::string &allowedS, const std::string &disallowedS) |
Parses the given definition of allowed/disallowed vehicle classes into the given containers. More... | |
SVCPermissions | parseVehicleClasses (const std::vector< std::string > &allowedS) |
Encodes the given vector of allowed classs into a bitset. More... | |
Definition in file SUMOVehicleClass.h.
typedef int SVCPermissions |
Definition at line 193 of file SUMOVehicleClass.h.
enum SUMOEmissionClass |
Definition of vehicle emission classes.
The order is important - HBEFA computation helper use it.
Definition at line 204 of file SUMOVehicleClass.h.
enum SUMOVehicleClass |
Definition of vehicle classes to differ between different lane usage and authority types.
Bits:
From NavTeq:
Definition at line 127 of file SUMOVehicleClass.h.
enum SUMOVehicleShape |
Definition of vehicle classes to differ between different appearences.
Definition at line 50 of file SUMOVehicleClass.h.
bool canParseVehicleClasses | ( | const std::string & | classes | ) |
Checks whether the given string contains only known vehicle classes.
Definition at line 325 of file SUMOVehicleClass.cpp.
References StringTokenizer::hasNext(), StringTokenizer::next(), and SumoVehicleClassStrings.
std::string getAllowedVehicleClassNames | ( | SVCPermissions | permissions | ) |
Returns the ids of the given classes, divided using a ' '.
[in] | the | permissions to encode |
Definition at line 249 of file SUMOVehicleClass.cpp.
References getAllowedVehicleClassNamesList(), and joinToString().
Referenced by GUILane::getParameterWindow(), getPermissionEncoding(), NWWriter_SUMO::writePermissions(), and NWWriter_SUMO::writePreferences().
std::vector<std::string> getAllowedVehicleClassNamesList | ( | SVCPermissions | permissions | ) |
Returns the ids of the given classes, divided using a ' '.
[in] | the | permissions to encode |
Definition at line 255 of file SUMOVehicleClass.cpp.
References SumoVehicleClassStrings, and SVC_UNKNOWN.
Referenced by getAllowedVehicleClassNames(), and TraCIServerAPI_Lane::processGet().
std::pair<std::string, bool> getPermissionEncoding | ( | SVCPermissions | permissions | ) |
returns the shorter encoding of the given permissions (selects automatically wether to use allow or disallow attribute)
Definition at line 270 of file SUMOVehicleClass.cpp.
References getAllowedVehicleClassNames(), SUMOVehicleClass_MAX, SumoVehicleClassStrings, and SVCFreeForAll.
Referenced by NWWriter_SUMO::writePermissions().
int getVehicleClassCompoundID | ( | const std::string & | name | ) |
Returns the OR'ed id of the compound class given by its name.
[in] | name | The name of the abstract vehicle class |
Definition at line 301 of file SUMOVehicleClass.cpp.
References SumoVehicleClassStrings, and SVC_UNKNOWN.
std::string getVehicleClassCompoundName | ( | int | id | ) |
Definition at line 232 of file SUMOVehicleClass.cpp.
References SumoVehicleClassStrings.
SUMOVehicleClass getVehicleClassID | ( | const std::string & | name | ) |
Returns the class id of the abstract class given by its name.
[in] | name | The name of the abstract vehicle class |
Definition at line 292 of file SUMOVehicleClass.cpp.
References SumoVehicleClassStrings.
Referenced by NBEdgeCont::applyOptions(), SUMOVehicleParserHelper::parseVehicleClass(), parseVehicleClasses(), and TraCIServerAPI_VehicleType::setVariable().
SUMOEmissionClass getVehicleEmissionTypeID | ( | const std::string & | name | ) |
Returns the class id of the emission class given by its name.
[in] | name | The name of the emission class |
Definition at line 383 of file SUMOVehicleClass.cpp.
References SumoEmissionClassStrings.
Referenced by SUMOVehicleParserHelper::parseEmissionClass(), and TraCIServerAPI_VehicleType::setVariable().
std::string getVehicleEmissionTypeName | ( | SUMOEmissionClass | id | ) |
Returns the class name of the emission class given by its id.
[in] | id | The id of the emission class |
Definition at line 392 of file SUMOVehicleClass.cpp.
References SumoEmissionClassStrings.
Referenced by TraCIServerAPI_VehicleType::getVariable(), and SUMOVTypeParameter::write().
SUMOVehicleShape getVehicleShapeID | ( | const std::string & | name | ) |
Returns the class id of the shape class given by its name.
[in] | name | The name of the shape class |
Definition at line 361 of file SUMOVehicleClass.cpp.
References SumoVehicleShapeStrings.
Referenced by TraCIServerAPI_VehicleType::setVariable().
std::string getVehicleShapeName | ( | SUMOVehicleShape | id | ) |
Returns the class name of the shape class given by its id.
[in] | id | The id of the shape class |
Definition at line 371 of file SUMOVehicleClass.cpp.
References SumoVehicleShapeStrings.
Referenced by TraCIServerAPI_VehicleType::getVariable(), and SUMOVTypeParameter::write().
bool isRailway | ( | SVCPermissions | permissions | ) |
Returns whether an edge with the given permission is a railway edge.
[in] | permissions | The permissions of the edge |
Definition at line 376 of file SUMOVehicleClass.cpp.
References SVC_CITYRAIL, SVC_LIGHTRAIL, SVC_PASSENGER, SVC_RAIL_FAST, and SVC_RAIL_SLOW.
Referenced by GUILane::drawGL(), GUILane::drawLinkRules(), and NBRampsComputer::fulfillsRampConstraints().
SVCPermissions parseVehicleClasses | ( | const std::string & | allowedS | ) |
Parses the given definition of allowed vehicle classes into the given containers.
[in] | classNames | Space separated class names |
[out] | container | The set of vehicle classes to fill throws ProcessErrorr if parsing fails |
Definition at line 314 of file SUMOVehicleClass.cpp.
References getVehicleClassID(), StringTokenizer::hasNext(), and StringTokenizer::next().
Referenced by NIImporter_SUMO::_loadNetwork(), NIXMLEdgesHandler::addEdge(), NLHandler::addLane(), NIXMLEdgesHandler::addLane(), NIXMLTypesHandler::myStartElement(), RONetHandler::parseLane(), parseVehicleClasses(), TraCIServerAPI_Edge::processSet(), and TraCIServerAPI_Lane::processSet().
SVCPermissions parseVehicleClasses | ( | const std::string & | allowedS, |
const std::string & | disallowedS | ||
) |
Parses the given definition of allowed/disallowed vehicle classes into the given containers.
[in] | allowedS | Definition which classes are allowed |
[in] | disallowedS | Definition which classes are not allowedEncodes the given vector of allowed and disallowed classs into a bitset |
[in] | allowedS | Definition which classes are allowed |
[in] | disallowedS | Definition which classes are not allowed |
Definition at line 336 of file SUMOVehicleClass.cpp.
References parseVehicleClasses(), SVCFreeForAll, and WRITE_WARNING.
SVCPermissions parseVehicleClasses | ( | const std::vector< std::string > & | allowedS | ) |
Encodes the given vector of allowed classs into a bitset.
[in] | classesS | The names vector to parse |
Definition at line 351 of file SUMOVehicleClass.cpp.
References getVehicleClassID().
const SUMOReal DEFAULT_PERSON_SPEED |
Referenced by MSRouteHandler::myStartElement().
const SUMOReal DEFAULT_VEH_ACCEL |
const SUMOVehicleClass DEFAULT_VEH_CLASS |
Referenced by ROVehicle::getVClass().
const SUMOReal DEFAULT_VEH_DECEL |
Referenced by MSVehicleType::build(), and TraCIServerAPI_Lane::processGet().
const SumoXMLTag DEFAULT_VEH_FOLLOW_MODEL |
const SUMOReal DEFAULT_VEH_HEIGHT |
const std::string DEFAULT_VEH_LANE_CHANGE_MODEL |
const SUMOReal DEFAULT_VEH_LENGTH |
Referenced by TraCIServerAPI_Lane::processGet().
const SUMOReal DEFAULT_VEH_MAXSPEED |
const SUMOReal DEFAULT_VEH_MINGAP |
const SUMOReal DEFAULT_VEH_PROB |
Referenced by MSRouteHandler::openRoute(), and RORouteHandler::openRoute().
const SUMOVehicleShape DEFAULT_VEH_SHAPE |
const SUMOReal DEFAULT_VEH_SIGMA |
const SUMOReal DEFAULT_VEH_SPEEDDEV |
const SUMOReal DEFAULT_VEH_SPEEDFACTOR |
const SUMOReal DEFAULT_VEH_TAU |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_TMP1 |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_TMP2 |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_TMP3 |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_TMP4 |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_TMP5 |
Referenced by MSVehicleType::build().
const SUMOReal DEFAULT_VEH_WIDTH |
const std::string DEFAULT_VTYPE_ID |
StringBijection<SUMOEmissionClass> SumoEmissionClassStrings |
Referenced by getVehicleEmissionTypeID(), and getVehicleEmissionTypeName().
const int SUMOVehicleClass_MAX |
Definition at line 223 of file SUMOVehicleClass.cpp.
Referenced by getPermissionEncoding().
StringBijection<SUMOVehicleClass> SumoVehicleClassStrings |
StringBijection<SUMOVehicleShape> SumoVehicleShapeStrings |
Referenced by getVehicleShapeID(), getVehicleShapeName(), and SUMOVehicleParserHelper::parseGuiShape().
const SVCPermissions SVCFreeForAll |
Definition at line 224 of file SUMOVehicleClass.cpp.
Referenced by NINavTeqHelper::addVehicleClasses(), NINavTeqHelper::addVehicleClassesV6(), NBEdge::dismissVehicleClassInformation(), NWWriter_DlrNavteq::getAllowedTypes(), getPermissionEncoding(), NBEdge::hasRestrictions(), MSEdge::initialize(), NBTypeCont::insert(), RONetHandler::parseLane(), parseVehicleClasses(), TraCIServerAPI_Lane::processGet(), MSEdge::rebuildAllowedLanes(), NWWriter_SUMO::writePermissions(), and NWWriter_SUMO::writePreferences().