46 const std::string& link1,
47 const std::string& link2,
48 const std::string& status)
49 : myConflictID(id), myFirstLink(link1), mySecondLink(link2), myStatus(status) {
60 const std::string& link2,
61 const std::string& status) {
74 DictType::iterator i =
myDict.find(
id);
86 DictType::iterator i =
myDict.find(
id);
97 const std::string& link2) {
98 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
99 if (((*i).second->myFirstLink == link1) &&
100 ((*i).second->mySecondLink == link2)) {
110 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
119 std::map<int, NIVissimConflictArea*>::iterator it;
124 if (firstLink ==
nullptr || secondLink ==
nullptr) {
130 if (conflictArea->
getStatus() ==
"ONEYIELDSTWO") {
131 priority_conn = secondLink;
132 subordinate_conn = firstLink;
134 const std::string mayDriveFrom_id = toString<int>(priority_conn->
getFromEdgeID());
135 const std::string mayDriveTo_id = toString<int>(priority_conn->
getToEdgeID());
136 const std::string mustStopFrom_id = toString<int>(subordinate_conn->
getFromEdgeID());
137 const std::string mustStopTo_id = toString<int>(subordinate_conn->
getToEdgeID());
144 if (mayDriveFrom !=
nullptr && mayDriveTo !=
nullptr && mustStopFrom !=
nullptr && mustStopTo !=
nullptr) {
145 NBNode* node = mayDriveFrom->getToNode();
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.
The representation of a single edge during network building.
~NIVissimConflictArea()
Destructor.
static bool dictionary(int id, NIVissimConnection *o)
static void setPriorityRegulation(NBEdgeCont &ec)
Sets the priority regulation according to the VISSIM conflict area data.
static NIVissimConflictArea * dict_findByLinks(const std::string &link1, const std::string &link2)
int getFromEdgeID() const
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
static void clearDict()
Clears the dictionary.
Storage for edges, including some functionality operating on multiple edges.
static int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
std::string getSecondLink()
Returns the second link of the conflic area.
NIVissimConflictArea(int id, const std::string &link1, const std::string &link2, const std::string &status)
Constructor.
static DictType myDict
The dictionary.
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 getFirstLink()
Returns the first link of the conflic area.
std::map< int, NIVissimConflictArea * > DictType
Definition of the dictionary type.