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) {}
247 if (edge != 0 && from != 0 && to != 0) {
295 WRITE_ERROR(
"Edge '" +
id +
"' has an invalid type.");
379 if (shape.size() < 2) {
380 WRITE_ERROR(
"Shape of lane '" +
id +
"' is broken.\n Can not build according edge.");
392 WRITE_ERROR(
"Another lane with the id '" +
id +
"' exists.");
418 if (shape.size() > 2) {
427 WRITE_ERROR(
"An unknown or invalid junction type occured in junction '" +
id +
"'.");
432 std::vector<MSLane*> incomingLanes;
435 std::vector<MSLane*> internalLanes;
436 #ifdef HAVE_INTERNAL_LANES
447 WRITE_ERROR(e.what() + std::string(
"\n Can not build according junction."));
456 const std::string& def, std::vector<MSLane*>& into,
bool& ok) {
459 std::string laneID = st.
next();
465 WRITE_ERROR(
"An unknown lane ('" + laneID +
"') was tried to be set as incoming to junction '" + junctionID +
"'.");
469 into.push_back(lane);
566 const SUMOReal INVALID_POSITION(-1000000);
588 if (x == INVALID_POSITION || y == INVALID_POSITION) {
593 WRITE_ERROR(
"Lane '" + laneID +
"' to place poi '" +
id +
"' on is not known.");
602 if (lat == INVALID_POSITION || lon == INVALID_POSITION) {
603 WRITE_ERROR(
"Either (x,y), (lon,lat) or (lane,pos) must be specified for poi '" +
id +
"'.");
606 WRITE_ERROR(
"(lon, lat) is specified for poi '" +
id +
"' but no geo-conversion is specified for the network.");
638 if (shape.size() != 0) {
640 WRITE_WARNING(
"Skipping redefinition of polygon '" +
id +
"'.");
654 #ifdef HAVE_INTERNAL_LANES
663 if (request >= 0 && response.length() > 0) {
697 WRITE_ERROR(
"Traffic light '" +
id +
"' has unknown type '" + typeS +
"'");
754 friendlyPos, splitByType);
836 const std::string lsaid = attrs.
getOpt<std::string>(
SUMO_ATTR_TLID,
id.c_str(), ok,
"<invalid>");
837 const std::string toLane = attrs.
getOpt<std::string>(
SUMO_ATTR_TO,
id.c_str(), ok,
"<invalid>");
851 if (lsaid !=
"<invalid>") {
852 if (toLane ==
"<invalid>") {
856 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
862 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
873 haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold,
898 frequency, haltingSpeedThreshold, haltingTimeThreshold);
944 const std::string type = attrs.
getOpt<std::string>(
SUMO_ATTR_TYPE,
id.c_str(), ok,
"performance");
956 excludeEmpty[0] !=
't' && excludeEmpty[0] !=
'T' && excludeEmpty[0] !=
'1' && excludeEmpty[0] !=
'x',
957 excludeEmpty ==
"defaults", withInternal, trackVehicles,
958 maxTravelTime, minSamples, haltingSpeedThreshold, vtypes,
984 #ifdef HAVE_INTERNAL_LANES
990 WRITE_ERROR(
"Unknown from-edge '" + fromID +
"' in connection");
995 WRITE_ERROR(
"Unknown to-edge '" + toID +
"' in connection");
998 if (fromLaneIdx < 0 || static_cast<unsigned int>(fromLaneIdx) >= from->getLanes().size() ||
999 toLaneIdx < 0 || static_cast<unsigned int>(toLaneIdx) >= to->
getLanes().size()) {
1000 WRITE_ERROR(
"Invalid lane index in connection from '" + from->getID() +
"' to '" + to->
getID() +
"'.");
1003 MSLane* fromLane = from->getLanes()[fromLaneIdx];
1013 if (tlLinkIdx < 0 || tlLinkIdx >= (
int)logic->getCurrentPhaseDef().getState().size()) {
1015 "' in connection controlled by '" + tlID +
"'");
1026 #ifdef HAVE_INTERNAL_LANES
1032 "') should be set as a via-lane for lane '" + toLane->
getID() +
"'.");
1037 link =
new MSLink(toLane, via, dir, state, length);
1044 link =
new MSLink(toLane, dir, state, length);
1100 WRITE_WARNING(
"no valid geo projection loaded from network. fcd-output.geo will not work");
1122 sink->
initialize(
new std::vector<MSLane*>());
1128 source->
initialize(
new std::vector<MSLane*>());
1131 for (std::vector<std::string>::const_iterator i = desc.begin(); i != desc.end(); ++i) {
1143 if (shape.size() != 0) {
1182 for (std::vector<std::string>::iterator it = edgeIDs.begin(); it != edgeIDs.end(); ++it) {
1185 WRITE_ERROR(
"Unknown edge '" + (*it) +
"' in roundabout");