52 const std::string& link1,
53 const std::string& link2,
54 const std::string& status)
55 : myConflictID(id), myFirstLink(link1), mySecondLink(link2), myStatus(status) {
66 const std::string& link2,
67 const std::string& status) {
80 DictType::iterator i =
myDict.find(
id);
92 DictType::iterator i =
myDict.find(
id);
103 const std::string& link2) {
104 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
105 if (((*i).second->myFirstLink == link1) &&
106 ((*i).second->mySecondLink == link2)) {
116 for (DictType::iterator i =
myDict.begin(); i !=
myDict.end(); i++) {
125 std::map<int, NIVissimConflictArea*>::iterator it;
130 if (firstLink == 0 || secondLink == 0) {
136 if (conflictArea->
getStatus() ==
"ONEYIELDSTWO") {
137 priority_conn = secondLink;
138 subordinate_conn = firstLink;
140 const std::string mayDriveFrom_id = toString<int>(priority_conn->
getFromEdgeID());
141 const std::string mayDriveTo_id = toString<int>(priority_conn->
getToEdgeID());
142 const std::string mustStopFrom_id = toString<int>(subordinate_conn->
getFromEdgeID());
143 const std::string mustStopTo_id = toString<int>(subordinate_conn->
getToEdgeID());
150 if (mayDriveFrom != 0 && mayDriveTo != 0 && mustStopFrom != 0 && mustStopTo != 0) {
151 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.
static int _str2int(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter...
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)
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.