Eclipse SUMO - Simulation of Urban MObility
|
#include <NIVissimConnectionCluster.h>
Data Structures | |
class | NodeSubCluster |
class | same_direction_sorter |
Public Member Functions | |
bool | around (const Position &p, double offset=0) const |
const std::vector< int > & | getConnections () const |
NIVissimConnection * | getIncomingContinuation (NIVissimEdge *e) const |
PositionVector | getIncomingContinuationGeometry (NIVissimEdge *e) const |
NBNode * | getNBNode () const |
NIVissimConnection * | getOutgoingContinuation (NIVissimEdge *e) const |
PositionVector | getOutgoingContinuationGeometry (NIVissimEdge *e) const |
double | getPositionForEdge (int edgeid) const |
bool | hasNodeCluster () const |
NIVissimConnectionCluster (const std::vector< int > &connections, const Boundary &boundary, int nodeCluster, const std::vector< int > &edges) | |
NIVissimConnectionCluster (const std::vector< int > &connections, int nodeCluster, int edgeid) | |
Constructor Build the boundary; The boundary includes both incoming and outgoing nodes. | |
bool | overlapsWith (NIVissimConnectionCluster *c, double offset=0) const |
Returns the information whether the given cluster overlaps the current. | |
~NIVissimConnectionCluster () | |
Destructor. | |
Static Public Member Functions | |
static void | _debugOut (std::ostream &into) |
static void | buildNodeClusters () |
static void | clearDict () |
static int | getNextFreeNodeID () |
static void | joinByDisturbances (double offset) |
static void | joinBySameEdges (double offset) |
Tries to joind clusters participating within a node This is done by joining clusters which overlap. | |
Private Types | |
typedef std::vector< NIVissimConnectionCluster * > | ContType |
Private Member Functions | |
void | add (NIVissimConnectionCluster *c) |
Adds the second cluster. | |
std::vector< int > | extendByToTreatAsSame (const std::vector< int > &iv1, const std::vector< int > &iv2) const |
std::vector< int > | getDisturbanceParticipators () |
bool | isWeakDistrictConnRealisation (NIVissimConnectionCluster *c2) |
bool | joinable (NIVissimConnectionCluster *c2, double offset) |
bool | liesOnSameEdgesEnd (NIVissimConnectionCluster *cc2) |
void | recheckEdges () |
void | recomputeBoundary () |
void | removeConnections (const NodeSubCluster &c) |
Private Attributes | |
int | myBlaID |
Boundary | myBoundary |
The boundary of the cluster. | |
std::vector< int > | myConnections |
List of connection-ids which participate within this cluster. | |
std::vector< int > | myEdges |
std::vector< int > | myIncomingEdges |
int | myNodeCluster |
The node the cluster is assigned to. | |
std::vector< int > | myNodes |
std::vector< int > | myOutgoingEdges |
std::vector< int > | myTLs |
Static Private Attributes | |
static ContType | myClusters |
static int | myFirstFreeID = 100000 |
static int | myStaticBlaID = 0 |
Friends | |
class | NIVissimEdge |
This class holds a list of connections either all outgoing or all incoming within an edge, which do lies close together. This shall be the connections which belong to a single node. It still are not all of the node's connections, as other edges may participate to this node, too.
Definition at line 50 of file NIVissimConnectionCluster.h.
|
private |
Definition at line 182 of file NIVissimConnectionCluster.h.
NIVissimConnectionCluster::NIVissimConnectionCluster | ( | const std::vector< int > & | connections, |
int | nodeCluster, | ||
int | edgeid | ||
) |
Constructor Build the boundary; The boundary includes both incoming and outgoing nodes.
Definition at line 112 of file NIVissimConnectionCluster.cpp.
References NIVissimConnection::dictionary(), NIVissimConnection::getFromEdgeID(), NIVissimConnection::getToEdgeID(), myClusters, myEdges, myIncomingEdges, myOutgoingEdges, recomputeBoundary(), and VectorHelper< T >::removeDouble().
NIVissimConnectionCluster::NIVissimConnectionCluster | ( | const std::vector< int > & | connections, |
const Boundary & | boundary, | ||
int | nodeCluster, | ||
const std::vector< int > & | edges | ||
) |
Definition at line 135 of file NIVissimConnectionCluster.cpp.
References NIVissimConnection::dictionary(), NIVissimConnection::getFromEdgeID(), NIVissimConnection::getToEdgeID(), myBoundary, myClusters, myIncomingEdges, myOutgoingEdges, recomputeBoundary(), VectorHelper< T >::removeDouble(), Boundary::xmax(), and Boundary::xmin().
NIVissimConnectionCluster::~NIVissimConnectionCluster | ( | ) |
Destructor.
Definition at line 158 of file NIVissimConnectionCluster.cpp.
|
static |
Definition at line 514 of file NIVissimConnectionCluster.cpp.
References myClusters.
|
private |
Adds the second cluster.
Definition at line 178 of file NIVissimConnectionCluster.cpp.
References Boundary::add(), NIVissimEdge::dictionary(), myBoundary, myConnections, myEdges, myIncomingEdges, myNodeCluster, myOutgoingEdges, VectorHelper< T >::removeDouble(), Boundary::xmax(), and Boundary::xmin().
Referenced by NIVissimConnectionCluster::NodeSubCluster::add().
bool NIVissimConnectionCluster::around | ( | const Position & | p, |
double | offset = 0 |
||
) | const |
Definition at line 574 of file NIVissimConnectionCluster.cpp.
References Boundary::around(), myBoundary, Boundary::xmax(), and Boundary::xmin().
Referenced by NIVissimEdge::getFromNode(), NIVissimEdge::getToNode(), and NIVissimEdge::resolveSameNode().
|
static |
Definition at line 483 of file NIVissimConnectionCluster.cpp.
References NIVissimNodeCluster::dictionary(), NIVissimDisturbance::getWithin(), myClusters, TL, and WRITE_WARNING.
Referenced by NIImporter_Vissim::postLoadBuild().
|
static |
Definition at line 680 of file NIVissimConnectionCluster.cpp.
References myClusters, and myFirstFreeID.
Referenced by NIImporter_Vissim::~NIImporter_Vissim().
|
private |
Definition at line 451 of file NIVissimConnectionCluster.cpp.
References NIVissimEdge::dictionary(), and NIVissimEdge::getToTreatAsSame().
Referenced by joinable().
|
inline |
Definition at line 76 of file NIVissimConnectionCluster.h.
References myConnections.
|
private |
Definition at line 467 of file NIVissimConnectionCluster.cpp.
References NIVissimDisturbance::dictionary(), NIVissimConnection::dictionary(), NIVissimDisturbance::getDisturbanceID(), NIVissimAbstractEdge::getDisturbances(), NIVissimDisturbance::getEdgeID(), and myConnections.
Referenced by joinable().
NIVissimConnection * NIVissimConnectionCluster::getIncomingContinuation | ( | NIVissimEdge * | e | ) | const |
Definition at line 713 of file NIVissimConnectionCluster.cpp.
References PositionVector::beginEndAngle(), NIVissimConnection::dictionary(), NIVissimConnection::getFromEdgeID(), NIVissimAbstractEdge::getGeometry(), NIVissimAbstractEdge::getID(), and myConnections.
PositionVector NIVissimConnectionCluster::getIncomingContinuationGeometry | ( | NIVissimEdge * | e | ) | const |
Definition at line 690 of file NIVissimConnectionCluster.cpp.
References PositionVector::beginEndAngle(), NIVissimConnection::dictionary(), NIVissimConnection::getFromEdgeID(), NIVissimAbstractEdge::getGeometry(), NIVissimAbstractEdge::getID(), and myConnections.
NBNode * NIVissimConnectionCluster::getNBNode | ( | ) | const |
Definition at line 568 of file NIVissimConnectionCluster.cpp.
References NIVissimNodeCluster::dictionary(), and myNodeCluster.
Referenced by NIVissimEdge::getFromNode(), and NIVissimEdge::getToNode().
|
static |
Definition at line 163 of file NIVissimConnectionCluster.cpp.
References myFirstFreeID.
Referenced by NIVissimConnectionCluster::NodeSubCluster::getConnectionIDs().
NIVissimConnection * NIVissimConnectionCluster::getOutgoingContinuation | ( | NIVissimEdge * | e | ) | const |
Definition at line 757 of file NIVissimConnectionCluster.cpp.
References PositionVector::beginEndAngle(), NIVissimConnection::dictionary(), NIVissimAbstractEdge::getGeometry(), NIVissimAbstractEdge::getID(), NIVissimConnection::getToEdgeID(), and myConnections.
PositionVector NIVissimConnectionCluster::getOutgoingContinuationGeometry | ( | NIVissimEdge * | e | ) | const |
Definition at line 735 of file NIVissimConnectionCluster.cpp.
References PositionVector::beginEndAngle(), NIVissimConnection::dictionary(), NIVissimAbstractEdge::getGeometry(), NIVissimAbstractEdge::getID(), NIVissimConnection::getToEdgeID(), and myConnections.
double NIVissimConnectionCluster::getPositionForEdge | ( | int | edgeid | ) | const |
Definition at line 613 of file NIVissimConnectionCluster.cpp.
References GeomHelper::crossPoint(), NIVissimEdge::dictionary(), NIVissimConnection::dictionary(), NIVissimNodeDef::dictionary(), NIVissimNodeDef::getEdgePosition(), NIVissimConnection::getFromEdgeID(), NIVissimConnection::getFromPosition(), NIVissimAbstractEdge::getGeometry(), NIVissimConnection::getToEdgeID(), NIVissimConnection::getToPosition(), myBoundary, myConnections, myEdges, myNodeCluster, GeomHelper::nearest_offset_on_line_to_point2D(), TL, WRITE_WARNING, Boundary::xmax(), and Boundary::xmin().
Referenced by NIVissimEdge::connection_cluster_position_sorter::operator()().
bool NIVissimConnectionCluster::hasNodeCluster | ( | ) | const |
Definition at line 531 of file NIVissimConnectionCluster.cpp.
References myNodeCluster.
Referenced by joinable().
|
private |
Definition at line 374 of file NIVissimConnectionCluster.cpp.
References GeomHelper::angleDiff(), PositionVector::beginEndAngle(), DEG2RAD, NIVissimEdge::dictionary(), NIVissimConnection::dictionary(), NIVissimAbstractEdge::getGeometry(), PositionVector::intersects(), isWeakDistrictConnRealisation(), myConnections, myIncomingEdges, and myOutgoingEdges.
Referenced by isWeakDistrictConnRealisation().
|
private |
Definition at line 317 of file NIVissimConnectionCluster.cpp.
References extendByToTreatAsSame(), getDisturbanceParticipators(), hasNodeCluster(), myConnections, myIncomingEdges, myOutgoingEdges, and overlapsWith().
|
static |
|
static |
Tries to joind clusters participating within a node This is done by joining clusters which overlap.
Definition at line 208 of file NIVissimConnectionCluster.cpp.
References myClusters.
Referenced by NIImporter_Vissim::postLoadBuild().
|
private |
Definition at line 416 of file NIVissimConnectionCluster.cpp.
References NIVissimEdge::dictionary(), NIVissimConnection::dictionary(), NIVissimBoundedClusterObject::getBoundary(), Boundary::getCenter(), NIVissimConnection::getFromEdgeID(), NIVissimAbstractEdge::getGeometry(), NIVissimConnection::getToEdgeID(), PositionVector::length(), myConnections, and GeomHelper::nearest_offset_on_line_to_point2D().
bool NIVissimConnectionCluster::overlapsWith | ( | NIVissimConnectionCluster * | c, |
double | offset = 0 |
||
) | const |
Returns the information whether the given cluster overlaps the current.
Definition at line 169 of file NIVissimConnectionCluster.cpp.
References myBoundary, Boundary::overlapsWith(), Boundary::xmax(), and Boundary::xmin().
Referenced by joinable().
|
private |
Definition at line 582 of file NIVissimConnectionCluster.cpp.
References NIVissimEdge::addToConnectionCluster(), Boundary::around(), NIVissimEdge::dictionary(), NIVissimConnection::dictionary(), NIVissimConnection::getFromEdgeID(), NIVissimConnection::getFromGeomPosition(), NIVissimConnection::getToEdgeID(), NIVissimConnection::getToGeomPosition(), myBoundary, myConnections, myEdges, NIVissimEdge::removeFromConnectionCluster(), Boundary::xmax(), and Boundary::xmin().
|
private |
Definition at line 551 of file NIVissimConnectionCluster.cpp.
References Boundary::add(), NIVissimConnection::dictionary(), PositionVector::getBoxBoundary(), NIVissimConnection::getFromGeomPosition(), NIVissimAbstractEdge::getGeometry(), NIVissimConnection::getToGeomPosition(), myBoundary, myConnections, Boundary::xmax(), and Boundary::xmin().
Referenced by NIVissimConnectionCluster(), NIVissimConnectionCluster(), and removeConnections().
|
private |
Definition at line 537 of file NIVissimConnectionCluster.cpp.
References NIVissimAbstractEdge::getID(), NIVissimConnectionCluster::NodeSubCluster::myConnections, myConnections, and recomputeBoundary().
|
friend |
Definition at line 74 of file NIVissimConnectionCluster.h.
|
private |
Definition at line 186 of file NIVissimConnectionCluster.h.
|
private |
The boundary of the cluster.
Definition at line 167 of file NIVissimConnectionCluster.h.
Referenced by NIVissimConnectionCluster::NodeSubCluster::add(), add(), around(), getPositionForEdge(), NIVissimConnectionCluster(), NIVissimConnectionCluster::NodeSubCluster::overlapsWith(), overlapsWith(), recheckEdges(), and recomputeBoundary().
|
staticprivate |
Definition at line 183 of file NIVissimConnectionCluster.h.
Referenced by _debugOut(), buildNodeClusters(), clearDict(), joinBySameEdges(), NIVissimConnectionCluster(), and NIVissimConnectionCluster().
|
private |
List of connection-ids which participate within this cluster.
Definition at line 164 of file NIVissimConnectionCluster.h.
Referenced by NIVissimConnectionCluster::NodeSubCluster::add(), add(), NIVissimConnectionCluster::NodeSubCluster::getConnectionIDs(), getConnections(), getDisturbanceParticipators(), getIncomingContinuation(), getIncomingContinuationGeometry(), getOutgoingContinuation(), getOutgoingContinuationGeometry(), getPositionForEdge(), isWeakDistrictConnRealisation(), joinable(), liesOnSameEdgesEnd(), recheckEdges(), recomputeBoundary(), removeConnections(), and NIVissimConnectionCluster::NodeSubCluster::size().
|
private |
Definition at line 173 of file NIVissimConnectionCluster.h.
Referenced by add(), getPositionForEdge(), NIVissimConnectionCluster(), and recheckEdges().
|
staticprivate |
Definition at line 184 of file NIVissimConnectionCluster.h.
Referenced by clearDict(), and getNextFreeNodeID().
|
private |
Definition at line 179 of file NIVissimConnectionCluster.h.
Referenced by add(), isWeakDistrictConnRealisation(), joinable(), NIVissimConnectionCluster(), and NIVissimConnectionCluster().
|
private |
The node the cluster is assigned to.
Definition at line 170 of file NIVissimConnectionCluster.h.
Referenced by add(), getNBNode(), getPositionForEdge(), and hasNodeCluster().
|
private |
Definition at line 175 of file NIVissimConnectionCluster.h.
|
private |
Definition at line 179 of file NIVissimConnectionCluster.h.
Referenced by add(), isWeakDistrictConnRealisation(), joinable(), NIVissimConnectionCluster(), and NIVissimConnectionCluster().
|
staticprivate |
Definition at line 185 of file NIVissimConnectionCluster.h.
|
private |
Definition at line 177 of file NIVissimConnectionCluster.h.