61 #ifdef CHECK_MEMORY_LEAKS
63 #endif // CHECK_MEMORY_LEAKS
75 myNet(net), myActionBuilder(net),
76 myCurrentIsInternalToSkip(false),
77 myDetectorBuilder(detBuilder), myTriggerBuilder(triggerBuilder),
78 myEdgeControlBuilder(edgeBuilder), myJunctionControlBuilder(junctionBuilder),
79 myAmInTLLogicMode(false), myCurrentIsBroken(false),
80 myHaveWarnedAboutDeprecatedLanes(false),
81 myLastParameterised(0),
82 myHaveSeenInternalEdge(false) {}
272 WRITE_ERROR(
"Edge '" +
id +
"' has an invalid type.");
348 if (shape.size() < 2) {
349 WRITE_ERROR(
"Shape of lane '" +
id +
"' is broken.\n Can not build according edge.");
361 WRITE_ERROR(
"Another lane with the id '" +
id +
"' exists.");
393 WRITE_ERROR(
"An unknown or invalid junction type occured in junction '" +
id +
"'.");
398 std::vector<MSLane*> incomingLanes;
401 std::vector<MSLane*> internalLanes;
402 #ifdef HAVE_INTERNAL_LANES
413 WRITE_ERROR(e.what() + std::string(
"\n Can not build according junction."));
422 const std::string& def, std::vector<MSLane*>& into,
bool& ok) {
425 std::string laneID = st.
next();
431 WRITE_ERROR(
"An unknown lane ('" + laneID +
"') was tried to be set as incoming to junction '" + junctionID +
"'.");
435 into.push_back(lane);
532 const SUMOReal INVALID_POSITION(-1000000);
554 if (x == INVALID_POSITION || y == INVALID_POSITION) {
559 WRITE_ERROR(
"Lane '" + laneID +
"' to place a poi '" +
id +
"'on is not known.");
568 if (lat == INVALID_POSITION || lon == INVALID_POSITION) {
569 WRITE_ERROR(
"Either (x,y), (lon,lat) or (lane,pos) must be specified for poi '" +
id +
"'.");
572 WRITE_ERROR(
"(lon, lat) is specified for poi '" +
id +
"' but no geo-conversion is specified for the network.");
604 if (shape.size() != 0) {
606 WRITE_ERROR(
"Polygon '" +
id +
"' already exists.");
620 #ifdef HAVE_INTERNAL_LANES
629 if (request >= 0 && response.length() > 0) {
663 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'");
720 friendlyPos, splitByType);
802 const std::string lsaid = attrs.
getOpt<std::string>(
SUMO_ATTR_TLID,
id.c_str(), ok,
"<invalid>");
803 const std::string toLane = attrs.
getOpt<std::string>(
SUMO_ATTR_TO,
id.c_str(), ok,
"<invalid>");
817 if (lsaid !=
"<invalid>") {
818 if (toLane ==
"<invalid>") {
822 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
828 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
839 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
864 frequency, haltingSpeedThreshold, haltingTimeThreshold);
910 const std::string type = attrs.
getOpt<std::string>(
SUMO_ATTR_TYPE,
id.c_str(), ok,
"performance");
922 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
923 excludeEmpty ==
"defaults", withInternal, trackVehicles,
924 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
950 #ifdef HAVE_INTERNAL_LANES
956 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection");
961 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection");
964 if (fromLaneIdx < 0 || static_cast<unsigned int>(fromLaneIdx) >= from->getLanes().size() ||
965 toLaneIdx < 0 || static_cast<unsigned int>(toLaneIdx) >= to->
getLanes().size()) {
966 WRITE_ERROR(
"Invalid lane index in connection from '" + from->getID() +
"' to '" + to->
getID() +
"'.");
969 MSLane* fromLane = from->getLanes()[fromLaneIdx];
979 if (tlLinkIdx < 0 || tlLinkIdx >= (
int)logic->getCurrentPhaseDef().getState().size()) {
981 "' in connection controlled by '" + tlID +
"'");
992 #ifdef HAVE_INTERNAL_LANES
998 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1003 link =
new MSLink(toLane, via, dir, state, length);
1010 link =
new MSLink(toLane, dir, state, length);
1066 WRITE_WARNING(
"no valid geo projection loaded from network. fcd-output.geo will not work");
1088 sink->
initialize(
new std::vector<MSLane*>());
1094 source->
initialize(
new std::vector<MSLane*>());
1097 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {