 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
57 const std::string& name,
60 : myID(id), myNode(-1), myName(name), myEdge(edge), myDisturbance(by) {}
83 DictType::iterator i =
myDict.find(
id);
94 DictType::iterator i =
myDict.find(
id);
103 std::vector<int> ret;
104 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
105 if ((*i).second->crosses(poly)) {
106 ret.push_back((*i).second->myID);
137 if (pc ==
nullptr && bc ==
nullptr) {
144 WRITE_WARNING(
"Ugly split to prohibit '" + toString<int>(e1->
getID()) +
"' by '" + toString<int>(e2->
getID()) +
"'.");
146 std::string id1 = toString<int>(e1->
getID()) +
"x" + toString<int>(e2->
getID());
147 std::string id2 = toString<int>(e2->
getID()) +
"x" + toString<int>(e1->
getID());
151 assert(node1 == 0 || node2 == 0);
152 if (node1 ==
nullptr && node2 ==
nullptr) {
161 node = node1 ==
nullptr ? node2 : node1;
171 if (mayDriveFrom !=
nullptr && mayDriveTo !=
nullptr && mustStopFrom !=
nullptr && mustStopTo !=
nullptr) {
181 }
else if (pc !=
nullptr && bc ==
nullptr) {
201 std::string id_pcie = toString<int>(pc->
getToEdgeID());
210 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
216 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
235 }
else if (bc !=
nullptr && pc ==
nullptr) {
246 std::string nid1 = e->
getID() +
"[0]";
247 std::string nid2 = e->
getID() +
"[1]";
256 std::string id_bcie = toString<int>(bc->
getToEdgeID());
265 for (EdgeVector::const_iterator i = connected.begin(); i != connected.end(); i++) {
271 WRITE_WARNING(
"Would have to split edge '" + e->
getID() +
"' to build a prohibition");
325 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
334 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
static const NBConnection InvalidConnection
static void reportRefused()
NBEdge * retrieve(const std::string &id, bool retrieveExtracted=false) const
Returns the edge that has the given id.
#define WRITE_WARNING(msg)
Storage for edges, including some functionality operating on multiple edges.
A temporary storage for edges imported from Vissim.
static std::vector< int > getWithin(const AbstractPoly &poly)
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
static bool dictionary(const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
double xmax() const
Returns maximum x-coordinate.
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
bool addToNode(NBNode *node, NBDistrictCont &dc, NBNodeCont &nc, NBEdgeCont &ec)
A container for districts.
bool splitAt(NBDistrictCont &dc, NBEdge *edge, NBNode *node)
Splits the edge at the position nearest to the given node.
Container for nodes during the netbuilding process.
The representation of a single edge during network building.
NIVissimExtendedEdgePoint myEdge
Position crossesEdgeAtPoint(NIVissimAbstractEdge *c) const
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.
NBEdge * getPossiblySplittedOutgoing(const std::string &edgeid)
get possibly splitted outgoing edge
NBNode * getToNode() const
Returns the destination node of the edge.
static int refusedProhibits
double xmin() const
Returns minimum x-coordinate.
A class that stores a 2D geometrical boundary.
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.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
static bool dictionary(int id, NIVissimAbstractEdge *e)
NBNode * retrieve(const std::string &id) const
Returns the node with the given name.
NBConnection getConnection(NBNode *node, int aedgeid)
bool check(const NBEdgeCont &ec)
checks whether the edges are still valid
std::map< int, NIVissimDisturbance * > DictType
NIVissimExtendedEdgePoint myDisturbance
static void dict_SetDisturbances()
Position getGeomPosition() const
EdgeVector getConnectedEdges() const
Returns the list of outgoing edges unsorted.
static bool dictionary(int id, NIVissimConnection *o)
int getFromEdgeID() const
Represents a single node (junction) during network building.
NIVissimDisturbance(int id, const std::string &name, const NIVissimExtendedEdgePoint &edge, const NIVissimExtendedEdgePoint &by)
NBEdge * getPossiblySplittedIncoming(const std::string &edgeid)
get possibly splitted incoming edge
double getPosition() const
NBNode * getFromNode() const
Returns the origin node of the edge.
virtual ~NIVissimDisturbance()
const std::string & getID() const