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) {}
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_WARNING(
"Skipping redefinition of polygon '" +
id +
"'.");
623 #ifdef HAVE_INTERNAL_LANES
632 if (request >= 0 && response.length() > 0) {
666 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'");
723 friendlyPos, splitByType);
805 const std::string lsaid = attrs.
getOpt<std::string>(
SUMO_ATTR_TLID,
id.c_str(), ok,
"<invalid>");
806 const std::string toLane = attrs.
getOpt<std::string>(
SUMO_ATTR_TO,
id.c_str(), ok,
"<invalid>");
820 if (lsaid !=
"<invalid>") {
821 if (toLane ==
"<invalid>") {
825 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
831 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
842 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
867 frequency, haltingSpeedThreshold, haltingTimeThreshold);
913 const std::string type = attrs.
getOpt<std::string>(
SUMO_ATTR_TYPE,
id.c_str(), ok,
"performance");
925 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
926 excludeEmpty ==
"defaults", withInternal, trackVehicles,
927 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
953 #ifdef HAVE_INTERNAL_LANES
959 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection");
964 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection");
967 if (fromLaneIdx < 0 || static_cast<unsigned int>(fromLaneIdx) >= from->getLanes().size() ||
968 toLaneIdx < 0 || static_cast<unsigned int>(toLaneIdx) >= to->
getLanes().size()) {
969 WRITE_ERROR(
"Invalid lane index in connection from '" + from->getID() +
"' to '" + to->
getID() +
"'.");
972 MSLane* fromLane = from->getLanes()[fromLaneIdx];
982 if (tlLinkIdx < 0 || tlLinkIdx >= (
int)logic->getCurrentPhaseDef().getState().size()) {
984 "' in connection controlled by '" + tlID +
"'");
995 #ifdef HAVE_INTERNAL_LANES
1001 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1006 link =
new MSLink(toLane, via, dir, state, length);
1013 link =
new MSLink(toLane, dir, state, length);
1069 WRITE_WARNING(
"no valid geo projection loaded from network. fcd-output.geo will not work");
1091 sink->
initialize(
new std::vector<MSLane*>());
1097 source->
initialize(
new std::vector<MSLane*>());
1100 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {
1112 if (shape.size() != 0) {
1151 for (std::vector<std::string>::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
1154 WRITE_ERROR(
"Unknown edge '" + (*it) +
"' in roundabout");