44 const std::string& link1,
45 const std::string& link2,
46 const std::string& status)
47 : myConflictID(id), myFirstLink(link1), mySecondLink(link2), myStatus(status) {
58 const std::string& link2,
59 const std::string& status) {
72 DictType::iterator i =
myDict.find(
id);
84 DictType::iterator i =
myDict.find(
id);
95 const std::string& link2) {
96 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
97 if (((*i).second->myFirstLink == link1) &&
98 ((*i).second->mySecondLink == link2)) {
108 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
117 std::map<int, NIVissimConflictArea*>::iterator it;
122 if (firstLink ==
nullptr || secondLink ==
nullptr) {
128 if (conflictArea->
getStatus() ==
"ONEYIELDSTWO") {
129 priority_conn = secondLink;
130 subordinate_conn = firstLink;
132 const std::string mayDriveFrom_id = toString<int>(priority_conn->
getFromEdgeID());
133 const std::string mayDriveTo_id = toString<int>(priority_conn->
getToEdgeID());
134 const std::string mustStopFrom_id = toString<int>(subordinate_conn->
getFromEdgeID());
135 const std::string mustStopTo_id = toString<int>(subordinate_conn->
getToEdgeID());
142 if (mayDriveFrom !=
nullptr && mayDriveTo !=
nullptr && mustStopFrom !=
nullptr && mustStopTo !=
nullptr) {
Storage for edges, including some functionality operating on multiple edges.
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
The representation of a single edge during network building.
NBNode * getToNode() const
Returns the destination node of the edge.
Represents a single node (junction) during network building.
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
A temporary storage for conflict areas imported from Vissim.
std::string getStatus()
Returns the priority regulation of the conflic area.
static bool dictionary(int id, const std::string &link1, const std::string &link2, const std::string &status)
Adds the described item to the dictionary Builds the conflict area first.
static void setPriorityRegulation(NBEdgeCont &ec)
Sets the priority regulation according to the VISSIM conflict area data.
static DictType myDict
The dictionary.
std::string getSecondLink()
Returns the second link of the conflic area.
static NIVissimConflictArea * dict_findByLinks(const std::string &link1, const std::string &link2)
static void clearDict()
Clears the dictionary.
std::string getFirstLink()
Returns the first link of the conflic area.
NIVissimConflictArea(int id, const std::string &link1, const std::string &link2, const std::string &status)
Constructor.
~NIVissimConflictArea()
Destructor.
std::map< int, NIVissimConflictArea * > DictType
Definition of the dictionary type.
int getFromEdgeID() const
static bool dictionary(int id, NIVissimConnection *o)
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...