 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
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();
static NIVissimConflictArea * dict_findByLinks(const std::string &link1, const std::string &link2)
Storage for edges, including some functionality operating on multiple edges.
static DictType myDict
The dictionary.
std::string getFirstLink()
Returns the first link of the conflic area.
std::string getSecondLink()
Returns the second link of the conflic area.
void addSortedLinkFoes(const NBConnection &mayDrive, const NBConnection &mustStop)
add shorted link FOES
std::map< int, NIVissimConflictArea * > DictType
Definition of the dictionary type.
NIVissimConflictArea(int id, const std::string &link1, const std::string &link2, const std::string &status)
Constructor.
The representation of a single edge during network building.
NBEdge * retrievePossiblySplit(const std::string &id, bool downstream) const
Tries to retrieve an edge, even if it is splitted.
std::string getStatus()
Returns the priority regulation of the conflic area.
A temporary storage for conflict areas imported from Vissim.
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 int toInt(const std::string &sData)
converts a string into the integer value described by it by calling the char-type converter,...
static bool dictionary(int id, NIVissimConnection *o)
static void setPriorityRegulation(NBEdgeCont &ec)
Sets the priority regulation according to the VISSIM conflict area data.
int getFromEdgeID() const
Represents a single node (junction) during network building.
~NIVissimConflictArea()
Destructor.
static void clearDict()
Clears the dictionary.