51 #ifdef CHECK_MEMORY_LEAKS
53 #endif // CHECK_MEMORY_LEAKS
69 const std::string& name,
72 : myID(id), myNode(-1), myName(name), myEdge(edge), myDisturbance(by) {}
95 DictType::iterator i =
myDict.find(
id);
106 DictType::iterator i =
myDict.find(
id);
115 std::vector<int> ret;
116 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
117 if ((*i).second->crosses(poly)) {
118 ret.push_back((*i).second->myID);
149 if (pc == 0 && bc == 0) {
156 WRITE_WARNING(
"Ugly split to prohibit '" + toString<int>(e1->
getID()) +
"' by '" + toString<int>(e2->getID()) +
"'.");
158 std::string id1 = toString<int>(e1->
getID()) +
"x" + toString<int>(e2->getID());
159 std::string id2 = toString<int>(e2->getID()) +
"x" + toString<int>(e1->
getID());
163 assert(node1 == 0 || node2 == 0);
164 if (node1 == 0 && node2 == 0) {
173 node = node1 == 0 ? node2 : node1;
181 NBEdge* mustStopFrom = ec.
retrieve(toString<int>(e2->getID()) +
"[0]");
182 NBEdge* mustStopTo = ec.
retrieve(toString<int>(e2->getID()) +
"[1]");
183 if (mayDriveFrom != 0 && mayDriveTo != 0 && mustStopFrom != 0 && mustStopTo != 0) {
193 }
else if (pc != 0 && bc == 0) {
213 std::string id_pcie = toString<int>(pc->
getToEdgeID());
222 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
228 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
247 }
else if (bc != 0 && pc == 0) {
258 std::string nid1 = e->
getID() +
"[0]";
259 std::string nid2 = e->
getID() +
"[1]";
267 std::string id_bcoe = toString<int>(bc->getFromEdgeID());
268 std::string id_bcie = toString<int>(bc->getToEdgeID());
277 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
283 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
305 if (!conn1.
check(ec) || !conn2.check(ec)) {
337 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
346 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
Position getGeomPosition() const
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
static bool dictionary(int id, NIVissimAbstractEdge *e)
static std::vector< int > getWithin(const AbstractPoly &poly)
static const NBConnection InvalidConnection
The representation of a single edge during network building.
SUMOReal xmin() const
Returns minimum x-coordinate.
A container for districts.
static bool dictionary(const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
bool addToNode(NBNode *node, NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
SUMOReal getPosition() const
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
static bool dictionary(int id, NIVissimConnection *o)
SUMOReal xmax() const
Returns maximum x-coordinate.
A class that stores a 2D geometrical boundary.
#define WRITE_WARNING(msg)
static int refusedProhibits
A temporary storage for edges imported from Vissim.
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
NIVissimExtendedEdgePoint myEdge
const std::string & getID() const
Returns the id.
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
A point in 2D or 3D with translation and scaling methods.
Storage for edges, including some functionality operating on multiple edges.
std::map< int, NIVissimDisturbance * > DictType
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
NBNode * getToNode() const
Returns the destination node of the edge.
NBConnection getConnection(NBNode *node, int aedgeid)
NIVissimExtendedEdgePoint myDisturbance
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
std::vector< NBEdge * > EdgeVector
static bool dictionary(int id, const std::string &name, const std::string &type, int noLanes, SUMOReal zuschlag1, SUMOReal zuschlag2, SUMOReal length, const PositionVector &geom, const NIVissimClosedLanesVector &clv)
Adds the described item to the dictionary Builds the edge first.
Represents a single node (junction) during network building.
NIVissimDisturbance(int id, const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
static void dict_SetDisturbances()
Position crossesEdgeAtPoint(NIVissimAbstractEdge *c) const
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
Container for nodes during the netbuilding process.
virtual ~NIVissimDisturbance()
static void reportRefused()
int getFromEdgeID() const
NBNode * getFromNode() const
Returns the origin node of the edge.