72 void setDefaults(
int defaultNumLanes,
double defaultLaneWidth,
73 double defaultSpeed,
int defaultPriority,
87 void insert(
const std::string&
id,
int numLanes,
88 double maxSpeed,
int prio,
90 double width,
bool oneWayIsDefault,
93 double widthResolution,
108 bool knows(
const std::string& type)
const;
156 double getSpeed(
const std::string& type)
const;
237 double getWidth(
const std::string& type)
const;
263 numLanes(1), speed((double) 13.89),
priority(-1),
266 width(
NBEdge::UNSPECIFIED_WIDTH),
270 sidewalkWidth(
NBEdge::UNSPECIFIED_WIDTH),
271 bikeLaneWidth(
NBEdge::UNSPECIFIED_WIDTH) {
277 double _sideWalkWidth,
278 double _bikeLaneWidth,
279 double _widthResolution,
282 numLanes(_numLanes), speed(_speed),
priority(_priority),
283 permissions(_permissions),
286 widthResolution(_widthResolution),
289 sidewalkWidth(_sideWalkWidth),
290 bikeLaneWidth(_bikeLaneWidth) {
341 typedef std::map<std::string, TypeDefinition>
TypesCont;
std::set< SumoXMLAttr > attrs
The attributes which have been set.
double getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
int numLanes
The number of lanes of an edge.
std::map< std::string, TypeDefinition > TypesCont
A container of types, accessed by the string id.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
NBTypeCont & operator=(const NBTypeCont &s)
invalid assignment operator
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
The representation of a single edge during network building.
int getPriority(const std::string &type) const
Returns the priority for the given type.
double widthResolution
The resolution for interpreting custom (noisy) lane widths of this type [m].
bool markAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a type as set.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
bool getShallBeDiscarded(const std::string &type) const
Returns the information whether edges of this type shall be discarded.
bool oneWay
Whether one-way traffic is mostly common for this type (mostly unused)
double getWidth(const std::string &type) const
Returns the lane width for the given type [m].
const TypeDefinition & getType(const std::string &name) const
Retrieve the name or the default type.
bool addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction to a type.
TypeDefinition()
Constructor.
bool knows(const std::string &type) const
Returns whether the named type is in the container.
double getBikeLaneWidth(const std::string &type) const
Returns the lane width for a bike lane to be added [m].
double getSidewalkWidth(const std::string &type) const
Returns the lane width for a sidewalk to be added [m].
void setDefaults(int defaultNumLanes, double defaultLaneWidth, double defaultSpeed, int defaultPriority, SVCPermissions defaultPermissions)
Sets the default values.
double getMinWidth(const std::string &type) const
Returns the minimum edge/lane widths of the given type.
double width
The width of lanes of edges of this type [m].
double minWidth
The minimum width for lanes of this type [m].
bool markAsToDiscard(const std::string &id)
Marks a type as to be discarded.
double getMaxWidth(const std::string &type) const
Returns the maximum edge/lane widths of the given type.
TypeDefinition myDefaultType
The default type.
double speed
The maximal velocity on an edge in m/s.
bool copyRestrictionsAndAttrs(const std::string &fromId, const std::string &toId)
Copy restrictions to a type.
std::map< SUMOVehicleClass, double > restrictions
The vehicle class specific speed restrictions.
Static storage of an output device and its base (abstract) implementation.
TypeDefinition(int _numLanes, double _speed, int _priority, double _width, SVCPermissions _permissions, bool _oneWay, double _sideWalkWidth, double _bikeLaneWidth, double _widthResolution, double _maxWidth, double _minWidth)
Constructor.
void insert(const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth, double widthResolution, double maxWidth, double minWidth)
Adds a type into the list.
int priority
The priority of an edge.
SVCPermissions permissions
List of vehicle types that are allowed on this edge.
bool getIsOneWay(const std::string &type) const
Returns whether edges are one-way per default for the given type.
double getWidthResolution(const std::string &type) const
Returns the resolution for interpreting edge/lane widths of the given type.
double maxWidth
The maximum width for lanes of this type [m].
TypesCont myTypes
The container of types.
int size() const
Returns the number of known types.
const SVCPermissions SVC_UNSPECIFIED
permissions not specified
bool wasSet(const std::string &type, const SumoXMLAttr attr) const
Returns whether an attribute of a type was set.
bool discard
Whether edges of this type shall be discarded.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
A storage for available types of edges.
void writeTypes(OutputDevice &into) const
writes all types a s XML