162 typedef std::map<std::string, EdgeTypeDefinition*>
TypesCont;
183 double defaultSpeed,
double defaultFriction,
int defaultPriority,
199 double maxSpeed,
int prio,
203 bool oneWayIsDefault,
204 double sidewalkWidth,
205 double bikeLaneWidth,
206 double widthResolution,
228 const std::set<SumoXMLAttr>& attrs);
248 TypesCont::const_iterator
begin()
const;
251 TypesCont::const_iterator
end()
const;
256 bool knows(
const std::string& edgeType)
const;
long long int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
LaneSpreadFunction
Numbers representing special SUMO-XML-attribute values Information how the edge's lateral offset shal...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
A storage for available edgeTypes of edges.
double getEdgeTypeMaxWidth(const std::string &edgeType) const
Returns the maximum edge/lane widths of the given edgeType.
bool markEdgeTypeAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a edgeType as set.
void removeEdgeType(const std::string &id)
Remove a edgeType from the list.
std::map< std::string, EdgeTypeDefinition * > TypesCont
A container of edgeTypes, accessed by the string id.
bool addLaneTypeRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction to last laneType.
bool wasSetEdgeTypeAttribute(const std::string &edgeType, const SumoXMLAttr attr) const
Returns whether an attribute of a edgeType was set.
int size() const
Returns the number of known edgeTypes.
bool markEdgeTypeAsToDiscard(const std::string &id)
Marks a edgeType as to be discarded.
NBTypeCont & operator=(const NBTypeCont &s)=delete
invalid assignment operator
double getEdgeTypeFriction(const std::string &edgeType) const
Returns the default friction for the given edgeType [-].
void writeEdgeTypes(OutputDevice &into, const std::set< std::string > &typeIDs=std::set< std::string >()) const
writes all EdgeTypes (and their lanes) as XML
double getEdgeTypeMinWidth(const std::string &edgeType) const
Returns the minimum edge/lane widths of the given edgeType.
bool getEdgeTypeShallBeDiscarded(const std::string &edgeType) const
Returns the information whether edges of this edgeType shall be discarded.
void insertEdgeType(const std::string &id, int numLanes, double maxSpeed, int prio, SVCPermissions permissions, LaneSpreadFunction spreadType, double width, bool oneWayIsDefault, double sidewalkWidth, double bikeLaneWidth, double widthResolution, double maxWidth, double minWidth)
Adds a edgeType into the list.
bool copyEdgeTypeRestrictionsAndAttrs(const std::string &fromId, const std::string &toId)
Copy restrictions to a edgeType.
double getEdgeTypeSpeed(const std::string &edgeType) const
Returns the maximal velocity for the given edgeType [m/s].
int getEdgeTypePriority(const std::string &edgeType) const
Returns the priority for the given edgeType.
TypesCont::const_iterator begin() const
return begin iterator
int getEdgeTypeNumLanes(const std::string &edgeType) const
Returns the number of lanes for the given edgeType.
double getEdgeTypeWidth(const std::string &edgeType) const
Returns the lane width for the given edgeType [m].
SVCPermissions getEdgeTypePermissions(const std::string &edgeType) const
Returns allowed vehicle classes for the given edgeType.
double getEdgeTypeWidthResolution(const std::string &edgeType) const
Returns the resolution for interpreting edge/lane widths of the given edgeType.
bool knows(const std::string &edgeType) const
Returns whether the named edgeType is in the container.
bool addEdgeTypeRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction to a edgeType.
TypesCont::const_iterator end() const
return end iterator
double getEdgeTypeSidewalkWidth(const std::string &edgeType) const
Returns the lane width for a sidewalk to be added [m].
LaneSpreadFunction getEdgeTypeSpreadType(const std::string &edgeType) const
Returns spreadType for the given edgeType.
double getEdgeTypeBikeLaneWidth(const std::string &edgeType) const
Returns the lane width for a bike lane to be added [m].
void clearTypes()
clear types
const EdgeTypeDefinition * getEdgeType(const std::string &name) const
Retrieve the name or the default edgeType.
bool getEdgeTypeIsOneWay(const std::string &edgeType) const
Returns whether edges are one-way per default for the given edgeType.
void updateEdgeTypeID(const std::string &oldId, const std::string &newId)
change edge type ID
TypesCont myEdgeTypes
The container of edgeTypes.
void setEdgeTypeDefaults(int defaultNumLanes, double defaultLaneWidth, double defaultSpeed, double defaultFriction, int defaultPriority, SVCPermissions defaultPermissions, LaneSpreadFunction defaultSpreadType)
Sets the default values.
bool markLaneTypeAsSet(const std::string &id, int index, const SumoXMLAttr attr)
Marks an attribute of last laneType as set.
EdgeTypeDefinition * myDefaultType
The default edgeType.
NBTypeCont(const NBTypeCont &s)=delete
invalid copy constructor
void insertLaneType(const std::string &edgeTypeID, int index, double maxSpeed, SVCPermissions permissions, double width, const std::set< SumoXMLAttr > &attrs)
Adds a laneType into the list.
Static storage of an output device and its base (abstract) implementation.
int priority
The priority of an edge.
EdgeTypeDefinition()
Constructor.
double width
The width of lanes of edges of this edgeType [m].
double minWidth
The minimum width for lanes of this edgeType [m].
double speed
The maximal velocity on an edge in m/s.
LaneSpreadFunction spreadType
lane spread type
SVCPermissions permissions
List of vehicle edgeTypes that are allowed on this edge.
double maxWidth
The maximum width for lanes of this edgeType [m].
double widthResolution
The resolution for interpreting custom (noisy) lane widths of this edgeType [m].
bool oneWay
Whether one-way traffic is mostly common for this edgeType (mostly unused)
std::set< SumoXMLAttr > attrs
The attributes which have been set.
double friction
The default friction on an edge.
std::map< SUMOVehicleClass, double > restrictions
The vehicle class specific speed restrictions.
bool needsLaneType() const
whether any lane attributes deviate from the edge attributes
std::vector< LaneTypeDefinition > laneTypeDefinitions
vector with LaneTypeDefinitions
bool discard
Whether edges of this edgeType shall be discarded.
std::map< SUMOVehicleClass, double > restrictions
The vehicle class specific speed restrictions.
double speed
The maximal velocity on a lane in m/s.
double friction
The default friction on a lane.
LaneTypeDefinition()
default Constructor
SVCPermissions permissions
List of vehicle edgeTypes that are allowed on this lane.
std::set< SumoXMLAttr > attrs
The attributes which have been set.
double width
lane width [m]