71 myUndoAdditionals(undoAdditionals),
72 myAdditionalParent(additionalParent) {
73 if (additionalParent) {
212 const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
213 double begin = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_BEGIN, abort);
214 double end = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_END, abort);
215 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_NAME, abort);
221 if (edge ==
nullptr) {
225 }
else if (begin > end) {
239 const std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
242 std::vector<std::string> edgeIDs;
244 std::string parsedAttribute = attrs.get<std::string>(
SUMO_ATTR_EDGES,
id.c_str(), abort,
false);
245 edgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> >(parsedAttribute);
248 std::vector<GNEEdge*> edges;
249 for (
auto i : edgeIDs) {
251 if (edge ==
nullptr) {
255 edges.push_back(edge);
275 const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
276 const double departWeight = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, edgeID, tag,
SUMO_ATTR_WEIGHT, abort);
283 if (edge ==
nullptr) {
285 }
else if (TAZ ==
nullptr) {
299 const std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
300 const double arrivalWeight = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, edgeID, tag,
SUMO_ATTR_WEIGHT, abort);
307 if (edge ==
nullptr) {
309 }
else if (TAZ ==
nullptr) {
323 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
324 std::string edgeId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_EDGE, abort);
325 std::string freq = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FREQUENCY, abort);
326 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
327 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
328 double begin = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_BEGIN, abort);
336 }
else if (edge ==
nullptr) {
338 WRITE_WARNING(
"The edge '" + edgeId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
341 if (GNEAttributeCarrier::canParse<double>(freq)) {
342 if (GNEAttributeCarrier::parse<double>(freq) < 0) {
363 std::string routeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
364 std::string edgeIDs = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, routeID, tag,
SUMO_ATTR_EDGES, abort);
365 RGBColor color = GNEAttributeCarrier::parseAttributeFromXML<RGBColor>(attrs, routeID, tag,
SUMO_ATTR_COLOR, abort);
369 std::vector<GNEEdge*> edges;
371 edges = GNEAttributeCarrier::parse<std::vector<GNEEdge*> >(
myViewNet->
getNet(), edgeIDs);
376 }
else if (edges.size() == 0) {
390 std::string vehicleTypeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
391 double accel = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_ACCEL, abort);
392 double decel = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_DECEL, abort);
393 double sigma = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_SIGMA, abort);
394 double tau = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_TAU, abort);
395 double length = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_LENGTH, abort);
396 double minGap = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_MINGAP, abort);
397 double maxSpeed = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_MAXSPEED, abort);
398 double speedFactor = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_SPEEDFACTOR, abort);
399 double speedDev = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_SPEEDDEV, abort);
400 RGBColor color = GNEAttributeCarrier::parseAttributeFromXML<RGBColor>(attrs, vehicleTypeID, tag,
SUMO_ATTR_COLOR, abort);
402 std::string emissionClass = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, vehicleTypeID, tag,
SUMO_ATTR_EMISSIONCLASS, abort);
404 double width = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_WIDTH, abort);
405 std::string filename = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, vehicleTypeID, tag,
SUMO_ATTR_IMGFILE, abort);
406 double impatience = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_IMPATIENCE, abort);
407 std::string laneChangeModel = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, vehicleTypeID, tag,
SUMO_ATTR_LANE_CHANGE_MODEL, abort);
408 std::string carFollowModel = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, vehicleTypeID, tag,
SUMO_ATTR_CAR_FOLLOW_MODEL, abort);
409 int personCapacity = GNEAttributeCarrier::parseAttributeFromXML<int>(attrs, vehicleTypeID, tag,
SUMO_ATTR_PERSON_CAPACITY, abort);
410 int containerCapacity = GNEAttributeCarrier::parseAttributeFromXML<int>(attrs, vehicleTypeID, tag,
SUMO_ATTR_CONTAINER_CAPACITY, abort);
411 double boardingDuration = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_BOARDING_DURATION, abort);
412 double loadingDuration = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_LOADING_DURATION, abort);
413 std::string latAlignment = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, vehicleTypeID, tag,
SUMO_ATTR_LATALIGNMENT, abort);
414 double minGapLat = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_MINGAP_LAT, abort);
415 double maxSpeedLat = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, vehicleTypeID, tag,
SUMO_ATTR_MAXSPEED_LAT, abort);
423 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildVehicleType(
myViewNet,
true, vehicleTypeID, accel, decel, sigma, tau, length, minGap, maxSpeed, speedFactor, speedDev, color, vClass, emissionClass, shape, width,
424 filename, impatience, laneChangeModel, carFollowModel, personCapacity, containerCapacity, boardingDuration, loadingDuration, latAlignment, minGapLat, maxSpeedLat));
434 std::string vehicleTypeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_TYPE, abort);
435 std::string routeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ROUTE, abort);
436 std::string vehsPerHour = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_VEHSPERHOUR, abort);
437 std::string speed = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_SPEED, abort);
439 std::string departLane = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DEPARTLANE, abort);
440 std::string departPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DEPARTPOS, abort);
441 std::string departSpeed = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DEPARTSPEED, abort);
442 std::string arrivalLane = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ARRIVALLANE, abort);
443 std::string arrivalPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ARRIVALPOS, abort);
444 std::string arrivalSpeed = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ARRIVALSPEED, abort);
445 std::string line = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_LINE, abort);
446 int personNumber = GNEAttributeCarrier::parseAttributeFromXML<int>(attrs,
"", tag,
SUMO_ATTR_PERSON_NUMBER, abort);
448 bool reroute = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs,
"", tag,
SUMO_ATTR_REROUTE, abort);
449 std::string departPosLat = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DEPARTPOS_LAT, abort);
450 std::string arrivalPosLat = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ARRIVALPOS_LAT, abort);
451 double begin = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_BEGIN, abort);
452 double end = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_END, abort);
460 if (route ==
nullptr) {
463 }
else if (vtype ==
nullptr) {
466 }
else if ((vehsPerHour.empty()) && (speed.empty())) {
469 }
else if (calibrator !=
nullptr) {
471 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildCalibratorFlow(
myViewNet,
true, calibrator, route, vtype, vehsPerHour, speed, color, departLane, departPos, departSpeed, arrivalLane, arrivalPos, arrivalSpeed,
472 line, personNumber, containerNumber, reroute, departPosLat, arrivalPosLat, begin, end));
489 WRITE_WARNING(
"Error parsing key from additional generic parameter. Key cannot be empty");
493 WRITE_WARNING(
"Error parsing key from additional generic parameter. Key contains invalid characters");
497 WRITE_WARNING(
"Error parsing key from additional generic parameter. Key doesn't exist");
503 WRITE_WARNING(
"Error parsing value from additional generic parameter. Value contains invalid characters");
515 WRITE_WARNING(
"Generic Parameters has to be declared within the definition of an additional element");
524 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
525 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
526 GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
527 std::string lanesIDs = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANES, abort);
532 std::vector<GNELane*> lanes;
534 lanes = GNEAttributeCarrier::parse<std::vector<GNELane*> >(
myViewNet->
getNet(), lanesIDs);
539 }
else if (lanes.size() == 0) {
540 WRITE_WARNING(
"A Variable Speed Sign needs at least one lane.");
552 double time = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_TIME, abort);
553 double speed = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_SPEED, abort);
559 if (variableSpeedSign !=
nullptr) {
571 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
572 std::string edgesIDs = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_EDGES, abort);
573 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
574 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
575 double probability = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_PROB, abort);
576 bool off = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_OFF, abort);
578 const std::string vTypes = attrs.getOpt<std::string>(
SUMO_ATTR_VTYPES,
id.c_str(), abort,
"");
583 std::vector<GNEEdge*> edges;
585 edges = GNEAttributeCarrier::parse<std::vector<GNEEdge*> >(
myViewNet->
getNet(), edgesIDs);
590 }
else if (edges.size() == 0) {
594 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildRerouter(
myViewNet,
myUndoAdditionals,
id, pos, edges, probability, name, file, off, timeThreshold, vTypes,
false));
604 double begin = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_BEGIN, abort);
605 double end = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_END, abort);
611 if (rerouter ==
nullptr) {
613 if (lastInsertedRerouterInterval) {
620 }
else if (rerouter !=
nullptr) {
632 std::string laneID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
633 std::string allow = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ALLOW, abort);
634 std::string disallow = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DISALLOW, abort);
641 if (lane ==
nullptr) {
643 }
else if (rerouterInterval !=
nullptr) {
655 std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
656 std::string allow = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ALLOW, abort);
657 std::string disallow = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_DISALLOW, abort);
664 if (edge ==
nullptr) {
666 }
else if (rerouterInterval !=
nullptr) {
678 std::string edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
679 double probability = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_PROB, abort);
686 if (edge ==
nullptr) {
688 }
else if (rerouterInterval !=
nullptr) {
700 std::string parkingAreaID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
701 double probability = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_PROB, abort);
702 bool visible = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs,
"", tag,
SUMO_ATTR_VISIBLE, abort);
709 if (parkingArea ==
nullptr) {
710 WRITE_WARNING(
"The parkingArea '" + parkingAreaID +
"' to use within the " +
toString(tag) +
" is not known.");
711 }
else if (rerouterInterval !=
nullptr) {
723 std::string routeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
724 double probability = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_PROB, abort);
730 if (rerouterInterval !=
nullptr) {
742 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
743 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
744 std::string startPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_STARTPOS, abort);
745 std::string endPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ENDPOS, abort);
746 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
747 std::vector<std::string> lines = GNEAttributeCarrier::parseAttributeFromXML<std::vector<std::string> >(attrs, id, tag,
SUMO_ATTR_LINES, abort);
748 bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
756 }
else if (lane ==
nullptr) {
758 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
774 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
775 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
776 std::string startPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_STARTPOS, abort);
777 std::string endPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ENDPOS, abort);
778 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
779 std::vector<std::string> lines = GNEAttributeCarrier::parseAttributeFromXML<std::vector<std::string> >(attrs, id, tag,
SUMO_ATTR_LINES, abort);
780 bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
788 }
else if (lane ==
nullptr) {
790 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
806 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_LANE, abort);
807 std::string position = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_POSITION, abort);
808 std::string length = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_LENGTH, abort);
809 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs,
"", tag,
SUMO_ATTR_FRIENDLY_POS, abort);
812 double posDouble = GNEAttributeCarrier::parse<double>(position);
817 if (lane ==
nullptr) {
819 }
else if (busStop ==
nullptr) {
824 WRITE_WARNING(
"Edge '" + lane->getParentEdge().getID() +
"' already has an Access for busStop '" + busStop->
getID() +
"'");
837 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
838 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
839 std::string startPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_STARTPOS, abort);
840 std::string endPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ENDPOS, abort);
841 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
842 double chargingPower = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_CHARGINGPOWER, abort);
843 double efficiency = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_EFFICIENCY, abort);
844 bool chargeInTransit = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_CHARGEINTRANSIT, abort);
845 double chargeDelay = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_CHARGEDELAY, abort);
846 bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
854 }
else if (lane ==
nullptr) {
856 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
862 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildChargingStation(
myViewNet,
myUndoAdditionals,
id, lane, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPosition,
false));
872 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
873 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
874 std::string startPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_STARTPOS, abort);
875 std::string endPos = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ENDPOS, abort);
876 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
877 bool friendlyPosition = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
879 bool onRoad = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_ONROAD, abort);
880 double width = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_WIDTH, abort);
881 std::string length = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LENGTH, abort);
882 double angle = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_ANGLE, abort);
890 }
else if (lane ==
nullptr) {
892 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
898 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildParkingArea(
myViewNet,
myUndoAdditionals,
id, lane, startPos, endPos, name, friendlyPosition, roadSideCapacity, onRoad, width, length, angle,
false));
909 double width = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_WIDTH, abort);
910 double length = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_LENGTH, abort);
911 double angle = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_ANGLE, abort);
917 if (parkingAreaParent !=
nullptr) {
929 std::string edgeID, laneId, id;
934 id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", typeOfCalibrator,
SUMO_ATTR_ID, abort);
935 edgeID = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, typeOfCalibrator,
SUMO_ATTR_EDGE, abort);
936 std::string outfile = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, typeOfCalibrator,
SUMO_ATTR_OUTPUT, abort);
937 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, typeOfCalibrator,
SUMO_ATTR_POSITION, abort);
938 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
939 double freq = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, typeOfCalibrator,
SUMO_ATTR_FREQUENCY, abort);
940 std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ROUTEPROBE, abort);
948 }
else if (edge ==
nullptr) {
949 WRITE_WARNING(
"The edge '" + edgeID +
"' to use within the " +
toString(typeOfCalibrator) +
" '" +
id +
"' is not known.");
957 id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", typeOfCalibrator,
SUMO_ATTR_ID, abort);
958 laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, typeOfCalibrator,
SUMO_ATTR_LANE, abort);
959 std::string outfile = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, typeOfCalibrator,
SUMO_ATTR_OUTPUT, abort);
960 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, typeOfCalibrator,
SUMO_ATTR_POSITION, abort);
961 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
962 double freq = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, typeOfCalibrator,
SUMO_ATTR_FREQUENCY, abort);
963 std::string routeProbe = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_ROUTEPROBE, abort);
971 }
else if (lane ==
nullptr) {
972 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(typeOfCalibrator) +
" '" +
id +
"' is not known.");
988 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
989 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
990 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_POSITION, abort);
991 double frequency = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_FREQUENCY, abort);
992 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
993 std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_VTYPES, abort);
994 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
995 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
1003 }
else if (lane ==
nullptr) {
1005 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
1010 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildDetectorE1(
myViewNet,
myUndoAdditionals,
id, lane, position, frequency, file, vehicleTypes, name, friendlyPos,
false));
1022 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", E2Tag,
SUMO_ATTR_ID, abort);
1030 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, E2Tag,
SUMO_ATTR_POSITION, abort);
1031 double frequency = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, E2Tag,
SUMO_ATTR_FREQUENCY, abort);
1032 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, E2Tag,
SUMO_ATTR_FILE, abort);
1033 std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, E2Tag,
SUMO_ATTR_VTYPES, abort);
1034 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, E2Tag,
SUMO_ATTR_NAME, abort);
1038 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, E2Tag,
SUMO_ATTR_FRIENDLY_POS, abort);
1040 GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, E2Tag,
SUMO_ATTR_CONT, abort);
1044 if(laneId.empty() && laneIds.empty()) {
1050 std::vector<GNELane*> lanes;
1051 bool laneConsecutives =
true;
1053 lanes = GNEAttributeCarrier::parse<std::vector<GNELane*> >(
myViewNet->
getNet(), laneIds);
1061 }
else if (attrs.hasAttribute(
SUMO_ATTR_LANE) && (lane ==
nullptr)) {
1063 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(E2Tag) +
" '" +
id +
"' is not known.");
1069 WRITE_WARNING(
"The list of lanes '" + laneIds +
"' to use within the " +
toString(E2Tag) +
" '" +
id +
"' isn't valid.");
1070 }
else if (!lanes.empty() && !laneConsecutives) {
1071 WRITE_WARNING(
"The lanes '" + laneIds +
"' to use within the " +
toString(E2Tag) +
" '" +
id +
"' aren't consecutives.");
1074 }
else if (!lanes.empty() && !
fixE2DetectorPosition(position, length, lanes.front()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) {
1076 }
else if (!lanes.empty() && !
fixE2DetectorPosition(endPos, length, lanes.back()->getParentEdge().getNBEdge()->getFinalLength(), friendlyPos)) {
1080 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildSingleLaneDetectorE2(
myViewNet,
myUndoAdditionals,
id, lane, position, length, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos,
false));
1083 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildMultiLaneDetectorE2(
myViewNet,
myUndoAdditionals,
id, lanes, position, endPos, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold, jamDistThreshold, friendlyPos,
false));
1094 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
1095 double frequency = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_FREQUENCY, abort);
1096 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
1097 std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_VTYPES, abort);
1098 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
1109 myHierarchyInsertedAdditionals.
commitElementInsertion(
buildDetectorE3(
myViewNet,
myUndoAdditionals,
id, pos, frequency, file, vehicleTypes, name, haltingTimeThreshold, haltingSpeedThreshold,
false));
1119 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_LANE, abort);
1120 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_POSITION, abort);
1121 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs,
"", tag,
SUMO_ATTR_FRIENDLY_POS, abort);
1128 if (lane ==
nullptr) {
1132 }
else if (E3Parent) {
1144 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_LANE, abort);
1145 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs,
"", tag,
SUMO_ATTR_POSITION, abort);
1146 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs,
"", tag,
SUMO_ATTR_FRIENDLY_POS, abort);
1153 if (lane ==
nullptr) {
1157 }
else if (E3Parent) {
1169 std::string
id = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs,
"", tag,
SUMO_ATTR_ID, abort);
1170 std::string laneId = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_LANE, abort);
1171 double position = GNEAttributeCarrier::parseAttributeFromXML<double>(attrs, id, tag,
SUMO_ATTR_POSITION, abort);
1172 std::string file = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_FILE, abort);
1173 std::string vehicleTypes = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_VTYPES, abort);
1174 std::string name = GNEAttributeCarrier::parseAttributeFromXML<std::string>(attrs, id, tag,
SUMO_ATTR_NAME, abort);
1175 bool friendlyPos = GNEAttributeCarrier::parseAttributeFromXML<bool>(attrs, id, tag,
SUMO_ATTR_FRIENDLY_POS, abort);
1183 }
else if (lane ==
nullptr) {
1185 WRITE_WARNING(
"The lane '" + laneId +
"' to use within the " +
toString(tag) +
" '" +
id +
"' is not known.");
1207 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(values[
SUMO_ATTR_LINES]);
1212 return buildBusStop(viewNet, allowUndoRedo,
id, lane, startPos, endPos, name, lines, friendlyPos, blockMovement);
1227 if (lane && busStop) {
1229 return buildAccess(viewNet, allowUndoRedo, busStop, lane, pos, length, friendlyPos, blockMovement);
1245 std::vector<std::string> lines = GNEAttributeCarrier::parse<std::vector<std::string> >(values[
SUMO_ATTR_LINES]);
1250 return buildContainerStop(viewNet, allowUndoRedo,
id, lane, startPos, endPos, name, lines, friendlyPos, blockMovement);
1270 return buildChargingStation(viewNet, allowUndoRedo,
id, lane, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPos, blockMovement);
1285 double width = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_WIDTH]);
1287 double angle = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_ANGLE]);
1291 return buildParkingArea(viewNet, allowUndoRedo,
id, lane, startPos, endPos, name, friendlyPos, roadSideCapacity, onRoad, width, lenght, angle, blockMovement);
1299 double width = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_WIDTH]);
1300 double lenght = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_LENGTH]);
1301 double angle = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_ANGLE]);
1305 return buildParkingSpace(viewNet, allowUndoRedo, parkingArea, pos, width, lenght, angle, blockMovement);
1320 return buildDetectorE1(viewNet, allowUndoRedo,
id, lane, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement);
1331 double length = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_LENGTH]);
1342 return buildSingleLaneDetectorE2(viewNet, allowUndoRedo,
id, lane, pos, length, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement);
1350 std::vector<GNELane*> lanes = GNEAttributeCarrier::parse<std::vector<GNELane*> >(viewNet->
getNet(), values[
SUMO_ATTR_LANES]);
1352 double endPos = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_ENDPOS]);
1363 if (lanes.size() > 0) {
1364 return buildMultiLaneDetectorE2(viewNet, allowUndoRedo,
id, lanes, pos, endPos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement);
1381 return buildDetectorE3(viewNet, allowUndoRedo,
id, pos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, blockMovement);
1392 return buildDetectorEntry(viewNet, allowUndoRedo, E3, lane, pos, friendlyPos, blockMovement);
1406 return buildDetectorExit(viewNet, allowUndoRedo, E3, lane, pos, friendlyPos, blockMovement);
1423 return buildDetectorE1Instant(viewNet, allowUndoRedo,
id, lane, pos, filename, vehicleTypes, name, friendlyPos, blockMovement);
1432 std::vector<GNELane*> lanes = GNEAttributeCarrier::parse<std::vector<GNELane*> >(viewNet->
getNet(), values[
SUMO_ATTR_LANES]);
1451 return buildCalibrator(viewNet, allowUndoRedo,
id, edge, pos, name, outfile, freq, routeProbe);
1468 return buildCalibrator(viewNet, allowUndoRedo,
id, lane, pos, name, outfile, freq, routeProbe);
1477 std::vector<GNEEdge*> edges = GNEAttributeCarrier::parse<std::vector<GNEEdge*> >(viewNet->
getNet(), values[
SUMO_ATTR_EDGES]);
1479 bool off = GNEAttributeCarrier::parse<bool>(values[
SUMO_ATTR_OFF]);
1480 double prob = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_PROB]);
1487 return buildRerouter(viewNet, allowUndoRedo,
id, pos, edges, prob, name, file, off, timeThreshold, vTypes, blockMovement);
1496 double begin = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_BEGIN]);
1499 return buildRouteProbe(viewNet, allowUndoRedo,
id, edge, freq, name, filename, begin);
1507 double begin = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_BEGIN]);
1508 double end = GNEAttributeCarrier::parse<double>(values[
SUMO_ATTR_END]);
1515 return buildVaporizer(viewNet, allowUndoRedo, edge, begin, end, name);
1527 std::vector<std::string> edgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> >(values[
SUMO_ATTR_EDGES]);
1530 std::vector<GNEEdge*> edges;
1531 for (
auto i : edgeIDs) {
1533 if (edge ==
nullptr) {
1537 edges.push_back(edge);
1541 return buildTAZ(viewNet, allowUndoRedo,
id, shape, color, edges, blockMovement);
1550 GNEAdditionalHandler::buildBusStop(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
const std::string& startPos,
const std::string& endPos,
const std::string& name,
const std::vector<std::string>& lines,
bool friendlyPosition,
bool blockMovement) {
1552 GNEBusStop* busStop =
new GNEBusStop(
id, lane, viewNet, startPos, endPos, name, lines, friendlyPosition, blockMovement);
1553 if (allowUndoRedo) {
1560 busStop->
incRef(
"buildBusStop");
1572 if (lane ==
nullptr) {
1574 }
else if (busStop ==
nullptr) {
1579 GNEAccess* access =
new GNEAccess(busStop, lane, viewNet, pos, length, friendlyPos, blockMovement);
1580 if (allowUndoRedo) {
1588 access->
incRef(
"buildAccess");
1599 if (allowUndoRedo) {
1606 containerStop->
incRef(
"buildContainerStop");
1608 return containerStop;
1617 double chargingPower,
double efficiency,
bool chargeInTransit,
double chargeDelay,
bool friendlyPosition,
bool blockMovement) {
1619 GNEChargingStation* chargingStation =
new GNEChargingStation(
id, lane, viewNet, startPos, endPos, name, chargingPower, efficiency, chargeInTransit, chargeDelay, friendlyPosition, blockMovement);
1620 if (allowUndoRedo) {
1627 chargingStation->
incRef(
"buildChargingStation");
1629 return chargingStation;
1638 bool friendlyPosition,
int roadSideCapacity,
bool onRoad,
double width,
const std::string& length,
double angle,
bool blockMovement) {
1640 GNEParkingArea* parkingArea =
new GNEParkingArea(
id, lane, viewNet, startPos, endPos, name, friendlyPosition, roadSideCapacity, onRoad, width, length, angle, blockMovement);
1641 if (allowUndoRedo) {
1648 parkingArea->
incRef(
"buildParkingArea");
1660 if (allowUndoRedo) {
1667 parkingSpace->
incRef(
"buildParkingSpace");
1669 return parkingSpace;
1674 GNEAdditionalHandler::buildDetectorE1(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
GNELane* lane,
double pos,
double freq,
const std::string& filename,
const std::string& vehicleTypes,
const std::string& name,
bool friendlyPos,
bool blockMovement) {
1676 GNEDetectorE1* detectorE1 =
new GNEDetectorE1(
id, lane, viewNet, pos, freq, filename, vehicleTypes, name, friendlyPos, blockMovement);
1677 if (allowUndoRedo) {
1684 detectorE1->
incRef(
"buildDetectorE1");
1695 const std::string& vehicleTypes,
const std::string& name,
const double timeThreshold,
double speedThreshold,
double jamThreshold,
bool friendlyPos,
bool blockMovement) {
1697 GNEDetectorE2* detectorE2 =
new GNEDetectorE2(
id, lane, viewNet, pos, length, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement);
1698 if (allowUndoRedo) {
1705 detectorE2->
incRef(
"buildDetectorE2");
1716 const std::string& vehicleTypes,
const std::string& name,
const double timeThreshold,
double speedThreshold,
double jamThreshold,
bool friendlyPos,
bool blockMovement) {
1718 GNEDetectorE2* detectorE2 =
new GNEDetectorE2(
id, lanes, viewNet, pos, endPos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, jamThreshold, friendlyPos, blockMovement);
1719 if (allowUndoRedo) {
1725 for (
auto i : lanes) {
1726 i->addAdditionalChild(detectorE2);
1728 detectorE2->
incRef(
"buildDetectorE2Multilane");
1741 const std::string& name,
const double timeThreshold,
double speedThreshold,
bool blockMovement) {
1743 GNEDetectorE3* detectorE3 =
new GNEDetectorE3(
id, viewNet, pos, freq, filename, vehicleTypes, name, timeThreshold, speedThreshold, blockMovement);
1744 if (allowUndoRedo) {
1750 detectorE3->
incRef(
"buildDetectorE3");
1762 if (lane ==
nullptr) {
1764 }
else if (E3Parent ==
nullptr) {
1768 if (allowUndoRedo) {
1776 entry->
incRef(
"buildDetectorEntry");
1786 if (lane ==
nullptr) {
1788 }
else if (E3Parent ==
nullptr) {
1792 if (allowUndoRedo) {
1800 exit->
incRef(
"buildDetectorExit");
1811 if (allowUndoRedo) {
1818 detectorE1Instant->
incRef(
"buildDetectorE1Instant");
1820 return detectorE1Instant;
1831 if (allowUndoRedo) {
1840 calibrator->
incRef(
"buildCalibrator");
1853 if (allowUndoRedo) {
1862 calibrator->
incRef(
"buildCalibrator");
1876 if (allowUndoRedo) {
1882 route->
incRef(
"buildCalibratorRoute");
1894 double accel,
double decel,
double sigma,
double tau,
double length,
double minGap,
double maxSpeed,
1895 double speedFactor,
double speedDev,
const RGBColor& color,
SUMOVehicleClass vClass,
const std::string& emissionClass,
1896 SUMOVehicleShape shape,
double width,
const std::string& filename,
double impatience,
const std::string& laneChangeModel,
1897 const std::string& carFollowModel,
int personCapacity,
int containerCapacity,
double boardingDuration,
1898 double loadingDuration,
const std::string& latAlignment,
double minGapLat,
double maxSpeedLat) {
1902 speedFactor, speedDev, color, vClass, emissionClass, shape, width, filename, impatience,
1903 laneChangeModel, carFollowModel, personCapacity, containerCapacity, boardingDuration,
1904 loadingDuration, latAlignment, minGapLat, maxSpeedLat);
1905 if (allowUndoRedo) {
1911 vType->
incRef(
"buildCalibratorVehicleType");
1922 const std::string& vehsPerHour,
const std::string& speed,
const RGBColor& color,
const std::string& departLane,
const std::string& departPos,
1923 const std::string& departSpeed,
const std::string& arrivalLane,
const std::string& arrivalPos,
const std::string& arrivalSpeed,
const std::string& line,
1924 int personNumber,
int containerNumber,
bool reroute,
const std::string& departPosLat,
const std::string& arrivalPosLat,
double begin,
double end) {
1928 arrivalLane, arrivalPos, arrivalSpeed, line, personNumber, containerNumber, reroute,
1929 departPosLat, arrivalPosLat, begin, end);
1930 if (allowUndoRedo) {
1936 flow->
incRef(
"buildCalibratorFlow");
1943 GNEAdditionalHandler::buildRerouter(
GNEViewNet* viewNet,
bool allowUndoRedo,
const std::string&
id,
Position pos,
const std::vector<GNEEdge*>& edges,
double prob,
const std::string& name,
const std::string& file,
bool off,
double timeThreshold,
const std::string& vTypes,
bool blockMovement) {
1945 GNERerouter* rerouter =
new GNERerouter(
id, viewNet, pos, edges, name, file, prob, off, timeThreshold, vTypes, blockMovement);
1946 if (allowUndoRedo) {
1953 for (
auto i : edges) {
1954 i->addAdditionalParent(rerouter);
1956 rerouter->
incRef(
"buildRerouter");
1959 if (!file.empty()) {
1963 GNEAdditionalHandler rerouterValuesHandler(currentAdditionalFilename + file, viewNet, allowUndoRedo, rerouter);
1986 if (allowUndoRedo) {
1992 rerouterInterval->
incRef(
"buildRerouterInterval");
1994 return rerouterInterval;
2006 if (allowUndoRedo) {
2012 closingLaneReroute->
incRef(
"buildClosingLaneReroute");
2014 return closingLaneReroute;
2023 if (allowUndoRedo) {
2029 closingReroute->
incRef(
"buildClosingReroute");
2031 return closingReroute;
2040 if (allowUndoRedo) {
2046 destProbReroute->
incRef(
"builDestProbReroute");
2048 return destProbReroute;
2057 if (allowUndoRedo) {
2063 parkingAreaReroute->
incRef(
"builParkingAreaReroute");
2065 return parkingAreaReroute;
2074 if (allowUndoRedo) {
2080 routeProbReroute->
incRef(
"buildRouteProbReroute");
2082 return routeProbReroute;
2090 if (allowUndoRedo) {
2099 routeProbe->
incRef(
"buildRouteProbe");
2112 if (allowUndoRedo) {
2119 for (
auto i : lanes) {
2120 i->addAdditionalParent(variableSpeedSign);
2122 variableSpeedSign->
incRef(
"buildVariableSpeedSign");
2124 return variableSpeedSign;
2136 if (allowUndoRedo) {
2142 variableSpeedSignStep->
incRef(
"buildVariableSpeedSignStep");
2144 return variableSpeedSignStep;
2151 if (allowUndoRedo) {
2160 vaporizer->
incRef(
"buildVaporizer");
2168 GNETAZ* TAZ =
new GNETAZ(
id, viewNet, shape, color, blockMovement);
2169 if (allowUndoRedo) {
2173 for (
auto i : edges) {
2185 for (
auto i : edges) {
2188 TAZSource->
incRef(
"buildTAZ");
2192 TAZSink->
incRef(
"buildTAZ");
2210 if(TAZSink ==
nullptr) {
2213 if (allowUndoRedo) {
2219 TAZSink->
incRef(
"buildTAZSource");
2231 if(TAZSource ==
nullptr) {
2234 if (allowUndoRedo) {
2240 TAZSource->
incRef(
"buildTAZSource");
2244 if (allowUndoRedo) {
2250 TAZSource->
incRef(
"buildTAZSource");
2267 if(TAZSource ==
nullptr) {
2270 if (allowUndoRedo) {
2276 TAZSource->
incRef(
"buildTAZSink");
2287 if(TAZSink ==
nullptr) {
2289 TAZSink =
new GNETAZSink(TAZ, edge, arrivalWeight);
2290 if (allowUndoRedo) {
2296 TAZSink->
incRef(
"buildTAZSink");
2300 if (allowUndoRedo) {
2306 TAZSink->
incRef(
"buildTAZSink");
2341 WRITE_WARNING(
"The position of additional '" + additionalID +
"' lies beyond the lane's '" + lane.
getID() +
"' length.");
2351 if (GNEAttributeCarrier::canParse<double>(startPos) && GNEAttributeCarrier::canParse<double>(endPos)) {
2353 double startPosDouble = GNEAttributeCarrier::parse<double>(startPos);
2354 double endPosDouble = GNEAttributeCarrier::parse<double>(endPos);
2357 if (minLength > laneLength) {
2360 if (startPosDouble < 0) {
2361 startPosDouble += laneLength;
2363 if (endPosDouble < 0) {
2364 endPosDouble += laneLength;
2366 if ((endPosDouble < minLength) || (endPosDouble > laneLength)) {
2370 if (endPosDouble < minLength) {
2371 endPosDouble = minLength;
2373 if (endPosDouble > laneLength) {
2374 endPosDouble = laneLength;
2377 if ((startPosDouble < 0) || (startPosDouble > (endPosDouble - minLength))) {
2381 if (startPosDouble < 0) {
2384 if (startPosDouble > (endPosDouble - minLength)) {
2385 startPosDouble = (endPosDouble - minLength);
2389 startPos =
toString(startPosDouble);
2391 }
else if (GNEAttributeCarrier::canParse<double>(startPos)) {
2393 if (endPos.empty() || !GNEAttributeCarrier::canParse<double>(endPos)) {
2395 double startPosDouble = GNEAttributeCarrier::parse<double>(startPos);
2397 if (minLength > laneLength) {
2400 if (startPosDouble < 0) {
2401 startPosDouble += laneLength;
2403 if ((startPosDouble < 0) || startPosDouble > (laneLength - minLength)) {
2407 if (startPosDouble < 0) {
2410 if (startPosDouble > (laneLength - minLength)) {
2411 startPosDouble = (laneLength - minLength);
2415 startPos =
toString(startPosDouble);
2419 }
else if (GNEAttributeCarrier::canParse<double>(endPos)) {
2421 if (startPos.empty() || !GNEAttributeCarrier::canParse<double>(startPos)) {
2423 double endPosDouble = GNEAttributeCarrier::parse<double>(endPos);
2425 if (minLength > laneLength) {
2428 if (endPosDouble < 0) {
2429 endPosDouble += laneLength;
2431 if ((endPosDouble < minLength) || (endPosDouble > laneLength)) {
2435 if (endPosDouble < minLength) {
2436 endPosDouble = minLength;
2438 if (endPosDouble > laneLength) {
2439 endPosDouble = laneLength;
2442 if (0 > (endPosDouble - minLength)) {
2458 if ((pos < 0) || (pos > laneLength)) {
2461 }
else if (pos < 0) {
2463 }
else if (pos > laneLength) {
2464 pos = laneLength - 0.01;
2472 if ((pos < 0) || ((pos + length) > laneLength)) {
2475 }
else if (pos < 0) {
2477 }
else if (pos > laneLength) {
2478 pos = laneLength - 0.01;
2480 }
else if ((pos + length) > laneLength) {
2481 length = laneLength - pos - 0.01;
2509 std::vector<std::pair<double, double>> sortedIntervals;
2512 sortedIntervals.push_back(std::make_pair(0., 0.));
2514 sortedIntervals.back().first = GNEAttributeCarrier::parse<double>(i->getAttribute(
SUMO_ATTR_BEGIN));
2515 sortedIntervals.back().second = GNEAttributeCarrier::parse<double>(i->getAttribute(
SUMO_ATTR_END));
2518 sortedIntervals.push_back(std::make_pair(newBegin, newEnd));
2520 std::sort(sortedIntervals.begin(), sortedIntervals.end());
2522 for (
int i = 0; i < (int)sortedIntervals.size() - 1; i++) {
2523 if (sortedIntervals.at(i).second > sortedIntervals.at(i + 1).first) {
2533 myInsertedElements.push_back(std::make_pair(tag,
nullptr));
2539 myInsertedElements.back().second = additional;
2545 if (!myInsertedElements.empty()) {
2546 myInsertedElements.pop_back();
2553 if (myInsertedElements.size() < 2) {
2555 WRITE_WARNING(
"A " +
toString(myInsertedElements.back().first) +
" must be declared within the definition of a " +
toString(expectedTag) +
".");
2558 if(myInsertedElements.size() < 2) {
2561 }
else if ((myInsertedElements.end() - 2)->second ==
nullptr) {
2567 if (retrievedAdditional ==
nullptr) {
2569 WRITE_WARNING(
"A " +
toString((myInsertedElements.end() - 1)->first) +
" must be declared within the definition of a " +
toString(expectedTag) +
".");
2573 WRITE_WARNING(
"A " +
toString((myInsertedElements.end() - 1)->first) +
" cannot be declared within the definition of a " + retrievedAdditional->
getTagStr() +
".");
2576 return retrievedAdditional;
2585 for (std::vector<std::pair<SumoXMLTag, GNEAdditional*> >::const_reverse_iterator i = myInsertedElements.rbegin(); i != myInsertedElements.rend(); i++) {
static GNEAdditional * buildParkingArea(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, bool friendlyPosition, int roadSideCapacity, bool onRoad, double width, const std::string &length, double angle, bool blockMovement)
Builds a Parking Area.
void insertAdditional(GNEAdditional *additional)
Insert a additional element int GNENet container.
GNEAdditional * getLastInsertedAdditional() const
return last additional inserted
SumoXMLTag
Numbers representing SUMO-XML - element names.
vehicle space used by GNEParkingAreas
static GNEAdditional * buildVehicleType(GNEViewNet *viewNet, bool allowUndoRedo, std::string vehicleTypeID, double accel, double decel, double sigma, double tau, double length, double minGap, double maxSpeed, double speedFactor, double speedDev, const RGBColor &color, SUMOVehicleClass vClass, const std::string &emissionClass, SUMOVehicleShape shape, double width, const std::string &filename, double impatience, const std::string &laneChangeModel, const std::string &carFollowModel, int personCapacity, int containerCapacity, double boardingDuration, double loadingDuration, const std::string &latAlignment, double minGapLat, double maxSpeedLat)
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
alternative tag for e1 detector
static std::string getConfigurationRelative(const std::string &configPath, const std::string &path)
Returns the second path as a relative path to the first file.
description of a vehicle type
void parseAndBuildRerouterRouteProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Route Prob Reroute.
a source within a district (connection road)
void parseAndBuildRerouterParkingAreaReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parkingAreaReroute.
static bool fixStoppinPlacePosition(std::string &startPos, std::string &endPos, const double laneLength, const double minLength, const bool friendlyPos)
check if the position of an stoppingPlace over a lane is valid
static bool checkAndFixDetectorPosition(double &pos, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
void parseAndBuildDetectorE1(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a induction loop detector (E1)
void myStartElement(int element, const SUMOSAXAttributes &attrs)
Called on the opening of a tag;.
void parseAndBuildTAZ(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a TAZ.
begin/end of the description of a single lane
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
a flow definition (used by router)
static GNEAdditional * buildVariableSpeedSign(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNELane *> &destLanes, const std::string &name, bool blockMovement)
Builds a VariableSpeedSign (lane speed trigger)
A calibrator placed over edge.
an e2 detector over multiple lanes (used by Netedit)
void popElement()
pop last inserted element (used only in function myEndElement)
a traffic assignment zone
static void setValidation(const std::string &validationScheme, const std::string &netValidationScheme)
Enables or disables validation.
void parseAndBuildChargingStation(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a charging station.
lane of a reroute of type closing
Allow/disallow charge in transit in Charging Stations.
void parseAndBuildParkingSpace(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parking space.
const std::string & getFileName() const
returns the current file name
int SVCPermissions
bitset where each bit declares whether a certain SVC may use this edge/lane
bool myUndoAdditionals
flag to check if created additionals must be undo and redo
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
Representation of a RouteProbe in netedit.
weights: time range begin
void parseAndBuildDetectorExit(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Exit detector.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static GNEAdditional * buildDetectorE3(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, const double timeThreshold, double speedThreshold, bool blockMovement)
Builds a multi entry exit detector (E3)
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
static GNEAdditional * buildCalibratorRoute(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &routeID, const std::vector< GNEEdge *> &edges, const RGBColor &color)
GNEAdditionalHandler(const std::string &file, GNEViewNet *viewNet, bool undoAdditionals=true, GNEAdditional *additionalParent=nullptr)
Constructor.
SAX-handler base for SUMO-files.
A parking space for a single vehicle within a parking area.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
double getPosition(double pos, GNELane &lane, bool friendlyPos, const std::string &additionalID)
extracts the position, checks whether it shall be mirrored and checks whether it is within the lane...
virtual bool hasAttribute(int id) const =0
Returns the information whether the named (by its enum-value) attribute is within the current list...
static GNEAdditional * buildContainerStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Builds a container stop.
static GNEAdditional * buildClosingReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *closedEdge, SVCPermissions permissions)
Builds trigger objects for GNENet (busStops, chargingStations, detectors, etc..)
begin/end of the description of a route
#define WRITE_WARNING(msg)
void parseAndBuildVariableSpeedSign(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal (lane speed trigger)
void parseAndBuildDetectorE2(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a lane area detector (E2)
static OptionsCont & getOptions()
Retrieves the options.
static GNEAdditional * builDestProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEEdge *newEdgeDestination, double probability)
virtual std::string getString(int id) const =0
Returns the string-value of the named (by its enum-value) attribute.
void commitElementInsertion(GNEAdditional *additionalCreated)
commit element insertion (used to save last correct created element)
GNEAdditional * retrieveAdditionalParent(GNEViewNet *viewNet, SumoXMLTag expectedTag) const
retrieve additional parent correspond to current status of myInsertedElements
static GNEAdditional * buildDetectorE1Instant(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a Instant Induction Loop Detector (E1Instant)
static GNEAdditional * buildDetectorEntry(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a entry detector (E3)
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
static GNEAdditional * buildRouteProbReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, const std::string &newRouteId, double probability)
void insertElement(SumoXMLTag tag)
insert new element (called only in function myStartElement)
void parseAndBuildDetectorE1Instant(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Instant induction loop detector (E1Instant)
GNEUndoList * getUndoList() const
get the undoList object
~GNEAdditionalHandler()
Destructor.
HierarchyInsertedAdditionals myHierarchyInsertedAdditionals
HierarchyInsertedAdditionals used for insert childs.
void parseAndBuildCalibratorVehicleType(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses vehicle type values of Calibrators.
static GNEAdditional * buildCalibrator(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, const std::string &name, const std::string &outfile, double freq, const std::string &routeprobe)
builds a microscopic calibrator over a lane
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
A lane area vehicles can park at (netedit-version)
GNEEdge & getParentEdge()
Returns underlying parent edge.
void addAdditionalChild(GNEAdditional *additional)
add additional child to this edge
static bool checkOverlappingRerouterIntervals(GNEAdditional *rerouter, double newBegin, double newEnd)
check if an overlapping is produced in rerouter if a interval with certain begin and end is inserted ...
void parseAndBuildRerouterInterval(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Rerouter Interval.
static GNEAdditional * buildChargingStation(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, double chargingPower, double efficiency, bool chargeInTransit, double chargeDelay, bool friendlyPosition, bool blockMovement)
Builds a charging Station.
Encapsulated SAX-Attributes.
An instantenous induction loop.
T get(int attr, const char *objectid, bool &ok, bool report=true) const
Tries to read given attribute assuming it is an int.
static bool isAbsolute(const std::string &path)
Returns the information whether the given path is absolute.
void parseAndBuildTAZSource(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a TAZ Source.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
parameter associated to a certain key
static bool lanesConsecutives(const std::vector< GNELane *> &lanes)
check if lanes are consecutives
static GNEAdditional * buildAccess(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *busStop, GNELane *lane, const std::string &pos, const std::string &length, bool friendlyPos, bool blockMovement)
Builds an Access.
static GNEAdditional * buildDetectorE1(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, bool friendlyPos, bool blockMovement)
Builds a induction loop detector (E1)
bool hasGenericParameters() const
return true if Tag correspond to an element that supports generic parameters
void checkE2MultilaneIntegrity()
check if E2 is valid (all of their lanes are connected, it must called after every operation which in...
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
void parseAndBuildRerouter(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a rerouter.
A calibrator placed over lane (used in netedit)
Representation of a vaporizer in netedit.
void parseAndBuildCalibratorRoute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses route values of Calibrators.
block movement of a graphic element
static GNEAdditional * buildRerouterInterval(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterParent, double begin, double end)
builds a rerouter interval
A lane area vehicles can halt at (netedit-version)
void setParameter(const std::string &key, const std::string &value)
Sets a parameter.
edge: the shape in xml-definition
probability of route of a reroute
SVCPermissions parseVehicleClasses(const std::string &allowedS)
Parses the given definition of allowed vehicle classes into the given containers Deprecated classes g...
probability of destiny of a reroute
const std::string getID() const
function to support debugging
GNEViewNet * myViewNet
pointer to View's Net
void incRef(const std::string &debugMsg="")
Increarse reference.
double getLaneShapeLength() const
returns the length of the lane's shape
static GNEAdditional * buildMultiLaneDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, const std::vector< GNELane *> &lanes, double pos, double endPos, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement)
Builds a multi-lane Area Detector (E2)
static GNEAdditional * buildTAZSource(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double departWeight)
Builds a TAZSource (Traffic Assignment Zone)
double getFinalLength() const
get length that will be assigned to the lanes in the final network
static bool accessCanBeCreated(GNEAdditional *busStopParent, GNEEdge &edge)
check if a GNEAccess can be created in a certain Edge
void parseAndBuildDetectorE3(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a multi entry exit detector (E3)
static GNEAdditional * buildRerouter(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, Position pos, const std::vector< GNEEdge *> &edges, double prob, const std::string &name, const std::string &file, bool off, double timeThreshold, const std::string &vTypes, bool blockMovement)
builds a rerouter
begin/end of the description of an edge
static GNEAdditional * buildSingleLaneDetectorE2(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, double pos, double length, double freq, const std::string &filename, const std::string &vehicleTypes, const std::string &name, const double timeThreshold, double speedThreshold, double jamThreshold, bool friendlyPos, bool blockMovement)
Builds a single-lane Area Detector (E2)
static GNEAdditional * buildParkingSpace(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *parkingAreaParent, Position pos, double width, double length, double angle, bool blockMovement)
Builds a Parking Space.
void parseAndBuildRouteProbe(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds routeProbe.
GNEAdditional * getFirstAdditionalParent() const
void parseAndBuildRerouterDestProbReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Destiny Prob Reroute.
A road/street connecting two junctions (netedit-version)
void parseAndBuildTAZSink(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a TAZ Sink.
entry for an alternative parking zone
void parseAndBuildCalibrator(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a mesoscopic or microscopic calibrator.
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
void parseAndBuildVariableSpeedSignStep(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Variable Speed Signal Step.
void parseGenericParameter(const SUMOSAXAttributes &attrs)
Parse generic parameter and insert it in the last created additional.
trigger: the time of the step
T getOpt(int attr, const char *objectid, bool &ok, T defaultValue, bool report=true) const
Tries to read given attribute assuming it is an int.
A train stop (alias for bus stop)
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
void parseAndBuildBusStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a bus stop.
void parseAndBuildContainerStop(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a container stop.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
a sink within a district (connection road)
static GNEAdditional * builParkingAreaReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNEAdditional *newParkignArea, double probability, bool visible)
An Element which don't belongs to GNENet but has influency in the simulation.
static GNEAdditional * buildAdditional(GNEViewNet *viewNet, bool allowUndoRedo, SumoXMLTag tag, std::map< SumoXMLAttr, std::string > values)
Build additionals.
void parseAndBuildCalibratorFlow(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses flow values of Calibrators.
const std::string & getTagStr() const
get tag assigned to this object in string format
static GNEAdditional * buildVaporizer(GNEViewNet *viewNet, bool allowUndoRedo, GNEEdge *edge, double startTime, double end, const std::string &name)
Builds a vaporizer (lane speed trigger)
void parseAndBuildVaporizer(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Builds a Vaporizer.
static GNEAdditional * buildTAZSink(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *TAZ, GNEEdge *edge, double arrivalWeight)
Builds a TAZSink (Traffic Assignment Zone)
void parseAndBuildRerouterClosingLaneReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Lane reroute.
GNENet * getNet() const
get the net object
static GNEAdditional * buildRouteProbe(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNEEdge *edge, const std::string &freq, const std::string &name, const std::string &file, double begin)
builds a Route probe
void parseAndBuildParkingArea(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a parking area.
GUIGlID getGlID() const
Returns the numerical id of the object.
an aggreagated-output interval
static GNEAdditional * buildCalibratorFlow(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *calibratorParent, GNEAdditional *route, GNEAdditional *vtype, const std::string &vehsPerHour, const std::string &speed, const RGBColor &color, const std::string &departLane, const std::string &departPos, const std::string &departSpeed, const std::string &arrivalLane, const std::string &arrivalPos, const std::string &arrivalSpeed, const std::string &line, int personNumber, int containerNumber, bool reroute, const std::string &departPosLat, const std::string &arrivalPosLat, double begin, double end)
Eficiency of the charge in Charging Stations.
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
void parseAndBuildAccess(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses values and adds access to the current bus stop.
static std::string getFilePath(const std::string &path)
Removes the file information from the given path.
parent of an additional element
static GNEAdditional * buildBusStop(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, GNELane *lane, const std::string &startPos, const std::string &endPos, const std::string &name, const std::vector< std::string > &lines, bool friendlyPosition, bool blockMovement)
Builds a bus stop.
void myEndElement(int element)
Called when a closing tag occurs.
static GNEAdditional * buildVariableSpeedSignStep(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *VSSParent, double time, double speed)
Builds a VariableSpeedSign Step.
static bool isValidTypeID(const std::string &value)
whether the given string is a valid id for an edge or vehicle type
Delay in the charge of charging stations.
static bool fixE2DetectorPosition(double &pos, double &length, const double laneLength, const bool friendlyPos)
check if the position of a detector over a lane is valid
void addAdditionalChild(GNEAdditional *additional)
add additional child to this additional
NBEdge * getNBEdge()
returns the internal NBEdge
A lane area vehicles can halt at (netedit-version)
#define WRITE_MESSAGE(msg)
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
An access point for a train stop.
static GNEAdditional * buildClosingLaneReroute(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *rerouterIntervalParent, GNELane *closedLane, SVCPermissions permissions)
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
static GNEAdditional * buildDetectorExit(GNEViewNet *viewNet, bool allowUndoRedo, GNEAdditional *E3Parent, GNELane *lane, double pos, bool friendlyPos, bool blockMovement)
Builds a exit detector (E3)
void parseAndBuildDetectorEntry(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Entry detector.
alternative tag for e3 detector
static GNEAdditional * buildTAZ(GNEViewNet *viewNet, bool allowUndoRedo, const std::string &id, const PositionVector &shape, const RGBColor &color, const std::vector< GNEEdge *> &edges, bool blockMovement)
Builds a TAZ (Traffic Assignment Zone)
alternative tag for e2 detector
trigger: a step description
void parseAndBuildRerouterClosingReroute(const SUMOSAXAttributes &attrs, const SumoXMLTag &tag)
Parses his values and builds a Closing Reroute.