48 : myCurrentNumericalLaneID(0), myCurrentNumericalEdgeID(0), myEdges(0), myCurrentLaneIndex(-1) {
62 const std::string& streetName,
63 const std::string& edgeType,
65 const std::string& bidi) {
81 double maxSpeed,
double length,
105 std::stringstream ss;
117 if (stopOffsets.size() == 0) {
121 std::stringstream ss;
133 std::stringstream ss;
134 ss <<
"Duplicate stopOffset definition for edge " <<
myActiveEdge->
getID() <<
". Ignoring duplicate specification.";
149 if (l->getStopOffsets().size() == 0) {
165 std::vector<MSLane*>* lanes =
new std::vector<MSLane*>();
183 for (MSEdgeVector::iterator i1 =
myEdges.begin(); i1 !=
myEdges.end(); i1++) {
184 (*i1)->closeBuilding();
186 for (MSEdgeVector::iterator i1 =
myEdges.begin(); i1 !=
myEdges.end(); i1++) {
187 (*i1)->buildLaneChanger();
191 for (MSEdgeVector::iterator i1 =
myEdges.begin(); i1 !=
myEdges.end(); i1++) {
195 throw ProcessError(
"Internal edge '" + edge->
getID() +
"' is not properly connected (probably a manually modified net.xml).");
208 if (
myBidiEdges.size() > 0 || networkVersion > 1.0) {
210 item.first->checkAndRegisterBiDirEdge(item.second);
216 e->checkAndRegisterBiDirEdge();
225 const std::string& streetName,
const std::string& edgeType,
const int priority) {
int getNumPredecessors() const
Returns the number of edges this edge is connected to.
std::set< std::string > deprecatedVehicleClassesSeen
virtual MSEdge * closeEdge()
Closes the building of an edge; The edge is completely described by now and may not be opened again...
const MSEdgeVector & getPredecessors() const
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
void setCrossingEdges(const std::vector< std::string > &crossingEdges)
Sets the crossed edge ids for a crossing edge.
std::map< MSEdge *, std::string > myBidiEdges
temporary storage for bidi attributes (to be resolved after loading all edges)
void addStopOffsets(const std::map< SVCPermissions, double > &stopOffsets)
process a stopOffset element (originates either from the active edge or lane).
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
MSEdgeVector myEdges
Temporary, internal storage for built edges.
void initialize(const std::vector< MSLane *> *lanes)
Initialize the edge.
const std::string & getID() const
Returns the id.
virtual MSEdge * buildEdge(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, const int priority)
Builds an edge instance (MSEdge in this case)
MSEdge * myActiveEdge
pointer to the currently chosen edge
void updateCurrentLaneStopOffsets(const std::map< SVCPermissions, double > &stopOffsets)
set the stopOffset for the last added lane.
#define WRITE_WARNING(msg)
int getNumSuccessors() const
Returns the number of edges that may be reached from this edge.
void setDefaultStopOffsets(std::map< SVCPermissions, double > stopOffsets)
set the stopOffset for the last added lane.
A road/street connecting two junctions.
void beginEdgeParsing(const std::string &id, const SumoXMLEdgeFunc function, const std::string &streetName, const std::string &edgeType, int priority, const std::string &bidi)
Begins building of an MSEdge.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::vector< MSLane * > * myLaneStorage
pointer to a temporary lane storage
NLEdgeControlBuilder()
Constructor.
Stores edges and lanes, performs moving of vehicle.
virtual ~NLEdgeControlBuilder()
Destructor.
std::string reportCurrentEdgeOrLane() const
Return info about currently processed edge or lane.
static bool gUsingInternalLanes
Information whether the simulation regards internal lanes.
int myCurrentNumericalEdgeID
A running number for edge numbering.
bool isInternal() const
return whether this edge is an internal edge
virtual void addNeigh(const std::string id)
Adds a neighbor to the current lane.
int myCurrentLaneIndex
The index of the currently active lane (-1 if none is active)
const MSEdgeVector & getSuccessors(SUMOVehicleClass vClass=SVC_IGNORING) const
Returns the following edges, restricted by vClass.
void applyDefaultStopOffsetsToLanes()
void closeLane()
Closes the building of a lane; The edge is completely described by now and may not be opened again...
virtual MSLane * addLane(const std::string &id, double maxSpeed, double length, const PositionVector &shape, double width, SVCPermissions permissions, int index, bool isRampAccel)
Adds a lane to the current edge.
SumoXMLEdgeFunc
Numbers representing special SUMO-XML-attribute values for representing edge functions used in netbui...
int myCurrentNumericalLaneID
A running number for lane numbering.
virtual void addCrossingEdges(const std::vector< std::string > &)
add the crossingEdges in a crossing edge if present
Representation of a lane in the micro simulation.
std::map< SVCPermissions, double > myCurrentDefaultStopOffsets
The default stop offset for all lanes belonging to the active edge (this is set if the edge was given...
MSEdgeControl * build(double networkVersion)
builds the MSEdgeControl-class which holds all edges