62 #ifdef CHECK_MEMORY_LEAKS
64 #endif // CHECK_MEMORY_LEAKS
76 myNet(net), myActionBuilder(net),
77 myCurrentIsInternalToSkip(false),
78 myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder),
79 myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder),
80 mySucceedingLaneBuilder(junctionBuilder),
81 myAmInTLLogicMode(false), myCurrentIsBroken(false),
82 myHaveWarnedAboutDeprecatedE1(false),
83 myHaveWarnedAboutDeprecatedE2(false),
84 myHaveWarnedAboutDeprecatedE3(false),
85 myHaveWarnedAboutDeprecatedDetEntry(false),
86 myHaveWarnedAboutDeprecatedDetExit(false),
87 myHaveWarnedAboutDeprecatedRowLogic(false),
88 myHaveWarnedAboutDeprecatedTLLogic(false),
89 myHaveWarnedAboutDeprecatedTimedEvent(false),
90 myHaveWarnedAboutDeprecatedTLSTiming(false),
91 myHaveWarnedAboutDeprecatedTimeThreshold(false),
92 myHaveWarnedAboutDeprecatedSpeedThreshold(false),
93 myHaveWarnedAboutDeprecatedJamDistThreshold(false),
94 myHaveWarnedAboutDeprecatedVTypeProbe(false),
95 myHaveWarnedAboutDeprecatedRouteProbe(false),
96 myHaveWarnedAboutDeprecatedEdgeMean(false),
97 myHaveWarnedAboutDeprecatedLaneMean(false),
98 myHaveWarnedAboutDeprecatedVTypes(false),
99 myHaveWarnedAboutDeprecatedLanes(false),
100 myHaveWarnedAboutDeprecatedDistrict(false), myHaveWarnedAboutDeprecatedDSource(false), myHaveWarnedAboutDeprecatedDSink(false) {}
142 WRITE_WARNING(
"Your network uses deprecated tags; please rebuild.");
170 case SUMO_TAG_MSG_EMITTER:
171 addMsgEmitter(attrs);
395 WRITE_ERROR(
"Edge '" +
id +
"' has an invalid type ('" + funcString +
"').");
468 if (shape.
size() < 2) {
469 WRITE_ERROR(
"Shape of lane '" +
id +
"' is broken.\n Can not build according edge.");
481 WRITE_ERROR(
"Another lane with the id '" +
id +
"' exists.");
512 std::vector<MSLane*> incomingLanes;
515 std::vector<MSLane*> internalLanes;
516 #ifdef HAVE_INTERNAL_LANES
527 WRITE_ERROR(e.what() + std::string(
"\n Can not build according junction."));
536 const std::string& def, std::vector<MSLane*> &into,
bool& ok) {
539 std::string laneID = st.
next();
545 WRITE_ERROR(
"An unknown lane ('" + laneID +
"') was tried to be set as incoming to junction '" + junctionID +
"'.");
549 into.push_back(lane);
643 const SUMOReal INVALID_POSITION(-1000000);
657 if (x == INVALID_POSITION || y == INVALID_POSITION) {
660 WRITE_ERROR(
"Lane '" + laneID +
"' to place a poi '" +
id +
"'on is not known.");
688 if (shape.size() != 0) {
690 WRITE_ERROR(
"Polygon '" +
id +
"' already exists.");
701 #ifdef HAVE_INTERNAL_LANES
710 if (request >= 0 && response.length() > 0) {
728 #ifdef HAVE_INTERNAL_LANES
737 if (request >= 0 && response.length() > 0) {
771 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'");
805 WRITE_WARNING(
"Your tls definition contains deprecated minimum/maximum duration attribute; use minDur and maxDur instead.");
815 WRITE_WARNING(
"Your tls definition contains deprecated minimum/maximum duration attribute; use minDur and maxDur instead.");
842 myNet.createMsgEmitter(
id, file,
getFileName(), whatemit, reverse, table, xycoord, step);
868 friendlyPos, splitByType);
966 if (lsaid !=
"<invalid>") {
967 if (toLane ==
"<invalid>") {
971 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
977 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
988 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
1027 frequency, haltingSpeedThreshold, haltingTimeThreshold);
1092 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
1093 excludeEmpty ==
"defaults", withInternal, trackVehicles,
1094 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
1131 #ifdef HAVE_INTERNAL_LANES
1174 std::string laneIndices;
1188 #ifdef HAVE_INTERNAL_LANES
1195 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection");
1200 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection");
1207 MSLane* fromLane = lanes.first;
1208 MSLane* toLane = lanes.second;
1221 "' in connection controlled by '" + tlID +
"'");
1232 #ifdef HAVE_INTERNAL_LANES
1238 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1246 link =
new MSLink(toLane, via, dir, state, length);
1253 link =
new MSLink(toLane, dir, state, length);
1262 logics.
addLink(link, fromLane, tlLinkIdx);
1298 std::pair<MSLane*, MSLane*>
1300 std::string
error =
"Invalid attribute in connection from '" + from->
getID() +
"' to '" + to->
getID() +
"' ";
1302 if (st.
size() == 2) {
1308 if (fromLaneIdx >= 0 && static_cast<unsigned int>(fromLaneIdx) < from->
getLanes().size() &&
1309 toLaneIdx >= 0 &&
static_cast<unsigned int>(toLaneIdx) < to->
getLanes().size()) {
1310 return std::pair<MSLane*, MSLane*>(from->
getLanes()[fromLaneIdx], to->
getLanes()[toLaneIdx]);
1312 error +=
"(invalid index)";
1315 error +=
"(number format)";
1318 error +=
"(malformed)";
1322 return std::pair<MSLane*, MSLane*>(
static_cast<MSLane*
>(0), static_cast<MSLane*>(0));
1372 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {