48 #ifdef CHECK_MEMORY_LEAKS
50 #endif // CHECK_MEMORY_LEAKS
63 if (!oc.
isSet(
"output-file")) {
78 if (!oc.
getBool(
"no-internal-links")) {
80 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
89 bool noNames = !oc.
getBool(
"output.street-names");
90 for (std::map<std::string, NBEdge*>::const_iterator i = ec.
begin(); i != ec.
end(); ++i) {
99 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
103 const bool includeInternal = !oc.
getBool(
"no-internal-links");
104 if (includeInternal) {
107 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
116 unsigned int numConnections = 0;
117 for (std::map<std::string, NBEdge*>::const_iterator it_edge = ec.
begin(); it_edge != ec.
end(); it_edge++) {
118 NBEdge* from = it_edge->second;
120 const std::vector<NBEdge::Connection> connections = from->
getConnections();
121 numConnections += (
unsigned int)connections.size();
122 for (std::vector<NBEdge::Connection>::const_iterator it_c = connections.begin(); it_c != connections.end(); it_c++) {
126 if (numConnections > 0) {
129 if (includeInternal) {
132 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
140 for (std::map<std::string, NBNode*>::const_iterator i = nc.
begin(); i != nc.
end(); ++i) {
145 const std::vector<std::set<NBEdge*> > &roundabouts = nb.
getRoundabouts();
146 for (std::vector<std::set<NBEdge*> >::const_iterator i = roundabouts.begin(); i != roundabouts.end(); ++i) {
149 if (roundabouts.size() != 0) {
154 for (std::map<std::string, NBDistrict*>::const_iterator i = dc.
begin(); i != dc.
end(); i++) {
157 if (dc.
size() != 0) {
168 for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
169 const std::vector<NBEdge::Connection> &elv = (*i)->getConnections();
170 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
171 if ((*k).toEdge == 0) {
231 const std::vector<NBEdge::Lane> &lanes = e.
getLanes();
236 for (
unsigned int i = 0; i < (
unsigned int) lanes.size(); i++) {
254 if (lane.
speed == 0) {
256 }
else if (lane.
speed < 0) {
260 length = length - lane.
offset;
286 std::string incLanes;
288 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); ++i) {
289 unsigned int noLanes = (*i)->getNumLanes();
290 for (
unsigned int j = 0; j < noLanes; j++) {
291 incLanes += (*i)->getLaneID(j);
292 if (i != incoming.end() - 1 || j < noLanes - 1) {
299 std::string intLanes;
302 for (EdgeVector::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
303 const std::vector<NBEdge::Connection> &elv = (*i)->getConnections();
304 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
305 if ((*k).toEdge == 0) {
312 intLanes += (*k).id +
"_0";
314 intLanes += (*k).viaID +
"_0";
338 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); i++) {
339 const std::vector<NBEdge::Connection> &elv = (*i)->getConnections();
340 for (std::vector<NBEdge::Connection>::const_iterator k = elv.begin(); k != elv.end(); ++k) {
341 if ((*k).toEdge == 0 || !(*k).haveVia) {
348 std::string incLanes = (*k).id +
"_0";
349 if ((*k).foeIncomingLanes.length() != 0) {
350 incLanes +=
" " + (*k).foeIncomingLanes;
372 if (style !=
PLAIN) {
373 if (includeInternal) {
387 std::string stateCode;
404 for (std::vector<NBEdge*>::const_iterator i = incoming.begin(); i != incoming.end(); ++i) {
406 const std::vector<NBEdge::Connection> &connections = from->
getConnections();
407 for (std::vector<NBEdge::Connection>::const_iterator j = connections.begin(); j != connections.end(); ++j) {
427 const std::string& from,
const std::string& to,
int toLane,
const std::string& via) {
444 std::set<std::string> nodes;
445 for (std::set<NBEdge*>::const_iterator j = r.begin(); j != r.end(); ++j) {
446 nodes.insert((*j)->getToNode()->getID());
448 std::string nodeString;
449 for (std::set<std::string>::const_iterator j = nodes.begin(); j != nodes.end(); ++j) {
450 if (j != nodes.begin()) {
474 for (i = 0; i < sources.size(); i++) {
481 for (i = 0; i < sinks.size(); i++) {
494 if (time == std::floor(time)) {
504 for (NBConnectionProhibits::const_iterator j = prohibitions.begin(); j != prohibitions.end(); j++) {
507 for (NBConnectionVector::const_iterator k = prohibiting.begin(); k != prohibiting.end(); k++) {
526 std::vector<NBTrafficLightLogic*> logics = tllCont.
getComputed();
527 for (std::vector<NBTrafficLightLogic*>::iterator it = logics.begin(); it != logics.end(); it++) {
535 const std::vector<NBTrafficLightLogic::PhaseDefinition> &phases = (*it)->getPhases();
536 for (std::vector<NBTrafficLightLogic::PhaseDefinition>::const_iterator j = phases.begin(); j != phases.end(); ++j) {
544 if (logics.size() > 0) {
573 }
else if (permissions == 0) {
579 if (encoding.second) {