 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
40 double defaultLaneWidth,
55 double sidewalkWidth,
double bikeLaneWidth,
56 double widthResolution,
60 TypeDefinition newType(numLanes, maxSpeed, prio, width, permissions, oneWayIsDefault, sidewalkWidth, bikeLaneWidth, widthResolution, maxWidth, minWidth);
61 TypesCont::iterator old =
myTypes.find(
id);
63 newType.
restrictions.insert(old->second.restrictions.begin(), old->second.restrictions.end());
64 newType.
attrs.insert(old->second.attrs.begin(), old->second.attrs.end());
78 TypesCont::iterator i =
myTypes.find(
id);
82 (*i).second.discard =
true;
89 TypesCont::iterator i =
myTypes.find(
id);
93 (*i).second.attrs.insert(attr);
100 TypesCont::iterator i =
myTypes.find(
id);
104 (*i).second.restrictions[svc] = speed;
111 TypesCont::iterator from =
myTypes.find(fromId);
112 TypesCont::iterator to =
myTypes.find(toId);
116 to->second.restrictions.insert(from->second.restrictions.begin(), from->second.restrictions.end());
117 to->second.attrs.insert(from->second.attrs.begin(), from->second.attrs.end());
124 for (TypesCont::const_iterator i =
myTypes.begin(); i !=
myTypes.end(); ++i) {
155 for (std::map<SUMOVehicleClass, double>::const_iterator j = type.
restrictions.begin(); j != type.
restrictions.end(); ++j) {
246 TypesCont::const_iterator i =
myTypes.find(name);
bool copyRestrictionsAndAttrs(const std::string &fromId, const std::string &toId)
Copy restrictions to a type.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
std::set< SumoXMLAttr > attrs
The attributes which have been set.
int numLanes
The number of lanes of an edge.
void setDefaults(int defaultNumLanes, double defaultLaneWidth, double defaultSpeed, int defaultPriority, SVCPermissions defaultPermissions)
Sets the default values.
Static storage of an output device and its base (abstract) implementation.
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.
double getMaxWidth(const std::string &type) const
Returns the maximum edge/lane widths of the given type.
double widthResolution
The resolution for interpreting custom (noisy) lane widths of this type [m].
bool knows(const std::string &type) const
Returns whether the named type is in the container.
bool markAsToDiscard(const std::string &id)
Marks a type as to be discarded.
double getWidthResolution(const std::string &type) const
Returns the resolution for interpreting edge/lane widths of the given type.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
bool oneWay
Whether one-way traffic is mostly common for this type (mostly unused)
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
bool getIsOneWay(const std::string &type) const
Returns whether edges are one-way per default for the given type.
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
TypesCont myTypes
The container of types.
double getSpeed(const std::string &type) const
Returns the maximal velocity for the given type [m/s].
void writePermissions(OutputDevice &into, SVCPermissions permissions)
writes allowed disallowed attributes if needed;
const std::string & getVehicleClassNames(SVCPermissions permissions, bool expand)
Returns the ids of the given classes, divided using a ' '.
double width
The width of lanes of edges of this type [m].
bool getShallBeDiscarded(const std::string &type) const
Returns the information whether edges of this type shall be discarded.
int getPriority(const std::string &type) const
Returns the priority for the given type.
double minWidth
The minimum width for lanes of this type [m].
begin/end of the description of an edge restriction
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
SVCPermissions getPermissions(const std::string &type) const
Returns allowed vehicle classes for the given type.
void writeTypes(OutputDevice &into) const
writes all types a s XML
double speed
The maximal velocity on an edge in m/s.
bool wasSet(const std::string &type, const SumoXMLAttr attr) const
Returns whether an attribute of a type was set.
bool markAsSet(const std::string &id, const SumoXMLAttr attr)
Marks an attribute of a type as set.
double getWidth(const std::string &type) const
Returns the lane width for the given type [m].
void lf()
writes a line feed if applicable
int getNumLanes(const std::string &type) const
Returns the number of lanes for the given type.
std::map< SUMOVehicleClass, double > restrictions
The vehicle class specific speed restrictions.
bool addRestriction(const std::string &id, const SUMOVehicleClass svc, const double speed)
Adds a restriction to a type.
const TypeDefinition & getType(const std::string &name) const
Retrieve the name or the default type.
int priority
The priority of an edge.
double getSidewalkWidth(const std::string &type) const
Returns the lane width for a sidewalk to be added [m].
TypeDefinition myDefaultType
The default type.
double maxWidth
The maximum width for lanes of this type [m].
double getMinWidth(const std::string &type) const
Returns the minimum edge/lane widths of the given type.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
SVCPermissions permissions
List of vehicle types that are allowed on this edge.
double getBikeLaneWidth(const std::string &type) const
Returns the lane width for a bike lane to be added [m].
bool discard
Whether edges of this type shall be discarded.