Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
SUMOVehicleClass.h File Reference
#include <config.h>
#include <string>
#include <set>
#include <limits>
#include <utils/common/StdDefs.h>
#include <utils/common/UtilExceptions.h>
#include <utils/common/StringBijection.h>
#include <utils/xml/SUMOXMLDefinitions.h>
Include dependency graph for SUMOVehicleClass.h:

Go to the source code of this file.

Data Structures

class  StopOffset
 stop offset More...
 

Typedefs

typedef int SUMOEmissionClass
 
typedef long long int SVCPermissions
 bitset where each bit declares whether a certain SVC may use this edge/lane
 

Enumerations

enum  SUMOVehicleClass : int64_t {
  SVC_IGNORING = 0 , SVC_PRIVATE = 1 , SVC_EMERGENCY = 1 << 1 , SVC_AUTHORITY = 1 << 2 ,
  SVC_ARMY = 1 << 3 , SVC_VIP = 1 << 4 , SVC_PEDESTRIAN = 1 << 5 , SVC_PASSENGER = 1 << 6 ,
  SVC_HOV = 1 << 7 , SVC_TAXI = 1 << 8 , SVC_BUS = 1 << 9 , SVC_COACH = 1 << 10 ,
  SVC_DELIVERY = 1 << 11 , SVC_TRUCK = 1 << 12 , SVC_TRAILER = 1 << 13 , SVC_MOTORCYCLE = 1 << 14 ,
  SVC_MOPED = 1 << 15 , SVC_BICYCLE = 1 << 16 , SVC_E_VEHICLE = 1 << 17 , SVC_TRAM = 1 << 18 ,
  SVC_RAIL_URBAN = 1 << 19 , SVC_RAIL = 1 << 20 , SVC_RAIL_ELECTRIC = 1 << 21 , SVC_RAIL_FAST = 1 << 22 ,
  SVC_SHIP = 1 << 23 , SVC_CONTAINER = 1 << 24 , SVC_CABLE_CAR = 1 << 25 , SVC_SUBWAY = 1 << 26 ,
  SVC_AIRCRAFT = 1 << 27 , SVC_WHEELCHAIR = 1 << 28 , SVC_SCOOTER = 1 << 29 , SVC_DRONE = 1 << 30 ,
  SVC_CUSTOM1 = (long long int)1 << 31 , SVC_CUSTOM2 = (long long int)1 << 32 , SVC_RAIL_CLASSES = SVC_RAIL_ELECTRIC | SVC_RAIL_FAST | SVC_RAIL | SVC_RAIL_URBAN | SVC_TRAM | SVC_SUBWAY | SVC_CABLE_CAR , SVC_PUBLIC_CLASSES = SVC_BUS | SVC_RAIL_CLASSES | SVC_CABLE_CAR | SVC_AIRCRAFT ,
  SVC_ROAD_CLASSES , SVC_NON_ROAD = SVC_RAIL_CLASSES | SVC_SHIP | SVC_AIRCRAFT | SVC_DRONE | SVC_CONTAINER , SVC_VULNERABLE = SVC_PEDESTRIAN | SVC_WHEELCHAIR | SVC_BICYCLE | SVC_SCOOTER
}
 Definition of vehicle classes to differ between different lane usage and authority types. More...
 
enum class  SUMOVehicleShape {
  UNKNOWN , PEDESTRIAN , BICYCLE , MOPED ,
  MOTORCYCLE , PASSENGER , PASSENGER_SEDAN , PASSENGER_HATCHBACK ,
  PASSENGER_WAGON , PASSENGER_VAN , TAXI , DELIVERY ,
  TRUCK , TRUCK_SEMITRAILER , TRUCK_1TRAILER , BUS ,
  BUS_COACH , BUS_FLEXIBLE , BUS_TROLLEY , RAIL ,
  RAIL_CAR , RAIL_CARGO , E_VEHICLE , ANT ,
  SHIP , EMERGENCY , FIREBRIGADE , POLICE ,
  RICKSHAW , SCOOTER , AIRCRAFT
}
 Definition of vehicle classes to differ between different appearances. More...
 

Functions

bool canParseVehicleClasses (const std::string &classes)
 Checks whether the given string contains only known vehicle classes.
 
bool canParseVehicleShape (const std::string &shape)
 Checks whether the given string contains only known vehicle shape.
 
