43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
350 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
355 if (ret.length() > 0) {
356 return ret.substr(1);
369 std::vector<std::string>
373 std::vector<std::string> result;
374 for (std::vector<std::string>::const_iterator it = classNames.begin(); it != classNames.end(); it++) {
376 if ((svc & permissions) == svc && svc !=
SVC_UNKNOWN) {
377 result.push_back(*it);
384 std::pair<std::string, bool>
388 return std::pair<std::string, bool>(
"",
false);
392 size_t num_allowed = 0;
394 if ((mask & permissions) == mask) {
411 throw ProcessError(
"Unknown vehicle class '" + name +
"'.");
419 for (std::vector<std::string>::const_iterator it = names.begin(); it != names.end(); it++) {
420 if (name.find(*it) != std::string::npos) {
452 if (allowedS.size() == 0 && disallowedS.size() == 0) {
454 }
else if (allowedS.size() > 0 && disallowedS.size() > 0) {
455 WRITE_WARNING(
"SVCPermissions must be specified either via 'allow' or 'disallow'. Ignoring 'disallow'");
457 }
else if (allowedS.size() > 0) {
468 for (std::vector<std::string>::const_iterator i = allowedS.begin(); i != allowedS.end(); ++i) {
480 throw ProcessError(
"Unknown vehicle shape '" + name +
"'.");
493 return (permissions & anyRail) > 0 && (permissions &
SVC_PASSENGER) == 0;
502 throw ProcessError(
"Unknown emission type '" + name +
"'.");
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
const SUMOReal DEFAULT_VEH_TMP3(1.)
SUMOEmissionClass getVehicleEmissionTypeID(const std::string &name)
Returns the class id of the emission class given by its name.
std::string getVehicleClassCompoundName(int id)
SumoXMLTag
Numbers representing SUMO-XML - element names.
std::string getVehicleEmissionTypeName(SUMOEmissionClass id)
Returns the class name of the emission class given by its id.
const SUMOReal DEFAULT_VEH_TMP5(1.)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
const SUMOReal DEFAULT_VEH_TAU(1.)
render as a slow (passenger) train
const SUMOReal DEFAULT_VEH_SPEEDFACTOR(1.)
StringBijection< SUMOEmissionClass > SumoEmissionClassStrings(SumoEmissionClassStringInitializer, SVE_Solo_LKW_D_EU6_II)
vehicle is a large transport vehicle
const SUMOReal DEFAULT_VEH_WIDTH(2.)
vehicle is a small delivery vehicle
std::string getAllowedVehicleClassNames(SVCPermissions permissions)
Returns the ids of the given classes, divided using a ' '.
render as a fast (passenger) train
const LaneChangeModel DEFAULT_VEH_LANE_CHANGE_MODEL(LCM_LC2013)
render as a delivery vehicle
const SUMOReal DEFAULT_VEH_LENGTH(5.)
StringBijection< SUMOVehicleClass >::Entry sumoVehicleClassStringInitializer[]
StringBijection< SUMOVehicleShape >::Entry sumoVehicleShapeStringInitializer[]
render as a sedan passenger vehicle ("Stufenheck")
const SUMOVehicleClass DEFAULT_VEH_CLASS(SVC_UNKNOWN)
bool isRailway(SVCPermissions permissions)
Returns whether an edge with the given permission is a railway edge.
const SUMOReal DEFAULT_VEH_MINGAP(2.5)
#define WRITE_WARNING(msg)
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
render as a semi-trailer transport vehicle ("Sattelschlepper")
SUMOEmissionClass
Definition of vehicle emission classes.
const SUMOReal DEFAULT_VEH_DECEL(4.5)
const SUMOVehicleShape DEFAULT_VEH_SHAPE(SVS_UNKNOWN)
const int SUMOVehicleClass_MAX
const SUMOReal DEFAULT_VEH_PROB(1.)
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2)
StringBijection< SUMOVehicleShape > SumoVehicleShapeStrings(sumoVehicleShapeStringInitializer, SVS_UNKNOWN)
render as a hatchback passenger vehicle ("Fliessheck")
StringBijection< SUMOEmissionClass >::Entry SumoEmissionClassStringInitializer[]
const SumoXMLTag DEFAULT_VEH_FOLLOW_MODEL(SUMO_TAG_CF_KRAUSS)
std::pair< std::string, bool > getPermissionEncoding(SVCPermissions permissions)
returns the shorter encoding of the given permissions (selects automatically wether to use allow or d...
const SUMOReal DEFAULT_VEH_ACCEL(2.6)
int getVehicleClassCompoundID(const std::string &name)
Returns the OR'ed id of the compound class given by its name.
const SUMOReal DEFAULT_VEH_TMP1(1.)
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers. ...
render as a passenger vehicle
const SVCPermissions SVCFreeForAll
vehicle is a passenger car (a "normal" car)
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
render as a flexible city bus
public emergency vehicles
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
const SUMOReal DEFAULT_PERSON_SPEED(5./3.6)
const SUMOReal DEFAULT_VEH_TMP4(1.)
vehicle is a slow moving transport rail
render as a transport vehicle with one trailer
const SUMOReal DEFAULT_VEH_HEIGHT(1.5)
const SUMOReal DEFAULT_VEH_MAXSPEED(70.0)
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=OUTPUT_ACCURACY)
render as a (futuristic) e-vehicle
std::vector< std::string > getAllowedVehicleClassNamesList(SVCPermissions permissions)
Returns the ids of the given classes, divided using a ' '.
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
public transport vehicles
const SUMOReal DEFAULT_VEH_SPEEDDEV(0.)
render as a wagon passenger vehicle ("Combi")
const std::string DEFAULT_VTYPE_ID("DEFAULT_VEHTYPE")
vehicle is a fast moving rail
const SUMOReal DEFAULT_VEH_TMP2(1.)
vehicles ignoring classes
const SUMOReal DEFAULT_VEH_SIGMA(0.5)
render as a transport vehicle