42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 57 const std::string& link1,
58 const std::string& link2,
59 const std::string& status)
60 : myConflictID(id), myFirstLink(link1), mySecondLink(link2), myStatus(status)
71 const std::string& link2,
72 const std::string& status) {
85 DictType::iterator i =
myDict.find(
id);
97 DictType::iterator i =
myDict.find(
id);
108 const std::string& link2) {
109 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
110 if (((*i).second->myFirstLink == link1) &&
111 ((*i).second->mySecondLink == link2)) {
121 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
130 std::map<int, NIVissimConflictArea*>::iterator it;
135 if (firstLink == 0 || secondLink == 0) {
141 if (conflictArea->
getStatus() ==
"ONEYIELDSTWO") {
142 priority_conn = secondLink;
143 subordinate_conn = firstLink;
145 const std::string mayDriveFrom_id = toString<int>(priority_conn->
getFromEdgeID());
146 const std::string mayDriveTo_id = toString<int>(priority_conn->
getToEdgeID());
147 const std::string mustStopFrom_id = toString<int>(subordinate_conn->
getFromEdgeID());
148 const std::string mustStopTo_id = toString<int>(subordinate_conn->
getToEdgeID());
155 if (mayDriveFrom != 0 && mayDriveTo != 0 && mustStopFrom != 0 && mustStopTo != 0) {
156 NBNode* node = mayDriveFrom->getToNode();
std::string getStatus()
Returns the priority regulation of the conflic area.
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
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)
static void clearDict()
Clears the dictionary.
static int _str2int(const std::string &sData)
Storage for edges, including some functionality operating on multiple edges.
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)
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.
int getFromEdgeID() const