SVCPermissions extraDisallowed (SVCPermissions disallowed, const MMVersion &networkVersion)
 Interprets disallowed vehicles depending on network version.
 
double getDefaultVehicleLength (const SUMOVehicleClass vc=SVC_IGNORING)
 Returns the default vehicle length This put into a function so it can be used by NBVehicle.
 
SVCPermissions getVehicleClassCompoundID (const std::string &name)
 Returns the OR'ed id of the compound class given by its name.
 
SUMOVehicleClass getVehicleClassID (const std::string &name)
 Returns the class id of the abstract class given by its name.
 
const std::string & getVehicleClassNames (SVCPermissions permissions, bool expand=false)
 Returns the ids of the given classes, divided using a ' '.
 
const std::vector< std::string > & getVehicleClassNamesList (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.
 
std::string getVehicleShapeName (SUMOVehicleShape id)
 Returns the class name of the shape class given by its id.
 
SVCPermissions invertPermissions (SVCPermissions permissions)
 negate the given permissions and ensure that only relevant bits are set
 
bool isAirway (SVCPermissions permissions)
 Returns whether an edge with the given permissions is an airway edge.
 
bool isBikepath (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a bicycle edge.
 
bool isForbidden (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a forbidden edge.
 
bool isForVulnerableModes (SVCPermissions permissions)
 Returns whether an edge with the given permissions allows only vulnerable road users.
 
bool isRailway (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a railway edge.
 
bool isSidewalk (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a sidewalk.
 
bool isTram (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a tram edge.
 
bool isWaterway (SVCPermissions permissions)
 Returns whether an edge with the given permissions is a waterway edge.
 
bool noVehicles (SVCPermissions permissions)
 Returns whether an edge with the given permissions forbids vehicles.
 
SVCPermissions parseVehicleClasses (const std::string &allowedS)
 Parses the given definition of allowed vehicle classes into the given containers Deprecated classes go into a separate container.
 
SVCPermissions parseVehicleClasses (const std::string &allowedS, const std::string &disallowedS, const MMVersion &networkVersion=NETWORK_VERSION)
 Encodes the given vector of allowed and disallowed classes into a bitset.
 
SVCPermissions parseVehicleClasses (const std::vector< std::string > &allowedS)
 Encodes the given vector of allowed class into a bitset Unlike the methods which parse a string it gives immediately a warning output on deprecated vehicle classes.
 
void writePermissions (OutputDevice &into, SVCPermissions permissions)
 writes allowed disallowed attributes if needed;
 
void writePreferences (OutputDevice &into, SVCPermissions preferred)
 writes allowed disallowed attributes if needed;
 

Variables

const double DEFAULT_BICYCLE_SPEED
 
const std::string DEFAULT_BIKETYPE_ID
 
const double DEFAULT_CONTAINER_TRANSHIP_SPEED
 
const std::string DEFAULT_CONTAINERTYPE_ID
 
const double DEFAULT_PEDESTRIAN_SPEED
 
const std::string DEFAULT_PEDTYPE_ID
 
const std::string DEFAULT_RAILTYPE_ID
 
const std::string DEFAULT_TAXITYPE_ID
 
const double DEFAULT_VEH_HEIGHT
 
const double DEFAULT_VEH_MASS
 
const double DEFAULT_VEH_PROB
 
const double DEFAULT_VEH_SHUT_OFF_STOP
 
const double DEFAULT_VEH_WIDTH
 
const std::string DEFAULT_VTYPE_ID
 
const std::set< std::string > DEFAULT_VTYPES
 
std::set< std::string > deprecatedVehicleClassesSeen
 
const SUMOEmissionClass EMISSION_CLASS_UNSPECIFIED
 emission class not specified
 
const SUMOVehicleClass SUMOVehicleClass_MAX
 
StringBijection< SUMOVehicleClassSumoVehicleClassStrings
 
StringBijection< SUMOVehicleShapeSumoVehicleShapeStrings
 
const SVCPermissions SVC_UNSPECIFIED
 permissions not specified
 
const SVCPermissions SVCAll
 all VClasses are allowed
 

Detailed Description

Author
Daniel Krajzewicz
Jakob Erdmann
Michael Behrisch
Walter Bamberger
Laura Bieker
Date
2006-01-24

Definition in file SUMOVehicleClass.h.

Typedef Documentation

◆ SUMOEmissionClass

typedef int SUMOEmissionClass

Definition at line 250 of file SUMOVehicleClass.h.

◆ SVCPermissions

typedef long long int SVCPermissions

bitset where each bit declares whether a certain SVC may use this edge/lane

Definition at line 237 of file SUMOVehicleClass.h.

Enumeration Type Documentation

◆ SUMOVehicleClass

enum SUMOVehicleClass : int64_t

Definition of vehicle classes to differ between different lane usage and authority types.

Bits:

  • 0-7: vehicle ownership
  • 8-23: vehicle size

From NavTeq:

  • [0] All
  • [1] Passenger cars
  • [2] High Occupancy Vehicle
  • [3] Emergency Vehicle
  • [4] Taxi
  • [5] Public Bus
  • [6] Delivery Truck
  • [7] Transport Truck
  • [8] Bicycle
  • [9] Pedestrian

enum type decleration to work around visual studio non-compliance see https://gist.github.com/NTimmons/a7229b1dacf8280be2292ebd6b2b8b5d#file-enum-h

Enumerator
SVC_IGNORING 

vehicles ignoring classes

SVC_PRIVATE 

private vehicles

SVC_EMERGENCY 

public emergency vehicles

SVC_AUTHORITY 

authorities vehicles

SVC_ARMY 

army vehicles

SVC_VIP 

vip vehicles

SVC_PEDESTRIAN 

pedestrian

SVC_PASSENGER 

vehicle is a passenger car (a "normal" car)

SVC_HOV 

vehicle is a HOV

SVC_TAXI 

vehicle is a taxi

SVC_BUS 

vehicle is a bus

SVC_COACH 

vehicle is a coach

SVC_DELIVERY 

vehicle is a small delivery vehicle

SVC_TRUCK 

vehicle is a large transport vehicle

SVC_TRAILER 

vehicle is a large transport vehicle

SVC_MOTORCYCLE 

vehicle is a motorcycle

SVC_MOPED 

vehicle is a moped

SVC_BICYCLE 

vehicle is a bicycle

SVC_E_VEHICLE 

is an electric vehicle

SVC_TRAM 

vehicle is a light rail

SVC_RAIL_URBAN 

vehicle is a city rail

SVC_RAIL 

vehicle is a not electrified rail

SVC_RAIL_ELECTRIC 

rail vehicle that requires electrified tracks

SVC_RAIL_FAST 

vehicle that is allowed to drive on high-speed rail tracks

SVC_SHIP 

is an arbitrary ship

SVC_CONTAINER 
SVC_CABLE_CAR 
SVC_SUBWAY 
SVC_AIRCRAFT 
SVC_WHEELCHAIR 
SVC_SCOOTER 
SVC_DRONE 
SVC_CUSTOM1 

is a user-defined type

SVC_CUSTOM2 

is a user-defined type

SVC_RAIL_CLASSES 

classes which drive on tracks

SVC_PUBLIC_CLASSES 

public transport

SVC_ROAD_CLASSES 

classes which drive on roads

SVC_NON_ROAD 

classes which (normally) do not drive on normal roads

SVC_VULNERABLE 

Definition at line 140 of file SUMOVehicleClass.h.

◆ SUMOVehicleShape

enum class SUMOVehicleShape
strong

Definition of vehicle classes to differ between different appearances.

Enumerator
UNKNOWN 

not defined

PEDESTRIAN 

render as a pedestrian

BICYCLE 

render as a bicycle

MOPED 

render as a moped

MOTORCYCLE 

render as a motorcycle

PASSENGER 

render as a passenger vehicle

PASSENGER_SEDAN 

render as a sedan passenger vehicle ("Stufenheck")

PASSENGER_HATCHBACK 

render as a hatchback passenger vehicle ("Fliessheck")

PASSENGER_WAGON 

render as a wagon passenger vehicle ("Combi")

PASSENGER_VAN 

render as a van

TAXI 

automated car (with cruise controllers)

render as a taxi

DELIVERY 

render as a delivery vehicle

TRUCK 

render as a transport vehicle

TRUCK_SEMITRAILER 

render as a semi-trailer transport vehicle ("Sattelschlepper")

TRUCK_1TRAILER 

render as a transport vehicle with one trailer

BUS 

render as a bus

BUS_COACH 

render as a coach

BUS_FLEXIBLE 

render as a flexible city bus

BUS_TROLLEY 

render as a trolley bus

RAIL 

render as a rail

RAIL_CAR 

render as a (city) rail without locomotive

RAIL_CARGO 

render as a cargo train

E_VEHICLE 

render as a (futuristic) e-vehicle

ANT 

render as a giant ant

SHIP 

render as a arbitrary ship

EMERGENCY 

render as an emergency vehicle

FIREBRIGADE 

render as a fire brigade

POLICE 

render as a police car

RICKSHAW 

render as a rickshaw

SCOOTER 

render as a scooter

AIRCRAFT 

render as aircraft

Definition at line 48 of file SUMOVehicleClass.h.

Function Documentation

◆ canParseVehicleClasses()

bool canParseVehicleClasses ( const std::string &  classes)
extern

Checks whether the given string contains only known vehicle classes.

Definition at line 379 of file SUMOVehicleClass.cpp.

References StringTokenizer::hasNext(), StringTokenizer::next(), parseVehicleClassesCached, SumoVehicleClassStrings, and VehicleClassNameAll.

Referenced by GNEClosingLaneReroute::isValid(), GNEClosingReroute::isValid(), GNEVType::isValid(), GNEConnection::isValid(), GNEEdge::isValid(), GNEEdgeType::isValid(), GNELane::isValid(), and GNELaneType::isValid().

Here is the caller graph for this function:

◆ canParseVehicleShape()

bool canParseVehicleShape ( const std::string &  shape)
extern

Checks whether the given string contains only known vehicle shape.

Definition at line 494 of file SUMOVehicleClass.cpp.

References SumoVehicleShapeStrings.

Referenced by GNEVType::isValid().

Here is the caller graph for this function:

◆ extraDisallowed()

SVCPermissions extraDisallowed ( SVCPermissions  disallowed,
const MMVersion networkVersion 
)
extern

Interprets disallowed vehicles depending on network version.

Parameters
[in]disallowedThe values found in the disallow attribute
[in]networkVersionThe version of the network from which the disallow value was loaded
Returns
The (possibly) extended set of disallowed classes

Definition at line 412 of file SUMOVehicleClass.cpp.

References SVC_CABLE_CAR, SVC_RAIL_FAST, SVC_RAIL_URBAN, and SVC_SUBWAY.

Referenced by NIImporter_OpenStreetMap::applyLaneUse(), and parseVehicleClasses().

Here is the caller graph for this function:

◆ getDefaultVehicleLength()

double getDefaultVehicleLength ( const SUMOVehicleClass  vc = SVC_IGNORING)
extern

Returns the default vehicle length This put into a function so it can be used by NBVehicle.

Parameters
[in]vcthe vehicle class
Returns
the default length in m

Definition at line 553 of file SUMOVehicleClass.cpp.

References SVC_AIRCRAFT, SVC_BICYCLE, SVC_BUS, SVC_COACH, SVC_CONTAINER, SVC_DELIVERY, SVC_DRONE, SVC_EMERGENCY, SVC_MOPED, SVC_MOTORCYCLE, SVC_PEDESTRIAN, SVC_RAIL, SVC_RAIL_ELECTRIC, SVC_RAIL_FAST, SVC_RAIL_URBAN, SVC_SCOOTER, SVC_SHIP, SVC_SUBWAY, SVC_TRAILER, SVC_TRAM, SVC_TRUCK, and SVC_WHEELCHAIR.

◆ getVehicleClassCompoundID()

SVCPermissions getVehicleClassCompoundID ( const std::string &  name)
extern

Returns the OR'ed id of the compound class given by its name.

Parameters
[in]nameThe name of the abstract vehicle class
Returns
The OR'ed combination of base enum values

Definition at line 333 of file SUMOVehicleClass.cpp.

References SumoVehicleClassStrings, and SVC_IGNORING.

◆ getVehicleClassID()

SUMOVehicleClass getVehicleClassID ( const std::string &  name)
extern

Returns the class id of the abstract class given by its name.

Parameters
[in]nameThe name of the abstract vehicle class
Returns
The internal representation of this class. Name must not be a compound name

Definition at line 324 of file SUMOVehicleClass.cpp.

References SumoVehicleClassStrings.

Referenced by NIXMLPTHandler::addPTLine(), NIXMLTypesHandler::myStartElement(), NLHandler::myStartElement(), RONetHandler::myStartElement(), SUMOVehicleParserHelper::parseVehicleClass(), parseVehicleClasses(), parseVehicleClasses(), RODFNet::RODFNet(), GNEVType::setAttribute(), and GNEAttributesEditorRow::showValueComboBox().

Here is the caller graph for this function:

◆ getVehicleClassNames()

const std::string & getVehicleClassNames ( SVCPermissions  permissions,
bool  expand = false 
)
extern

◆ getVehicleClassNamesList()

const std::vector< std::string > & getVehicleClassNamesList ( SVCPermissions  permissions)
extern

Returns the ids of the given classes, divided using a ' '.

Parameters
[in]thepermissions to encode
Returns
The string representation of these classes as a vector

Definition at line 305 of file SUMOVehicleClass.cpp.

References SumoVehicleClassStrings, SVC_IGNORING, and vehicleClassNamesListCached.

Referenced by LIBSUMO_NAMESPACE::Lane::getAllowed(), LIBSUMO_NAMESPACE::Lane::getChangePermissions(), LIBSUMO_NAMESPACE::Lane::getDisallowed(), and getVehicleClassNames().

Here is the caller graph for this function:

◆ getVehicleShapeID()

SUMOVehicleShape getVehicleShapeID ( const std::string &  name)
extern

Returns the class id of the shape class given by its name.

Parameters
[in]nameThe name of the shape class
Returns
The internal representation of this class

Definition at line 484 of file SUMOVehicleClass.cpp.

References SumoVehicleShapeStrings.

Referenced by GNEVehicle::drawGL(), GNEVType::setAttribute(), and GNEVehicleTypeDialog::VTypeAttributes::VShapeRow::setVShapeLabelImage().

Here is the caller graph for this function:

◆ getVehicleShapeName()

std::string getVehicleShapeName ( SUMOVehicleShape  id)
extern

Returns the class name of the shape class given by its id.

Parameters
[in]idThe id of the shape class
Returns
The string representation of this class

Definition at line 500 of file SUMOVehicleClass.cpp.

References SumoVehicleShapeStrings.

Referenced by GNEVType::getAttribute(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GNEVType::overwriteVType(), and SUMOVTypeParameter::write().

Here is the caller graph for this function:

◆ invertPermissions()

◆ isAirway()

bool isAirway ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is an airway edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is an airway edge

Definition at line 524 of file SUMOVehicleClass.cpp.

References SVC_AIRCRAFT, and SVC_DRONE.

Referenced by GUILane::drawGL(), and GUIJunctionWrapper::GUIJunctionWrapper().

Here is the caller graph for this function:

◆ isBikepath()

bool isBikepath ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a bicycle edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is a bicycle edge

Definition at line 513 of file SUMOVehicleClass.cpp.

References SVC_BICYCLE, and SVC_PASSENGER.

Referenced by NBEdge::getInternalLaneWidth().

Here is the caller graph for this function:

◆ isForbidden()

bool isForbidden ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a forbidden edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is forbidden

Definition at line 529 of file SUMOVehicleClass.cpp.

References SVCAll.

Referenced by NBOwnTLDef::allowUnrelated(), NBNode::ApproachingDivider::ApproachingDivider(), NBEdgeCont::checkGeometries(), NBEdge::divideOnEdges(), noVehicles(), NBOwnTLDef::patchStateForCrossings(), and NBEdge::recheckLanes().

Here is the caller graph for this function:

◆ isForVulnerableModes()

bool isForVulnerableModes ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions allows only vulnerable road users.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge allows only a (non-empty) subset of SVC_PEDESTRIAN, SVC_WHEELCHAIR, SVC_BICYCLE, SVC_SCOOTER

Definition at line 541 of file SUMOVehicleClass.cpp.

References SVC_VULNERABLE.

Referenced by NBNodeCont::pruneClusterFringe().

Here is the caller graph for this function:

◆ isRailway()

bool isRailway ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a railway edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is a railway edge

Definition at line 505 of file SUMOVehicleClass.cpp.

References SVC_PASSENGER, and SVC_RAIL_CLASSES.

Referenced by NIXMLPTHandler::addPTStop(), MSDevice_Tripinfo::addRideTransportData(), NBEdge::appendTurnaround(), NBRequest::bidiConflict(), NBEdge::buildInnerEdges(), NGEdge::buildNBEdge(), MSDriveWay::buildRoute(), MSDriveWay::checkCrossingFlanks(), NBEdgeCont::checkGeometries(), MSVehicle::cleanupFurtherLanes(), NBTrafficLightDefinition::collectAllLinks(), NBEdge::computeEdge2Edges(), MSVehicle::computeFurtherLanes(), NBNodeShapeComputer::computeNodeShapeDefault(), NBOwnTLDef::computeUnblockedWeightedStreamNumber(), NBPTLineCont::constructRoute(), GUILane::drawAsRailway(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::enterLaneAtMove(), NIImporter_OpenStreetMap::extendRailwayDistances(), GNELane::getColorValue(), GUILane::getColorValue(), NWWriter_OpenDrive::getLaneType(), NBNode::getLinkState(), MSLane::getMaximumBrakeDist(), GUIVehicle::getParameterWindow(), RouterProvider< E, L, N, V >::getVehicleRouter(), NBRailwaySignalGuesser::guessByStops(), GUIJunctionWrapper::GUIJunctionWrapper(), MSLane::incorporateVehicle(), NIImporter_OpenStreetMap::insertEdge(), NIImporter_OpenStreetMap::interpretTransportType(), NBEdge::isBidiRail(), NBNode::isExplicitRailNoBidi(), MSBaseVehicle::isRail(), NBEdge::isRailDeadEnd(), MSVehicle::leaveLane(), NBNodeCont::pruneClusterFringe(), NBNodeCont::removeComponents(), NBEdge::removeInvalidConnections(), RORouteDef::repairCurrentRoute(), NBEdge::shiftPositionAtNode(), GNELane::DrawingConstants::update(), MSVehicle::updateBestLanes(), and MSVehicle::updateFurtherLanes().

Here is the caller graph for this function:

◆ isSidewalk()

bool isSidewalk ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a sidewalk.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is a sidewalk

Definition at line 535 of file SUMOVehicleClass.cpp.

References SVC_PEDESTRIAN, and SVCAll.

Referenced by NBEdgeCont::checkGeometries(), and noVehicles().

Here is the caller graph for this function:

◆ isTram()

bool isTram ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a tram edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is a tram edge

Definition at line 509 of file SUMOVehicleClass.cpp.

References SVC_PASSENGER, SVC_RAIL_CLASSES, and SVC_TRAM.

Referenced by NBEdgeCont::joinTramEdges().

Here is the caller graph for this function:

◆ isWaterway()

bool isWaterway ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions is a waterway edge.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is a waterway edge

Definition at line 519 of file SUMOVehicleClass.cpp.

References SVC_SHIP.

Referenced by NBNodeTypeComputer::computeNodeTypes(), GUILane::drawAsWaterway(), GNELane::drawAsWaterway(), GUILane::drawGL(), GUIJunctionWrapper::GUIJunctionWrapper(), and NBNodeCont::removeComponents().

Here is the caller graph for this function:

◆ noVehicles()

bool noVehicles ( SVCPermissions  permissions)
extern

Returns whether an edge with the given permissions forbids vehicles.

Parameters
[in]permissionsThe permissions of the edge
Returns
Whether the edge is forbidden for vehicles

Definition at line 547 of file SUMOVehicleClass.cpp.

References isForbidden(), and isSidewalk().

Referenced by MSActuatedTrafficLightLogic::init(), MSDelayBasedTrafficLightLogic::init(), and NEMALogic::init().

Here is the caller graph for this function:

◆ parseVehicleClasses() [1/3]

SVCPermissions parseVehicleClasses ( const std::string &  allowedS)
extern

Parses the given definition of allowed vehicle classes into the given containers Deprecated classes go into a separate container.

Parameters
[in]classNamesSpace separated class names
[out]containerThe set of vehicle classes to fill throws ProcessError if parsing fails

Definition at line 346 of file SUMOVehicleClass.cpp.

References deprecatedVehicleClassesSeen, getVehicleClassID(), gIgnoreUnknownVClass, StringTokenizer::hasNext(), StringTokenizer::next(), parseVehicleClassesCached, SumoVehicleClassStrings, SVCAll, TL, VehicleClassNameAll, WRITE_ERRORF, and WRITE_WARNINGF.

Referenced by NIImporter_SUMO::_loadNetwork(), NIImporter_SUMO::addConnection(), NIXMLEdgesHandler::addEdge(), NIXMLEdgesHandler::addLane(), NLHandler::addLane(), TraCIServer::addSubscriptionFilter(), LIBSUMO_NAMESPACE::Vehicle::addSubscriptionFilterVClass(), NBEdgeCont::applyOptions(), NBNetBuilder::applyOptions(), NLEdgeControlBuilder::build(), MSVehicleType::check(), NBNetBuilder::compute(), MSTriggeredRerouter::myStartElement(), NIXMLTypesHandler::myStartElement(), RONetHandler::parseConnection(), RONetHandler::parseLane(), NIXMLConnectionsHandler::parseLaneBound(), AdditionalHandler::parseSumoBaseObject(), parseVehicleClasses(), LIBSUMO_NAMESPACE::Edge::setAllowed(), LIBSUMO_NAMESPACE::Edge::setAllowed(), LIBSUMO_NAMESPACE::Lane::setAllowed(), GNEClosingLaneReroute::setAttribute(), GNEClosingReroute::setAttribute(), GNEConnection::setAttribute(), GNEEdgeType::setAttribute(), GNELane::setAttribute(), GNELaneType::setAttribute(), LIBSUMO_NAMESPACE::Lane::setChangePermissions(), LIBSUMO_NAMESPACE::Edge::setDisallowed(), LIBSUMO_NAMESPACE::Edge::setDisallowed(), LIBSUMO_NAMESPACE::Lane::setDisallowed(), and StopOffset::StopOffset().

Here is the caller graph for this function:

◆ parseVehicleClasses() [2/3]

SVCPermissions parseVehicleClasses ( const std::string &  allowedS,
const std::string &  disallowedS,
const MMVersion networkVersion = NETWORK_VERSION 
)
extern

Encodes the given vector of allowed and disallowed classes into a bitset.

Parameters
[in]allowedSDefinition which classes are allowed
[in]disallowedSDefinition which classes are not allowed

Definition at line 398 of file SUMOVehicleClass.cpp.

References extraDisallowed(), invertPermissions(), parseVehicleClasses(), SVCAll, TL, and WRITE_WARNING.

◆ parseVehicleClasses() [3/3]

SVCPermissions parseVehicleClasses ( const std::vector< std::string > &  allowedS)
extern

Encodes the given vector of allowed class into a bitset Unlike the methods which parse a string it gives immediately a warning output on deprecated vehicle classes.

Parameters
[in]classesSThe names vector to parse

Definition at line 433 of file SUMOVehicleClass.cpp.

References getVehicleClassID(), SumoVehicleClassStrings, SVCAll, TL, VehicleClassNameAll, and WRITE_WARNINGF.

◆ writePermissions()

void writePermissions ( OutputDevice into,
SVCPermissions  permissions 
)
extern

writes allowed disallowed attributes if needed;

Definition at line 451 of file SUMOVehicleClass.cpp.

References getVehicleClassNames(), NUM_VCLASSES, SUMO_ATTR_ALLOW, SUMO_ATTR_DISALLOW, SUMOVehicleClass_MAX, SVCAll, VehicleClassNameAll, and OutputDevice::writeAttr().

Referenced by NWWriter_SUMO::writeConnection(), NWWriter_XML::writeEdgesAndConnections(), NBTypeCont::writeEdgeTypes(), and NWWriter_SUMO::writeLane().

Here is the caller graph for this function:

◆ writePreferences()

void writePreferences ( OutputDevice into,
SVCPermissions  preferred 
)
extern

writes allowed disallowed attributes if needed;

Definition at line 474 of file SUMOVehicleClass.cpp.

References getVehicleClassNames(), SUMO_ATTR_PREFER, SVCAll, and OutputDevice::writeAttr().

Referenced by NWWriter_XML::writeEdgesAndConnections(), and NWWriter_SUMO::writeLane().

Here is the caller graph for this function:

Variable Documentation

◆ DEFAULT_BICYCLE_SPEED

const double DEFAULT_BICYCLE_SPEED
extern

◆ DEFAULT_BIKETYPE_ID

◆ DEFAULT_CONTAINER_TRANSHIP_SPEED

const double DEFAULT_CONTAINER_TRANSHIP_SPEED
extern

◆ DEFAULT_CONTAINERTYPE_ID

◆ DEFAULT_PEDESTRIAN_SPEED

◆ DEFAULT_PEDTYPE_ID

◆ DEFAULT_RAILTYPE_ID

◆ DEFAULT_TAXITYPE_ID

◆ DEFAULT_VEH_HEIGHT

const double DEFAULT_VEH_HEIGHT
extern

◆ DEFAULT_VEH_MASS

const double DEFAULT_VEH_MASS
extern

◆ DEFAULT_VEH_PROB

◆ DEFAULT_VEH_SHUT_OFF_STOP

const double DEFAULT_VEH_SHUT_OFF_STOP
extern

◆ DEFAULT_VEH_WIDTH

const double DEFAULT_VEH_WIDTH
extern

◆ DEFAULT_VTYPE_ID

◆ DEFAULT_VTYPES

◆ deprecatedVehicleClassesSeen

std::set<std::string> deprecatedVehicleClassesSeen
extern

◆ EMISSION_CLASS_UNSPECIFIED

const SUMOEmissionClass EMISSION_CLASS_UNSPECIFIED
extern

emission class not specified

Definition at line 162 of file SUMOVehicleClass.cpp.

◆ SUMOVehicleClass_MAX

const SUMOVehicleClass SUMOVehicleClass_MAX
extern

◆ SumoVehicleClassStrings

StringBijection<SUMOVehicleClass> SumoVehicleClassStrings
extern

◆ SumoVehicleShapeStrings

StringBijection<SUMOVehicleShape> SumoVehicleShapeStrings
extern

◆ SVC_UNSPECIFIED

◆ SVCAll

const SVCPermissions SVCAll
extern

all VClasses are allowed

Definition at line 158 of file SUMOVehicleClass.cpp.

Referenced by IntermodalNetwork< E, L, N, V >::addCarEdges(), NLHandler::addLane(), NIImporter_OpenStreetMap::applyChangeProhibition(), NBEdge::applyTurnSigns(), NBEdge::buildInnerEdges(), NBNode::computeLanes2Lanes(), NIImporter_MATSim::EdgesHandler::computePermission(), NBEdge::dismissVehicleClassInformation(), LIBSUMO_NAMESPACE::Lane::getAllowed(), NWWriter_DlrNavteq::getAllowedTypes(), GNEEdgeType::getAttribute(), GNELaneType::getAttribute(), GNEEdge::getAttributeForSelection(), GNELane::getAttributeForSelection(), NBEdge::getFirstNonPedestrianNonBicycleLaneIndex(), NWWriter_OpenDrive::getLaneType(), MSEdge::getNumDrivingLanes(), getVehicleClassNames(), NBEdgeCont::guessRoundabouts(), NBEdge::hasPermissions(), NBRailwayTopologyAnalyzer::hasRailway(), MSEdge::initialize(), GUIVisualizationSettings::initNeteditDefaults(), GUIVisualizationSettings::initSumoGuiDefaults(), invertPermissions(), isForbidden(), isSidewalk(), MSTriggeredRerouter::myEndElement(), GNERerouterIntervalDialog::onCmdAddClosingLaneReroute(), GNERerouterIntervalDialog::onCmdAddClosingReroute(), RONetHandler::parseLane(), parseVehicleClasses(), parseVehicleClasses(), parseVehicleClasses(), NBEdge::prohibitsChanging(), MSEdge::rebuildAllowedLanes(), NBEdge::recheckLanes(), MSLane::resetPermissions(), ROEdge::ROEdge(), GNEEdgeType::setAttribute(), GNELaneType::setAttribute(), MSTriggeredRerouter::setPermissions(), MSTriggeredRerouter::triggerRouting(), NBEdge::updateChangeRestrictions(), GNEClosingLaneReroute::writeAdditional(), NWWriter_SUMO::writeConnection(), NWWriter_XML::writeEdgesAndConnections(), NWWriter_SUMO::writeInternalEdges(), NWWriter_SUMO::writeLane(), writePermissions(), writePreferences(), and NWWriter_DlrNavteq::writeProhibitedManoeuvres().