65 const std::string& name,
68 : myID(id), myNode(-1), myName(name), myEdge(edge), myDisturbance(by) {}
91 DictType::iterator i =
myDict.find(
id);
102 DictType::iterator i =
myDict.find(
id);
111 std::vector<int> ret;
112 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
113 if ((*i).second->crosses(poly)) {
114 ret.push_back((*i).second->myID);
145 if (pc == 0 && bc == 0) {
152 WRITE_WARNING(
"Ugly split to prohibit '" + toString<int>(e1->
getID()) +
"' by '" + toString<int>(e2->getID()) +
"'.");
154 std::string id1 = toString<int>(e1->
getID()) +
"x" + toString<int>(e2->getID());
155 std::string id2 = toString<int>(e2->getID()) +
"x" + toString<int>(e1->
getID());
159 assert(node1 == 0 || node2 == 0);
160 if (node1 == 0 && node2 == 0) {
169 node = node1 == 0 ? node2 : node1;
177 NBEdge* mustStopFrom = ec.
retrieve(toString<int>(e2->getID()) +
"[0]");
178 NBEdge* mustStopTo = ec.
retrieve(toString<int>(e2->getID()) +
"[1]");
179 if (mayDriveFrom != 0 && mayDriveTo != 0 && mustStopFrom != 0 && mustStopTo != 0) {
189 }
else if (pc != 0 && bc == 0) {
209 std::string id_pcie = toString<int>(pc->
getToEdgeID());
218 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
224 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
243 }
else if (bc != 0 && pc == 0) {
254 std::string nid1 = e->
getID() +
"[0]";
255 std::string nid2 = e->
getID() +
"[1]";
263 std::string id_bcoe = toString<int>(bc->getFromEdgeID());
264 std::string id_bcie = toString<int>(bc->getToEdgeID());
273 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
279 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
301 if (!conn1.
check(ec) || !conn2.check(ec)) {
333 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
342 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
double xmax() const
Returns maximum x-coordinate.
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.
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)
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)
const std::string & getID() const
Returns the id.
A class that stores a 2D geometrical boundary.
#define WRITE_WARNING(msg)
static int refusedProhibits
A temporary storage for edges imported from Vissim.
NIVissimExtendedEdgePoint myEdge
int getFromEdgeID() const
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
get possibly splitted incoming edge
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
A point in 2D or 3D with translation and scaling methods.
Storage for edges, including some functionality operating on multiple edges.
double xmin() const
Returns minimum x-coordinate.
static bool dictionary(int id, const std::string &name, const std::string &type, int noLanes, double zuschlag1, double zuschlag2, double length, const PositionVector &geom, const NIVissimClosedLanesVector &clv)
Adds the described item to the dictionary Builds the edge first.
std::map< int, NIVissimDisturbance * > DictType
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
get possibly splitted outgoing edge
Position crossesEdgeAtPoint(NIVissimAbstractEdge *c) const
NBConnection getConnection(NBNode *node, int aedgeid)
NIVissimExtendedEdgePoint myDisturbance
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
double getPosition() const
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)
add shorted link FOES
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
static void dict_SetDisturbances()
NBNode * getFromNode() const
Returns the origin node of the edge.
Container for nodes during the netbuilding process.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
virtual ~NIVissimDisturbance()
Position getGeomPosition() const
NBNode * getToNode() const
Returns the destination node of the edge.
static void reportRefused()