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 myAmInTLLogicMode(false), myCurrentIsBroken(false),
81 myHaveWarnedAboutDeprecatedLanes(false), myLastParameterised(0) {}
130 case SUMO_TAG_MSG_EMITTER:
131 addMsgEmitter(attrs);
275 WRITE_ERROR(
"Edge '" +
id +
"' has an invalid type.");
351 if (shape.size() < 2) {
352 WRITE_ERROR(
"Shape of lane '" +
id +
"' is broken.\n Can not build according edge.");
364 WRITE_ERROR(
"Another lane with the id '" +
id +
"' exists.");
396 WRITE_ERROR(
"An unknown or invalid junction type occured in junction '" +
id +
"'.");
401 std::vector<MSLane*> incomingLanes;
404 std::vector<MSLane*> internalLanes;
405 #ifdef HAVE_INTERNAL_LANES
416 WRITE_ERROR(e.what() + std::string(
"\n Can not build according junction."));
425 const std::string& def, std::vector<MSLane*>& into,
bool& ok) {
428 std::string laneID = st.
next();
434 WRITE_ERROR(
"An unknown lane ('" + laneID +
"') was tried to be set as incoming to junction '" + junctionID +
"'.");
438 into.push_back(lane);
535 const SUMOReal INVALID_POSITION(-1000000);
557 if (x == INVALID_POSITION || y == INVALID_POSITION) {
562 WRITE_ERROR(
"Lane '" + laneID +
"' to place a poi '" +
id +
"'on is not known.");
571 if (lat == INVALID_POSITION || lon == INVALID_POSITION) {
572 WRITE_ERROR(
"Either (x,y), (lon,lat) or (lane,pos) must be specified for poi '" +
id +
"'.");
575 WRITE_ERROR(
"(lon, lat) is specified for poi '" +
id +
"' but no geo-conversion is specified for the network.");
607 if (shape.size() != 0) {
609 WRITE_ERROR(
"Polygon '" +
id +
"' already exists.");
623 #ifdef HAVE_INTERNAL_LANES
632 if (request >= 0 && response.length() > 0) {
666 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'");
714 bool reverse = attrs.
getOpt<
bool>(SUMO_ATTR_REVERSE, 0, ok,
false);
715 bool table = attrs.
getOpt<
bool>(SUMO_ATTR_TABLE, 0, ok,
false);
716 bool xycoord = attrs.
getOpt<
bool>(SUMO_ATTR_XY, 0, ok,
false);
717 std::string whatemit = attrs.
get<std::string>(SUMO_ATTR_EVENTS, 0, ok);
721 myNet.createMsgEmitter(
id, file,
getFileName(), whatemit, reverse, table, xycoord, step);
746 friendlyPos, splitByType);
828 const std::string lsaid = attrs.
getOpt<std::string>(
SUMO_ATTR_TLID,
id.c_str(), ok,
"<invalid>");
829 const std::string toLane = attrs.
getOpt<std::string>(
SUMO_ATTR_TO,
id.c_str(), ok,
"<invalid>");
843 if (lsaid !=
"<invalid>") {
844 if (toLane ==
"<invalid>") {
848 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
854 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
865 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
890 frequency, haltingSpeedThreshold, haltingTimeThreshold);
936 const std::string type = attrs.
getOpt<std::string>(
SUMO_ATTR_TYPE,
id.c_str(), ok,
"performance");
948 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
949 excludeEmpty ==
"defaults", withInternal, trackVehicles,
950 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
976 #ifdef HAVE_INTERNAL_LANES
982 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection");
987 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection");
990 if (fromLaneIdx < 0 || static_cast<unsigned int>(fromLaneIdx) >= from->getLanes().size() ||
991 toLaneIdx < 0 || static_cast<unsigned int>(toLaneIdx) >= to->
getLanes().size()) {
992 WRITE_ERROR(
"Invalid lane index in connection from '" + from->getID() +
"' to '" + to->
getID() +
"'.");
995 MSLane* fromLane = from->getLanes()[fromLaneIdx];
1005 if (tlLinkIdx < 0 || tlLinkIdx >= (
int)logic->getCurrentPhaseDef().getState().size()) {
1007 "' in connection controlled by '" + tlID +
"'");
1018 #ifdef HAVE_INTERNAL_LANES
1024 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1029 link =
new MSLink(toLane, via, dir, state, length);
1036 link =
new MSLink(toLane, dir, state, length);
1092 WRITE_WARNING(
"no valid geo projection loaded from network. fcd-output.geo will not work");
1114 sink->
initialize(
new std::vector<MSLane*>());
1120 source->
initialize(
new std::vector<MSLane*>());
1123 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {