diff --git a/.jenkins/sign-macos-installer.jenkinsfile b/.jenkins/sign-macos-installer.jenkinsfile index 404f107b8b52..198af9bb3ede 100644 --- a/.jenkins/sign-macos-installer.jenkinsfile +++ b/.jenkins/sign-macos-installer.jenkinsfile @@ -27,13 +27,9 @@ pipeline { cmake --install jupedsim-build --config Release # Cloning SUMO - git clone -q --filter=tree:0 --branch v1_21_0 https://github.com/eclipse-sumo/sumo.git + git clone -q --filter=tree:0 --branch main https://github.com/eclipse-sumo/sumo.git export SUMO_HOME=\${WORKSPACE}/sumo - # FIXME (load file from main to have the current version) - curl -s -o "${WORKSPACE}/sumo/tools/build_config/buildMacOSInstaller.py" https://raw.githubusercontent.com/eclipse-sumo/sumo/main/tools/build_config/buildMacOSInstaller.py - curl -s -o "${WORKSPACE}/sumo/tools/requirements.txt" https://raw.githubusercontent.com/eclipse-sumo/sumo/main/tools/requirements.txt - # Creating virtual env for Python for the whole process /opt/homebrew/bin/python3.13 -m venv env env/bin/python3 -m pip install --quiet -r sumo/tools/requirements.txt diff --git a/build_config/docker/Dockerfile.ubuntu.git b/build_config/docker/Dockerfile.ubuntu.git index 0a1085c281df..83f1861d2f43 100644 --- a/build_config/docker/Dockerfile.ubuntu.git +++ b/build_config/docker/Dockerfile.ubuntu.git @@ -7,7 +7,8 @@ # This Dockerfile installs everything for a full fledged SUMO with all tools runnable. # If you don't need certain features and rather have a smaller container you can comment the unneeded parts below -FROM ubuntu:jammy +# We are dividing the build into multiple stages to reduce the size of the resulting image +FROM ubuntu:jammy as build ENV SUMO_HOME=/usr/share/sumo ARG DEBIAN_FRONTEND=noninteractive @@ -27,12 +28,48 @@ RUN apt-get -y install $(cat /opt/sumo/build_config/tools_req_deb.txt) # JuPedSim RUN cd /opt; git clone -b $JUPEDSIM_VERSION https://github.com/PedestrianDynamics/jupedsim -RUN cd /opt; cmake -B jupedsim-build -D CMAKE_INSTALL_PREFIX=jupedsim-install jupedsim; \ - cmake --build jupedsim-build -j4 --config Release; cmake --install jupedsim-build --config Release; rm -rf jupedsim-build +RUN cd /opt; cmake -B jupedsim-build -D CMAKE_INSTALL_PREFIX=/install/usr jupedsim; \ + cmake --build jupedsim-build -j4 --config Release; cmake --install jupedsim-build --config Release # python packages needed for the tools (the ones where we do not have ubuntu packages) RUN pip3 install -r /opt/sumo/tools/requirements.txt # python packages needed for the docs (the ones where we do not have ubuntu packages) RUN pip3 install -r /opt/sumo/docs/web/requirements.txt -RUN cd /opt/sumo; cmake -B cmake-build -DCMAKE_INSTALL_PREFIX=/usr -DSUMO_UTILS=TRUE; \ - cd cmake-build; make -j8 all examples doc install; cd ..; rm -rf cmake-build + +RUN cd /opt/sumo; cmake -B cmake-build -DCMAKE_INSTALL_PREFIX=/install/usr -DSUMO_UTILS=TRUE; \ + cd cmake-build; make -j8 all examples doc install + +# Now create actual image +FROM ubuntu:jammy + +# Add metadata +LABEL org.opencontainers.image.authors="SUMO Developers " \ + org.opencontainers.image.url="https://ghcr.io/eclipse-sumo/sumo" \ + org.opencontainers.image.source="https://github.com/eclipse-sumo/sumo/blob/main/build_config/docker/Dockerfile.ubuntu.git" \ + org.opencontainers.image.documentation="https://sumo.dlr.de/docs/Developer/Docker.html" \ + org.opencontainers.image.licenses="EPL-2.0 OR GPL-2.0-or-later" + +# Setup environment +ENV SUMO_HOME=/usr/share/sumo +ARG DEBIAN_FRONTEND=noninteractive + +# Getting build artifacts +COPY --from=build /install/usr /usr +# Get dependency lists +COPY --from=build /opt/sumo/build_config/build_req_deb.txt /tmp/build_req_deb.txt +COPY --from=build /opt/sumo/build_config/tools_req_deb.txt /tmp/tools_req_deb.txt +COPY --from=build /opt/sumo/tools/requirements.txt /tmp/requirements.txt + +# Installing runtime dependencies (for simplicity we use the build dependencies. Possibility for optimization in the future) +RUN apt-get -qq update; \ + apt-get -qq -y install $(cat /tmp/build_req_deb.txt) $(cat /tmp/tools_req_deb.txt) \ + libavformat58 libopenscenegraph161 libswscale5; \ + apt-get -qq clean autoclean; \ + apt-get -qq -y autoremove; \ + rm -rf /var/lib/apt/lists/* + +# Installing tools dependencies for python +RUN pip3 install --no-cache-dir -r /tmp/requirements.txt + +CMD ["/bin/bash", "-c"] + diff --git a/data/po/it_sumo.po b/data/po/it_sumo.po index 761923a9cd2b..491ad3ff374e 100644 --- a/data/po/it_sumo.po +++ b/data/po/it_sumo.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: sumo\n" "Report-Msgid-Bugs-To: sumo-dev@eclipse.org\n" "POT-Creation-Date: 2025-01-06 11:22+0100\n" -"PO-Revision-Date: 2025-01-29 11:10+0000\n" +"PO-Revision-Date: 2025-01-30 12:17+0000\n" "Last-Translator: Mirko Barthauer \n" "Language-Team: Italian \n" @@ -4024,7 +4024,7 @@ msgstr "" #: src/microsim/devices/MSDevice_Emissions.cpp:97 #, c-format msgid "Unknown attribute '%' to write in emission output." -msgstr "" +msgstr "Attributo sconosciuto '%' da scrivere nell'uscita di emissioni." #: src/microsim/devices/MSDevice_Example.cpp:48 msgid "" @@ -4060,11 +4060,12 @@ msgstr "Registra oggetti in un raggio attorno a veicoli attrezzati" #: src/microsim/devices/MSDevice_FCD.cpp:138 #, c-format msgid "Specified shape '%' for filtering fcd-output could not be found." -msgstr "" +msgstr "La forma specificata '%' per filtrate l'uscita FCD non è stata trovata." #: src/microsim/devices/MSDevice_FCD.cpp:163 msgid "Could not load names of edges for filtering fcd-output from '%'." msgstr "" +"Non ho potuto caricare i nome degli archi da '%' per filtrare l'uscita FCD." #: src/microsim/devices/MSDevice_FCD.cpp:182 #, c-format @@ -4073,7 +4074,7 @@ msgstr "Attributo sconosciuto '%' da emettere in uscita FCD." #: src/microsim/devices/MSDevice_FCDReplay.cpp:61 msgid "FCD file to read" -msgstr "" +msgstr "File FCD da leggere" #: src/microsim/devices/MSDevice_FCDReplay.cpp:216 msgid "Unknown edge '%' in fcd replay file for person '%'." @@ -4119,22 +4120,28 @@ msgid "" "Additional time the vehicle shall need to reach the intersection after the " "signal turns green" msgstr "" +"Tempo addizionale che il veicolo necessita per giungere all'incrocio dopo " +"che il signale diventa verde" #: src/microsim/devices/MSDevice_GLOSA.cpp:63 msgid "Use queue in front of the tls for GLOSA calculation" -msgstr "" +msgstr "Usa la coda di veicoli a monte del semaforo per il calcolo GLOSA" #: src/microsim/devices/MSDevice_GLOSA.cpp:66 msgid "" "Override safety features - ignore the current light state, always follow " "GLOSA's predicted state" msgstr "" +"Non tenere conto delle funzioni di sicurezza - ignora lo stato del segnale e " +"segui sempre lo stato previsto da GLOSA" #: src/microsim/devices/MSDevice_GLOSA.cpp:69 msgid "" "Vehicles follow a perfect speed calculation - ignore speed calculations from " "the CF model if not safety critical" msgstr "" +"I veicoli seguono un calcolo di velocità perfetto - ignora i calcoli di " +"velocità tratti da modelli di guida se non sono critici per la sicurezza" #: src/microsim/devices/MSDevice_GLOSA.cpp:345 msgid "" @@ -4180,6 +4187,8 @@ msgid "" "Use weight files given with option --weight-files for initializing edge " "weights" msgstr "" +"Usa i file di pesi dati con l'opzione --weight-files per inizializzare i " +"pesi di archi" #: src/microsim/devices/MSDevice_Routing.cpp:84 msgid "The number of parallel execution threads used for rerouting" @@ -4200,7 +4209,7 @@ msgstr "Calcola velocità medie separate per biciclette" #: src/microsim/devices/MSDevice_Routing.cpp:96 msgid "Save adapting weights to FILE" -msgstr "" +msgstr "Salva pesi di adattamento in FILE" #: src/microsim/devices/MSDevice_Routing.cpp:104 msgid "" @@ -4571,17 +4580,24 @@ msgid "" "measures ('%').\n" "Please specify exactly one threshold for each measure." msgstr "" +"L'elenco dato di valori soglia ('%') non è della stessa dimensione che " +"l'elenco di misure ('%').\n" +"Per favore specifica esattamente un valore soglia per ogni misura." #: src/microsim/devices/MSDevice_StationFinder.cpp:62 msgid "" "Time to wait for a rescue vehicle on the road side when the battery is empty" msgstr "" +"Tempo di attesa sul lato della strada per un veicolo rimorchiatore quando la " +"batteria è scarica" #: src/microsim/devices/MSDevice_StationFinder.cpp:64 msgid "" "How to deal with a vehicle which has to stop due to low battery: [none, " "remove, tow]" msgstr "" +"Come procedere con un veicolo fermatosi per causa di batteria scarica: " +"[none, remove, tow]" #: src/microsim/devices/MSDevice_StationFinder.cpp:66 msgid "" @@ -4613,33 +4629,42 @@ msgstr "" #: src/microsim/devices/MSDevice_StationFinder.cpp:78 msgid "Type of energy transfer" -msgstr "" +msgstr "Tipo di trasferimento di energia" #: src/microsim/devices/MSDevice_StationFinder.cpp:80 msgid "" "After this waiting time vehicle searches for a new station when the initial " "one is blocked" msgstr "" +"Dopo questo tempo d'attesa il veicolo inizia di nuovo a cercare una stazione " +"di ricarica se quella iniziale è occupata" #: src/microsim/devices/MSDevice_StationFinder.cpp:82 msgid "" "Only stops with a predicted duration of at least the given threshold are " "considered for opportunistic charging." msgstr "" +"Considera unicamente le fermate per la carica opportunistica che hanno una " +"durata stimata di almeno il valore soglia dato." #: src/microsim/devices/MSDevice_StationFinder.cpp:84 msgid "Target state of charge after which the vehicle stops charging" msgstr "" +"Traguardo di livello di carica dopo il quale il veicolo ferma la ricarica" #: src/microsim/devices/MSDevice_StationFinder.cpp:86 msgid "State of charge the vehicle begins searching for charging stations" msgstr "" +"Livello di carica allo quale il veicolo inizia a cercare delle stazioni di " +"ricarica" #: src/microsim/devices/MSDevice_StationFinder.cpp:88 msgid "" "State of charge below which the vehicle may look for charging opportunities " "along its planned stops" msgstr "" +"Livello di carica sotto il quale il veicolo può cercare della opportunità di " +"carica intorno alle sue fermate pianificate" #: src/microsim/devices/MSDevice_StationFinder.cpp:90 msgid "" diff --git a/docs/web/docs/ChangeLog.md b/docs/web/docs/ChangeLog.md index 5505665c7f4d..18ba9812e98d 100644 --- a/docs/web/docs/ChangeLog.md +++ b/docs/web/docs/ChangeLog.md @@ -48,7 +48,8 @@ title: ChangeLog - Fixed bug where a vehicle steals another vehicles parking spot #15976 - Fixed bug where parking egress is blocked after lane change #15757 - Fixed missing XML validation for parking badges #16005 - - Fixed undefined behavior when using options **--device.rerouting.threads** with **--weights.random-factor** #15994 + - Fixed undefined behavior when using options **--device.rerouting.threads** with **--weights.random-factor** #15994 + - Option **--edgedata-output** now works when setting option **--begin** #16079 - netedit - Fixed crash when moving a big selection #15132 (regression in 1.16.0) @@ -107,6 +108,10 @@ title: ChangeLog - Selection mode function 'select parents' now selects incoming and outgoing lane of selected connections #15968 - Fixed invalid weights loading values of TAZ source/sinks #16037 - Fixed "freezing" when handling very large TAZ #15844 + - Fixed bug when saving toolcfg where the tool uses positional arguments #16075 + - Reloading a demand file now raises warnins rather than errors #16027 + - Deleting one edge no longer removes crossings from other edges #16017 + - Fixed selecting TAZ edges with a small selection #16100 - sumo-gui - Fixed framerate drop when zoomed in very far #15666 @@ -116,7 +121,8 @@ title: ChangeLog - Fixed invalid travel time when computing pedestrian reachability in a non-pedestrian network #15792 - Fixed invalid travel times when computing pedestrian and bicycle reachability #15793 - Saving and loading of meso edge scaling scheme is now working #15902 - - edgedata-file parsing no longer aborts after encountering a single non-numerical attribute #15903 + - edgedata-file parsing no longer aborts after encountering a single non-numerical attribute #15903 + - The rainbow colorscheme is now properly stored in gui settings #16080 - netconvert - Fixed invalid extra connections from edge where input specifies "no connections" #15944 (regression in 1.2.0) @@ -127,23 +133,35 @@ title: ChangeLog - Fixed invalid linkState for left turns from the major road at junction type `allway_stop` #15737 - Fixed invalid tlLogic after processing net with **--keep-edges** #15798 - No longer building bicyle left turns from a straight-only vehicle lane (starting from a left-turn lane instead) #15943 - - Fixed invalid handling of negative stop position in ptstop-files #12183 + - Fixed invalid handling of negative stop position in ptstop-files #12183 + - Option **--sidewalks.guess.by-permissions** no longer puts sidewalks onto paths that are shared between pedestrians and bicycles #16060 + - OSM: loading typemap *osmNetconvertPedestrians.typ.xml* no longer puts sidewalks on both sides of oneway streets (i.e. in the middle of a divided road). Legacy behavior can be restored with option **--osm.oneway-reverse-sidewalk** #16063 + - OSM: fixed missing vehicle lane where access=yes and busway:right=lane #16061 + - OSM: fixed missing stops in ptline-output #16101 + - OSM: fixed missing bus direction at oneway street with `oneway:psv=no` #16103 - duarouter - Fixed crash when using stop with coordinates and option **--mapmatch.junctions** #15740 - Fixed invalid use of taz information when coordinates are defined for a trip #15768 - Fixed invalid route in a network with connection permissions but no other permissions #15925 - - Fixed invalid precision with **--write-costs** #15938 + - Fixed invalid precision with **--write-costs** #15938 + - Fixed crash when loading flows with particular combinaion of IDs #16091 - marouter - Fixed invalid route involving vClass-restricted connection #15883 +- netgenerate + - No longer hangs when setting option **--rand.connectivity 1** #16089 + - meso - - fixed invalid queue assignment for turning vehicles #16034 (regression in 1.7.0) + - Fixed gridlocks in roundabouts #14129 (regression in 1.4.0) + - Fixed invalid queue assignment for turning vehicles #16034 (regression in 1.7.0) - Fixed crash when using **--mapmatch.junctions** in a network with internal edges #15741 - Fixed crash when using **--time-to-teleport.disconnected** #15751 - Option **--time-to-teleport.disconnected** is now working when connections are missing #15777 - - Fixed crash when rendering vehicle at parkingArea #15956 + - Fixed crash when rendering vehicle at parkingArea #15956 + - Fixed missing waitingTime in edgeData output #16082 + - activitygen - fixed crash when attribute is not set #15782 @@ -158,7 +176,9 @@ title: ChangeLog - subscribing to complex types now works with the python API #15785 - Concurrent access to libsumo now works #15967 - moveToXY now works on parked vehicles #16010 - - When setting option **--keep-after-arrival**, vehicles that were affected by moveToXY while parking are no longer drawn after arrival. #16009 + - When setting option **--keep-after-arrival**, vehicles that were affected by moveToXY while parking are no longer drawn after arrival. #16009 + - Fixed result of `simulaton.convertRoad` when adjacent lanes have different widths #16105 + - Fixed missing collision check between cars and remote-controlled pedestrian #16092 - Tools - matsim_importPlans.py: no longer writes unsorted trips with option **-vehicles-only** #15743 @@ -169,11 +189,16 @@ title: ChangeLog - sumolib: Can now set a new attribute in sumolib.xml element #15991 - sumolib.xml: Fixed bug where parse_fast retrieves wrong attribute if one attribute is the end-suffix of another attribute #15901 - randomTrips.py: option **--fringe-factor** now works in lefthand networks #15876 - - randomTrips.py: Options **--random-departpos** and **--random-arrivalpos** now take effect for persons #15946 + - randomTrips.py: Options **--random-departpos** and **--random-arrivalpos** now take effect for persons #15946 - routeSampler.py: fixed crash when loading negative counts #15908 - gtfs2pt.py: Import now works when optional 'direction_id' is missing #15736 - Empty strings can now be passed via tool config file #15499 - - tracemapper.py No longer creates routes with the same edge repeated over and over #15625 + - tracemapper.py No longer creates routes with the same edge repeated over and over #15625 + - osmWebWizard.py: Dunkirk no longer gets imported with lefthand traffic #16059 + - Fixed saving of toolconfig for jtcrouter.py,plotFlows.py,signal_POIs_from_xodr.py,tripinfoByTAZ.py and tripinfoDiff.py #16085 + - osmGet.py: fixed missing public transport stops (also affects osmWebWizard.py) #16106 + + ### Enhancements @@ -219,7 +244,9 @@ title: ChangeLog - Undo-redo functionality can now optionally be disabled to improve operational speed #15663 - Undo-redo functionality can now be temporary disabled while loading a file to improve loading speed #15668 - Improved visibility of short edges #15592 - - The route for inspected vehicles is now highlighted #15930 + - The route for inspected vehicles is now highlighted #15930 + - Added 62 python tools to the menu #16076 + - sumo-gui - The value of SUMO_HOME is now shown in the *About Dialog* (also for netedit) #15218 @@ -236,10 +263,14 @@ title: ChangeLog - Actuated pedestrian crossings are now actuated by pedestrians rather than vehicles #7637 - Pedestrian crossings created by option **--crossings.guess** are now given priority. The old behavior can be obtained by setting option **--crossings.guess.roundabout-priority false** #15833 - Option **--plain-output-prefix** now also saves a *.netccfg*-file for rebuilding the network from plain-xml files #12998 - - Improved geometry of pedestrian crossings when a footpath crosses a road #15975 + - Improved geometry of pedestrian crossings when a footpath crosses a road #15975 + - Removed warning about sharp angles on service roads #16062 + - OSM: busways are now imported #16090 - meso - fcd-output can now be configured to include model attributes *segment, queue, entryTime, eventTime* and *blockTime* #15670 + - Vehicle attribute `insertionChecks="none"` can now force insertion #16096 + - duarouter - The input file for ALT-landmarks can now be defined with geo-coordinates #15855 @@ -256,8 +287,7 @@ title: ChangeLog - Tools - matsim_importPlans.py: Added options **-no-bikes** and **--no-rides** for filtering different modes of traffic. #15738 - sort_routes.py: Added option **--verbose** #15744 - - osmWebWizard.py: optionally can write output to existing folders #15783 - - countEdgeUsage.py: Now issues a warning when encountering attributes fromJunction or toJunction #15804 + - osmWebWizard.py: optionally can write output to existing folders #15783 - emissionsMap: Now supports options **--vtype** and **--additional-files** #15812 - driveways2poly.py: Added new tool for visualizing train driveways #15027 - dxf2jupedsim.py: now supports projection 'none' @@ -268,26 +298,31 @@ title: ChangeLog - randomTrips.py: Added option **--edge-type-file** for affecting probabilities by edge type #15877 - randomTrips.py: Added option **--marouter** to write routes which take into account traffic load on the network #15881 - randomTrips.py: option **--flows** can now be used together with **--pedestrians** or **--persontrips** to create personFlows #12791 - - randomTrips.py: Added option **--poisson** to generate poisson-distributed flows (with option **--flows**) #13178 - - edgeDataDiff.py: Added option **--attributes** to allow comparing files with differing attribute names #15898 + - randomTrips.py: Added option **--poisson** to generate poisson-distributed flows (with option **--flows**) #13178 - routeStats.py: Added option **--edges-file** for counting the number of times per route that a specific edge (i.e. a counting) location was passed) #15900 - routeSampler.py: Added option **--verbose.timing** to print wall-clock-time performance statistics #15910 - routeSampler.py: Major increase in processing speed for long routes #15911 - routeSampler.py: Added option **--depart-distribution** to distribute departures within the counting data intervals #15909 - routeSampler.py: now warn about duplicate counting data #15997 - routeSampler.py: now includes GEH in mismatch-output #16000 - - routeSampler.py: Added option **--geh-scale** to permit custom scaling for GEH value (i.e. to avoid averaging daily counts over 24 hours) #16001 + - routeSampler.py: Added option **--geh-scale** to permit custom scaling for GEH value (i.e. to avoid averaging daily counts over 24 hours) #16001 + - routeSampler.py: Options that set attributse to parse (i.e. **--edgedata-attribute**) now support a list of comma separated attributs (values are added) #16020 - edgeDataDiff.py: Added option **--geh-scale** to permit custom scaling for GEH value and otherwise scaling data to hourly values automatically #16002 - - routeSampler.py: Options that set attributse to parse (i.e. **--edgedata-attribute**) now support a list of comma separated attributs (values are added) #16020 + - edgeDataDiff.py: Added option **--attributes** to allow comparing files with differing attribute names #15898 - xml2csv.py: Added option **--keep-attributes** to limit the attributes exported to csv #15915 - plotXMLAttributes.py: Added options **--split-x** and **--split-y** for plotting attributes with list values #15934 - sumolib: Geometry helper functions for rotation at offset is now available #15445 - duaIterate.py: When loading trips with taz or junction-taz, vehicles may change their depart and arrival edge in each iteration #15983 - filterDistricts.py: New options **--remove-ids** and **--remove-ids-file** allow filtering out explicit edges #16038 + - countEdgeUsage.py: Now issues a warning when encountering attributes fromJunction or toJunction #15804 - countEdgeUsage.py: print output on number loaded / filtered routes when option **--verbose** is set #16040 - countEdgeUsage.py: New option **--subpart.via** allow filtering subparts with gaps (i.e. via edges) #16041 - netdiff.py: Modified file edges for generated polygons to simplify file filtering in netedit #16042 - poly2edgedata.py: Added new tool to transform traffic data from polygons (i.e. from geojson) to edgedata (i.e. for routeSampler.py) #16051 + - edgesInDistrict.py: now supports .xml.gz inputs #16066 + - edgeDepartDelay.py: New tool for edge-wise analysis of departDelay from tripinfo-output #16021 + - geoTrip2POI.py: New for visualizing geoTrips #16028 + ### Miscellaneous diff --git a/docs/web/docs/Developer/Docker.md b/docs/web/docs/Developer/Docker.md index 241bace5503f..014ee4e657bb 100644 --- a/docs/web/docs/Developer/Docker.md +++ b/docs/web/docs/Developer/Docker.md @@ -4,54 +4,69 @@ title: Docker ## Dockerized SUMO -Building and installing SUMO from source is not an easy task for -beginner users. Docker is a popular tool to solve this issue. Searching -"SUMO" at [Docker Hub](https://hub.docker.com) will give several results -from attempts to Dockerize SUMO. We list a few of these attempts -beginning with standalone SUMO to SUMO with other packages. - -### SUMO, SUMO GUI, and TraCI - -The solution given at -[docker-sumo](https://github.com/bogaotory/docker-sumo) contains only -standard SUMO and tools. It demonstrates how to Dockerize SUMO version -0.30.0 on top of Ubuntu 16.04. As well as sumo and TraCI, -[docker-sumo](https://github.com/bogaotory/docker-sumo) also shows the -user how to access the graphical interface of a Dockerized SUMO, i.e. -**sumo-gui**, which is unique compared to other attempts at Dockerising -SUMO. - -![Docker-sumo-demo1.gif](../images/Docker-sumo-demo1.gif "Docker-sumo-demo1.gif") -**sumo-gui** in action from [docker-sumo](https://github.com/bogaotory/docker-sumo) - -### SUMO and TraCI4J - -The [sumo-docker](https://hub.docker.com/r/similitude/sumo-docker/) -project demonstrates how to Dockerize SUMO version 0.25.0 on top of -Apache Maven 3 with [TraCI4J](https://github.com/egueli/TraCI4J). - -### SUMO and JuPedSim - -The -[hybrid_sumo_jps](https://hub.docker.com/r/grgrlmml/hybrid_sumo_jps/) -project aims on providing an easy to use docker image for running a -hybrid simulation that couples SUMO with -[JuPedSim](https://www.jupedsim.org). SUMO is a mighty simulator for all -kinds of transport problems that focuses mainly on motorized traffic. -While SUMO also provides a pedestrian model for simulating pedestrians -on sidewalks, crossings or the like, it lacks of the capability to model -pedestrians in true 2d space (e.g. in buildings, on squares, at train -stations). Instead of reinventing the wheel we decided to team up with -JuPedSim and develop a hybrid coupling approach that combines the power -of both frameworks. The coupling is realized using google's [protocol -buffers](https://github.com/google/protobuf) over -[gRPC](https://github.com/grpc), a library for \*remote procedure -calls\*. Currently this coupling approach is provided as a Docker image. -Moreover, also the Docker image is not intended to replace the common -SUMO installation (e.g. hybrid_sumo_jps does not provided a graphical -interface, i.e. no sumo-gui), you may also use the hybrid_sumo_jps -image to run ordinary SUMO scenarios. - -Details on how to run hybrid_sumo_jps can be found at the -corresponding [hybrid_sumo_jps's Docker -Hub](https://hub.docker.com/r/grgrlmml/hybrid_sumo_jps/) page. +Building and installing SUMO from source is not an easy task for beginner users. +Docker is a popular tool to solve this issue. +SUMO provides [Dockerfiles](https://github.com/eclipse-sumo/sumo/blob/main/build_config/docker) and [prebuilt Docker images](https://github.com/eclipse-sumo/sumo/pkgs/container/sumo/versions) to use. + +### Available Dockerfiles + +There are several Dockerfiles available in the SUMO repository. +To build them, check out [the SUMO repository](https://github.com/eclipse-sumo/sumo) and use the following command while in the `build_config/docker` directory of the repository: + +```shell + docker build -f {NAME_OF_DOCKERFILE} . +``` + +!!! note + Ensure to include the dot at the end of the command. + +The following Dockerfiles containing SUMO are available: + +| Dockerfile | description | +|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `Dockerfile.ubuntu.git` | An image containing a complete SUMO installation (binaries, documentation, TraCI, ...) and [JuPedSim](https://www.jupedsim.org) based on Ubuntu Jammy (22.04).
When building this image, the latest version of SUMO from the repository is used.
This image is built nightly and uploaded to the container registry.
It is also built and tagged for each stable release. | +| `Dockerfile.fedora` | An image with a SUMO installation based on the current Fedora development version (rawhide).
When building this image, the latest version of SUMO from the repository is used. | +| `Dockerfile.ubuntu.latest` | An image based on Ubuntu Jammy (22.04) with SUMO installed from the APT package manager.
This image does not build SUMO from source, so it will always use a stable version. | + +The following Dockerfiles provide build environments: + +| Dockerfile | Description | +|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| +| `Dockerfile.jenkins-build` | Environment for building SUMO on Jenkins. Installs all packages required to build SUMO, but does not contain any SUMO binaries. | +| `Dockerfile.manylinux2014` | Build environment for creating [manylinux](https://github.com/pypa/manylinux) python wheels, adapted with additional preinstalled packages. | + +### Available Images in the registry + +SUMO publishes images to the [GitHub container registry](https://ghcr.io/eclipse-sumo/sumo), which can be pulled and +used immediately. +The published images are built from the `Dockerfile.ubuntu.git` Dockerfile. + +To use any of the uploaded images, reference `ghcr.io/eclipse-sumo/sumo:${TAG}` (e.g. `docker pull ghcr.io/eclipse-sumo/sumo:main`). + +The following tags are available: + +| Tag | Description | +|---------------------------|----------------------------------------------------------------------------------------------------------------| +| `main` `nightly` | Nightly build containing the current version of SUMO from the repository. | +| `vX_Y_Z` (e.g. `v1_21_0`) | A version of the image created alongside the respective release. Contains SUMO in the matching stable version. | +| `latest` | References the image of the latest stable release (e.g. `v1_21_0`) | + +### How to use dockerized SUMO + +A complete example is available in [the tutorial on containerized SUMO](../Tutorials/Containerized_SUMO.md). + +A quick example for running a prepared simulation looks like this: + +```shell + docker run \ + -v /path/to/your/simulation/data:/data \ + ghcr.io/eclipse-sumo/sumo:main \ + sumo /data/simulation.sumocfg +``` + +A use-case for this could be preparing the simulation data on a computer with SUMO installed and then running the simulation on a server without needing to install SUMO. + +The container images also contains the graphical applications. +However, configuring them for use depends on your operating system and graphical environment (e.g., X11, Wayland). +For guidance, consult Docker's documentation on GUI application forwarding. +Therefore, we cannot provide specific instructions here. diff --git a/docs/web/docs/Developer/index.md b/docs/web/docs/Developer/index.md index 8e6cdb116e28..638ad9a2fc55 100644 --- a/docs/web/docs/Developer/index.md +++ b/docs/web/docs/Developer/index.md @@ -55,7 +55,7 @@ title: Developer - [How To add more car-following models](Implementation_Notes/Vehicle_Models.md) - [Progress on implementing an XML validation](XML_Validation.md) - [HowToRelease](HowToRelease.md) - how to do a release -- [Docker](Docker.md) - projects using Dockerised SUMO +- [Docker](Docker.md) - how to use containerized SUMO - [How To create a CI Test with GitHub Actions](Github_Actions_CI_Test.md) - projects depending on SUMO - [Git](GitStuff.md) - [Profiling](Profiling.md) diff --git a/docs/web/docs/Installing/index.md b/docs/web/docs/Installing/index.md index f26231f1e5fd..f32db00f30e4 100644 --- a/docs/web/docs/Installing/index.md +++ b/docs/web/docs/Installing/index.md @@ -158,14 +158,7 @@ you need several additional python modules. The easiest way to install them is t # via Docker -Building and installing SUMO from source is not an easy task for -beginner users. Docker is a popular tool to solve this issue. Searching -"SUMO" at [Docker Hub](https://hub.docker.com) will give several results -from existing attempts at Dockerising SUMO. - -The solution given at -[docker-sumo](https://github.com/bogaotory/docker-sumo) demonstrates how -to Dockerise SUMO version 0.30.0 on top of Ubuntu 16.04. As well as -**sumo** and **traci**, the use of **sumo-gui** is also demonstrated by -[docker-sumo](https://github.com/bogaotory/docker-sumo) so that the -users have access to the graphical interface of a Dockerised SUMO. +Building and installing SUMO from source is not an easy task for beginner users. +Docker is a popular tool to solve this issue. +SUMO provides [Dockerfiles](https://github.com/eclipse-sumo/sumo/blob/main/build_config/docker) and [prebuilt Docker images](https://github.com/eclipse-sumo/sumo/pkgs/container/sumo/versions) to use. +For more details check out [the documentation on dockerized SUMO](../Developer/Docker.md) or [the tutorial on dockerized SUMO](../Tutorials/Containerized_SUMO.md). diff --git a/docs/web/docs/Tutorials/Containerized_SUMO.md b/docs/web/docs/Tutorials/Containerized_SUMO.md new file mode 100644 index 000000000000..841123312c45 --- /dev/null +++ b/docs/web/docs/Tutorials/Containerized_SUMO.md @@ -0,0 +1,114 @@ +--- +title: Containerized SUMO +--- + +This tutorial shows how to use SUMO to run simulations inside a docker container. + +## Introduction + +This tutorial demonstrates how to use SUMO for running simulations without installing the software on your local machine. + +It is also possible to run the GUI applications from the docker container. +The way to do this is highly dependent on your individual setup, so we will not provide the required configuration or commands. + +## Getting the docker image + +You can either get the latest docker image from the SUMO docker registry by using + +```shell + docker pull ghcr.io/eclipse-sumo/sumo:main +``` + +or build your own local version of the image by checking out the [SUMO repository](https://github.com/eclipse-sumo/sumo) and executing: + +```shell + cd build_config/docker + docker build -t ghcr.io/eclipse-sumo/sumo:main -f Dockerfile.ubuntu.git . +``` + +## Creating simulation files + +For this tutorial we use the simulation files from the [Hello SUMO Tutorial](Hello_SUMO.md). +Check out that tutorial to learn about the purpose of the files. + +Create a directory called `hello_sumo_docker` and in it create 3 files: + +#### `hello.net.xml` + +```xml + + + + + + + + + + + + + + + + + + + + + + +``` + +#### `hello.rou.xml` + +```xml + + + + + +``` + +#### `hello.sumocfg` + +```xml + + + + + + + + +``` + +## Running the simulation + +To run the simulation start a new container from the image and mount the directory in there with the `-v`-Option. +Add `--full-output result.xml` to the SUMO command to get the result of the simulation. +The command to start the container might look like this: + +```shell + # Replace this with the location where your simulation files are located. + export SIMULATION_FILES_DIR=$PWD + + docker run \ + --rm \ + -v $SIMULATION_FILES_DIR:$SIMULATION_FILES_DIR \ + ghcr.io/eclipse-sumo/sumo:main \ + sumo --configuration-file $SIMULATION_FILES_DIR/hello.sumocfg --full-output $SIMULATION_FILES_DIR/result.xml +``` + +This will run the simulation specified in `hello.sumocfg`. +After that, a file named `result.xml` will have been created, which contains the output of the simulation. + +## Further Reading + +You can try more of the [Tutorials](index.md) with the docker image. diff --git a/docs/web/docs/Tutorials/index.md b/docs/web/docs/Tutorials/index.md index 2a1445a0bc54..dada7d77ea20 100644 --- a/docs/web/docs/Tutorials/index.md +++ b/docs/web/docs/Tutorials/index.md @@ -62,6 +62,7 @@ The SUMO User Conference is an annual event organized by the German Aerospace Ce * [PT from OpenStreetMap](PT_from_OpenStreetMap.md) - Creating a runnable public transit scenario entirely from [OpenStreetMap](https://www.openstreetmap.org/) * [Importing GTFS](GTFS.md) - Importing public transport schedules from public sources using the General Transit Feed Specification * [Port](port.md) - Creating a scenario that simulates the port logistics of an arbitrary port from [OpenStreetMap](https://www.openstreetmap.org/) +* [Containerized SUMO](Containerized_SUMO.md) - Using SUMO to run a simulation inside a docker container # TraCI Tutorials These tutorials use the [Python-TraCI Library](../TraCI/Interfacing_TraCI_from_Python.md) for interfacing a python script with a running [sumo](../sumo.md) simulation. diff --git a/src/foreign/rtree/SUMORTree.h b/src/foreign/rtree/SUMORTree.h index cebcac6a2194..9fa0e5e6c174 100644 --- a/src/foreign/rtree/SUMORTree.h +++ b/src/foreign/rtree/SUMORTree.h @@ -78,8 +78,6 @@ class SUMORTree : private GUI_RTREE_QUAL, public Boundary { // cannot throw exception in destructor WRITE_ERROR("Mutex of SUMORTree is locked during call of the destructor"); } - // show information in gui testing debug gl mode - WRITE_GLDEBUG("Number of objects in SUMORTree during call of the destructor: " + toString(myTreeDebug.size())); } /** @brief Insert entry @@ -144,8 +142,6 @@ class SUMORTree : private GUI_RTREE_QUAL, public Boundary { throw ProcessError("GUIGlObject was already inserted"); } else { myTreeDebug[o] = b; - // write GL Debug - WRITE_GLDEBUG("\tInserted " + o->getFullName() + " into SUMORTree with boundary " + toString(b)); } } // insert it in Tree @@ -186,7 +182,6 @@ class SUMORTree : private GUI_RTREE_QUAL, public Boundary { throw ProcessError("add boundary of GUIGlObject " + o->getMicrosimID() + " is different of removed boundary (" + toString(b) + " != " + toString(myTreeDebug.at(o)) + ")"); } else { myTreeDebug.erase(o); - WRITE_GLDEBUG("\tRemoved object " + o->getFullName() + " from SUMORTree with boundary " + toString(b)); } } // remove it from Tree diff --git a/src/guisim/GUIPerson.cpp b/src/guisim/GUIPerson.cpp index 147106aa1978..287e8e1d056a 100644 --- a/src/guisim/GUIPerson.cpp +++ b/src/guisim/GUIPerson.cpp @@ -234,6 +234,7 @@ GUIPerson::getParameterWindow(GUIMainWindow& app, ret->mkItem(TL("dest stop [id]"), true, new FunctionBindingString(this, &GUIPerson::getDestinationStopID)); ret->mkItem(TL("arrival position [m]"), true, new FunctionBinding(this, &GUIPerson::getStageArrivalPos)); ret->mkItem(TL("edge [id]"), true, new FunctionBindingString(this, &GUIPerson::getEdgeID)); + ret->mkItem(TL("lane [id]"), true, new FunctionBindingString(this, &GUIPerson::getLaneID)); ret->mkItem(TL("position [m]"), true, new FunctionBinding(this, &GUIPerson::getEdgePos)); ret->mkItem(TL("speed [m/s]"), true, new FunctionBinding(this, &GUIPerson::getSpeed)); ret->mkItem(TL("speed factor"), false, getChosenSpeedFactor()); @@ -594,6 +595,16 @@ GUIPerson::getEdgeID() const { } +std::string +GUIPerson::getLaneID() const { + FXMutexLock locker(myLock); + if (hasArrived()) { + return "arrived"; + } + return getLane() != nullptr ? getLane()->getID() : ""; +} + + std::string GUIPerson::getFromEdgeID() const { FXMutexLock locker(myLock); diff --git a/src/guisim/GUIPerson.h b/src/guisim/GUIPerson.h index 733b10fe07cb..863487dd3cc1 100644 --- a/src/guisim/GUIPerson.h +++ b/src/guisim/GUIPerson.h @@ -150,7 +150,10 @@ class GUIPerson : public MSPerson, public GUIGlObject { /// @brief get edge ID std::string getEdgeID() const; - /// @brief ger from edge ID + /// @brief get lane ID + std::string getLaneID() const; + + /// @brief get from edge ID std::string getFromEdgeID() const; /// @brief get destination edge ID diff --git a/src/libsumo/Helper.cpp b/src/libsumo/Helper.cpp index a40e19de9aa6..bb2f22075e37 100644 --- a/src/libsumo/Helper.cpp +++ b/src/libsumo/Helper.cpp @@ -431,7 +431,8 @@ Helper::convertCartesianToRoadMap(const Position& pos, const SUMOVehicleClass vC MSLane* lane = const_cast(dynamic_cast(named)); if (lane->allowsVehicleClass(vClass)) { // @todo this may be a place where 3D is required but 2D is used - const double newDistance = lane->getShape().distance2D(pos); + double newDistance = lane->getShape().distance2D(pos); + newDistance = patchShapeDistance(lane, pos, newDistance, false); if (newDistance < minDistance || (newDistance == minDistance && result.first != nullptr @@ -1568,10 +1569,12 @@ Helper::moveToXYMap(const Position& pos, double maxRouteDistance, bool mayLeaveN double off = laneShape.nearest_offset_to_point2D(pos, true); if (off != GeomHelper::INVALID_OFFSET) { perpendicularDist = laneShape.distance2D(pos, true); + perpendicularDist = patchShapeDistance(l, pos, perpendicularDist, true); } off = l->getShape().nearest_offset_to_point2D(pos, perpendicular); if (off != GeomHelper::INVALID_OFFSET) { dist = l->getShape().distance2D(pos, perpendicular); + dist = patchShapeDistance(l, pos, dist, perpendicular); langle = GeomHelper::naviDegree(l->getShape().rotationAtOffset(off)); } // cannot trust lanePos on walkingArea @@ -1697,7 +1700,8 @@ Helper::findCloserLane(const MSEdge* edge, const Position& pos, SUMOVehicleClass // mapping to shapeless lanes is a bad idea continue; } - const double dist = candidateLane->getShape().distance2D(pos); // get distance + double dist = candidateLane->getShape().distance2D(pos); + dist = patchShapeDistance(candidateLane, pos, dist, false); #ifdef DEBUG_MOVEXY std::cout << " b at lane " << candidateLane->getID() << " dist:" << dist << " best:" << bestDistance << std::endl; #endif @@ -1843,6 +1847,15 @@ Helper::moveToXYMap_matchingRoutePosition(const Position& pos, const std::string } +double +Helper::patchShapeDistance(const MSLane* lane, const Position& pos, double dist, bool wasPerpendicular) { + if ((lane->isNormal() || lane->isCrossing()) && (wasPerpendicular || lane->getShape().nearest_offset_to_point25D(pos, true) != GeomHelper::INVALID_OFFSET)) { + dist = MAX2(0.0, dist - lane->getWidth() * 0.5); + } + return dist; +} + + Helper::SubscriptionWrapper::SubscriptionWrapper(VariableWrapper::SubscriptionHandler handler, SubscriptionResults& into, ContextSubscriptionResults& context) : VariableWrapper(handler), myResults(into), myContextResults(context), myActiveResults(&into) { diff --git a/src/libsumo/Helper.h b/src/libsumo/Helper.h index 9bbca1b66cd0..28f9eb92e675 100644 --- a/src/libsumo/Helper.h +++ b/src/libsumo/Helper.h @@ -186,6 +186,10 @@ class Helper { static bool findCloserLane(const MSEdge* edge, const Position& pos, SUMOVehicleClass vClass, double& bestDistance, MSLane** lane); + /// @brief return the distance of pos from the area covered by this lane + static double patchShapeDistance(const MSLane* lane, const Position& pos, double dist, bool wasPerpendicular); + + class LaneUtility { public: LaneUtility(double dist_, double perpendicularDist_, double lanePos_, double angleDiff_, bool ID_, diff --git a/src/microsim/MSLane.cpp b/src/microsim/MSLane.cpp index 0df1ee3f9ccb..d0adb0b0a5ef 100644 --- a/src/microsim/MSLane.cpp +++ b/src/microsim/MSLane.cpp @@ -1723,7 +1723,7 @@ MSLane::detectCollisions(SUMOTime timestep, const std::string& stage) { #ifdef DEBUG_PEDESTRIAN_COLLISIONS if (DEBUG_COND && DEBUG_COND2(v)) { std::cout << SIMTIME << " back=" << back << " right=" << right << " person=" << Named::getIDSecure(leader.first) - << " dist=" << leader.second << " jammed=" << leader.first->isJammed() << "\n"; + << " dist=" << leader.second << " jammed=" << (leader.first == nullptr ? false : leader.first->isJammed()) << "\n"; } #endif if (leader.first != 0 && leader.second < length && !leader.first->isJammed()) { diff --git a/src/microsim/transportables/MSPModel_Striping.cpp b/src/microsim/transportables/MSPModel_Striping.cpp index d7484af63833..6765fda6d065 100644 --- a/src/microsim/transportables/MSPModel_Striping.cpp +++ b/src/microsim/transportables/MSPModel_Striping.cpp @@ -2377,6 +2377,7 @@ MSPModel_Striping::PState::moveToXY(MSPerson* p, Position pos, MSLane* lane, dou myWalkingAreaPath = nullptr; myEdgePos = lanePos; myPosLat = lateral_offset - lanePosLat; + lane->requireCollisionCheck(); } // guess direction const double angleDiff = GeomHelper::getMinAngleDiff(angle, oldAngle); @@ -2411,7 +2412,9 @@ MSPModel_Striping::PState::moveToXY(MSPerson* p, Position pos, MSLane* lane, dou #endif } #ifdef DEBUG_MOVETOXY - std::cout << " newRelPos=" << Position(myEdgePos, myPosLat) << " edge=" << myPerson->getEdge()->getID() << " newPos=" << myPerson->getPosition() + std::cout << " newRelPos=" << Position(myEdgePos, myPosLat) << " edge=" << myPerson->getEdge()->getID() + << " newPos=" << myPerson->getPosition() + << " latOffset=" << getLatOffset() << " oldAngle=" << oldAngle << " angleDiff=" << angleDiff << " newDir=" << myDir << "\n"; #endif if (oldLane == myLane) { diff --git a/src/netedit/GNEApplicationWindow.cpp b/src/netedit/GNEApplicationWindow.cpp index 66c402d74c30..09572156d9b4 100644 --- a/src/netedit/GNEApplicationWindow.cpp +++ b/src/netedit/GNEApplicationWindow.cpp @@ -851,9 +851,6 @@ GNEApplicationWindow::onCmdOpenTLSPrograms(FXObject*, FXSelector, void*) { myUndoList->end(); update(); } - } else { - // write debug information - WRITE_DEBUG("Cancel TLSProgram dialog"); } return 1; } @@ -1191,30 +1188,22 @@ GNEApplicationWindow::onCmdClearMsgWindow(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdLoadAdditionalsInSUMOGUI(FXObject*, FXSelector, void*) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Toggle load additionals in sumo-gui"); return 1; } long GNEApplicationWindow::onCmdLoadDemandInSUMOGUI(FXObject*, FXSelector, void*) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Toggle load demand in sumo-gui"); return 1; } long GNEApplicationWindow::onCmdAbout(FXObject*, FXSelector, void*) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening about dialog"); // create and open about dialog GNEAbout* about = new GNEAbout(this); about->create(); about->show(PLACEMENT_OWNER); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed about dialog"); return 1; } @@ -1755,23 +1744,13 @@ long GNEApplicationWindow::computeJunctionWithVolatileOptions() { // declare variable to save FXMessageBox outputs. FXuint answer = 0; - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Volatile Recomputing'"); // open question dialog box answer = FXMessageBox::question(myNet->getViewNet()->getApp(), MBOX_YES_NO, TL("Recompute with volatile options"), TL("Changes produced in the net due a recomputing with volatile options cannot be undone. Continue?")); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Volatile Recomputing' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Volatile Recomputing' with 'ESC'"); - } // abort recompute with volatile options return 0; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Volatile Recomputing' with 'Yes'"); // save all elements onCmdSaveAdditionals(nullptr, 0, nullptr); onCmdSaveDemandElements(nullptr, 0, nullptr); @@ -1903,29 +1882,19 @@ GNEApplicationWindow::onCmdProcessButton(FXObject*, FXSelector sel, void*) { // check what FXMenuCommand was called switch (FXSELID(sel)) { case MID_HOTKEY_F5_COMPUTE_NETWORK_DEMAND: - // show extra information for tests - WRITE_DEBUG("Key F5 (Compute) pressed"); myNet->computeNetwork(this, true, false); updateControls(); break; case MID_HOTKEY_SHIFT_F5_COMPUTEJUNCTIONS_VOLATILE: - // show extra information for tests - WRITE_DEBUG("Keys Shift + F5 (Compute with volatile options) pressed"); computeJunctionWithVolatileOptions(); break; case MID_HOTKEY_F6_CLEAN_SOLITARYJUNCTIONS_UNUSEDROUTES: - // show extra information for tests - WRITE_DEBUG("Key F6 (Clean junction) pressed"); myNet->removeSolitaryJunctions(myUndoList); break; case MID_HOTKEY_F7_JOIN_SELECTEDJUNCTIONS_ROUTES: - // show extra information for tests - WRITE_DEBUG("Key F7 (Join junctions) pressed"); myNet->joinSelectedJunctions(myUndoList); break; case MID_HOTKEY_F8_CLEANINVALID_CROSSINGS_DEMANDELEMENTS: - // show extra information for tests - WRITE_DEBUG("Key F8 (Clean invalid crossings) pressed"); myNet->cleanInvalidCrossings(myUndoList); break; default: @@ -1935,29 +1904,19 @@ GNEApplicationWindow::onCmdProcessButton(FXObject*, FXSelector sel, void*) { // check what FXMenuCommand was called switch (FXSELID(sel)) { case MID_HOTKEY_F5_COMPUTE_NETWORK_DEMAND: - // show extra information for tests - WRITE_DEBUG("Key F5 (Compute) pressed"); myNet->computeDemandElements(this); updateControls(); break; case MID_HOTKEY_F6_CLEAN_SOLITARYJUNCTIONS_UNUSEDROUTES: - // show extra information for tests - WRITE_DEBUG("Key F6 (RemoveUnusedRoutes) pressed"); myNet->cleanUnusedRoutes(myUndoList); break; case MID_HOTKEY_F7_JOIN_SELECTEDJUNCTIONS_ROUTES: - // show extra information for tests - WRITE_DEBUG("Key F7 (JoinRoutes) pressed"); myNet->joinRoutes(myUndoList); break; case MID_HOTKEY_SHIFT_F7_ADJUST_PERSON_PLANS: - // show extra information for tests - WRITE_DEBUG("Key F7 (AdjustPersonPlans) pressed"); myNet->adjustPersonPlans(myUndoList); break; case MID_HOTKEY_F8_CLEANINVALID_CROSSINGS_DEMANDELEMENTS: - // show extra information for tests - WRITE_DEBUG("Key F8 (CleanInvalidDemandElements) pressed"); myNet->cleanInvalidDemandElements(myUndoList); break; default: @@ -2070,24 +2029,16 @@ long GNEApplicationWindow::onCmdAbort(FXObject*, FXSelector, void*) { // check that view exists if (myViewNet) { - // show extra information for tests - WRITE_DEBUG("Key ESC (abort) pressed"); // first check if we're selecting a subset of edges in TAZ Frame if (myViewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModule()->getEdgeAndTAZChildrenSelected().size() > 0) { - // show extra information for tests - WRITE_DEBUG("Cleaning current selected edges"); // clear current selection myViewNet->getViewParent()->getTAZFrame()->getTAZSelectionStatisticsModule()->clearSelectedEdges(); } else if (myViewNet->getViewParent()->getInspectorFrame()->shown()) { // check if stop select parent if (myViewNet->getViewParent()->getInspectorFrame()->getNeteditAttributesEditor()->isReparenting()) { - // show extra information for tests - WRITE_DEBUG("Stop select new parent"); // and stop select paretn myViewNet->getViewParent()->getInspectorFrame()->getNeteditAttributesEditor()->abortReparenting(); } else { - // show extra information for tests - WRITE_DEBUG("Cleaning inspected elements"); // clear inspected elements myViewNet->getViewParent()->getInspectorFrame()->clearInspection(); } @@ -2104,8 +2055,6 @@ long GNEApplicationWindow::onCmdDel(FXObject*, FXSelector, void*) { // check that view exists if (myViewNet) { - // show extra information for tests - WRITE_DEBUG("Key DEL (delete) pressed"); myViewNet->hotkeyDel(); } return 1; @@ -2116,8 +2065,6 @@ long GNEApplicationWindow::onCmdEnter(FXObject*, FXSelector, void*) { // check that view exists if (myViewNet) { - // show extra information for tests - WRITE_DEBUG("Key ENTER pressed"); myViewNet->hotkeyEnter(); } return 1; @@ -2128,8 +2075,6 @@ long GNEApplicationWindow::onCmdBackspace(FXObject*, FXSelector, void*) { // check that view exists if (myViewNet) { - // show extra information for tests - WRITE_DEBUG("Key BACKSPACE pressed"); myViewNet->hotkeyBackSpace(); } return 1; @@ -2239,14 +2184,6 @@ long GNEApplicationWindow::onCmdToggleGrid(FXObject* sender, FXSelector sel, void* ptr) { // check that view exists if (myViewNet) { - // show debug info - if (myViewNet->getVisualisationSettings().showGrid) { - // show extra information for tests - WRITE_DEBUG("Disabled grid through Ctrl+g hotkey"); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled grid through Ctrl+g hotkey"); - } // Call manually toggle grid function myViewNet->onCmdToggleShowGrid(sender, sel, ptr); } @@ -2258,14 +2195,6 @@ long GNEApplicationWindow::onCmdToggleDrawJunctionShape(FXObject* sender, FXSelector sel, void* ptr) { // check that view exists if (myViewNet) { - // show debug info - if (myViewNet->getVisualisationSettings().drawJunctionShape) { - // show extra information for tests - WRITE_DEBUG("Disabled draw junction shape through Ctrl+j hotkey"); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled draw junction shape through Ctrl+j hotkey"); - } // Call manually toggle junction shape function myViewNet->onCmdToggleDrawJunctionShape(sender, sel, ptr); } @@ -2397,14 +2326,10 @@ GNEApplicationWindow::onCmdTutorial(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdFeedback(FXObject*, FXSelector, void*) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening feedback dialog"); // create and open feedback dialog GUIDialog_Feedback* feedback = new GUIDialog_Feedback(this); feedback->create(); feedback->show(PLACEMENT_OWNER); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed feedback dialog"); return 1; } @@ -2452,7 +2377,6 @@ GNEApplicationWindow::onCmdOpenNetgenerateOptionsDialog(FXObject*, FXSelector, v long GNEApplicationWindow::onCmdUndo(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Keys Ctrl+Z (Undo) pressed"); // Check conditions if (myViewNet == nullptr) { return 0; @@ -2484,7 +2408,6 @@ GNEApplicationWindow::onCmdUndo(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdRedo(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Keys Ctrl+Y (Redo) pressed"); // Check conditions if (myViewNet == nullptr) { return 0; @@ -2554,7 +2477,6 @@ GNEApplicationWindow::onCmdComputePathManager(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdCut(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+X (Cut) pressed"); // Prepared for #6042 return 1; } @@ -2562,7 +2484,6 @@ GNEApplicationWindow::onCmdCut(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdCopy(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+C (Copy) pressed"); // Prepared for #6042 return 1; } @@ -2570,7 +2491,6 @@ GNEApplicationWindow::onCmdCopy(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdPaste(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+V (Paste) pressed"); // Prepared for #6042 return 1; } @@ -2578,7 +2498,6 @@ GNEApplicationWindow::onCmdPaste(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdSetTemplate(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+F1 (Set Template) pressed"); // first check if myViewNet exist if (myViewNet) { // call set template in inspector frame @@ -2590,7 +2509,6 @@ GNEApplicationWindow::onCmdSetTemplate(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdCopyTemplate(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+F2 (Copy Template) pressed"); // first check if myViewNet exist if (myViewNet) { // call copy template in inspector frame @@ -2602,7 +2520,6 @@ GNEApplicationWindow::onCmdCopyTemplate(FXObject*, FXSelector, void*) { long GNEApplicationWindow::onCmdClearTemplate(FXObject*, FXSelector, void*) { - WRITE_DEBUG("Key Ctrl+F3 (Clear Template) pressed"); // first check if myViewNet exist if (myViewNet) { // call clear template in inspector frame @@ -3213,31 +3130,21 @@ GNEApplicationWindow::onCmdSaveNetwork(FXObject* sender, FXSelector sel, void* p // 1 -> Invalid network elements fixed, friendlyPos enabled, or saved with invalid positions GNEFixNetworkElements fixNetworkElementsDialog(myViewNet, invalidNetworkElements); if (fixNetworkElementsDialog.execute() == 0) { - // show debug information - WRITE_DEBUG("network elements saving aborted"); // stop return 0; } else { // Save network myNet->saveNetwork(); saved = true; - // show debug information - WRITE_DEBUG("network elements saved after dialog"); } } else { // Save network myNet->saveNetwork(); saved = true; - // show debug information - WRITE_DEBUG("network elements saved"); } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving network'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving Network failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving network' with 'OK'"); } if (saved) { // write info @@ -3266,8 +3173,8 @@ GNEApplicationWindow::onCmdSaveNetworkAs(FXObject*, FXSelector, void*) { neteditOptions.set("net-file", networkFile); // update netedit title with the network name setTitle(MFXUtils::getTitleText(myTitlePrefix, networkFile.c_str())); - // set focus again in viewNet - myViewNet->setFocus(); + // enable save network + myNet->getSavingStatus()->requireSaveNetwork(); // save network return onCmdSaveNetwork(nullptr, 0, nullptr); } else { @@ -3303,12 +3210,8 @@ GNEApplicationWindow::onCmdSavePlainXMLAs(FXObject*, FXSelector, void*) { // write info WRITE_MESSAGE(TL("Plain XML saved with prefix '") + plainXMLFile + "'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Error saving plainXML'"); // open message box FXMessageBox::error(this, MBOX_OK, TL("Saving plain xml failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Error saving plainXML' with 'OK'"); } // end saving plain XML getApp()->endWaitCursor(); @@ -3331,12 +3234,8 @@ GNEApplicationWindow::onCmdSaveJoinedJunctionsAs(FXObject*, FXSelector, void*) { // write info WRITE_MESSAGE(TL("Joined junctions saved to '") + joinedJunctionsFile + "'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving joined'"); // opening error message FXMessageBox::error(this, MBOX_OK, TL("Saving joined junctions failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving joined' with 'OK'"); } getApp()->endWaitCursor(); // set focus again in viewNet @@ -3560,12 +3459,8 @@ GNEApplicationWindow::onCmdSaveTLSPrograms(FXObject* obj, FXSelector sel, void* // write info WRITE_MESSAGE(TL("TLS Programs saved in '") + neteditOptions.getString("tls-file") + "'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving TLS Programs'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving TLS Programs failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving TLS Programs' with 'OK'"); } myMessageWindow->addSeparator(); getApp()->endWaitCursor(); @@ -3608,12 +3503,8 @@ GNEApplicationWindow::onCmdSaveEdgeTypes(FXObject* obj, FXSelector sel, void* pt // write info WRITE_MESSAGE(TL("EdgeType saved in '") + neteditOptions.getString("edgetypes-file") + "'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving edgeTypes'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving edgeTypes failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving edgeTypes' with 'OK'"); } myMessageWindow->addSeparator(); getApp()->endWaitCursor(); @@ -3820,12 +3711,8 @@ GNEApplicationWindow::onCmdSaveAdditionals(FXObject* sender, FXSelector sel, voi return 0; } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving additionals'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving additionals failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving additionals' with 'OK'"); } return 0; } @@ -3885,12 +3772,8 @@ GNEApplicationWindow::onCmdSaveJuPedSimElementsAs(FXObject*, FXSelector, void*) return 0; } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving JuPedSim elements'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving JuPedSim elements failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving JuPedSim elements' with 'OK'"); } } return 0; @@ -4028,12 +3911,8 @@ GNEApplicationWindow::onCmdSaveDemandElements(FXObject* sender, FXSelector sel, return 0; } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving demand elements'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving demand elements failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving demand elements' with 'OK'"); } } return 0; @@ -4209,12 +4088,8 @@ GNEApplicationWindow::onCmdSaveDataElements(FXObject* sender, FXSelector sel, vo return 0; } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving data elements'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving data elements failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving data elements' with 'OK'"); } } return 0; @@ -4383,12 +4258,8 @@ GNEApplicationWindow::onCmdSaveMeanDatas(FXObject* sender, FXSelector sel, void* return 0; } } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving demand elements'"); // open error message box FXMessageBox::error(this, MBOX_OK, TL("Saving demand elements failed!"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving demand elements' with 'OK'"); } } return 0; @@ -4429,66 +4300,43 @@ GNEApplicationWindow::onCmdSaveMeanDatasAs(FXObject* sender, FXSelector sel, voi bool GNEApplicationWindow::continueWithUnsavedChanges() { + if (continueWithUnsavedNetworkChanges() && + continueWithUnsavedAdditionalChanges() && + continueWithUnsavedDemandElementChanges() && + continueWithUnsavedDataElementChanges() && + continueWithUnsavedMeanDataElementChanges()) { + // clear undo list + clearUndoList(); + return true; + } else { + return false; + } +} + + +bool +GNEApplicationWindow::continueWithUnsavedNetworkChanges() { if (myNet && !myNet->getSavingStatus()->isNetworkSaved()) { // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Confirm close network'"); // open question box const std::string header = TL("Confirm close Network"); const std::string contentsA = TL("You have unsaved changes in the network."); const std::string contentsB = TL("Do you wish to close and discard all changes?"); const auto answer = GUISaveDialog::question(getApp(), header.c_str(), "%s", (contentsA + "\n" + contentsB).c_str()); - // restore focus to view net - myViewNet->setFocus(); // if user close dialog box, check additionals and demand elements if (answer == GUISaveDialog::CLICKED_DISCARD) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Confirm close network' with 'Quit'"); - if (continueWithUnsavedAdditionalChanges() && - continueWithUnsavedDemandElementChanges() && - continueWithUnsavedDataElementChanges() && - continueWithUnsavedMeanDataElementChanges()) { - // clear undo list - clearUndoList(); - return true; - } else { - return false; - } + // nothing to save, return true + return true; } else if (answer == GUISaveDialog::CLICKED_SAVE) { - // save network - onCmdSaveNetwork(nullptr, 0, nullptr); - // check - if (continueWithUnsavedAdditionalChanges() && - continueWithUnsavedDemandElementChanges() && - continueWithUnsavedDataElementChanges() && - continueWithUnsavedMeanDataElementChanges()) { - // clear undo list - clearUndoList(); - return true; - } else { - return false; - } + // return true if was sucessfully saved + return (onCmdSaveNetwork(nullptr, 0, nullptr) == 1); } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Confirm close network' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Confirm close network' with 'ESC'"); - } // return false to stop closing/reloading return false; } } else { - if (continueWithUnsavedAdditionalChanges() && - continueWithUnsavedDemandElementChanges() && - continueWithUnsavedDataElementChanges() && - continueWithUnsavedMeanDataElementChanges()) { - // clear undo list - clearUndoList(); - return true; - } else { - // return false to stop closing/reloading - return false; - } + // nothing to save, return true + return true; } } @@ -4497,36 +4345,19 @@ bool GNEApplicationWindow::continueWithUnsavedAdditionalChanges() { // Check if there are non saved additionals if (myNet && !myNet->getSavingStatus()->isAdditionalsSaved()) { - WRITE_DEBUG("Opening FXMessageBox 'Save additionals before close'"); // open question box const std::string header = TL("Save additional elements before close"); const std::string contentsA = TL("You have unsaved additional elements."); const std::string contentsB = TL("Do you wish to close and discard all changes?"); const auto answer = GUISaveDialog::question(getApp(), header.c_str(), "%s", (contentsA + "\n" + contentsB).c_str()); - // restore focus to view net - myViewNet->setFocus(); // if answer was affirmative, but there was an error during saving additionals, return false to stop closing/reloading if (answer == GUISaveDialog::CLICKED_DISCARD) { - WRITE_DEBUG("Closed FXMessageBox 'Save additionals before close' with 'Quit'"); // nothing to save, return true return true; } else if (answer == GUISaveDialog::CLICKED_SAVE) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save additionals before close' with 'Yes'"); - if (onCmdSaveAdditionals(nullptr, 0, nullptr) == 1) { - // additionals successfully saved - return true; - } else { - // error saving additionals, abort saving - return false; - } + // return true if was sucessfully saved + return (onCmdSaveAdditionals(nullptr, 0, nullptr) == 1); } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save additionals before close' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save additionals before close' with 'ESC'"); - } // abort saving return false; } @@ -4541,36 +4372,19 @@ bool GNEApplicationWindow::continueWithUnsavedDemandElementChanges() { // Check if there are non saved demand elements if (myNet && !myNet->getSavingStatus()->isDemandElementsSaved()) { - WRITE_DEBUG("Opening FXMessageBox 'Save demand elements before close'"); // open question box const std::string header = TL("Save demand elements before close"); const std::string contentsA = TL("You have unsaved demand elements."); const std::string contentsB = TL("Do you wish to close and discard all changes?"); const auto answer = GUISaveDialog::question(getApp(), header.c_str(), "%s", (contentsA + "\n" + contentsB).c_str()); - // restore focus to view net - myViewNet->setFocus(); // if answer was affirmative, but there was an error during saving demand elements, return false to stop closing/reloading if (answer == GUISaveDialog::CLICKED_DISCARD) { - WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before close' with 'Quit'"); // nothing to save, return true return true; } else if (answer == GUISaveDialog::CLICKED_SAVE) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before close' with 'Yes'"); - if (onCmdSaveDemandElements(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1) { - // demand elements successfully saved - return true; - } else { - // error saving demand elements, abort saving - return false; - } + // return true if was sucessfully saved + return (onCmdSaveDemandElements(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1); } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before close' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save demand elements before close' with 'ESC'"); - } // abort saving return false; } @@ -4585,36 +4399,19 @@ bool GNEApplicationWindow::continueWithUnsavedDataElementChanges() { // Check if there are non saved data elements if (myNet && !myNet->getSavingStatus()->isDataElementsSaved()) { - WRITE_DEBUG("Opening FXMessageBox 'Save data elements before close'"); // open question box const std::string header = TL("Save data elements before close"); const std::string contentsA = TL("You have unsaved data elements."); const std::string contentsB = TL("Do you wish to close and discard all changes?"); const auto answer = GUISaveDialog::question(getApp(), header.c_str(), "%s", (contentsA + "\n" + contentsB).c_str()); - // restore focus to view net - myViewNet->setFocus(); // if answer was affirmative, but there was an error during saving data elements, return false to stop closing/reloading if (answer == GUISaveDialog::CLICKED_DISCARD) { - WRITE_DEBUG("Closed FXMessageBox 'Save data elements before close' with 'Quit'"); // nothing to save, return true return true; } else if (answer == GUISaveDialog::CLICKED_SAVE) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save data elements before close' with 'Yes'"); - if (onCmdSaveDataElements(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1) { - // data elements successfully saved - return true; - } else { - // error saving data elements, abort saving - return false; - } + // return true if was sucessfully saved + return (onCmdSaveDataElements(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1); } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save data elements before close' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save data elements before close' with 'ESC'"); - } // abort saving return false; } @@ -4629,36 +4426,19 @@ bool GNEApplicationWindow::continueWithUnsavedMeanDataElementChanges() { // Check if there are non saved data elements if (myNet && !myNet->getSavingStatus()->isMeanDatasSaved()) { - WRITE_DEBUG("Opening FXMessageBox 'Save meanData elements before close'"); // open question box const std::string header = TL("Save meanData elements before close"); const std::string contentsA = TL("You have unsaved meanData elements."); const std::string contentsB = TL("Do you wish to close and discard all changes?"); const auto answer = GUISaveDialog::question(getApp(), header.c_str(), "%s", (contentsA + "\n" + contentsB).c_str()); - // restore focus to view net - myViewNet->setFocus(); // if answer was affirmative, but there was an error during saving meanData elements, return false to stop closing/reloading if (answer == GUISaveDialog::CLICKED_DISCARD) { - WRITE_DEBUG("Closed FXMessageBox 'Save meanData elements before close' with 'Quit'"); // nothing to save, return true return true; } else if (answer == GUISaveDialog::CLICKED_SAVE) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Save meanData elements before close' with 'Yes'"); - if (onCmdSaveMeanDatas(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1) { - // meanData elements successfully saved - return true; - } else { - // error saving meanData elements, abort saving - return false; - } + // return true if was sucessfully saved + return (onCmdSaveMeanDatas(nullptr, MID_GNE_AUTOMATICFILENAME, nullptr) == 1); } else { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Save meanData elements before close' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Save meanData elements before close' with 'ESC'"); - } // abort saving return false; } diff --git a/src/netedit/GNEApplicationWindow.h b/src/netedit/GNEApplicationWindow.h index 7671ac61c000..6e7623f44979 100644 --- a/src/netedit/GNEApplicationWindow.h +++ b/src/netedit/GNEApplicationWindow.h @@ -791,6 +791,9 @@ class GNEApplicationWindow : public GUIMainWindow, public MFXInterThreadEventCli /// @brief warns about unsaved changes and gives the user the option to abort bool continueWithUnsavedChanges(); + /// @brief warns about unsaved changes in network and gives the user the option to abort + bool continueWithUnsavedNetworkChanges(); + /// @brief warns about unsaved changes in additionals and gives the user the option to abort bool continueWithUnsavedAdditionalChanges(); diff --git a/src/netedit/GNEApplicationWindowHelper.cpp b/src/netedit/GNEApplicationWindowHelper.cpp index f995926e3cf4..7e4d997cdcf6 100644 --- a/src/netedit/GNEApplicationWindowHelper.cpp +++ b/src/netedit/GNEApplicationWindowHelper.cpp @@ -2345,179 +2345,51 @@ GNEApplicationWindowHelper::toggleEditOptionsNetwork(GNEViewNet* viewNet, const const int numericalKeyPressed, FXObject* obj, FXSelector sel) { // finally function correspond to visibleMenuCommands[numericalKeyPressed] if (menuCheck == viewNet->getNetworkViewOptions().menuCheckToggleGrid) { - // Toggle menuCheckToggleGrid - if (viewNet->getNetworkViewOptions().menuCheckToggleGrid->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle show grid through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle show grid through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowGrid viewNet->onCmdToggleShowGrid(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckToggleDrawJunctionShape) { - // Toggle menuCheckToggleDrawJunctionShape - if (viewNet->getNetworkViewOptions().menuCheckToggleDrawJunctionShape->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleDrawJunctionShape viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckDrawSpreadVehicles) { - // Toggle menuCheckDrawSpreadVehicles - if (viewNet->getNetworkViewOptions().menuCheckDrawSpreadVehicles->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle draw spread vehicles through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle spread vehicles through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleDrawSpreadVehicles viewNet->onCmdToggleDrawSpreadVehicles(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowDemandElements) { - // Toggle menuCheckShowDemandElements - if (viewNet->getNetworkViewOptions().menuCheckShowDemandElements->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show demand elements through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show demand elements through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowDemandElementsNetwork viewNet->onCmdToggleShowDemandElementsNetwork(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckSelectEdges) { - // Toggle menuCheckSelectEdges - if (viewNet->getNetworkViewOptions().menuCheckSelectEdges->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled select edges through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled select edges through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleSelectEdges viewNet->onCmdToggleSelectEdges(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowConnections) { - // Toggle menuCheckShowConnections - if (viewNet->getNetworkViewOptions().menuCheckShowConnections->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show connections through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show connections through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowConnections viewNet->onCmdToggleShowConnections(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckHideConnections) { - // Toggle menuCheckHideConnections - if (viewNet->getNetworkViewOptions().menuCheckHideConnections->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled hide connections through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled hide connections through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleHideConnections viewNet->onCmdToggleHideConnections(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowAdditionalSubElements) { - // Toggle menuCheckShowAdditionalSubElements - if (viewNet->getNetworkViewOptions().menuCheckShowAdditionalSubElements->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show additional sub-elements through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show additional sub-elements through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowAdditionalSubElements viewNet->onCmdToggleShowAdditionalSubElements(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowTAZElements) { - // Toggle menuCheckShowTAZElements - if (viewNet->getNetworkViewOptions().menuCheckShowTAZElements->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show TAZ elements through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show TAZ elements through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowTAZElements viewNet->onCmdToggleShowTAZElements(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckExtendSelection) { - // Toggle menuCheckExtendSelection - if (viewNet->getNetworkViewOptions().menuCheckExtendSelection->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled extend selection through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled extend selection through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleExtendSelection viewNet->onCmdToggleExtendSelection(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckChangeAllPhases) { - // Toggle menuCheckChangeAllPhases - if (viewNet->getNetworkViewOptions().menuCheckChangeAllPhases->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled change all phases through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled change all phases through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleChangeAllPhases viewNet->onCmdToggleChangeAllPhases(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckMergeAutomatically) { - // Toggle menuCheckWarnAboutMerge - if (viewNet->getNetworkViewOptions().menuCheckMergeAutomatically->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled warn about merge through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled warn about merge through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleMergeAutomatically viewNet->onCmdToggleMergeAutomatically(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckShowJunctionBubble) { - // Toggle menuCheckShowJunctionBubble - if (viewNet->getNetworkViewOptions().menuCheckShowJunctionBubble->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show junction as bubble through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show junction as bubble through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowJunctionBubble viewNet->onCmdToggleShowJunctionBubbles(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckMoveElevation) { - // Toggle menuCheckMoveElevation - if (viewNet->getNetworkViewOptions().menuCheckMoveElevation->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled move elevation through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled move elevation through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleMoveElevation viewNet->onCmdToggleMoveElevation(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckChainEdges) { - // Toggle menuCheckChainEdges - if (viewNet->getNetworkViewOptions().menuCheckChainEdges->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled chain edges through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled chain edges through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleChainEdges viewNet->onCmdToggleChainEdges(obj, sel, nullptr); } else if (menuCheck == viewNet->getNetworkViewOptions().menuCheckAutoOppositeEdge) { - // Toggle menuCheckAutoOppositeEdge - if (viewNet->getNetworkViewOptions().menuCheckAutoOppositeEdge->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled auto opposite edge through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled auto opposite edge through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleAutoOppositeEdge viewNet->onCmdToggleAutoOppositeEdge(obj, sel, nullptr); } else { @@ -2530,125 +2402,36 @@ GNEApplicationWindowHelper::toggleEditOptionsNetwork(GNEViewNet* viewNet, const bool GNEApplicationWindowHelper::toggleEditOptionsDemand(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck, const int numericalKeyPressed, FXObject* obj, FXSelector sel) { if (menuCheck == viewNet->getDemandViewOptions().menuCheckToggleGrid) { - // Toggle menuCheckToggleGrid - if (viewNet->getDemandViewOptions().menuCheckToggleGrid->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle show grid through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle show grid through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowGrid viewNet->onCmdToggleShowGrid(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckToggleDrawJunctionShape) { - // Toggle menuCheckToggleDrawJunctionShape - if (viewNet->getDemandViewOptions().menuCheckToggleDrawJunctionShape->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleDrawJunctionShape viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckDrawSpreadVehicles) { - // Toggle menuCheckDrawSpreadVehicles - if (viewNet->getDemandViewOptions().menuCheckDrawSpreadVehicles->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle draw spread vehicles through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle spread vehicles through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleDrawSpreadVehicles viewNet->onCmdToggleDrawSpreadVehicles(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckHideShapes) { - // Toggle menuCheckHideShapes - if (viewNet->getDemandViewOptions().menuCheckHideShapes->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled hide shapes through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled hide shapes through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleHideShapes viewNet->onCmdToggleHideShapes(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllTrips) { - // Toggle menuCheckShowAllTrips - if (viewNet->getDemandViewOptions().menuCheckShowAllTrips->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show all trips through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show all trips through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowTrips viewNet->onCmdToggleShowTrips(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllPersonPlans) { - // Toggle menuCheckShowAllPersonPlans - if (viewNet->getDemandViewOptions().menuCheckShowAllPersonPlans->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show all person plans through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show all person plans through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowAllPersonPlans viewNet->onCmdToggleShowAllPersonPlans(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckLockPerson) { - // Toggle menuCheckShowAllPersonPlans - if (viewNet->getDemandViewOptions().menuCheckLockPerson->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled lock person plan through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled lock person plan through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleLockPerson viewNet->onCmdToggleLockPerson(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowAllContainerPlans) { - // Toggle menuCheckShowAllContainerPlans - if (viewNet->getDemandViewOptions().menuCheckShowAllContainerPlans->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show all container plans through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show all container plans through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowAllContainerPlans viewNet->onCmdToggleShowAllContainerPlans(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckLockContainer) { - // Toggle menuCheckShowAllContainerPlans - if (viewNet->getDemandViewOptions().menuCheckLockContainer->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled lock container plan through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled lock container plan through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleLockContainer viewNet->onCmdToggleLockContainer(obj, sel, nullptr); } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckHideNonInspectedDemandElements) { - // Toggle menuCheckHideNonInspectedDemandElements - if (viewNet->getDemandViewOptions().menuCheckHideNonInspectedDemandElements->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled hide non inspected demand elements through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled hide non inspected demand elements through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleHideNonInspecteDemandElements viewNet->onCmdToggleHideNonInspecteDemandElements(obj, sel, nullptr); - } else if (menuCheck == viewNet->getDemandViewOptions().menuCheckShowOverlappedRoutes) { - // Toggle menuCheckShowOverlappedRoutes - if (viewNet->getDemandViewOptions().menuCheckShowOverlappedRoutes->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show overlapped routes through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show overlapped routes through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleHideNonInspecteDemandElements viewNet->onCmdToggleShowOverlappedRoutes(obj, sel, nullptr); } else { @@ -2661,91 +2444,27 @@ GNEApplicationWindowHelper::toggleEditOptionsDemand(GNEViewNet* viewNet, const M bool GNEApplicationWindowHelper::toggleEditOptionsData(GNEViewNet* viewNet, const MFXCheckableButton* menuCheck, const int numericalKeyPressed, FXObject* obj, FXSelector sel) { if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleDrawJunctionShape) { - // Toggle menuCheckToggleDrawJunctionShape - if (viewNet->getDataViewOptions().menuCheckToggleDrawJunctionShape->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled draw junction shape through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleDrawJunctionShape viewNet->onCmdToggleDrawJunctionShape(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowAdditionals) { - // Toggle menuCheckHideShapes - if (viewNet->getDataViewOptions().menuCheckShowAdditionals->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show additionals through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show shapes through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowAdditionals viewNet->onCmdToggleShowAdditionals(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowShapes) { - // Toggle menuCheckHideShapes - if (viewNet->getDataViewOptions().menuCheckShowShapes->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show shapes through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show shapes through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowShapes viewNet->onCmdToggleShowShapes(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckShowDemandElements) { - // Toggle menuCheckShowDemandElements - if (viewNet->getDataViewOptions().menuCheckShowDemandElements->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled show demand elements through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled show demand elements through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleShowDemandElementsData viewNet->onCmdToggleShowDemandElementsData(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelDrawing) { - // Toggle menuCheckToggleTAZRelDrawing - if (viewNet->getDataViewOptions().menuCheckToggleTAZRelDrawing->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle TAXRel drawing through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle TAXRel drawing through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleTAZRelDrawing viewNet->onCmdToggleTAZRelDrawing(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZDrawFill) { - // Toggle menuCheckToggleTAZDrawFill - if (viewNet->getDataViewOptions().menuCheckToggleTAZDrawFill->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle TAZ draw fill through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle TAZ draw fill through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleTAZDrawFill viewNet->onCmdToggleTAZDrawFill(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyFrom) { - // Toggle menuCheckToggleTAZRelOnlyFrom - if (viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyFrom->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle TAZRel only from through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle TAZRel only from through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleTAZRelOnlyFrom viewNet->onCmdToggleTAZRelOnlyFrom(obj, sel, nullptr); } else if (menuCheck == viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyTo) { - // Toggle menuCheckToggleTAZRelOnlyTo - if (viewNet->getDataViewOptions().menuCheckToggleTAZRelOnlyTo->amChecked() == TRUE) { - // show extra information for tests - WRITE_DEBUG("Disabled toggle TAZRel only to through alt + " + toString(numericalKeyPressed + 1)); - } else { - // show extra information for tests - WRITE_DEBUG("Enabled toggle TAZRel only to through alt + " + toString(numericalKeyPressed + 1)); - } // Call manually onCmdToggleTAZRelOnlyTo viewNet->onCmdToggleTAZRelOnlyTo(obj, sel, nullptr); } else { @@ -2978,8 +2697,6 @@ GNEApplicationWindowHelper::openOptionFileDialog(FXWindow* window, bool save) { std::string GNEApplicationWindowHelper::openFileDialog(FXWindow* window, const std::string title, GUIIcon icon, const std::string patternList, bool save, bool multi) { - // write title information - WRITE_DEBUG(title); // configure open dialog FXFileDialog opendialog(window, title.c_str()); // check if allow to create a new file, or select only existent files @@ -3005,22 +2722,16 @@ GNEApplicationWindowHelper::openFileDialog(FXWindow* window, const std::string t if (save) { // check if overwritte file if (MFXUtils::userPermitsOverwritingWhenFileExists(window, opendialog.getFilename())) { - // close save dialog - WRITE_DEBUG("Close save dialog sucesfully"); // udpate current folder gCurrentFolder = opendialog.getDirectory(); // assureExtension return MFXUtils::assureExtension(opendialog.getFilename(), opendialog.getPatternText(opendialog.getCurrentPattern()).after('.').before(')')).text(); } else { - // close additional dialog - WRITE_DEBUG("Abort overwritte file"); // return empty file return ""; } } else { - // close load dialog - WRITE_DEBUG("Close load dialog sucesfully"); // udpate current folder gCurrentFolder = opendialog.getDirectory(); // return file @@ -3046,8 +2757,6 @@ GNEApplicationWindowHelper::openFileDialog(FXWindow* window, const std::string t } } } else { - // close additional dialog - WRITE_DEBUG("Abort dialog"); // return empty file return ""; } diff --git a/src/netedit/GNELoadThread.cpp b/src/netedit/GNELoadThread.cpp index 82f9452a2490..cc714e1d5e86 100644 --- a/src/netedit/GNELoadThread.cpp +++ b/src/netedit/GNELoadThread.cpp @@ -67,8 +67,6 @@ GNELoadThread::run() { auto& neteditOptions = OptionsCont::getOptions(); // register message callbacks MsgHandler::getMessageInstance()->addRetriever(myMessageRetriever); - MsgHandler::getDebugInstance()->addRetriever(myDebugRetriever); - MsgHandler::getGLDebugInstance()->addRetriever(myGLDebugRetriever); MsgHandler::getErrorInstance()->addRetriever(myErrorRetriever); MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); // flag for check if input is valid @@ -138,8 +136,6 @@ GNELoadThread::run() { return 0; } // clear message instances - MsgHandler::getGLDebugInstance()->clear(); - MsgHandler::getDebugInstance()->clear(); MsgHandler::getErrorInstance()->clear(); MsgHandler::getWarningInstance()->clear(); MsgHandler::getMessageInstance()->clear(); @@ -240,8 +236,6 @@ GNELoadThread::run() { void GNELoadThread::submitEndAndCleanup(GNENet* net, const std::string& loadedFile, const std::string& guiSettingsFile, const bool viewportFromRegistry) { // remove message callbacks - MsgHandler::getDebugInstance()->removeRetriever(myDebugRetriever); - MsgHandler::getGLDebugInstance()->removeRetriever(myGLDebugRetriever); MsgHandler::getErrorInstance()->removeRetriever(myErrorRetriever); MsgHandler::getWarningInstance()->removeRetriever(myWarningRetriever); MsgHandler::getMessageInstance()->removeRetriever(myMessageRetriever); diff --git a/src/netedit/GNENet.cpp b/src/netedit/GNENet.cpp index 750147de92a6..7eb4ee89b0c6 100644 --- a/src/netedit/GNENet.cpp +++ b/src/netedit/GNENet.cpp @@ -97,8 +97,6 @@ GNENet::GNENet(NBNetBuilder* netBuilder) : myDataPathManager(new GNEPathManager(this)) { // set net in gIDStorage GUIGlObjectStorage::gIDStorage.setNetObject(this); - // Write GL debug information - WRITE_GLDEBUG("initJunctionsAndEdges function called in GNENet constructor"); // init junction and edges initJunctionsAndEdges(); // check Z boundary @@ -118,8 +116,6 @@ GNENet::~GNENet() { delete myAttributeCarriers; // delete saving status delete mySavingStatus; - // show extra information for tests - WRITE_DEBUG("Deleting net builder in GNENet destructor"); delete myNetBuilder; } @@ -1610,24 +1606,14 @@ GNENet::joinSelectedJunctions(GNEUndoList* undoList) { // Check that there isn't another junction in the same position as Pos but doesn't belong to cluster for (const auto& junction : myAttributeCarriers->getJunctions()) { if ((junction.second->getPositionInView() == pos) && (cluster.find(junction.second->getNBNode()) == cluster.end())) { - // show warning in gui testing debug mode - WRITE_DEBUG("Opening FXMessageBox 'Join non-selected junction'"); // Ask confirmation to user const std::string header = TL("Position of joined junction"); const std::string bodyA = TL("There is another unselected junction in the same position of joined junction."); const std::string bodyB = TL("It will be joined with the other selected junctions. Continue?"); const auto answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", (bodyA + std::string("\n") + bodyB).c_str()); if (answer != 1) { // 1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Join non-selected junction' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Join non-selected junction' with 'ESC'"); - } return false; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Join non-selected junction' with 'Yes'"); // select conflicted junction an join all again junction.second->setAttribute(GNE_ATTR_SELECTED, "true", undoList); return joinSelectedJunctions(undoList); @@ -1725,30 +1711,19 @@ GNENet::cleanInvalidCrossings(GNEUndoList* undoList) { } if (myInvalidCrossings.empty()) { - // show warning in gui testing debug mode - WRITE_DEBUG("Opening FXMessageBox 'No crossing to remove'"); // open a dialog informing that there isn't crossing to remove const std::string header = TL("Clear crossings"); const std::string body = TL("There are no invalid crossings to remove."); FXMessageBox::warning(getApp(), MBOX_OK, (header).c_str(), "%s", (body).c_str()); - // show warning in gui testing debug mode - WRITE_DEBUG("Closed FXMessageBox 'No crossing to remove' with 'OK'"); } else { std::string plural = myInvalidCrossings.size() == 1 ? ("") : ("s"); - // show warning in gui testing debug mode - WRITE_DEBUG("Opening FXMessageBox 'clear crossings'"); // Ask confirmation to user const std::string header = TL("Clear crossings"); const std::string body = TL("Crossings will be cleared. Continue?"); const auto answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str()); // 1:yes, 2:no, 4:esc if (answer != 1) { - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'clear crossings' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'clear crossings' with 'ESC'"); - } + return false; } else { undoList->begin(GUIIcon::MODEDELETE, TL("clear crossings")); for (auto i = myInvalidCrossings.begin(); i != myInvalidCrossings.end(); i++) { @@ -1757,7 +1732,7 @@ GNENet::cleanInvalidCrossings(GNEUndoList* undoList) { undoList->end(); } } - return 1; + return true; } @@ -2226,19 +2201,13 @@ GNENet::saveAdditionals() { // 1 -> Invalid stoppingPlaces and E2 fixed, friendlyPos enabled, or saved with invalid positions GNEFixAdditionalElements fixAdditionalElementsDialog(myViewNet, invalidSingleLaneAdditionals, invalidMultiLaneAdditionals); if (fixAdditionalElementsDialog.execute() == 0) { - // show debug information - WRITE_DEBUG("Additionals saving aborted"); return false; } else { saveAdditionalsConfirmed(); - // show debug information - WRITE_DEBUG("Additionals saved after dialog"); return true; } } else { saveAdditionalsConfirmed(); - // show debug information - WRITE_DEBUG("Additionals saved"); return true; } } @@ -2257,8 +2226,6 @@ GNENet::saveJuPedSimElements(const std::string& file) { device.close(); // set focus again in net myViewNet->setFocus(); - // show debug information - WRITE_DEBUG("JuPedSim elements saved"); return true; } @@ -2288,19 +2255,13 @@ GNENet::saveDemandElements() { // 1 -> Invalid demand elements fixed, friendlyPos enabled, or saved with invalid positions GNEFixDemandElements fixDemandElementsDialog(myViewNet, invalidSingleLaneDemandElements); if (fixDemandElementsDialog.execute() == 0) { - // show debug information - WRITE_DEBUG("demand elements saving aborted"); return false; } else { saveDemandElementsConfirmed(); - // show debug information - WRITE_DEBUG("demand elements saved after dialog"); return true; } } else { saveDemandElementsConfirmed(); - // show debug information - WRITE_DEBUG("demand elements saved"); return true; } } @@ -2314,8 +2275,6 @@ GNENet::saveDataElements() { saveDataElementsConfirmed(); // set focus again in net myViewNet->setFocus(); - // show debug information - WRITE_DEBUG("data sets saved"); return true; } @@ -2359,8 +2318,6 @@ GNENet::saveMeanDatas() { saveMeanDatasConfirmed(); // set focus again in net myViewNet->setFocus(); - // show debug information - WRITE_DEBUG("MeanDatas saved"); return true; } @@ -2801,8 +2758,6 @@ GNENet::saveTLSPrograms(const std::string& filename) { device.close(); // change save status mySavingStatus->TLSSaved(); - // show debug information - WRITE_DEBUG("TLSPrograms saved"); } @@ -2948,12 +2903,10 @@ GNENet::computeAndUpdate(OptionsCont& neteditOptions, bool volatileOptions) { } } // removes all junctions of grid - WRITE_GLDEBUG("Removing junctions during recomputing"); for (const auto& junction : myAttributeCarriers->getJunctions()) { removeGLObjectFromGrid(junction.second); } // remove all edges from grid - WRITE_GLDEBUG("Removing edges during recomputing"); for (const auto& edge : myAttributeCarriers->getEdges()) { removeGLObjectFromGrid(edge.second); } @@ -2996,15 +2949,12 @@ GNENet::computeAndUpdate(OptionsCont& neteditOptions, bool volatileOptions) { myAttributeCarriers->clearDemandElements(); // enable update geometry again myUpdateGeometryEnabled = true; - // Write GL debug information - WRITE_GLDEBUG("initJunctionsAndEdges function called in computeAndUpdate(...) due recomputing with volatile options"); // init again junction an edges (Additionals and shapes will be loaded after the end of this function) initJunctionsAndEdges(); // init default vTypes again myAttributeCarriers->addDefaultVTypes(); } else { // insert all junctions of grid again - WRITE_GLDEBUG("Add junctions during recomputing after calling myNetBuilder->compute(...)"); for (const auto& junction : myAttributeCarriers->getJunctions()) { // update centering boundary junction.second->updateCenteringBoundary(false); @@ -3012,7 +2962,6 @@ GNENet::computeAndUpdate(OptionsCont& neteditOptions, bool volatileOptions) { addGLObjectIntoGrid(junction.second); } // insert all edges from grid again - WRITE_GLDEBUG("Add edges during recomputing after calling myNetBuilder->compute(...)"); for (const auto& edge : myAttributeCarriers->getEdges()) { // update centeting boundary edge.second->updateCenteringBoundary(false); diff --git a/src/netedit/GNENetHelper.cpp b/src/netedit/GNENetHelper.cpp index 43237c8bda42..a4c58bcf2ea1 100644 --- a/src/netedit/GNENetHelper.cpp +++ b/src/netedit/GNENetHelper.cpp @@ -94,22 +94,16 @@ GNENetHelper::AttributeCarriers::~AttributeCarriers() { // Drop EdgeTypes for (const auto& edgeType : myEdgeTypes) { edgeType.second->decRef("GNENetHelper::~GNENet"); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + edgeType.second->getTagStr() + " '" + edgeType.second->getID() + "' in AttributeCarriers destructor"); delete edgeType.second; } // Drop Edges for (const auto& edge : myEdges) { edge.second->decRef("GNENetHelper::~GNENet"); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + edge.second->getTagStr() + " '" + edge.second->getID() + "' in AttributeCarriers destructor"); delete edge.second; } // Drop myJunctions for (const auto& junction : myJunctions) { junction.second->decRef("GNENetHelper::~GNENet"); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + junction.second->getTagStr() + " '" + junction.second->getID() + "' in AttributeCarriers destructor"); delete junction.second; } // Drop Additionals (Only used for additionals that were inserted without using GNEChange_Additional) @@ -117,8 +111,6 @@ GNENetHelper::AttributeCarriers::~AttributeCarriers() { for (const auto& additional : additionalTag.second) { // decrease reference manually (because it was increased manually in GNEAdditionalHandler) additional.second->decRef(); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + additional.second->getTagStr() + " in AttributeCarriers destructor"); delete additional.second; } } @@ -127,15 +119,6 @@ GNENetHelper::AttributeCarriers::~AttributeCarriers() { for (const auto& demandElement : demandElementTag.second) { // decrease reference manually (because it was increased manually in GNERouteHandler) demandElement.second->decRef(); - // show extra information for tests - if (demandElement.second->getTagProperty().isType()) { - // special case for default VTypes - if (DEFAULT_VTYPES.count(demandElement.second->getID()) == 0) { - WRITE_DEBUG("Deleting unreferenced " + demandElement.second->getTagStr() + " in AttributeCarriers destructor"); - } - } else { - WRITE_DEBUG("Deleting unreferenced " + demandElement.second->getTagStr() + " in AttributeCarriers destructor"); - } delete demandElement.second; } } @@ -143,8 +126,6 @@ GNENetHelper::AttributeCarriers::~AttributeCarriers() { for (const auto& dataSet : myDataSets) { // decrease reference manually (because it was increased manually in GNEDataHandler) dataSet.second->decRef(); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + dataSet.second->getTagStr() + " in AttributeCarriers destructor"); delete dataSet.second; } // Drop MeanDatas (Only used for meanDatas that were inserted without using GNEChange_MeanData) @@ -152,8 +133,6 @@ GNENetHelper::AttributeCarriers::~AttributeCarriers() { for (const auto& meanData : meanDataTag.second) { // decrease reference manually (because it was increased manually in GNEMeanDataHandler) meanData.second->decRef(); - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + meanData.second->getTagStr() + " in AttributeCarriers destructor"); delete meanData.second; } } diff --git a/src/netedit/GNEUndoList.cpp b/src/netedit/GNEUndoList.cpp index abbdfd826f2b..d6651ec65dc6 100644 --- a/src/netedit/GNEUndoList.cpp +++ b/src/netedit/GNEUndoList.cpp @@ -138,7 +138,6 @@ GNEUndoList::~GNEUndoList() {} void GNEUndoList::undo() { - WRITE_DEBUG("Calling GNEUndoList::undo()"); GNEChange* change = nullptr; if (group) { throw ProcessError("GNEUndoList::undo() cannot call undo inside begin-end block"); @@ -163,7 +162,6 @@ GNEUndoList::undo() { void GNEUndoList::redo() { - WRITE_DEBUG("Calling GNEUndoList::redo()"); GNEChange* change = nullptr; if (group) { throw ProcessError("GNEUndoList::redo() cannot call undo inside begin-end block"); diff --git a/src/netedit/GNEViewNet.cpp b/src/netedit/GNEViewNet.cpp index b4043f17d3f1..b5a985de8d38 100644 --- a/src/netedit/GNEViewNet.cpp +++ b/src/netedit/GNEViewNet.cpp @@ -522,7 +522,7 @@ GNEViewNet::updateObjectsInPosition(const Position& pos) { void GNEViewNet::updateObjectsInShape(const PositionVector& shape) { // triangulate shape - const auto triangles = Triangle::triangulate(shape); + const auto triangles = Triangle::triangulate(shape); // clear post drawing elements gViewObjectsHandler.reset(); // push matrix @@ -531,7 +531,7 @@ GNEViewNet::updateObjectsInShape(const PositionVector& shape) { myVisualizationSettings->drawForViewObjectsHandler = true; myVisualizationSettings->drawForRectangleSelection = true; // draw all GL elements within the boundares formed by triangles - for (const auto &triangle : triangles) { + for (const auto& triangle : triangles) { gViewObjectsHandler.setSelectionTriangle(triangle); drawGLElements(triangle.getBoundary()); } @@ -905,25 +905,16 @@ GNEViewNet::askMergeJunctions(const GNEJunction* movedJunction, const GNEJunctio } else if (myNetworkViewOptions.menuCheckMergeAutomatically->amChecked()) { return true; } else { - WRITE_DEBUG("Opening FXMessageBox 'merge junctions'"); // open question box const std::string header = TL("Confirm Junction Merger"); const std::string body = (TLF("Do you wish to merge junctions '%' and '%'?\n('%' will be eliminated and its roads added to '%')", movedJunction->getMicrosimID(), targetJunction->getMicrosimID(), movedJunction->getMicrosimID(), targetJunction->getMicrosimID())); const FXuint answer = FXMessageBox::question(this, MBOX_YES_NO, header.c_str(), "%s", body.c_str()); alreadyAsked = true; if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'ESC'"); - } return false; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'merge junctions' with 'Yes'"); + return true; } - return true; } } @@ -1022,22 +1013,12 @@ GNEViewNet::restrictLane(GNELane* lane, SUMOVehicleClass vclass) { FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", (body + toString(vclass) + ".").c_str()); return 0; } else { - WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'"); // Ask confirmation to user const std::string header = TLF("Set vclass to % for selected lanes", toString(vclass)); const std::string body = TLF("% lanes will be restricted to %. Continue?", toString(mapOfEdgesAndLanes.size() - counter), toString(vclass)); FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'"); - } return 0; - } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'"); } } // begin undo operation @@ -1096,22 +1077,12 @@ GNEViewNet::addRestrictedLane(GNELane* lane, SUMOVehicleClass vclass, const bool FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", body.c_str()); return 0; } else { - WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'"); // Ask confirmation to user const std::string header = TLF("Add vclass % to selected lanes", toString(vclass)); const std::string body = TLF("% restrictions to % will be added. Continue?", toString(setOfEdges.size() - counter), toString(vclass)); FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'"); - } return 0; - } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'"); } } // begin undo operation @@ -1184,22 +1155,12 @@ GNEViewNet::removeRestrictedLane(GNELane* lane, SUMOVehicleClass vclass) { FXMessageBox::information(getApp(), MBOX_OK, header.c_str(), "%s", body.c_str()); return 0; } else { - WRITE_DEBUG("Opening FXMessageBox 'restrict lanes'"); // Ask confirmation to user const std::string header = TLF("Remove vclass % from selected lanes", toString(vclass)); const std::string body = TLF("% restrictions to % will be removed. Continue?", toString(setOfEdges.size() - counter), toString(vclass)); FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, header.c_str(), "%s", body.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'ESC'"); - } return 0; - } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'restrict lanes' with 'Yes'"); } } // begin undo operation diff --git a/src/netedit/GNEViewParent.cpp b/src/netedit/GNEViewParent.cpp index 01ec7de25d8c..c7615726ae9f 100644 --- a/src/netedit/GNEViewParent.cpp +++ b/src/netedit/GNEViewParent.cpp @@ -494,12 +494,8 @@ GNEViewParent::onCmdMakeSnapshot(FXObject*, FXSelector, void*) { } std::string error = myView->makeSnapshot(file); if (error != "") { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving snapshot'"); // open message box FXMessageBox::error(this, MBOX_OK, TL("Saving failed."), "%s", error.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving snapshot' with 'OK'"); } else { WRITE_MESSAGE(TL("Snapshot successfully saved!")); } diff --git a/src/netedit/changes/GNEChange_Additional.cpp b/src/netedit/changes/GNEChange_Additional.cpp index 3bb09f4b42d5..bc58fc68423d 100644 --- a/src/netedit/changes/GNEChange_Additional.cpp +++ b/src/netedit/changes/GNEChange_Additional.cpp @@ -47,8 +47,6 @@ GNEChange_Additional::~GNEChange_Additional() { if (myAdditional->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myAdditional->decRef("GNEChange_Additional"); if (myAdditional->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myAdditional->getTagStr()); // make sure that additional isn't in net before removing if (myAdditional->getNet()->getAttributeCarriers()->retrieveAdditional(myAdditional, false)) { // delete additional from net @@ -63,8 +61,6 @@ GNEChange_Additional::~GNEChange_Additional() { void GNEChange_Additional::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myAdditional->unselectAttributeCarrier(); @@ -74,8 +70,6 @@ GNEChange_Additional::undo() { // restore container restoreHierarchicalContainers(); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); // select if mySelectedElement is enabled if (mySelectedElement) { myAdditional->selectAttributeCarrier(); @@ -93,8 +87,6 @@ GNEChange_Additional::undo() { void GNEChange_Additional::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); // select if mySelectedElement is enabled if (mySelectedElement) { myAdditional->selectAttributeCarrier(); @@ -104,8 +96,6 @@ GNEChange_Additional::redo() { // add additional in parent elements addElementInParentsAndChildren(myAdditional); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myAdditional->getTagStr() + " '" + myAdditional->getID() + "' in GNEChange_Additional"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myAdditional->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_Attribute.cpp b/src/netedit/changes/GNEChange_Attribute.cpp index 1b24151b44db..c7d9e0d7fd0c 100644 --- a/src/netedit/changes/GNEChange_Attribute.cpp +++ b/src/netedit/changes/GNEChange_Attribute.cpp @@ -86,8 +86,6 @@ GNEChange_Attribute::~GNEChange_Attribute() { myAC->decRef("GNEChange_Attribute " + toString(myKey)); // remove if is unreferenced if (myAC->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myAC->getTagStr() + " in GNEChange_Attribute"); // delete AC delete myAC; } @@ -97,8 +95,6 @@ GNEChange_Attribute::~GNEChange_Attribute() { void GNEChange_Attribute::undo() { - // show extra information for tests - WRITE_DEBUG("Restoring previous attribute"/* + toString(myKey)*/); // set original value myAC->setAttribute(myKey, myOrigValue); // certain attributes needs extra operations @@ -131,8 +127,6 @@ GNEChange_Attribute::undo() { void GNEChange_Attribute::redo() { - // show extra information for tests - WRITE_DEBUG("Setting new attribute"/* + toString(myKey)*/); // set new value myAC->setAttribute(myKey, myNewValue); // certain attributes needs extra operations diff --git a/src/netedit/changes/GNEChange_Children.cpp b/src/netedit/changes/GNEChange_Children.cpp index 2d0e80b7a7e6..604e99499e6f 100644 --- a/src/netedit/changes/GNEChange_Children.cpp +++ b/src/netedit/changes/GNEChange_Children.cpp @@ -68,8 +68,6 @@ GNEChange_Children::~GNEChange_Children() { myParentDemandElement->decRef("GNEChange_Children"); // remove if is unreferenced if (myParentDemandElement->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myParentDemandElement->getTagStr() + " '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // delete AC delete myParentDemandElement; } @@ -82,26 +80,18 @@ GNEChange_Children::undo() { if (myForward) { // continue depending of myOperation if (myOperation == GNEChange_Children::Operation::MOVE_FRONT) { - // show extra information for tests - WRITE_DEBUG("Moving front " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // restore child demand element original vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myOriginalChildElements; } else if (myOperation == GNEChange_Children::Operation::MOVE_BACK) { - // show extra information for tests - WRITE_DEBUG("Moving back " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // restore child demand element original vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myOriginalChildElements; } } else { // continue depending of myOperation if (myOperation == GNEChange_Children::Operation::MOVE_FRONT) { - // show extra information for tests - WRITE_DEBUG("Moving front " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // set child demand element edited vector in myChildDemandElement // myParentDemandElement- myChildDemandElements = myEditedChildElements; } else if (myOperation == GNEChange_Children::Operation::MOVE_BACK) { - // show extra information for tests - WRITE_DEBUG("Moving back " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // set child demand element edited vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myEditedChildElements; } @@ -116,26 +106,18 @@ GNEChange_Children::redo() { if (myForward) { // continue depending of myOperation if (myOperation == GNEChange_Children::Operation::MOVE_FRONT) { - // show extra information for tests - WRITE_DEBUG("Moving front " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // set child demand element edited vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myEditedChildElements; } else if (myOperation == GNEChange_Children::Operation::MOVE_BACK) { - // show extra information for tests - WRITE_DEBUG("Moving back " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // set child demand element edited vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myEditedChildElements; } } else { // continue depending of myOperation if (myOperation == GNEChange_Children::Operation::MOVE_FRONT) { - // show extra information for tests - WRITE_DEBUG("Moving front " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // restore child demand element original vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myOriginalChildElements; } else if (myOperation == GNEChange_Children::Operation::MOVE_BACK) { - // show extra information for tests - WRITE_DEBUG("Moving back " + myChildDemandElement->getTagStr() + " within demandElement parent '" + myParentDemandElement->getID() + "' in GNEChange_Children"); // restore child demand element original vector in myChildDemandElement // myParentDemandElement->myChildDemandElements = myOriginalChildElements; } diff --git a/src/netedit/changes/GNEChange_Connection.cpp b/src/netedit/changes/GNEChange_Connection.cpp index 61fd1085d56b..4a1436d92e9e 100644 --- a/src/netedit/changes/GNEChange_Connection.cpp +++ b/src/netedit/changes/GNEChange_Connection.cpp @@ -47,18 +47,9 @@ GNEChange_Connection::~GNEChange_Connection() { void GNEChange_Connection::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + toString(SUMO_TAG_CONNECTION) + " '" + - myEdge->getNBEdge()->getLaneID(myNBEdgeConnection.fromLane) + "->" + myNBEdgeConnection.toEdge->getLaneID(myNBEdgeConnection.toLane) + "' from " + - toString(SUMO_TAG_EDGE) + " '" + myEdge->getID() + "'"); // remove connection from edge myEdge->removeConnection(myNBEdgeConnection); } else { - // show extra information for tests - std::string selected = mySelectedElement ? ("a previously selected ") : (""); - WRITE_DEBUG("Adding " + selected + toString(SUMO_TAG_CONNECTION) + " '" + - myEdge->getNBEdge()->getLaneID(myNBEdgeConnection.fromLane) + "->" + myNBEdgeConnection.toEdge->getLaneID(myNBEdgeConnection.toLane) + "' into " + - toString(SUMO_TAG_EDGE) + " '" + myEdge->getID() + "'"); // add connection into edge myEdge->addConnection(myNBEdgeConnection, mySelectedElement); } @@ -70,18 +61,9 @@ GNEChange_Connection::undo() { void GNEChange_Connection::redo() { if (myForward) { - // show extra information for tests - std::string selected = mySelectedElement ? ("a previously selected ") : (""); - WRITE_DEBUG("Adding " + selected + toString(SUMO_TAG_CONNECTION) + " '" + - myEdge->getNBEdge()->getLaneID(myNBEdgeConnection.fromLane) + "->" + myNBEdgeConnection.toEdge->getLaneID(myNBEdgeConnection.toLane) + "' into " + - toString(SUMO_TAG_EDGE) + " '" + myEdge->getID() + "'"); // add connection into edge myEdge->addConnection(myNBEdgeConnection, mySelectedElement); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + toString(SUMO_TAG_CONNECTION) + " '" + - myEdge->getNBEdge()->getLaneID(myNBEdgeConnection.fromLane) + "->" + myNBEdgeConnection.toEdge->getLaneID(myNBEdgeConnection.toLane) + "' from " + - toString(SUMO_TAG_EDGE) + " '" + myEdge->getID() + "'"); // remove connection from edge myEdge->removeConnection(myNBEdgeConnection); } diff --git a/src/netedit/changes/GNEChange_Crossing.cpp b/src/netedit/changes/GNEChange_Crossing.cpp index a429d5352043..b6119677e28a 100644 --- a/src/netedit/changes/GNEChange_Crossing.cpp +++ b/src/netedit/changes/GNEChange_Crossing.cpp @@ -67,8 +67,6 @@ GNEChange_Crossing::~GNEChange_Crossing() { void GNEChange_Crossing::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("removing " + toString(SUMO_TAG_CROSSING) + " from " + myJunctionParent->getTagStr() + " '" + myJunctionParent->getID() + "'"); // unselect if mySelectedElement is enabled if (mySelectedElement) { GNECrossing* crossing = myJunctionParent->retrieveGNECrossing(myJunctionParent->getNBNode()->getCrossing(myEdges), false); @@ -90,19 +88,13 @@ void GNEChange_Crossing::undo() { if (myJunctionParent->getNet()->getAttributeCarriers()->getCrossings().empty() && (myJunctionParent->getNet()->getNetBuilder()->haveNetworkCrossings())) { // change flag of NetBuilder (For build GNECrossing) myJunctionParent->getNet()->getNetBuilder()->setHaveNetworkCrossings(false); - // show extra information for tests - WRITE_DEBUG("Changed flag netBuilder::haveNetworkCrossings from 'true' to 'false'"); } } else { - // show extra information for tests - WRITE_DEBUG("Adding " + toString(SUMO_TAG_CROSSING) + " into " + myJunctionParent->getTagStr() + " '" + myJunctionParent->getID() + "'"); // add crossing of NBNode NBNode::Crossing* c = myJunctionParent->getNBNode()->addCrossing(myEdges, myWidth, myPriority, myCustomTLIndex, myCustomTLIndex2, myCustomShape); // Check if Flag "haveNetworkCrossings" has to be enabled if (!myJunctionParent->getNet()->getNetBuilder()->haveNetworkCrossings() == false) { myJunctionParent->getNet()->getNetBuilder()->setHaveNetworkCrossings(true); - // show extra information for tests - WRITE_DEBUG("Changed flag netBuilder::haveNetworkCrossings from 'false' to 'true'"); } // rebuild GNECrossings myJunctionParent->rebuildGNECrossings(); @@ -129,15 +121,11 @@ void GNEChange_Crossing::undo() { void GNEChange_Crossing::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + toString(SUMO_TAG_CROSSING) + " into " + myJunctionParent->getTagStr() + " '" + myJunctionParent->getID() + "'"); // add crossing of NBNode and update geometry NBNode::Crossing* c = myJunctionParent->getNBNode()->addCrossing(myEdges, myWidth, myPriority, myCustomTLIndex, myCustomTLIndex2, myCustomShape); // Check if Flag "haveNetworkCrossings" has to be enabled if (myJunctionParent->getNet()->getNetBuilder()->haveNetworkCrossings() == false) { myJunctionParent->getNet()->getNetBuilder()->setHaveNetworkCrossings(true); - // show extra information for tests - WRITE_DEBUG("Changed flag netBuilder::haveNetworkCrossings from 'false' to 'true'"); } // rebuild GNECrossings myJunctionParent->rebuildGNECrossings(); @@ -157,8 +145,6 @@ void GNEChange_Crossing::redo() { } } } else { - // show extra information for tests - WRITE_DEBUG("Removing " + toString(SUMO_TAG_CROSSING) + " from " + myJunctionParent->getTagStr() + " '" + myJunctionParent->getID() + "'"); // unselect if mySelectedElement is enabled if (mySelectedElement) { GNECrossing* crossing = myJunctionParent->retrieveGNECrossing(myJunctionParent->getNBNode()->getCrossing(myEdges), false); @@ -180,8 +166,6 @@ void GNEChange_Crossing::redo() { if (myJunctionParent->getNet()->getAttributeCarriers()->getCrossings().empty() && (myJunctionParent->getNet()->getNetBuilder()->haveNetworkCrossings())) { // change flag of NetBuilder (For build GNECrossing) myJunctionParent->getNet()->getNetBuilder()->setHaveNetworkCrossings(false); - // show extra information for tests - WRITE_DEBUG("Changed flag netBuilder::haveNetworkCrossings from 'true' to 'false'"); } } // enable save networkElements diff --git a/src/netedit/changes/GNEChange_DataInterval.cpp b/src/netedit/changes/GNEChange_DataInterval.cpp index 27cb2dfd0e02..f6f2284ba54f 100644 --- a/src/netedit/changes/GNEChange_DataInterval.cpp +++ b/src/netedit/changes/GNEChange_DataInterval.cpp @@ -51,10 +51,6 @@ GNEChange_DataInterval::~GNEChange_DataInterval() { if (myDataInterval->unreferenced() && myDataInterval->getNet()->getAttributeCarriers()->retrieveDataSet(myDataSetParent->getID(), false) && myDataInterval->getNet()->getAttributeCarriers()->retrieveDataInterval(myDataInterval, false)) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myDataInterval->getTagStr() + " [" + - myDataInterval->getAttribute(SUMO_ATTR_BEGIN) + ", " + - myDataInterval->getAttribute(SUMO_ATTR_END) + "] in ~GNEChange_DataInterval()"); // check that data interval don't exist myDataSetParent->removeDataIntervalChild(myDataInterval); // delete dataInterval @@ -67,17 +63,9 @@ GNEChange_DataInterval::~GNEChange_DataInterval() { void GNEChange_DataInterval::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myDataInterval->getTagStr() + " [" + - myDataInterval->getAttribute(SUMO_ATTR_BEGIN) + ", " + - myDataInterval->getAttribute(SUMO_ATTR_END) + "] in GNEChange_DataInterval"); // remove data interval from data set parent myDataSetParent->removeDataIntervalChild(myDataInterval); } else { - // show extra information for tests - WRITE_DEBUG("adding " + myDataInterval->getTagStr() + " [" + - myDataInterval->getAttribute(SUMO_ATTR_BEGIN) + ", " + - myDataInterval->getAttribute(SUMO_ATTR_END) + "] in GNEChange_DataInterval"); // add data interval into data set parent myDataSetParent->addDataIntervalChild(myDataInterval); } @@ -89,17 +77,9 @@ GNEChange_DataInterval::undo() { void GNEChange_DataInterval::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("adding " + myDataInterval->getTagStr() + " [" + - myDataInterval->getAttribute(SUMO_ATTR_BEGIN) + ", " + - myDataInterval->getAttribute(SUMO_ATTR_END) + "] in GNEChange_DataInterval"); // add data interval into data set parent myDataSetParent->addDataIntervalChild(myDataInterval); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myDataInterval->getTagStr() + " [" + - myDataInterval->getAttribute(SUMO_ATTR_BEGIN) + ", " + - myDataInterval->getAttribute(SUMO_ATTR_END) + "] in GNEChange_DataInterval"); // remove data interval from data set parent myDataSetParent->removeDataIntervalChild(myDataInterval); } diff --git a/src/netedit/changes/GNEChange_DataSet.cpp b/src/netedit/changes/GNEChange_DataSet.cpp index 124337380967..6687effa8600 100644 --- a/src/netedit/changes/GNEChange_DataSet.cpp +++ b/src/netedit/changes/GNEChange_DataSet.cpp @@ -49,8 +49,6 @@ GNEChange_DataSet::~GNEChange_DataSet() { myDataSet->decRef("GNEChange_DataSet"); if (myDataSet->unreferenced() && myDataSet->getNet()->getAttributeCarriers()->retrieveDataSet(myDataSet->getID(), false)) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myDataSet->getTagStr() + " '" + myDataSet->getID() + "'"); // make sure that element isn't in net before removing myDataSet->getNet()->getAttributeCarriers()->deleteDataSet(myDataSet); // delete data set @@ -63,13 +61,9 @@ GNEChange_DataSet::~GNEChange_DataSet() { void GNEChange_DataSet::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myDataSet->getTagStr() + " '" + myDataSet->getID() + "' in GNEChange_DataSet"); // delete data set from net myDataSet->getNet()->getAttributeCarriers()->deleteDataSet(myDataSet); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myDataSet->getTagStr() + " '" + myDataSet->getID() + "' in GNEChange_DataSet"); // insert data set into net myDataSet->getNet()->getAttributeCarriers()->insertDataSet(myDataSet); } @@ -81,13 +75,9 @@ GNEChange_DataSet::undo() { void GNEChange_DataSet::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myDataSet->getTagStr() + " '" + myDataSet->getID() + "' in GNEChange_DataSet"); // insert data set into net myDataSet->getNet()->getAttributeCarriers()->insertDataSet(myDataSet); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myDataSet->getTagStr() + " '" + myDataSet->getID() + "' in GNEChange_DataSet"); // delete data set from net myDataSet->getNet()->getAttributeCarriers()->deleteDataSet(myDataSet); } diff --git a/src/netedit/changes/GNEChange_DemandElement.cpp b/src/netedit/changes/GNEChange_DemandElement.cpp index a0cae3886429..9602083ea8e5 100644 --- a/src/netedit/changes/GNEChange_DemandElement.cpp +++ b/src/netedit/changes/GNEChange_DemandElement.cpp @@ -48,8 +48,6 @@ GNEChange_DemandElement::~GNEChange_DemandElement() { if (myDemandElement->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myDemandElement->decRef("GNEChange_DemandElement"); if (myDemandElement->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myDemandElement->getTagStr()); // make sure that element isn't in net before removing if (myDemandElement->getNet()->getAttributeCarriers()->retrieveDemandElement(myDemandElement, false)) { // remove demand element of network @@ -64,8 +62,6 @@ GNEChange_DemandElement::~GNEChange_DemandElement() { void GNEChange_DemandElement::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myDemandElement->unselectAttributeCarrier(); @@ -75,8 +71,6 @@ GNEChange_DemandElement::undo() { // restore container restoreHierarchicalContainers(); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); // select if mySelectedElement is enabled if (mySelectedElement) { myDemandElement->selectAttributeCarrier(); @@ -105,8 +99,6 @@ GNEChange_DemandElement::undo() { void GNEChange_DemandElement::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); // select if mySelectedElement is enabled if (mySelectedElement) { myDemandElement->selectAttributeCarrier(); @@ -116,8 +108,6 @@ GNEChange_DemandElement::redo() { // add demand element in parents and children addElementInParentsAndChildren(myDemandElement); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myDemandElement->getTagStr() + " '" + myDemandElement->getID() + "' in GNEChange_DemandElement"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myDemandElement->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_Distribution.cpp b/src/netedit/changes/GNEChange_Distribution.cpp index 64134b7e862b..42d87447fc37 100644 --- a/src/netedit/changes/GNEChange_Distribution.cpp +++ b/src/netedit/changes/GNEChange_Distribution.cpp @@ -76,8 +76,6 @@ GNEChange_Distribution::~GNEChange_Distribution() { myDistribution->decRef("GNEChange_Distribution " + myDistribution->getTagProperty().getTagStr()); // remove if is unreferenced if (myDistribution->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myDistribution->getTagStr() + " '" + myDistribution->getID() + "' in GNEChange_Distribution"); // delete distribution delete myDistribution; } @@ -87,8 +85,6 @@ GNEChange_Distribution::~GNEChange_Distribution() { void GNEChange_Distribution::undo() { - // show extra information for tests - WRITE_DEBUG("Setting previous distribution into " + myDistribution->getTagStr() + " '" + myDistribution->getID() + "'"); // continue depending of flags if (myEditingProbability) { myDistribution->editDistributionValue(myKey, myOriginalProbability); @@ -104,8 +100,6 @@ GNEChange_Distribution::undo() { void GNEChange_Distribution::redo() { - // show extra information for tests - WRITE_DEBUG("Setting new distribution into " + myDistribution->getTagStr() + " '" + myDistribution->getID() + "'"); // continue depending of flags if (myEditingProbability) { myDistribution->editDistributionValue(myKey, myNewProbability); diff --git a/src/netedit/changes/GNEChange_Edge.cpp b/src/netedit/changes/GNEChange_Edge.cpp index 09b178f893f6..19b4a2896408 100644 --- a/src/netedit/changes/GNEChange_Edge.cpp +++ b/src/netedit/changes/GNEChange_Edge.cpp @@ -58,8 +58,6 @@ GNEChange_Edge::~GNEChange_Edge() { if (myEdge->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myEdge->decRef("GNEChange_Edge"); if (myEdge->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myEdge->getTagStr() + " '" + myEdge->getID() + "' GNEChange_Edge"); // delete edge delete myEdge; } @@ -70,8 +68,6 @@ GNEChange_Edge::~GNEChange_Edge() { void GNEChange_Edge::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myEdge->unselectAttributeCarrier(); @@ -83,8 +79,6 @@ GNEChange_Edge::undo() { // delete edge from net myEdge->getNet()->getAttributeCarriers()->deleteSingleEdge(myEdge); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // select if mySelectedElement is enabled if (mySelectedElement) { myEdge->selectAttributeCarrier(); @@ -104,8 +98,6 @@ GNEChange_Edge::undo() { void GNEChange_Edge::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // select if mySelectedElement is enabled if (mySelectedElement) { myEdge->selectAttributeCarrier(); @@ -117,8 +109,6 @@ GNEChange_Edge::redo() { // add edge lanes into parents and children addEdgeLanes(); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myEdge->getTagStr() + " '" + myEdge->getID() + "' from " + toString(SUMO_TAG_NET)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myEdge->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_EdgeType.cpp b/src/netedit/changes/GNEChange_EdgeType.cpp index 7ef3e7c5f839..364bb48b91a2 100644 --- a/src/netedit/changes/GNEChange_EdgeType.cpp +++ b/src/netedit/changes/GNEChange_EdgeType.cpp @@ -51,8 +51,6 @@ GNEChange_EdgeType::~GNEChange_EdgeType() { if (myEdgeType->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myEdgeType->decRef("GNEChange_EdgeType"); if (myEdgeType->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myEdgeType->getTagStr() + " '" + myEdgeType->getID() + "' GNEChange_EdgeType"); // make sure that edgeType isn't in net before removing if (myEdgeType->getNet()->getAttributeCarriers()->retrieveEdgeType(myEdgeType->getID(), false)) { // delete edgeType from net @@ -68,13 +66,9 @@ GNEChange_EdgeType::~GNEChange_EdgeType() { void GNEChange_EdgeType::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myEdgeType->getTagStr() + " '" + myEdgeType->getID() + "' from " + toString(SUMO_TAG_NET)); // delete edgeType from net myEdgeType->getNet()->getAttributeCarriers()->deleteEdgeType(myEdgeType); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myEdgeType->getTagStr() + " '" + myEdgeType->getID() + "' into " + toString(SUMO_TAG_NET)); // insert edgeType into net myEdgeType->getNet()->getAttributeCarriers()->insertEdgeType(myEdgeType); } @@ -90,13 +84,9 @@ GNEChange_EdgeType::undo() { void GNEChange_EdgeType::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myEdgeType->getTagStr() + " '" + myEdgeType->getID() + "' into " + toString(SUMO_TAG_NET)); // insert edgeType into net myEdgeType->getNet()->getAttributeCarriers()->insertEdgeType(myEdgeType); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myEdgeType->getTagStr() + " '" + myEdgeType->getID() + "' from " + toString(SUMO_TAG_NET)); // delete edgeType from net myEdgeType->getNet()->getAttributeCarriers()->deleteEdgeType(myEdgeType); } diff --git a/src/netedit/changes/GNEChange_GenericData.cpp b/src/netedit/changes/GNEChange_GenericData.cpp index ba8459b43dcd..0c62c1533f61 100644 --- a/src/netedit/changes/GNEChange_GenericData.cpp +++ b/src/netedit/changes/GNEChange_GenericData.cpp @@ -56,8 +56,6 @@ GNEChange_GenericData::~GNEChange_GenericData() { if (myGenericData->unreferenced() && myGenericData->getNet()->getAttributeCarriers()->retrieveDataInterval(myDataIntervalParent, false) && myGenericData->getNet()->getAttributeCarriers()->retrieveGenericData(myGenericData, false)) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myGenericData->getTagStr()); // delete generic data from interval parent myDataIntervalParent->removeGenericDataChild(myGenericData); // delete generic data @@ -70,8 +68,6 @@ GNEChange_GenericData::~GNEChange_GenericData() { void GNEChange_GenericData::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myGenericData->getTagStr() + " '" + myGenericData->getID() + "' in GNEChange_GenericData"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myGenericData->unselectAttributeCarrier(); @@ -81,8 +77,6 @@ GNEChange_GenericData::undo() { // restore container restoreHierarchicalContainers(); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myGenericData->getTagStr() + " '" + myGenericData->getID() + "' in GNEChange_GenericData"); // select if mySelectedElement is enabled if (mySelectedElement) { myGenericData->selectAttributeCarrier(); @@ -100,8 +94,6 @@ GNEChange_GenericData::undo() { void GNEChange_GenericData::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myGenericData->getTagStr() + " '" + myGenericData->getID() + "' in GNEChange_GenericData"); // select if mySelectedElement is enabled if (mySelectedElement) { myGenericData->selectAttributeCarrier(); @@ -111,8 +103,6 @@ GNEChange_GenericData::redo() { // add genericData in parents and children addElementInParentsAndChildren(myGenericData); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myGenericData->getTagStr() + " '" + myGenericData->getID() + "' in GNEChange_GenericData"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myGenericData->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_Junction.cpp b/src/netedit/changes/GNEChange_Junction.cpp index 822516180238..ccc72f617033 100644 --- a/src/netedit/changes/GNEChange_Junction.cpp +++ b/src/netedit/changes/GNEChange_Junction.cpp @@ -49,8 +49,6 @@ GNEChange_Junction::~GNEChange_Junction() { if (myJunction->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myJunction->decRef("GNEChange_Junction"); if (myJunction->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myJunction->getTagStr() + " '" + myJunction->getID() + "' in GNEChange_Junction"); delete myJunction; } } @@ -60,8 +58,6 @@ GNEChange_Junction::~GNEChange_Junction() { void GNEChange_Junction::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myJunction->getTagStr() + " '" + myJunction->getID() + "' from " + toString(SUMO_TAG_NET)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myJunction->unselectAttributeCarrier(); @@ -69,8 +65,6 @@ GNEChange_Junction::undo() { // add junction to net myJunction->getNet()->getAttributeCarriers()->deleteSingleJunction(myJunction); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myJunction->getTagStr() + " '" + myJunction->getID() + "' into " + toString(SUMO_TAG_NET)); // select if mySelectedElement is enabled if (mySelectedElement) { myJunction->selectAttributeCarrier(); @@ -86,8 +80,6 @@ GNEChange_Junction::undo() { void GNEChange_Junction::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myJunction->getTagStr() + " '" + myJunction->getID() + "' into " + toString(SUMO_TAG_NET)); // select if mySelectedElement is enabled if (mySelectedElement) { myJunction->selectAttributeCarrier(); @@ -95,8 +87,6 @@ GNEChange_Junction::redo() { // add junction into net myJunction->getNet()->getAttributeCarriers()->insertJunction(myJunction); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myJunction->getTagStr() + " '" + myJunction->getID() + "' from " + toString(SUMO_TAG_NET)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myJunction->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_Lane.cpp b/src/netedit/changes/GNEChange_Lane.cpp index 889b38895edb..2e21e3806836 100644 --- a/src/netedit/changes/GNEChange_Lane.cpp +++ b/src/netedit/changes/GNEChange_Lane.cpp @@ -64,15 +64,11 @@ GNEChange_Lane::~GNEChange_Lane() { if (myEdge->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myEdge->decRef("GNEChange_Lane"); if (myEdge->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myEdge->getTagStr() + " '" + myEdge->getID() + "' in GNEChange_Lane"); delete myEdge; } if (myLane) { myLane->decRef("GNEChange_Lane"); if (myLane->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myLane->getTagStr() + " '" + myLane->getID() + "' in GNEChange_Lane"); // delete lane delete myLane; } @@ -86,30 +82,24 @@ GNEChange_Lane::undo() { if (myForward) { // show extra information for tests if (myLane != nullptr) { - WRITE_DEBUG("Removing " + myLane->getTagStr() + " '" + myLane->getID() + "' from " + toString(SUMO_TAG_EDGE)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myLane->unselectAttributeCarrier(); } // restore container restoreHierarchicalContainers(); - } else { - WRITE_DEBUG("Removing nullptr " + toString(SUMO_TAG_LANE) + " from " + toString(SUMO_TAG_EDGE)); } // remove lane from edge (note: myLane can be nullptr) myEdge->removeLane(myLane, false); } else { // show extra information for tests if (myLane != nullptr) { - WRITE_DEBUG("Adding " + myLane->getTagStr() + " '" + myLane->getID() + "' into " + toString(SUMO_TAG_EDGE)); // select if mySelectedElement is enabled if (mySelectedElement) { myLane->selectAttributeCarrier(); } // restore container restoreHierarchicalContainers(); - } else { - WRITE_DEBUG("Adding nullptr " + toString(SUMO_TAG_LANE) + " into " + toString(SUMO_TAG_EDGE)); } // add lane and their attributes to edge (lane removal is reverted, no need to recompute connections) myEdge->addLane(myLane, myLaneAttrs, false); @@ -124,30 +114,24 @@ GNEChange_Lane::redo() { if (myForward) { // show extra information for tests if (myLane != nullptr) { - WRITE_DEBUG("Adding " + myLane->getTagStr() + " '" + myLane->getID() + "' into " + toString(SUMO_TAG_EDGE)); // select if mySelectedElement is enabled if (mySelectedElement) { myLane->selectAttributeCarrier(); } // add lane into parents and children addElementInParentsAndChildren(myLane); - } else { - WRITE_DEBUG("Adding nullptr " + toString(SUMO_TAG_LANE) + " into " + toString(SUMO_TAG_EDGE)); } // add lane and their attributes to edge myEdge->addLane(myLane, myLaneAttrs, myRecomputeConnections); } else { // show extra information for tests if (myLane != nullptr) { - WRITE_DEBUG("Removing " + myLane->getTagStr() + " '" + myLane->getID() + "' from " + toString(SUMO_TAG_EDGE)); // unselect if mySelectedElement is enabled if (mySelectedElement) { myLane->unselectAttributeCarrier(); } // remove lane from parents and children removeElementFromParentsAndChildren(myLane); - } else { - WRITE_DEBUG("Removing nullptr " + toString(SUMO_TAG_LANE) + " from " + toString(SUMO_TAG_EDGE)); } // remove lane from edge myEdge->removeLane(myLane, myRecomputeConnections); diff --git a/src/netedit/changes/GNEChange_MeanData.cpp b/src/netedit/changes/GNEChange_MeanData.cpp index 7a6166b0d7e8..b8db4a596d14 100644 --- a/src/netedit/changes/GNEChange_MeanData.cpp +++ b/src/netedit/changes/GNEChange_MeanData.cpp @@ -52,8 +52,6 @@ GNEChange_MeanData::~GNEChange_MeanData() { if (myMeanData->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myMeanData->decRef("GNEChange_MeanData"); if (myMeanData->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myMeanData->getTagStr()); // make sure that MeanData isn't in net before removing if (myMeanData->getNet()->getAttributeCarriers()->retrieveMeanData(myMeanData->getTagProperty().getTag(), myMeanData->getID(), false)) { // delete MeanData from net @@ -69,8 +67,6 @@ GNEChange_MeanData::~GNEChange_MeanData() { void GNEChange_MeanData::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + myMeanData->getTagStr() + " '" + myMeanData->getID() + "' in GNEChange_MeanData"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myMeanData->unselectAttributeCarrier(); @@ -78,8 +74,6 @@ GNEChange_MeanData::undo() { // delete meanData from net myMeanData->getNet()->getAttributeCarriers()->deleteMeanData(myMeanData); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + myMeanData->getTagStr() + " '" + myMeanData->getID() + "' in GNEChange_MeanData"); // select if mySelectedElement is enabled if (mySelectedElement) { myMeanData->selectAttributeCarrier(); @@ -95,8 +89,6 @@ GNEChange_MeanData::undo() { void GNEChange_MeanData::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + myMeanData->getTagStr() + " '" + myMeanData->getID() + "' in GNEChange_MeanData"); // select if mySelectedElement is enabled if (mySelectedElement) { myMeanData->selectAttributeCarrier(); @@ -104,8 +96,6 @@ GNEChange_MeanData::redo() { // insert meanData into net myMeanData->getNet()->getAttributeCarriers()->insertMeanData(myMeanData); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + myMeanData->getTagStr() + " '" + myMeanData->getID() + "' in GNEChange_MeanData"); // unselect if mySelectedElement is enabled if (mySelectedElement) { myMeanData->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_RegisterJoin.cpp b/src/netedit/changes/GNEChange_RegisterJoin.cpp index 4d6496afe57e..9188de9a2501 100644 --- a/src/netedit/changes/GNEChange_RegisterJoin.cpp +++ b/src/netedit/changes/GNEChange_RegisterJoin.cpp @@ -50,16 +50,12 @@ GNEChange_RegisterJoin::~GNEChange_RegisterJoin() { void GNEChange_RegisterJoin::undo() { - // show extra information for tests - WRITE_DEBUG("Reverting join registration"); myNC.unregisterJoinedCluster(myNodeIDs); } void GNEChange_RegisterJoin::redo() { - // show extra information for tests - WRITE_DEBUG("Redo join registration"); myNC.registerJoinedCluster(myNodeIDs); } diff --git a/src/netedit/changes/GNEChange_TAZSourceSink.cpp b/src/netedit/changes/GNEChange_TAZSourceSink.cpp index caeeb85fccb4..4f29275547cd 100644 --- a/src/netedit/changes/GNEChange_TAZSourceSink.cpp +++ b/src/netedit/changes/GNEChange_TAZSourceSink.cpp @@ -47,8 +47,6 @@ GNEChange_TAZSourceSink::~GNEChange_TAZSourceSink() { if (mySourceSink->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { mySourceSink->decRef("GNEChange_TAZSourceSink"); if (mySourceSink->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + mySourceSink->getTagStr()); // make sure that sourceSink isn't in net before removing if (mySourceSink->getNet()->getAttributeCarriers()->retrieveAdditional(mySourceSink, false)) { // delete sourceSink from net @@ -63,8 +61,6 @@ GNEChange_TAZSourceSink::~GNEChange_TAZSourceSink() { void GNEChange_TAZSourceSink::undo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Removing " + mySourceSink->getTagStr() + " '" + mySourceSink->getID() + "' in GNEChange_TAZSourceSink"); // unselect if mySelectedElement is enabled if (mySelectedElement) { mySourceSink->unselectAttributeCarrier(); @@ -74,8 +70,6 @@ GNEChange_TAZSourceSink::undo() { // restore container restoreHierarchicalContainers(); } else { - // show extra information for tests - WRITE_DEBUG("Adding " + mySourceSink->getTagStr() + " '" + mySourceSink->getID() + "' in GNEChange_TAZSourceSink"); // select if mySelectedElement is enabled if (mySelectedElement) { mySourceSink->selectAttributeCarrier(); @@ -93,8 +87,6 @@ GNEChange_TAZSourceSink::undo() { void GNEChange_TAZSourceSink::redo() { if (myForward) { - // show extra information for tests - WRITE_DEBUG("Adding " + mySourceSink->getTagStr() + " '" + mySourceSink->getID() + "' in GNEChange_TAZSourceSink"); // select if mySelectedElement is enabled if (mySelectedElement) { mySourceSink->selectAttributeCarrier(); @@ -104,8 +96,6 @@ GNEChange_TAZSourceSink::redo() { // add sourceSink in parent elements addElementInParentsAndChildren(mySourceSink); } else { - // show extra information for tests - WRITE_DEBUG("Removing " + mySourceSink->getTagStr() + " '" + mySourceSink->getID() + "' in GNEChange_TAZSourceSink"); // unselect if mySelectedElement is enabled if (mySelectedElement) { mySourceSink->unselectAttributeCarrier(); diff --git a/src/netedit/changes/GNEChange_TLS.cpp b/src/netedit/changes/GNEChange_TLS.cpp index f3e23676c44e..7db362cc668c 100644 --- a/src/netedit/changes/GNEChange_TLS.cpp +++ b/src/netedit/changes/GNEChange_TLS.cpp @@ -99,8 +99,6 @@ GNEChange_TLS::~GNEChange_TLS() { if (myJunction->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed()) { myJunction->decRef("GNEChange_TLS"); if (myJunction->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myJunction->getTagStr() + " '" + myJunction->getID() + "' in GNEChange_TLS"); delete myJunction; } } @@ -111,25 +109,17 @@ void GNEChange_TLS::undo() { if (myForward) { if (myNewID.empty()) { - // show extra information for tests - WRITE_DEBUG("Removing TLS from " + myJunction->getTagStr() + " '" + myJunction->getID() + "'"); // remove traffic light from junction myJunction->removeTrafficLight(myTlDef); } else { - // show extra information for tests - WRITE_DEBUG("Renaming Traffic Light: " + myOldID); // set old ID myJunction->getNet()->getTLLogicCont().rename(myTlDef, myOldID); } } else { if (myNewID.empty()) { - // show extra information for tests - WRITE_DEBUG("Adding TLS into " + myJunction->getTagStr() + " '" + myJunction->getID() + "'"); // add traffic light to junction myJunction->addTrafficLight(myTlDef, myForceInsert); } else { - // show extra information for tests - WRITE_DEBUG("Renaming Traffic Light: " + myNewID); // set new ID myJunction->getNet()->getTLLogicCont().rename(myTlDef, myNewID); } @@ -143,25 +133,17 @@ void GNEChange_TLS::redo() { if (myForward) { if (myNewID.empty()) { - // show extra information for tests - WRITE_DEBUG("Adding TLS into " + myJunction->getTagStr() + " '" + myJunction->getID() + "'"); // add traffic light to junction myJunction->addTrafficLight(myTlDef, myForceInsert); } else { - // show extra information for tests - WRITE_DEBUG("Renaming Traffic Light: " + myNewID); // set new ID myJunction->getNet()->getTLLogicCont().rename(myTlDef, myNewID); } } else { if (myNewID.empty()) { - // show extra information for tests - WRITE_DEBUG("Deleting TLS from " + myJunction->getTagStr() + " '" + myJunction->getID() + "'"); // remove traffic light from junction myJunction->removeTrafficLight(myTlDef); } else { - // show extra information for tests - WRITE_DEBUG("Renaming Traffic Light: " + myOldID); // set old ID myJunction->getNet()->getTLLogicCont().rename(myTlDef, myOldID); } diff --git a/src/netedit/changes/GNEChange_ToggleAttribute.cpp b/src/netedit/changes/GNEChange_ToggleAttribute.cpp index a28f7aa3ff5c..9685590515f8 100644 --- a/src/netedit/changes/GNEChange_ToggleAttribute.cpp +++ b/src/netedit/changes/GNEChange_ToggleAttribute.cpp @@ -52,8 +52,6 @@ GNEChange_ToggleAttribute::~GNEChange_ToggleAttribute() { myAC->decRef("GNEChange_ToggleAttribute " + myAC->getTagProperty().getTagStr()); // remove if is unreferenced if (myAC->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + myAC->getTagStr() + " '" + myAC->getID() + "' in GNEChange_ToggleAttribute"); // delete AC delete myAC; } @@ -63,8 +61,6 @@ GNEChange_ToggleAttribute::~GNEChange_ToggleAttribute() { void GNEChange_ToggleAttribute::undo() { - // show extra information for tests - WRITE_DEBUG("Toggle attribute into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); // set original value myAC->toggleAttribute(myKey, myOrigValue); // check if networkElements, additional or shapes has to be saved @@ -84,8 +80,6 @@ GNEChange_ToggleAttribute::undo() { void GNEChange_ToggleAttribute::redo() { - // show extra information for tests - WRITE_DEBUG("Toggle attribute into " + myAC->getTagStr() + " '" + myAC->getID() + "'"); // set new attributes myAC->toggleAttribute(myKey, myNewValue); // check if networkElements, additional or shapes has to be saved diff --git a/src/netedit/dialogs/GNEAbout.cpp b/src/netedit/dialogs/GNEAbout.cpp index 4d1395781952..e630b07970c5 100644 --- a/src/netedit/dialogs/GNEAbout.cpp +++ b/src/netedit/dialogs/GNEAbout.cpp @@ -59,7 +59,6 @@ GNEAbout::GNEAbout(FXWindow* parent) : while ((modules.size() > 0) && (modules.front() != ' ')) { modules.erase(modules.begin()); } - WRITE_DEBUG(("Modules: " + modules).c_str()); // SUMO_HOME new FXLabel(descriptionFrame, std::string("SUMO_HOME: " + std::string(getenv("SUMO_HOME"))).c_str(), nullptr, GUIDesignLabelAboutInfo); // copyright notice diff --git a/src/netedit/dialogs/GNECalibratorDialog.cpp b/src/netedit/dialogs/GNECalibratorDialog.cpp index c3efd0e972b3..9705022e87d3 100644 --- a/src/netedit/dialogs/GNECalibratorDialog.cpp +++ b/src/netedit/dialogs/GNECalibratorDialog.cpp @@ -170,24 +170,14 @@ GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) { } // if there are flows that has route to remove as "route" parameter if (calibratorFlowsToErase.size() > 0) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'question'"); // open question dialog box const std::string msg = ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() + "' will remove " + toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_CALIBRATOR_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str(), "%s", msg.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'"); - } // abort deletion of route return 0; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'"); // remove affected flows of calibrator flows for (auto j : calibratorFlowsToErase) { myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true); @@ -298,17 +288,9 @@ GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) { toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_CALIBRATOR_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?"); FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_CALIBRATOR_FLOW) + "s").c_str(), "%s", msg.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'"); - } // abort deletion of vehicle type return 0; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'"); // remove affected flows of calibrator flows for (auto j : calibratorFlowsToErase) { myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true); diff --git a/src/netedit/dialogs/GNECalibratorFlowDialog.cpp b/src/netedit/dialogs/GNECalibratorFlowDialog.cpp index 729576367492..9be3165e2ff0 100644 --- a/src/netedit/dialogs/GNECalibratorFlowDialog.cpp +++ b/src/netedit/dialogs/GNECalibratorFlowDialog.cpp @@ -158,40 +158,28 @@ GNECalibratorFlowDialog::onCmdAccept(FXObject*, FXSelector, void*) { std::string parentTagString = myEditedAdditional->getParentAdditionals().at(0)->getTagStr(); std::string tagString = myEditedAdditional->getTagStr(); if (!myCalibratorFlowValid) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning dialog box FXMessageBox::warning(getApp(), MBOX_OK, ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s", (parentTagString + "'s " + tagString + " cannot be " + operation2 + " because parameter " + toString(myInvalidAttr) + " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if (!myEditedAdditional->getParentAdditionals().at(0)->checkChildAdditionalsOverlapping()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning dialog box FXMessageBox::warning(getApp(), MBOX_OK, ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s", (parentTagString + "'s " + tagString + " cannot be " + operation2 + " because there is overlapping with another " + tagString + ".").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myEditedAdditional->getAttribute(SUMO_ATTR_VEHSPERHOUR).empty() && myEditedAdditional->getAttribute(SUMO_ATTR_SPEED).empty()) || (!myEditedAdditional->getAttribute(SUMO_ATTR_VEHSPERHOUR).empty() && !myEditedAdditional->getAttribute(SUMO_ATTR_SPEED).empty())) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning dialog box FXMessageBox::warning(getApp(), MBOX_OK, ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s", (parentTagString + "'s " + tagString + " cannot be " + operation2 + " because parameters " + toString(SUMO_ATTR_VEHSPERHOUR) + " and " + toString(SUMO_ATTR_SPEED) + " cannot be defined together.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/dialogs/GNEFixDemandElements.cpp b/src/netedit/dialogs/GNEFixDemandElements.cpp index 753e94913a49..75f09f65f67d 100644 --- a/src/netedit/dialogs/GNEFixDemandElements.cpp +++ b/src/netedit/dialogs/GNEFixDemandElements.cpp @@ -213,19 +213,11 @@ GNEFixDemandElements::FixOptions::saveContents() const { } // close output device dev.close(); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Saving list of conflicted items successfully'"); // open message box error FXMessageBox::information(myTable, MBOX_OK, "Saving successfully", "%s", "List of conflicted items was successfully saved"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Saving list of conflicted items successfully' with 'OK'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving list of conflicted items'"); // open message box error FXMessageBox::error(myTable, MBOX_OK, "Saving list of conflicted items failed", "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving list of conflicted items' with 'OK'"); } return true; } diff --git a/src/netedit/dialogs/GNEFixNetworkElements.cpp b/src/netedit/dialogs/GNEFixNetworkElements.cpp index 31397a002f64..8cffd23e2f55 100644 --- a/src/netedit/dialogs/GNEFixNetworkElements.cpp +++ b/src/netedit/dialogs/GNEFixNetworkElements.cpp @@ -200,19 +200,11 @@ GNEFixNetworkElements::FixOptions::saveContents() const { } // close output device dev.close(); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Saving list of conflicted items successfully'"); // open message box error FXMessageBox::information(myTable, MBOX_OK, TL("Saving successfully"), "%s", "List of conflicted items was successfully saved"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Saving list of conflicted items successfully' with 'OK'"); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error saving list of conflicted items'"); // open message box error FXMessageBox::error(myTable, MBOX_OK, TL("Saving list of conflicted items failed"), "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error saving list of conflicted items' with 'OK'"); } return true; } diff --git a/src/netedit/dialogs/GNEMultipleParametersDialog.cpp b/src/netedit/dialogs/GNEMultipleParametersDialog.cpp index 43cf74bcc7d2..8e6f586c06f2 100644 --- a/src/netedit/dialogs/GNEMultipleParametersDialog.cpp +++ b/src/netedit/dialogs/GNEMultipleParametersDialog.cpp @@ -415,8 +415,6 @@ GNEMultipleParametersDialog::ParametersOperations::onCmdHelpParameter(FXObject*, new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), ParameterHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening Parameter help dialog"); // create Dialog ParameterHelpDialog->create(); // show in the given position @@ -425,8 +423,6 @@ GNEMultipleParametersDialog::ParametersOperations::onCmdHelpParameter(FXObject*, getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(ParameterHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Closing Parameter help dialog"); return 1; } @@ -524,20 +520,12 @@ GNEMultipleParametersDialog::onCmdAccept(FXObject*, FXSelector, void*) { // continue if we're going to modify key if (parameterRow->valueChanged) { if (parameterRow->keyField->getText().empty()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Empty Parameter key", "%s", "Parameters with empty keys aren't allowed"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } else if (!SUMOXMLDefinitions::isValidParameterKey(parameterRow->keyField->getText().text())) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Invalid Parameter key", "%s", "There are keys with invalid characters"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } // insert in parameters @@ -550,12 +538,8 @@ GNEMultipleParametersDialog::onCmdAccept(FXObject*, FXSelector, void*) { // check if there is duplicated keys for (auto i = parametersChanged.begin(); i != parametersChanged.end(); i++) { if (((i + 1) != parametersChanged.end()) && (i->first) == (i + 1)->first) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Duplicated Parameters", "%s", "Parameters with the same Key aren't allowed"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } } diff --git a/src/netedit/dialogs/GNERerouterDialog.cpp b/src/netedit/dialogs/GNERerouterDialog.cpp index 96cfda683898..403d267877ad 100644 --- a/src/netedit/dialogs/GNERerouterDialog.cpp +++ b/src/netedit/dialogs/GNERerouterDialog.cpp @@ -83,12 +83,8 @@ long GNERerouterDialog::onCmdAccept(FXObject*, FXSelector, void*) { // Check if there is overlapping between Intervals if (!myEditedAdditional->checkChildAdditionalsOverlapping()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Overlapping detected", "%s", ("Values of '" + myEditedAdditional->getID() + "' cannot be saved. There are intervals overlapped.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/dialogs/GNERerouterIntervalDialog.cpp b/src/netedit/dialogs/GNERerouterIntervalDialog.cpp index 2938c443d17c..ee63a1eaeea6 100644 --- a/src/netedit/dialogs/GNERerouterIntervalDialog.cpp +++ b/src/netedit/dialogs/GNERerouterIntervalDialog.cpp @@ -212,64 +212,36 @@ GNERerouterIntervalDialog::onCmdAccept(FXObject*, FXSelector, void*) { std::string errorTitle = "Error" + toString(myUpdatingElement ? "updating" : "creating") + " " + myEditedAdditional->getTagStr() + " of " + myEditedAdditional->getParentAdditionals().at(0)->getTagStr(); std::string operationType = myEditedAdditional->getParentAdditionals().at(0)->getTagStr() + "'s " + myEditedAdditional->getTagStr() + " cannot be " + (myUpdatingElement ? "updated" : "created") + " because "; if (!myBeginEndValid) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + myEditedAdditional->getTagStr() + " defined by " + toString(SUMO_ATTR_BEGIN) + " and " + toString(SUMO_ATTR_END) + " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if (myClosingLaneReroutesEdited.empty() && myClosingReroutesEdited.empty() && myDestProbReroutesEdited.empty() && myParkingAreaRerouteEdited.empty() && myRouteProbReroutesEdited.empty()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "at least one " + myEditedAdditional->getTagStr() + "'s element must be defined.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingLaneReroutesValid == false)) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + "s.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingReroutesValid == false)) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_REROUTE) + "s.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myDestProbReroutesEdited.size() > 0) && (myDestProbReroutesValid == false)) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_PARKING_AREA_REROUTE) + "s.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myParkingAreaRerouteEdited.size() > 0) && (myParkingAreaReroutesValid == false)) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_DEST_PROB_REROUTE) + "s.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else if ((myRouteProbReroutesEdited.size() > 0) && (myRouteProbReroutesValid == false)) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_ROUTE_PROB_REROUTE) + "s.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/dialogs/GNERouteDialog.cpp b/src/netedit/dialogs/GNERouteDialog.cpp index 5d3c58200f9f..15472c46d686 100644 --- a/src/netedit/dialogs/GNERouteDialog.cpp +++ b/src/netedit/dialogs/GNERouteDialog.cpp @@ -92,8 +92,6 @@ GNERouteDialog::~GNERouteDialog() {} long GNERouteDialog::onCmdAccept(FXObject*, FXSelector, void*) { if (!myCalibratorRouteValid) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); std::string operation2 = myUpdatingElement ? ("updated") : ("created"); std::string tagString = myEditedDemandElement->getTagStr(); @@ -101,8 +99,6 @@ GNERouteDialog::onCmdAccept(FXObject*, FXSelector, void*) { FXMessageBox::warning(getApp(), MBOX_OK, ("Error " + operation1 + " " + tagString).c_str(), "%s", (tagString + " cannot be " + operation2 + " because parameter " + toString(myInvalidAttr) + " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/dialogs/GNESingleParametersDialog.cpp b/src/netedit/dialogs/GNESingleParametersDialog.cpp index 3ea6b534944f..ea68000b64ad 100644 --- a/src/netedit/dialogs/GNESingleParametersDialog.cpp +++ b/src/netedit/dialogs/GNESingleParametersDialog.cpp @@ -412,8 +412,6 @@ GNESingleParametersDialog::ParametersOperations::onCmdHelpParameter(FXObject*, F new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), ParameterHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening Parameter help dialog"); // create Dialog ParameterHelpDialog->create(); // show in the given position @@ -422,8 +420,6 @@ GNESingleParametersDialog::ParametersOperations::onCmdHelpParameter(FXObject*, F getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(ParameterHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Closing Parameter help dialog"); return 1; } @@ -576,20 +572,12 @@ GNESingleParametersDialog::onCmdAccept(FXObject*, FXSelector, void*) { // ignore last row if (parameterRow != myParametersValues->getParameterRows().back()) { if (parameterRow->keyField->getText().empty()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Empty Parameter key", "%s", "Parameters with empty keys aren't allowed"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } else if (!SUMOXMLDefinitions::isValidParameterKey(parameterRow->keyField->getText().text())) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Invalid Parameter key", "%s", "There are keys with invalid characters"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } // insert in parameters @@ -601,12 +589,8 @@ GNESingleParametersDialog::onCmdAccept(FXObject*, FXSelector, void*) { // check if there is duplicated keys for (auto i = parameters.begin(); i != parameters.end(); i++) { if (((i + 1) != parameters.end()) && (i->first) == (i + 1)->first) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, "Duplicated Parameters", "%s", "Parameters with the same Key aren't allowed"); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 1; } } diff --git a/src/netedit/dialogs/GNEVTypeDistributionsDialog.cpp b/src/netedit/dialogs/GNEVTypeDistributionsDialog.cpp index 077c60ff3e36..b850751d3847 100644 --- a/src/netedit/dialogs/GNEVTypeDistributionsDialog.cpp +++ b/src/netedit/dialogs/GNEVTypeDistributionsDialog.cpp @@ -407,8 +407,6 @@ GNEVTypeDistributionsDialog::ParametersOperations::onCmdHelpParameter(FXObject*, new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), ParameterHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening Parameter help dialog"); // create Dialog ParameterHelpDialog->create(); // show in the given position @@ -417,8 +415,6 @@ GNEVTypeDistributionsDialog::ParametersOperations::onCmdHelpParameter(FXObject*, getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(ParameterHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Closing Parameter help dialog"); return 1; } diff --git a/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp b/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp index 553102d926b6..765c0ac4b811 100644 --- a/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp +++ b/src/netedit/dialogs/GNEVariableSpeedSignDialog.cpp @@ -158,13 +158,9 @@ GNEVariableSpeedSignDialog::onCmdSortSteps(FXObject*, FXSelector, void*) { long GNEVariableSpeedSignDialog::onCmdAccept(FXObject*, FXSelector, void*) { if (!myStepsValids) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); // open warning Box FXMessageBox::warning(getApp(), MBOX_OK, ("Error updating " + toString(SUMO_TAG_VSS) + " " + toString(SUMO_TAG_STEP)).c_str(), "%s", (toString(SUMO_TAG_VSS) + " " + toString(SUMO_TAG_STEP) + "cannot be updated because there are invalid values").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/dialogs/GNEVehicleTypeDialog.cpp b/src/netedit/dialogs/GNEVehicleTypeDialog.cpp index a7855e986832..49f9289fa006 100644 --- a/src/netedit/dialogs/GNEVehicleTypeDialog.cpp +++ b/src/netedit/dialogs/GNEVehicleTypeDialog.cpp @@ -1264,17 +1264,10 @@ GNEVehicleTypeDialog::VTypeAttributes::onCmdOpenAttributeDialog(FXObject* obj, F long GNEVehicleTypeDialog::VTypeAttributes::onCmdOpenParametersEditor(FXObject*, FXSelector, void*) { - // write debug information - WRITE_DEBUG("Open parameters dialog"); // edit parameters using dialog if (GNESingleParametersDialog(myParameters, myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()).execute()) { - // write debug information - WRITE_DEBUG("Close parameters dialog"); // set values edited in Parameter dialog in Edited AC myVehicleTypeDialog->getEditedDemandElement()->setAttribute(GNE_ATTR_PARAMETERS, myParameters->getParametersStr(), myVehicleTypeDialog->getEditedDemandElement()->getNet()->getViewNet()->getUndoList()); - } else { - // write debug information - WRITE_DEBUG("Cancel parameters dialog"); } return 1; } @@ -1804,8 +1797,6 @@ GNEVehicleTypeDialog::~GNEVehicleTypeDialog() {} long GNEVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) { if (!myVehicleTypeValid) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox of type 'warning'"); std::string operation1 = myUpdatingElement ? ("updating") : ("creating"); std::string operation2 = myUpdatingElement ? ("updated") : ("created"); std::string tagString = myEditedDemandElement->getTagStr(); @@ -1815,8 +1806,6 @@ GNEVehicleTypeDialog::onCmdAccept(FXObject*, FXSelector, void*) { (tagString + " cannot be " + operation2 + " because parameter " + toString(myInvalidAttr) + " is invalid.").c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'"); return 0; } else { // accept changes before closing dialog diff --git a/src/netedit/elements/GNEAttributeCarrier.cpp b/src/netedit/elements/GNEAttributeCarrier.cpp index 9be29289d7c1..fdc00f2754a3 100644 --- a/src/netedit/elements/GNEAttributeCarrier.cpp +++ b/src/netedit/elements/GNEAttributeCarrier.cpp @@ -9778,8 +9778,8 @@ GNEAttributeCarrier::fillCommonMeanDataAttributes(GNETagProperties& tagPropertie attrProperty = GNEAttributeProperties(SUMO_ATTR_EXCLUDE_EMPTY, GNEAttributeProperties::STRING | GNEAttributeProperties::DISCRETE | GNEAttributeProperties::DEFAULTVALUE, TL("If set to true, edges/lanes which were not used by a vehicle during this period will not be written"), - "default"); - attrProperty.setDiscreteValues({"1", "0", "default"}); + SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::FALSES)); + attrProperty.setDiscreteValues(SUMOXMLDefinitions::ExcludeEmptys.getStrings()); tagProperties.addAttribute(attrProperty); attrProperty = GNEAttributeProperties(SUMO_ATTR_WITH_INTERNAL, diff --git a/src/netedit/elements/additional/GNEAdditionalHandler.cpp b/src/netedit/elements/additional/GNEAdditionalHandler.cpp index 646c4009c85a..01d92a752b11 100644 --- a/src/netedit/elements/additional/GNEAdditionalHandler.cpp +++ b/src/netedit/elements/additional/GNEAdditionalHandler.cpp @@ -889,6 +889,7 @@ GNEAdditionalHandler::buildCalibratorFlow(const CommonXMLStructure::SumoBaseObje myNet->getViewNet()->getUndoList()->add(new GNEChange_Additional(flow, true), true); myNet->getViewNet()->getUndoList()->end(); } else { + myNet->getAttributeCarriers()->insertAdditional(flow); calibrator->addChildElement(flow); route->addChildElement(flow); vType->addChildElement(flow); diff --git a/src/netedit/elements/data/GNEMeanData.cpp b/src/netedit/elements/data/GNEMeanData.cpp index 4d8ae090500e..2dd99f3aede9 100644 --- a/src/netedit/elements/data/GNEMeanData.cpp +++ b/src/netedit/elements/data/GNEMeanData.cpp @@ -102,7 +102,7 @@ GNEMeanData::writeMeanData(OutputDevice& device) const { if (myEnd != -1) { device.writeAttr(SUMO_ATTR_END, STEPS2TIME(myEnd)); } - if (myExcludeEmpty != "default") { + if (myExcludeEmpty != myTagProperty.getDefaultValue(SUMO_ATTR_EXCLUDE_EMPTY)) { device.writeAttr(SUMO_ATTR_EXCLUDE_EMPTY, myExcludeEmpty); } if (myWithInternal) { @@ -320,7 +320,7 @@ GNEMeanData::isValid(SumoXMLAttr key, const std::string& value) { if (canParse(value)) { return true; } else { - return (value == "default"); + return (value == SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::DEFAULTS)); } case SUMO_ATTR_WITH_INTERNAL: return (canParse(value)); @@ -408,7 +408,13 @@ GNEMeanData::setAttribute(SumoXMLAttr key, const std::string& value) { } break; case SUMO_ATTR_EXCLUDE_EMPTY: - myExcludeEmpty = value; + if (value == SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::DEFAULTS)) { + myExcludeEmpty = value; + } else if (parse(value)) { + myExcludeEmpty = SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::TRUES); + } else { + myExcludeEmpty = SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::FALSES); + } break; case SUMO_ATTR_WITH_INTERNAL: myWithInternal = parse(value); diff --git a/src/netedit/elements/data/GNEMeanDataHandler.cpp b/src/netedit/elements/data/GNEMeanDataHandler.cpp index 390d75a7c911..3617039e171d 100644 --- a/src/netedit/elements/data/GNEMeanDataHandler.cpp +++ b/src/netedit/elements/data/GNEMeanDataHandler.cpp @@ -83,6 +83,8 @@ GNEMeanDataHandler::buildEdgeMeanData(const CommonXMLStructure::SumoBaseObject* return false; } else if (!checkNegative(SUMO_TAG_MEANDATA_EDGE, id, SUMO_ATTR_HALTING_SPEED_THRESHOLD, speedThreshold, true)) { return false; + } else if (!checkExcludeEmpty(SUMO_TAG_MEANDATA_EDGE, id, excludeEmpty)) { + return false; } else if ((edges.size() == edgeIDs.size()) && (attributes.size() == writtenAttributes.size())) { GNEMeanData* edgeMeanData = new GNEMeanData(myNet, SUMO_TAG_MEANDATA_EDGE, id, file, period, begin, end, trackVehicles, attributes, aggregate, edgeIDs, edgeFile, excludeEmpty, withInternal, @@ -130,6 +132,8 @@ GNEMeanDataHandler::buildLaneMeanData(const CommonXMLStructure::SumoBaseObject* return false; } else if (!checkNegative(SUMO_TAG_MEANDATA_EDGE, id, SUMO_ATTR_HALTING_SPEED_THRESHOLD, speedThreshold, true)) { return false; + } else if (!checkExcludeEmpty(SUMO_TAG_MEANDATA_EDGE, id, excludeEmpty)) { + return false; } else if ((edges.size() == edgeIDs.size()) && (attributes.size() == writtenAttributes.size())) { GNEMeanData* edgeMeanData = new GNEMeanData(myNet, SUMO_TAG_MEANDATA_LANE, id, file, period, begin, end, trackVehicles, attributes, aggregate, edgeIDs, edgeFile, excludeEmpty, withInternal, @@ -203,4 +207,16 @@ GNEMeanDataHandler::checkDuplicatedMeanDataElement(const SumoXMLTag tag, const s return true; } + +bool +GNEMeanDataHandler::checkExcludeEmpty(const SumoXMLTag tag, const std::string& id, const std::string& excludeEmpty) { + if (GNEAttributeCarrier::canParse(excludeEmpty)) { + return true; + } else if (excludeEmpty == SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::DEFAULTS)) { + return true; + } else { + return writeError(TLF("Could not build % with ID '%' in netedit; Invalid value '%' for %.", toString(tag), id, excludeEmpty, toString(SUMO_ATTR_EXCLUDE_EMPTY))); + } +} + /****************************************************************************/ diff --git a/src/netedit/elements/data/GNEMeanDataHandler.h b/src/netedit/elements/data/GNEMeanDataHandler.h index f16783602c8d..eca09336631d 100644 --- a/src/netedit/elements/data/GNEMeanDataHandler.h +++ b/src/netedit/elements/data/GNEMeanDataHandler.h @@ -84,6 +84,9 @@ class GNEMeanDataHandler : public MeanDataHandler { /// @brief check if given ID correspond to a duplicated mean data element bool checkDuplicatedMeanDataElement(const SumoXMLTag tag, const std::string& id); + /// @brief check if given excludeEmpty is valid + bool checkExcludeEmpty(const SumoXMLTag tag, const std::string& id, const std::string& excludeEmpty); + private: /// @brief invalidate copy constructor GNEMeanDataHandler(const GNEMeanDataHandler& s) = delete; diff --git a/src/netedit/elements/demand/GNERouteHandler.cpp b/src/netedit/elements/demand/GNERouteHandler.cpp index 67d4f29fe92f..f8c209ace270 100644 --- a/src/netedit/elements/demand/GNERouteHandler.cpp +++ b/src/netedit/elements/demand/GNERouteHandler.cpp @@ -1651,12 +1651,8 @@ GNERouteHandler::transformToVehicle(GNEVehicle* originalVehicle, bool createEmbe const std::string header = "Problem transforming to vehicle"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of edges"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // begin undo-redo operation net->getViewNet()->getUndoList()->begin(originalVehicle, "transform " + originalVehicle->getTagStr() + " to " + toString(SUMO_TAG_VEHICLE)); @@ -1733,12 +1729,8 @@ GNERouteHandler::transformToRouteFlow(GNEVehicle* originalVehicle, bool createEm const std::string header = "Problem transforming to vehicle"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of edges"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // begin undo-redo operation net->getViewNet()->getUndoList()->begin(originalVehicle, "transform " + originalVehicle->getTagStr() + " to " + toString(SUMO_TAG_VEHICLE)); @@ -1820,12 +1812,8 @@ GNERouteHandler::transformToTrip(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to vehicle"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of edges"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // begin undo-redo operation net->getViewNet()->getUndoList()->begin(originalVehicle, "transform " + originalVehicle->getTagStr() + " to " + toString(SUMO_TAG_TRIP)); @@ -1885,12 +1873,8 @@ GNERouteHandler::transformToFlow(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to vehicle"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of edges"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // begin undo-redo operation net->getViewNet()->getUndoList()->begin(originalVehicle, "transform " + originalVehicle->getTagStr() + " to " + toString(SUMO_TAG_VEHICLE)); @@ -1937,12 +1921,8 @@ GNERouteHandler::transformToTripJunctions(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to trip over junctions"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of junctions"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // get pointer to net GNENet* net = originalVehicle->getNet(); @@ -1981,12 +1961,8 @@ GNERouteHandler::transformToFlowJunctions(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to flow over junctions"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of junctions"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // get pointer to net GNENet* net = originalVehicle->getNet(); @@ -2034,12 +2010,8 @@ GNERouteHandler::transformToTripTAZs(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to trip over TAZs"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of TAZs"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // get pointer to net GNENet* net = originalVehicle->getNet(); @@ -2078,12 +2050,8 @@ GNERouteHandler::transformToFlowTAZs(GNEVehicle* originalVehicle) { const std::string header = "Problem transforming to flow over TAZs"; // declare message const std::string message = "Vehicle cannot be transformed. Invalid number of TAZs"; - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(originalVehicle->getNet()->getViewNet()->getApp(), MBOX_OK, header.c_str(), "%s", message.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } else { // get pointer to net GNENet* net = originalVehicle->getNet(); diff --git a/src/netedit/elements/network/GNEEdge.cpp b/src/netedit/elements/network/GNEEdge.cpp index 525afed76c31..75dad6743a72 100644 --- a/src/netedit/elements/network/GNEEdge.cpp +++ b/src/netedit/elements/network/GNEEdge.cpp @@ -106,8 +106,6 @@ GNEEdge::~GNEEdge() { if (myNet->getAttributeCarriers()->getLanes().count(lane) > 0) { myNet->getAttributeCarriers()->deleteLane(lane); } - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + lane->getTagStr() + " '" + lane->getID() + "' in GNEEdge destructor"); delete lane; } } @@ -119,8 +117,6 @@ GNEEdge::~GNEEdge() { if (myNet->getAttributeCarriers()->getConnections().count(connection) > 0) { myNet->getAttributeCarriers()->deleteConnection(connection); } - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + connection->getTagStr() + " '" + connection->getID() + "' in GNEEdge destructor"); delete connection; } } @@ -978,9 +974,6 @@ GNEEdge::remakeGNEConnections(bool junctionsReady) { } // delete GNEConnection if is unreferenced if (connection->unreferenced()) { - - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + connection->getTagStr() + " '" + connection->getID() + "' in rebuildGNEConnections()"); delete connection; } } @@ -1007,8 +1000,6 @@ GNEEdge::clearGNEConnections() { } // Delete GNEConnectionToErase if is unreferenced if (connection->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + connection->getTagStr() + " '" + connection->getID() + "' in clearGNEConnections()"); delete connection; } } @@ -1945,11 +1936,9 @@ GNEEdge::setAttribute(SumoXMLAttr key, const std::string& value) { case GNE_ATTR_MODIFICATION_STATUS: myConnectionStatus = value; if (value == FEATURE_GUESSED) { - WRITE_DEBUG("invalidating (removing) connections of edge '" + getID() + "' due it were guessed"); myNBEdge->invalidateConnections(true); clearGNEConnections(); } else if (value != FEATURE_GUESSED) { - WRITE_DEBUG("declaring connections of edge '" + getID() + "' as loaded (It will not be removed)"); myNBEdge->declareConnectionsAsLoaded(); } break; @@ -2200,8 +2189,6 @@ GNEEdge::removeLane(GNELane* lane, bool recomputeConnections) { myNet->getAttributeCarriers()->deleteLane(lane); // Delete lane if is unreferenced if (lane->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + lane->getTagStr() + " '" + lane->getID() + "' in removeLane()"); delete lane; } // update indices @@ -2280,8 +2267,6 @@ GNEEdge::removeConnection(NBEdge::Connection nbCon) { myNet->getAttributeCarriers()->deleteConnection(connection); } if (connection->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + connection->getTagStr() + " '" + connection->getID() + "' in removeConnection()"); // actually we only do this to force a redraw updateGeometry(); } @@ -2299,8 +2284,6 @@ GNEEdge::retrieveGNEConnection(int fromLane, NBEdge* to, int toLane, bool create if (createIfNoExist) { // create new connection. Will be added to the rTree on first geometry computation GNEConnection* connection = new GNEConnection(myLanes[fromLane], myNet->getAttributeCarriers()->retrieveEdge(to->getID())->getLanes()[toLane]); - // show extra information for tests - WRITE_DEBUG("Created " + connection->getTagStr() + " '" + connection->getID() + "' in retrieveGNEConnection()"); // add it into network myNet->addGLObjectIntoGrid(connection); // add it in attributeCarriers diff --git a/src/netedit/elements/network/GNEJunction.cpp b/src/netedit/elements/network/GNEJunction.cpp index 9d2bcbda5deb..2a5a988fa9f5 100644 --- a/src/netedit/elements/network/GNEJunction.cpp +++ b/src/netedit/elements/network/GNEJunction.cpp @@ -86,8 +86,6 @@ GNEJunction::~GNEJunction() { if (myNet->getAttributeCarriers()->getCrossings().count(crossing) > 0) { myNet->getAttributeCarriers()->deleteCrossing(crossing); } - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + crossing->getTagStr() + " '" + crossing->getID() + "' in GNEJunction destructor"); delete crossing; } } @@ -99,14 +97,10 @@ GNEJunction::~GNEJunction() { if (myNet->getAttributeCarriers()->getWalkingAreas().count(walkingArea) > 0) { myNet->getAttributeCarriers()->deleteWalkingArea(walkingArea); } - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + walkingArea->getTagStr() + " '" + walkingArea->getID() + "' in GNEJunction destructor"); delete walkingArea; } } if (myAmResponsible) { - // show extra information for tests - WRITE_DEBUG("Deleting NBNode of '" + getID() + "' in GNEJunction destructor"); delete myNBNode; } } @@ -453,8 +447,6 @@ GNEJunction::rebuildGNECrossings(bool rebuildNBNodeCrossings) { // remove it from attributeCarriers myNet->getAttributeCarriers()->deleteCrossing(crossing); if (crossing->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + crossing->getTagStr() + " in rebuildGNECrossings()"); delete crossing; } } @@ -873,8 +865,6 @@ void GNEJunction::invalidateShape() { if (!myNBNode->hasCustomShape()) { if (myNBNode->myPoly.size() > 0) { - // write GL Debug - WRITE_GLDEBUG("<-- Invalidating shape of junction '" + getID() + "' -->"); // clear poly myNBNode->myPoly.clear(); // update centering boundary @@ -1159,8 +1149,6 @@ GNEJunction::retrieveGNECrossing(NBNode::Crossing* NBNodeCrossing, bool createIf if (createIfNoExist) { // create new GNECrossing GNECrossing* createdGNECrossing = new GNECrossing(this, NBNodeCrossing->edges); - // show extra information for tests - WRITE_DEBUG("Created " + createdGNECrossing->getTagStr() + " '" + createdGNECrossing->getID() + "' in retrieveGNECrossing()"); // update geometry after creating createdGNECrossing->updateGeometry(); // add it in Network @@ -1186,8 +1174,6 @@ GNEJunction::retrieveGNEWalkingArea(const std::string& NBNodeWalkingAreaID, bool if (createIfNoExist) { // create new GNEWalkingArea GNEWalkingArea* createdGNEWalkingArea = new GNEWalkingArea(this, NBNodeWalkingAreaID); - // show extra information for tests - WRITE_DEBUG("Created " + createdGNEWalkingArea->getTagStr() + " '" + createdGNEWalkingArea->getID() + "' in retrieveGNEWalkingArea()"); // update geometry after creating createdGNEWalkingArea->updateGeometry(); // add it in Network @@ -1273,8 +1259,6 @@ GNEJunction::clearWalkingAreas() { // remove it from attributeCarriers myNet->getAttributeCarriers()->deleteWalkingArea(walkingArea); if (walkingArea->unreferenced()) { - // show extra information for tests - WRITE_DEBUG("Deleting unreferenced " + walkingArea->getTagStr() + " in rebuildGNEWalkingAreas()"); delete walkingArea; } } diff --git a/src/netedit/frames/GNEAttributesCreator.cpp b/src/netedit/frames/GNEAttributesCreator.cpp index 74f1fe23037a..3df3f12e10ce 100644 --- a/src/netedit/frames/GNEAttributesCreator.cpp +++ b/src/netedit/frames/GNEAttributesCreator.cpp @@ -179,8 +179,6 @@ GNEAttributesCreator::showWarningMessage(std::string extra) const { } // set message in status bar myFrameParent->getViewNet()->setStatusBarText(errorMessage); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(errorMessage); } diff --git a/src/netedit/frames/GNEAttributesEditorRow.cpp b/src/netedit/frames/GNEAttributesEditorRow.cpp index 566fe5fb4f97..f80656b3fb18 100644 --- a/src/netedit/frames/GNEAttributesEditorRow.cpp +++ b/src/netedit/frames/GNEAttributesEditorRow.cpp @@ -327,8 +327,6 @@ GNEAttributesEditorRow::onCmdSetAttribute(FXObject* obj, FXSelector, void*) { if (newValue.empty()) { myValueComboBox->setBackColor(TEXTCOLOR_BACKGROUND_RED); } - // Write Warning in console if we're in testing mode - WRITE_DEBUG(TLF("ComboBox value '%' for attribute % of % isn't valid", newValue, attrProperties.getAttrStr(), attrProperties.getTagPropertyParent().getTagStr())); } } else if (obj == myValueTextField) { // check if we're merging junction @@ -377,8 +375,6 @@ GNEAttributesEditorRow::onCmdSetAttribute(FXObject* obj, FXSelector, void*) { if (newValue.empty()) { myValueTextField->setBackColor(TEXTCOLOR_BACKGROUND_RED); } - // Write Warning in console if we're in testing mode - WRITE_DEBUG(TLF("TextField value '%' for attribute % of % isn't valid", newValue, attrProperties.getAttrStr(), attrProperties.getTagPropertyParent().getTagStr())); } } return 1; diff --git a/src/netedit/frames/GNEDemandSelector.cpp b/src/netedit/frames/GNEDemandSelector.cpp index a4ddfea9e623..98e56e42a931 100644 --- a/src/netedit/frames/GNEDemandSelector.cpp +++ b/src/netedit/frames/GNEDemandSelector.cpp @@ -265,8 +265,6 @@ GNEDemandElementSelector::onCmdSelectDemandElement(FXObject*, FXSelector, void*) myCurrentDemandElement = demandElement.second; // call demandElementSelected function myFrameParent->demandElementSelected(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG((TL("Selected item '") + myDemandElementsComboBox->getText() + TL("' in DemandElementSelector")).text()); return 1; } } @@ -277,8 +275,6 @@ GNEDemandElementSelector::onCmdSelectDemandElement(FXObject*, FXSelector, void*) myFrameParent->demandElementSelected(); // change color of myDemandElementsComboBox to red (invalid) myDemandElementsComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(TL("Selected invalid item in DemandElementSelector")); return 1; } diff --git a/src/netedit/frames/GNEFrame.cpp b/src/netedit/frames/GNEFrame.cpp index 03cdb730f8b0..37cd43eeb3ca 100644 --- a/src/netedit/frames/GNEFrame.cpp +++ b/src/netedit/frames/GNEFrame.cpp @@ -233,8 +233,6 @@ GNEFrame::openHelpAttributesDialog(const GNEAttributeCarrier* AC) const { new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), attributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(TLF("Opening HelpAttributes dialog for tag '%' showing % attributes", AC->getTagProperty().getTagStr(), toString(AC->getTagProperty().getNumberOfAttributes()))); // create Dialog attributesHelpDialog->create(); // show in the given position @@ -243,8 +241,6 @@ GNEFrame::openHelpAttributesDialog(const GNEAttributeCarrier* AC) const { getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(attributesHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(TL("Closing HelpAttributes dialog for tag '") + AC->getTagProperty().getTagStr() + "'"); } diff --git a/src/netedit/frames/GNEFrameAttributeModules.cpp b/src/netedit/frames/GNEFrameAttributeModules.cpp index 593d39769045..a81d71b708eb 100644 --- a/src/netedit/frames/GNEFrameAttributeModules.cpp +++ b/src/netedit/frames/GNEFrameAttributeModules.cpp @@ -170,16 +170,9 @@ GNEFrameAttributeModules::GenericDataAttributes::areAttributesValid() const { long GNEFrameAttributeModules::GenericDataAttributes::onCmdEditParameters(FXObject*, FXSelector, void*) { - // write debug information - WRITE_DEBUG("Open single parameters dialog"); if (GNESingleParametersDialog(this).execute()) { - // write debug information - WRITE_DEBUG("Close single parameters dialog"); // Refresh parameter EditorCreator refreshGenericDataAttributes(); - } else { - // write debug information - WRITE_DEBUG("Cancel single parameters dialog"); } return 1; } @@ -349,52 +342,27 @@ GNEFrameAttributeModules::ParametersEditor::onCmdEditParameters(FXObject*, FXSel // continue depending of markAC if (inspectedElements.getFirstAC() && inspectedElements.getFirstAC()->getTagProperty().hasParameters()) { if (inspectedElements.isInspectingMultipleElements()) { - // write debug information - WRITE_DEBUG("Open multiple parameters dialog"); // open multiple parameters dialog if (GNEMultipleParametersDialog(this).execute()) { - // write debug information - WRITE_DEBUG("Close multiple parameters dialog"); // update frame parent after attribute successfully set myInspectorFrameParent->attributeUpdated(GNE_ATTR_PARAMETERS); // Refresh parameter EditorInspector refreshParametersEditor(); - } else { - // write debug information - WRITE_DEBUG("Cancel multiple parameters dialog"); - } - } else { - // write debug information - WRITE_DEBUG("Open single parameters dialog"); - if (GNESingleParametersDialog(this).execute()) { - // write debug information - WRITE_DEBUG("Close single parameters dialog"); - // update frame parent after attribute successfully set - myInspectorFrameParent->attributeUpdated(GNE_ATTR_PARAMETERS); - // Refresh parameter EditorInspector - refreshParametersEditor(); - } else { - // write debug information - WRITE_DEBUG("Cancel single parameters dialog"); } + } else if (GNESingleParametersDialog(this).execute()) { + // update frame parent after attribute successfully set + myInspectorFrameParent->attributeUpdated(GNE_ATTR_PARAMETERS); + // Refresh parameter EditorInspector + refreshParametersEditor(); } } } else if (myTypeFrameParent) { // get type GNEDemandElement* type = myTypeFrameParent->getTypeSelector()->getCurrentType(); // continue depending of type - if (type) { - // write debug information - WRITE_DEBUG("Open single parameters dialog"); - if (GNESingleParametersDialog(this).execute()) { - // write debug information - WRITE_DEBUG("Close single parameters dialog"); - // Refresh parameter EditorInspector - refreshParametersEditor(); - } else { - // write debug information - WRITE_DEBUG("Cancel single parameters dialog"); - } + if (type && GNESingleParametersDialog(this).execute()) { + // Refresh parameter EditorInspector + refreshParametersEditor(); } } return 1; diff --git a/src/netedit/frames/GNENeteditAttributes.cpp b/src/netedit/frames/GNENeteditAttributes.cpp index b137168f7a79..980c2ea4ed61 100644 --- a/src/netedit/frames/GNENeteditAttributes.cpp +++ b/src/netedit/frames/GNENeteditAttributes.cpp @@ -401,8 +401,6 @@ GNENeteditAttributes::onCmdHelp(FXObject*, FXSelector, void*) { new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), additionalNeteditAttributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening GNENeteditAttributes help dialog"); // create Dialog additionalNeteditAttributesHelpDialog->create(); // show in the given position @@ -411,8 +409,6 @@ GNENeteditAttributes::onCmdHelp(FXObject*, FXSelector, void*) { getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(additionalNeteditAttributesHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Closing GNENeteditAttributes help dialog"); return 1; } diff --git a/src/netedit/frames/GNEPlanSelector.cpp b/src/netedit/frames/GNEPlanSelector.cpp index 7e56885e6120..46e2513ce077 100644 --- a/src/netedit/frames/GNEPlanSelector.cpp +++ b/src/netedit/frames/GNEPlanSelector.cpp @@ -305,8 +305,6 @@ GNEPlanSelector::onCmdSelectPlan(FXObject*, FXSelector, void*) { myPlansComboBox->killFocus(); // call tag selected function myFrameParent->tagSelected(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myPlansComboBox->getText() + "' in GNEPlanSelector").text()); return 1; } } @@ -314,8 +312,6 @@ GNEPlanSelector::onCmdSelectPlan(FXObject*, FXSelector, void*) { myCurrentPlanTemplate = std::make_pair(GNETagProperties(), nullptr); // set color of myTypeMatchBox to red (invalid) myPlansComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in TemplatePlanSelector"); // call tag selected function myFrameParent->tagSelected(); return 1; diff --git a/src/netedit/frames/GNETLSTable.cpp b/src/netedit/frames/GNETLSTable.cpp index 7b3ee9963990..f24c147a90c5 100644 --- a/src/netedit/frames/GNETLSTable.cpp +++ b/src/netedit/frames/GNETLSTable.cpp @@ -325,12 +325,10 @@ GNETLSTable::onCmdEditRow(FXObject* sender, FXSelector, void*) { if (textField == sender) { // edit value and change value depending of result if (myTLSPhasesParent->changePhaseValue(columnIndex, rowIndex, textField->getText().text())) { - WRITE_DEBUG(("Valid " + myColumns.at(columnIndex)->getColumnLabelTop()).text()); textField->setTextColor(FXRGB(0, 0, 0)); textField->killFocus(); myTLSPhasesParent->getTLSEditorParent()->update(); } else { - WRITE_DEBUG(("Invalid " + myColumns.at(columnIndex)->getColumnLabelTop()).text()); textField->setTextColor(FXRGB(255, 0, 0)); } return 1; @@ -382,7 +380,6 @@ GNETLSTable::onCmdKeyPress(FXObject* sender, FXSelector sel, void* ptr) { long GNETLSTable::onCmdAddPhase(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Add default phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -403,7 +400,6 @@ GNETLSTable::onCmdAddPhase(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdDuplicatePhase(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Duplicate phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -424,7 +420,6 @@ GNETLSTable::onCmdDuplicatePhase(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdAddPhaseAllRed(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Add red phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -445,7 +440,6 @@ GNETLSTable::onCmdAddPhaseAllRed(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdAddPhaseAllYellow(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Add yellow phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -466,7 +460,6 @@ GNETLSTable::onCmdAddPhaseAllYellow(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdAddPhaseAllGreen(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Add green phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -487,7 +480,6 @@ GNETLSTable::onCmdAddPhaseAllGreen(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdAddPhaseAllGreenPriority(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Add green priority phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -508,7 +500,6 @@ GNETLSTable::onCmdAddPhaseAllGreenPriority(FXObject* sender, FXSelector, void*) long GNETLSTable::onCmdRemovePhase(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Remove phase"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -527,7 +518,6 @@ GNETLSTable::onCmdRemovePhase(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdMoveUpPhase(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Move phase up"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell @@ -546,7 +536,6 @@ GNETLSTable::onCmdMoveUpPhase(FXObject* sender, FXSelector, void*) { long GNETLSTable::onCmdMoveDownPhase(FXObject* sender, FXSelector, void*) { - WRITE_DEBUG("Move phase down"); // search selected text field for (int indexRow = 0; indexRow < (int)myRows.size(); indexRow++) { // iterate over every cell diff --git a/src/netedit/frames/GNETagSelector.cpp b/src/netedit/frames/GNETagSelector.cpp index 3ecd8ca365bc..b36addbe2a81 100644 --- a/src/netedit/frames/GNETagSelector.cpp +++ b/src/netedit/frames/GNETagSelector.cpp @@ -268,8 +268,6 @@ GNETagSelector::onCmdSelectTag(FXObject*, FXSelector, void*) { myTagsMatchBox->killFocus(); // call tag selected function myFrameParent->tagSelected(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myTagsMatchBox->getText() + "' in GNETagSelector").text()); return 1; } } @@ -277,8 +275,6 @@ GNETagSelector::onCmdSelectTag(FXObject*, FXSelector, void*) { myCurrentTemplateAC = nullptr; // set color of myTypeMatchBox to red (invalid) myTagsMatchBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in GNETagSelector"); // call tag selected function myFrameParent->tagSelected(); return 1; diff --git a/src/netedit/frames/common/GNEDeleteFrame.cpp b/src/netedit/frames/common/GNEDeleteFrame.cpp index 32aa08f1ac75..d5c51fb48b39 100644 --- a/src/netedit/frames/common/GNEDeleteFrame.cpp +++ b/src/netedit/frames/common/GNEDeleteFrame.cpp @@ -222,12 +222,8 @@ GNEDeleteFrame::SubordinatedElements::openWarningDialog(const std::string& type, "' cannot be deleted because it is part of " + toString(number) + " " + type + " element" + plural + ".\n" + "To delete it, uncheck 'protect " + type + " elements'."; } - // write warning - WRITE_DEBUG("Opened FXMessageBox " + header); // open message box FXMessageBox::warning(myViewNet->getApp(), MBOX_OK, header.c_str(), "%s", msg.c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox " + header); } // --------------------------------------------------------------------------- diff --git a/src/netedit/frames/common/GNEMatchAttribute.cpp b/src/netedit/frames/common/GNEMatchAttribute.cpp index b9565b85c903..54d3e37be212 100644 --- a/src/netedit/frames/common/GNEMatchAttribute.cpp +++ b/src/netedit/frames/common/GNEMatchAttribute.cpp @@ -299,8 +299,6 @@ GNEMatchAttribute::onCmdHelp(FXObject*, FXSelector, void*) { new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), additionalNeteditAttributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening help dialog of selector frame"); // create Dialog additionalNeteditAttributesHelpDialog->create(); // show in the given position @@ -309,8 +307,6 @@ GNEMatchAttribute::onCmdHelp(FXObject*, FXSelector, void*) { getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(additionalNeteditAttributesHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Close help dialog of selector frame"); return 1; } diff --git a/src/netedit/frames/common/GNEMatchGenericDataAttribute.cpp b/src/netedit/frames/common/GNEMatchGenericDataAttribute.cpp index cd6380a37539..b92482e0ee97 100644 --- a/src/netedit/frames/common/GNEMatchGenericDataAttribute.cpp +++ b/src/netedit/frames/common/GNEMatchGenericDataAttribute.cpp @@ -481,8 +481,6 @@ GNEMatchGenericDataAttribute::onCmdHelp(FXObject*, FXSelector, void*) { new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); GUIDesigns::buildFXButton(myHorizontalFrameOKButton, TL("OK"), "", TL("close"), GUIIconSubSys::getIcon(GUIIcon::ACCEPT), additionalNeteditAttributesHelpDialog, FXDialogBox::ID_ACCEPT, GUIDesignButtonOK); new FXHorizontalFrame(myHorizontalFrameOKButton, GUIDesignAuxiliarHorizontalFrame); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Opening help dialog of selector frame"); // create Dialog additionalNeteditAttributesHelpDialog->create(); // show in the given position @@ -491,8 +489,6 @@ GNEMatchGenericDataAttribute::onCmdHelp(FXObject*, FXSelector, void*) { getApp()->refresh(); // open as modal dialog (will block all windows until stop() or stopModal() is called) getApp()->runModalFor(additionalNeteditAttributesHelpDialog); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Close help dialog of selector frame"); return 1; } diff --git a/src/netedit/frames/common/GNESelectorFrame.cpp b/src/netedit/frames/common/GNESelectorFrame.cpp index 1ec88d620438..811b223c8e67 100644 --- a/src/netedit/frames/common/GNESelectorFrame.cpp +++ b/src/netedit/frames/common/GNESelectorFrame.cpp @@ -359,12 +359,8 @@ GNESelectorFrame::SelectionOperation::onCmdSave(FXObject*, FXSelector, void*) { } dev.close(); } catch (IOError& e) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'error storing selection'"); // open message box error FXMessageBox::error(getCollapsableFrame(), MBOX_OK, "Storing Selection failed", "%s", e.what()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'error storing selection' with 'OK'"); } return 1; } @@ -601,21 +597,12 @@ GNESelectorFrame::SelectionOperation::processMassiveDataElementSelection() const bool GNESelectorFrame::SelectionOperation::askContinueIfLock() const { - WRITE_DEBUG("Opening FXMessageBox 'confirm selection operation'"); // open question box const FXuint answer = FXMessageBox::question(mySelectorFrameParent->getViewNet()->getApp(), MBOX_YES_NO, "Confirm selection operation", "There are locked elements in the current selection.\nApply operation to locked elements?"); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'confirm selection operation' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'confirm selection operation' with 'ESC'"); - } return false; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'confirm selection operation' with 'Yes'"); return true; } } diff --git a/src/netedit/frames/data/GNEMeanDataFrame.cpp b/src/netedit/frames/data/GNEMeanDataFrame.cpp index c36308ede49d..80d11f679bd6 100644 --- a/src/netedit/frames/data/GNEMeanDataFrame.cpp +++ b/src/netedit/frames/data/GNEMeanDataFrame.cpp @@ -134,8 +134,6 @@ GNEMeanDataFrame::MeanDataTypeSelector::onCmdSelectItem(FXObject*, FXSelector, v // show modules if selected item is valid myMeanDataFrameParent->myMeanDataEditor->showMeanDataEditorModule(); myMeanDataFrameParent->myMeanDataSelector->showMeanDataSelector(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myTypeComboBox->getText() + "' in MeanDataTypeSelector").text()); return 1; } } @@ -147,8 +145,6 @@ GNEMeanDataFrame::MeanDataTypeSelector::onCmdSelectItem(FXObject*, FXSelector, v myMeanDataFrameParent->myMeanDataSelector->hideMeanDataSelector(); // set color of myTypeMatchBox to red (invalid) myTypeComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in MeanDataTypeSelector"); return 1; } @@ -404,8 +400,6 @@ GNEMeanDataFrame::MeanDataSelector::onCmdSelectItem(FXObject*, FXSelector, void* myMeanDataFrameParent->myMeanDataEditor->refreshMeanDataEditorModule(); // show modules if selected item is valid myMeanDataFrameParent->myMeanDataAttributesEditor->showAttributesEditor(myCurrentMeanData); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myMeanDataComboBox->getText() + "' in MeanDataSelector").text()); // update viewNet myMeanDataFrameParent->getViewNet()->updateViewNet(); return 1; @@ -418,8 +412,6 @@ GNEMeanDataFrame::MeanDataSelector::onCmdSelectItem(FXObject*, FXSelector, void* myMeanDataFrameParent->myMeanDataAttributesEditor->hideAttributesEditor(); // set color of myMeanDataMatchBox to red (invalid) myMeanDataComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in MeanDataSelector"); // update viewNet myMeanDataFrameParent->getViewNet()->updateViewNet(); return 1; diff --git a/src/netedit/frames/demand/GNEDistributionFrame.cpp b/src/netedit/frames/demand/GNEDistributionFrame.cpp index 23f55882dd60..90ab74d8b2da 100644 --- a/src/netedit/frames/demand/GNEDistributionFrame.cpp +++ b/src/netedit/frames/demand/GNEDistributionFrame.cpp @@ -242,8 +242,6 @@ GNEDistributionFrame::DistributionSelector::onCmdSelectDistribution(FXObject*, F // show modules myAttributesEditor->showAttributesEditor(distribution.second); myDistributionValuesEditor->showDistributionValuesEditor(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myDistributionsComboBox->getText() + "' in DistributionSelector").text()); // update viewNet viewNet->updateViewNet(); return 1; @@ -256,8 +254,6 @@ GNEDistributionFrame::DistributionSelector::onCmdSelectDistribution(FXObject*, F myDistributionValuesEditor->hideDistributionValuesEditor(); // set color of myTypeMatchBox to red (invalid) myDistributionsComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in DistributionSelector"); // update viewNet viewNet->updateViewNet(); return 1; diff --git a/src/netedit/frames/demand/GNERouteFrame.cpp b/src/netedit/frames/demand/GNERouteFrame.cpp index 225f375a2a28..baf2f48d5a33 100644 --- a/src/netedit/frames/demand/GNERouteFrame.cpp +++ b/src/netedit/frames/demand/GNERouteFrame.cpp @@ -146,8 +146,6 @@ GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode(FXObject*, FXSelector, vo myCurrentRouteMode = routeMode.first; // set color of myTypeMatchBox to black (valid) myRouteModeMatchBox->setTextColor(FXRGB(0, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected RouteMode '" + myRouteModeMatchBox->getText() + "' in RouteModeSelector").text()); } } // check if parameters are valid @@ -173,8 +171,6 @@ GNERouteFrame::RouteModeSelector::onCmdSelectVClass(FXObject*, FXSelector, void* myVClassMatchBox->setTextColor(FXRGB(0, 0, 0)); // set vClass in Path creator myRouteFrameParent->myPathCreator->setVClass(SumoVehicleClassStrings.get(vClass)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected VClass '" + myVClassMatchBox->getText() + "' in RouteModeSelector").text()); } } // check if parameters are valid diff --git a/src/netedit/frames/demand/GNETypeFrame.cpp b/src/netedit/frames/demand/GNETypeFrame.cpp index c54a470450d9..a9f73918489f 100644 --- a/src/netedit/frames/demand/GNETypeFrame.cpp +++ b/src/netedit/frames/demand/GNETypeFrame.cpp @@ -169,8 +169,6 @@ GNETypeFrame::TypeSelector::onCmdSelectItem(FXObject*, FXSelector, void*) { myTypeFrameParent->myTypeAttributesEditor->showAttributesEditor(myCurrentType); myTypeFrameParent->myAttributesEditorExtended->showAttributesEditor(myCurrentType); myTypeFrameParent->myParametersEditor->refreshParametersEditor(); - // Write Warning in console if we're in testing mode - WRITE_DEBUG(("Selected item '" + myTypeComboBox->getText() + "' in TypeSelector").text()); // update viewNet myTypeFrameParent->getViewNet()->updateViewNet(); return 1; @@ -184,8 +182,6 @@ GNETypeFrame::TypeSelector::onCmdSelectItem(FXObject*, FXSelector, void*) { myTypeFrameParent->myAttributesEditorExtended->hideAttributesEditor(); // set color of myTypeMatchBox to red (invalid) myTypeComboBox->setTextColor(FXRGB(255, 0, 0)); - // Write Warning in console if we're in testing mode - WRITE_DEBUG("Selected invalid item in TypeSelector"); // update viewNet myTypeFrameParent->getViewNet()->updateViewNet(); return 1; @@ -345,22 +341,13 @@ GNETypeFrame::TypeEditor::deleteType() { // show question dialog if vtype has already assigned vehicles if (myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size() > 0) { std::string plural = myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size() == 1 ? ("") : ("s"); - // show warning in gui testing debug mode - WRITE_DEBUG("Opening FXMessageBox 'remove vType'"); // Ask confirmation to user FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_VTYPE) + "s").c_str(), "%s", ("Delete " + toString(SUMO_TAG_VTYPE) + " '" + myTypeFrameParent->myTypeSelector->getCurrentType()->getID() + "' will remove " + toString(myTypeFrameParent->myTypeSelector->getCurrentType()->getChildDemandElements().size()) + " vehicle" + plural + ". Continue?").c_str()); - if (answer != 1) { // 1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'remove vType' with 'ESC'"); - } - } else { + if (answer == 1) { // 1:yes, 2:no, 4:esc // begin undo list operation myTypeFrameParent->myViewNet->getUndoList()->begin(myTypeFrameParent->myTypeSelector->getCurrentType(), ("delete vehicle type")); // remove vehicle type (and all of their children) diff --git a/src/netedit/frames/network/GNETAZFrame.cpp b/src/netedit/frames/network/GNETAZFrame.cpp index c6171615f7e6..57d426a4defb 100644 --- a/src/netedit/frames/network/GNETAZFrame.cpp +++ b/src/netedit/frames/network/GNETAZFrame.cpp @@ -1729,24 +1729,14 @@ GNETAZFrame::dropTAZMembers() { bool GNETAZFrame::askCreateMultipleSourceSinks(const size_t numSourceSinks) const { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening FXMessageBox 'Ask create multiple sourceSinks'"); // open question dialog box const std::string header = TL("Create multiple sourceSinks"); const std::string info = TLF("Creation of % cannot be undo. Continue?", toString(numSourceSinks)); const auto answer = FXMessageBox::question(myViewNet->getApp(), MBOX_YES_NO, "%s", header.c_str(), "%s", info.c_str()); if (answer != 1) { //1:yes, 2:no, 4:esc - // write warning if netedit is running in testing mode - if (answer == 2) { - WRITE_DEBUG("Closed FXMessageBox 'Ask create multiple sourceSinks' with 'No'"); - } else if (answer == 4) { - WRITE_DEBUG("Closed FXMessageBox 'Ask create multiple sourceSinks' with 'ESC'"); - } // abort recompute with volatile options return false; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'Ask create multiple sourceSinks' with 'Yes'"); return true; } } diff --git a/src/netedit/frames/network/GNETLSEditorFrame.cpp b/src/netedit/frames/network/GNETLSEditorFrame.cpp index 471e7bc7c9ce..f9c1453c5ab9 100644 --- a/src/netedit/frames/network/GNETLSEditorFrame.cpp +++ b/src/netedit/frames/network/GNETLSEditorFrame.cpp @@ -191,27 +191,19 @@ GNETLSEditorFrame::editTLS(GNEViewNetHelper::ViewObjectsSelector& viewObjects, c bool GNETLSEditorFrame::isTLSSaved() { if (myTLSDefinition->checkHaveModifications()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening question FXMessageBox 'save TLS'"); // open question box FXuint answer = FXMessageBox::question(this, MBOX_YES_NO_CANCEL, TL("Save TLS Changes"), "%s", TL("There are unsaved changes in the currently edited traffic light.\nDo you want to save it before changing mode?")); if (answer == MBOX_CLICKED_YES) { //1:yes, 2:no, 4:esc/cancel - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'save TLS' with 'YES'"); // save modifications myTLSDefinition->onCmdSaveChanges(nullptr, 0, nullptr); return true; } else if (answer == MBOX_CLICKED_NO) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'save TLS' with 'No'"); // cancel modifications myTLSDefinition->onCmdSaveChanges(nullptr, 0, nullptr); return true; } else { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'save TLS' with 'Cancel'"); // abort changing mode return false; } @@ -781,20 +773,13 @@ GNETLSEditorFrame::TLSAttributes::onCmdParametersDialog(FXObject*, FXSelector, v if (myTLSEditorParent->myEditedDef) { // get previous parameters const auto previousParameters = getParameters(); - // write debug information - WRITE_DEBUG("Open single parameters dialog"); if (GNESingleParametersDialog(myTLSEditorParent->getViewNet()->getApp(), myTLSEditorParent->myEditedDef).execute()) { - // write debug information - WRITE_DEBUG("Close single parameters dialog"); // set parameters in textfield setParameters(myTLSEditorParent->myEditedDef->getParametersStr()); // only mark as modified if parameters are different if (getParameters() != previousParameters) { myTLSEditorParent->myTLSDefinition->markAsModified(); } - } else { - // write debug information - WRITE_DEBUG("Cancel single parameters dialog"); } } return 1; @@ -1543,28 +1528,20 @@ GNETLSEditorFrame::TLSDefinition::onCmdCreate(FXObject*, FXSelector, void*) { discardChanges(false); // check number of edges if (currentJunction->getGNEIncomingEdges().empty() && currentJunction->getGNEOutgoingEdges().empty()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening warning FXMessageBox 'invalid TLS'"); // open question box FXMessageBox::warning(this, MBOX_OK, TL("TLS cannot be created"), "%s", (TL("Traffic Light cannot be created because junction must have") + std::string("\n") + TL("at least one incoming edge and one outgoing edge.")).c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'invalid TLS'"); return 1; } // check number of connections if (currentJunction->getGNEConnections().empty()) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening warning FXMessageBox 'invalid TLS'"); // open question box FXMessageBox::warning(this, MBOX_OK, TL("TLS cannot be created"), "%s", (TL("Traffic Light cannot be created because junction") + std::string("\n") + TL("must have at least one connection.")).c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'invalid TLS'"); return 1; } // check uncontrolled connections @@ -1575,15 +1552,11 @@ GNETLSEditorFrame::TLSDefinition::onCmdCreate(FXObject*, FXSelector, void*) { } } if (!connectionControlled) { - // write warning if netedit is running in testing mode - WRITE_DEBUG("Opening warning FXMessageBox 'invalid TLS'"); // open question box FXMessageBox::warning(this, MBOX_OK, TL("TLS cannot be created"), "%s", (TL("Traffic Light cannot be created because junction") + std::string("\n") + TL("must have at least one controlled connection.")).c_str()); - // write warning if netedit is running in testing mode - WRITE_DEBUG("Closed FXMessageBox 'invalid TLS'"); return 1; } // all checks ok, then create TLS in junction @@ -2131,12 +2104,6 @@ GNETLSEditorFrame::TLSPhases::addPhase(const int row, const char c) { default: break; } - // Write debug - if (c == ' ') { - WRITE_DEBUG("Add default phase in row " + toString(row)); - } else { - WRITE_DEBUG("Add new phase in row " + toString(row) + " of type: " + c); - } // int phase table again initPhaseTable(); // mark new row as selected @@ -2154,8 +2121,6 @@ GNETLSEditorFrame::TLSPhases::duplicatePhase(const int row) { const int newIndex = buildDefaultPhase(row); // coply old phase in the new phase myTLSEditorParent->myEditedDef->getLogic()->copyPhase(row, row + 1); - // Write debug - WRITE_DEBUG("Duplicated phase " + toString(row)); // int phase table again initPhaseTable(); // mark new row as selected @@ -2173,8 +2138,6 @@ GNETLSEditorFrame::TLSPhases::removePhase(const int row) { const auto newRow = MAX2(0, (row - 1)); // delete selected row myTLSEditorParent->myEditedDef->getLogic()->deletePhase(row); - // Write debug - WRITE_DEBUG("removed phase " + toString(row)); // int phase table again initPhaseTable(); // mark new row as selected @@ -2188,8 +2151,6 @@ void GNETLSEditorFrame::TLSPhases::movePhaseUp(const int row) { // mark TLS ad modified myTLSEditorParent->myTLSDefinition->markAsModified(); - // Write debug - WRITE_DEBUG("Move up phase " + toString(row)); // delete selected row if (row == 0) { myTLSEditorParent->myEditedDef->getLogic()->swapfirstPhase(); @@ -2213,8 +2174,6 @@ void GNETLSEditorFrame::TLSPhases::movePhaseDown(const int row) { // mark TLS ad modified myTLSEditorParent->myTLSDefinition->markAsModified(); - // Write debug - WRITE_DEBUG("Move down phase " + toString(row)); // delete selected row if (row == (int)myTLSEditorParent->myEditedDef->getLogic()->getPhases().size() - 1) { myTLSEditorParent->myEditedDef->getLogic()->swaplastPhase(); @@ -2307,7 +2266,6 @@ GNETLSEditorFrame::TLSPhases::onCmdCleanStates(FXObject*, FXSelector, void*) { initPhaseTable(); myPhaseTable->setFocus(); myTLSEditorParent->myTLSDefinition->markAsModified(); - WRITE_DEBUG("Clean states"); return 1; } @@ -2318,7 +2276,6 @@ GNETLSEditorFrame::TLSPhases::onCmdAddUnusedStates(FXObject*, FXSelector, void*) myTLSEditorParent->myTLSDefinition->markAsModified(); initPhaseTable(); myPhaseTable->setFocus(); - WRITE_DEBUG("Add unused states"); return 1; } @@ -2330,7 +2287,6 @@ GNETLSEditorFrame::TLSPhases::onCmdGroupStates(FXObject*, FXSelector, void*) { myTLSEditorParent->buildInternalLanes(myTLSEditorParent->myEditedDef); initPhaseTable(); myPhaseTable->setFocus(); - WRITE_DEBUG("Group states"); return 1; } @@ -2343,7 +2299,6 @@ GNETLSEditorFrame::TLSPhases::onCmdUngroupStates(FXObject*, FXSelector, void*) { myTLSEditorParent->buildInternalLanes(myTLSEditorParent->myEditedDef); initPhaseTable(); myPhaseTable->setFocus(); - WRITE_DEBUG("Ungroup states"); return 1; } diff --git a/src/netimport/NIImporter_OpenStreetMap.cpp b/src/netimport/NIImporter_OpenStreetMap.cpp index b5a292496000..e50e6a601634 100644 --- a/src/netimport/NIImporter_OpenStreetMap.cpp +++ b/src/netimport/NIImporter_OpenStreetMap.cpp @@ -1277,6 +1277,7 @@ NIImporter_OpenStreetMap::EdgesHandler::myStartElement(int element, const SUMOSA && key != "bicycle" && key != "oneway:bicycle" && key != "oneway:bus" + && key != "oneway:psv" && key != "bus:lanes" && key != "bus:lanes:forward" && key != "bus:lanes:backward" @@ -1492,7 +1493,7 @@ NIImporter_OpenStreetMap::EdgesHandler::myStartElement(int element, const SUMOSA } } else if (key == "oneway:bicycle") { myCurrentEdge->myExtraTags["oneway:bicycle"] = value; - } else if (key == "oneway:bus") { + } else if (key == "oneway:bus" || key == "oneway:psv") { if (value == "no") { // need to add a bus way in reversed direction of way myCurrentEdge->myBuswayType = WAY_BACKWARD; @@ -1868,9 +1869,11 @@ NIImporter_OpenStreetMap::RelationHandler::myStartElement(int element, const SUM myFromWay = ref; } else if (role == "to" && checkEdgeRef(ref)) { myToWay = ref; - } else if (role == "stop") { + } else if (StringUtils::startsWith(role, "stop")) { + // permit _entry_only and _exit_only variants myStops.push_back(ref); - } else if (role == "platform") { + } else if (StringUtils::startsWith(role, "platform")) { + // permit _entry_only and _exit_only variants std::string memberType = attrs.get(SUMO_ATTR_TYPE, nullptr, ok); if (memberType == "way") { const std::map::const_iterator& wayIt = myPlatformShapes.find(ref); diff --git a/src/utils/common/MsgHandler.cpp b/src/utils/common/MsgHandler.cpp index bd3cccf0976c..37fb6af2eafc 100644 --- a/src/utils/common/MsgHandler.cpp +++ b/src/utils/common/MsgHandler.cpp @@ -44,8 +44,6 @@ // static member variables // =========================================================================== MsgHandler::Factory MsgHandler::myFactory = nullptr; -MsgHandler* MsgHandler::myDebugInstance = nullptr; -MsgHandler* MsgHandler::myGLDebugInstance = nullptr; MsgHandler* MsgHandler::myErrorInstance = nullptr; MsgHandler* MsgHandler::myWarningInstance = nullptr; MsgHandler* MsgHandler::myMessageInstance = nullptr; @@ -97,24 +95,6 @@ MsgHandler::getErrorInstance() { } -MsgHandler* -MsgHandler::getDebugInstance() { - if (myDebugInstance == nullptr) { - myDebugInstance = new MsgHandler(MsgType::MT_DEBUG); - } - return myDebugInstance; -} - - -MsgHandler* -MsgHandler::getGLDebugInstance() { - if (myGLDebugInstance == nullptr) { - myGLDebugInstance = new MsgHandler(MsgType::MT_GLDEBUG); - } - return myGLDebugInstance; -} - - void MsgHandler::enableDebugMessages(bool enable) { myWriteDebugMessages = enable; @@ -258,12 +238,6 @@ MsgHandler::isRetriever(OutputDevice* retriever) const { void MsgHandler::removeRetrieverFromAllInstances(OutputDevice* out) { - if (myDebugInstance != nullptr) { - myDebugInstance->removeRetriever(out); - } - if (myGLDebugInstance != nullptr) { - myGLDebugInstance->removeRetriever(out); - } if (myErrorInstance != nullptr) { myErrorInstance->removeRetriever(out); } @@ -363,10 +337,6 @@ MsgHandler::cleanupOnEnd() { myWarningInstance = nullptr; delete myErrorInstance; myErrorInstance = nullptr; - delete myDebugInstance; - myDebugInstance = nullptr; - delete myGLDebugInstance; - myGLDebugInstance = nullptr; } diff --git a/src/utils/common/MsgHandler.h b/src/utils/common/MsgHandler.h index 43031783379c..f0dcc1c4019b 100644 --- a/src/utils/common/MsgHandler.h +++ b/src/utils/common/MsgHandler.h @@ -76,12 +76,6 @@ class MsgHandler { /// @brief Returns the instance to add errors to static MsgHandler* getErrorInstance(); - /// @brief Returns the instance to add debug to - static MsgHandler* getDebugInstance(); - - /// @brief Returns the instance to add GLdebug to - static MsgHandler* getGLDebugInstance(); - /// @brief enable/disable debug messages static void enableDebugMessages(bool enable); @@ -222,12 +216,6 @@ class MsgHandler { /// @brief The function to call for new MsgHandlers, nullptr means use default constructor static Factory myFactory; - /// @brief The instance to handle debug - static MsgHandler* myDebugInstance; - - /// @brief The instance to handle glDebug - static MsgHandler* myGLDebugInstance; - /// @brief The instance to handle errors static MsgHandler* myErrorInstance; @@ -303,8 +291,6 @@ class MsgHandler { #define PROGRESS_FAILED_MESSAGE() MsgHandler::getMessageInstance()->endProcessMsg2(false); #define WRITE_ERROR(msg) MsgHandler::getErrorInstance()->inform(msg); #define WRITE_ERRORF(...) MsgHandler::getErrorInstance()->informf(__VA_ARGS__); -#define WRITE_DEBUG(msg) if(MsgHandler::writeDebugMessages()){MsgHandler::getDebugInstance()->inform(msg);}; -#define WRITE_GLDEBUG(msg) if(MsgHandler::writeDebugGLMessages()){MsgHandler::getGLDebugInstance()->inform(msg);}; #ifdef HAVE_INTL // basic translation #define TL(string) gettext(string) diff --git a/src/utils/gui/div/GUIMessageWindow.cpp b/src/utils/gui/div/GUIMessageWindow.cpp index d1e3a2f54122..35ea1a86e01e 100644 --- a/src/utils/gui/div/GUIMessageWindow.cpp +++ b/src/utils/gui/div/GUIMessageWindow.cpp @@ -300,13 +300,9 @@ GUIMessageWindow::registerMsgHandlers() { // initialize only if registration is requested myMessageRetriever = new MsgOutputDevice(this, GUIEventType::MESSAGE_OCCURRED); myErrorRetriever = new MsgOutputDevice(this, GUIEventType::ERROR_OCCURRED); - myDebugRetriever = new MsgOutputDevice(this, GUIEventType::DEBUG_OCCURRED); - myGLDebugRetriever = new MsgOutputDevice(this, GUIEventType::GLDEBUG_OCCURRED); myWarningRetriever = new MsgOutputDevice(this, GUIEventType::WARNING_OCCURRED); } MsgHandler::getMessageInstance()->addRetriever(myMessageRetriever); - MsgHandler::getDebugInstance()->addRetriever(myDebugRetriever); - MsgHandler::getGLDebugInstance()->addRetriever(myGLDebugRetriever); MsgHandler::getErrorInstance()->addRetriever(myErrorRetriever); MsgHandler::getWarningInstance()->addRetriever(myWarningRetriever); } @@ -315,8 +311,6 @@ GUIMessageWindow::registerMsgHandlers() { void GUIMessageWindow::unregisterMsgHandlers() { MsgHandler::getMessageInstance()->removeRetriever(myMessageRetriever); - MsgHandler::getDebugInstance()->removeRetriever(myDebugRetriever); - MsgHandler::getGLDebugInstance()->removeRetriever(myGLDebugRetriever); MsgHandler::getErrorInstance()->removeRetriever(myErrorRetriever); MsgHandler::getWarningInstance()->removeRetriever(myWarningRetriever); } diff --git a/src/utils/gui/div/GUIMessageWindow.h b/src/utils/gui/div/GUIMessageWindow.h index ffab34177ceb..225c93daaedf 100644 --- a/src/utils/gui/div/GUIMessageWindow.h +++ b/src/utils/gui/div/GUIMessageWindow.h @@ -179,5 +179,5 @@ class GUIMessageWindow : public FXText { static std::map myTypeStrings; /// @brief The instances of message retriever encapsulations - OutputDevice* myErrorRetriever, *myDebugRetriever, *myGLDebugRetriever, *myMessageRetriever, *myWarningRetriever; + OutputDevice* myErrorRetriever, *myMessageRetriever, *myWarningRetriever; }; diff --git a/src/utils/gui/div/GUIViewObjectsHandler.h b/src/utils/gui/div/GUIViewObjectsHandler.h index 9dc8a1e9ded4..24abc29ae1e5 100644 --- a/src/utils/gui/div/GUIViewObjectsHandler.h +++ b/src/utils/gui/div/GUIViewObjectsHandler.h @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/src/utils/gui/windows/GUIDialog_EditViewport.cpp b/src/utils/gui/windows/GUIDialog_EditViewport.cpp index 6ec45a4aa1eb..cc9e189daf64 100644 --- a/src/utils/gui/windows/GUIDialog_EditViewport.cpp +++ b/src/utils/gui/windows/GUIDialog_EditViewport.cpp @@ -164,9 +164,6 @@ GUIDialog_EditViewport::onCmdOk(FXObject*, FXSelector, void*) { #endif , myRotation->getValue() ); - // write information of current zoom status - WRITE_DEBUG("Current Viewport values: " + toString(myXOff->getValue()) + ", " + toString(myYOff->getValue()) + ", " + toString(myZOff->getValue()) + - ". Zoom = '" + toString(myZoom->getValue()) + "'"); hide(); return 1; } diff --git a/src/utils/handlers/CommonHandler.cpp b/src/utils/handlers/CommonHandler.cpp index 0fb4dd012a02..bae45b5b4d81 100644 --- a/src/utils/handlers/CommonHandler.cpp +++ b/src/utils/handlers/CommonHandler.cpp @@ -67,7 +67,6 @@ CommonHandler::parseParameters(const SUMOSAXAttributes& attrs) { } else if (!SUMOXMLDefinitions::isValidParameterKey(key)) { writeError(TLF("Error parsing key from % generic parameter. Key contains invalid characters", parentTagStr)); } else { - WRITE_DEBUG("Inserting generic parameter '" + key + "|" + value + "' into " + parentTagStr); // insert parameter in SumoBaseObjectParent SumoBaseObjectParent->addParameter(key, value); } diff --git a/src/utils/handlers/MeanDataHandler.cpp b/src/utils/handlers/MeanDataHandler.cpp index 9d0bf60726b3..41f4f726ea75 100644 --- a/src/utils/handlers/MeanDataHandler.cpp +++ b/src/utils/handlers/MeanDataHandler.cpp @@ -162,7 +162,7 @@ MeanDataHandler::parseEdgeMeanData(const SUMOSAXAttributes& attrs) { const bool aggregate = attrs.getOpt(SUMO_ATTR_AGGREGATE, id.c_str(), parsedOk, false); const std::vector edges = attrs.getOpt >(SUMO_ATTR_EDGES, id.c_str(), parsedOk, {}); const std::string edgeFile = attrs.getOpt(SUMO_ATTR_EDGESFILE, id.c_str(), parsedOk, ""); - const std::string excludeEmpty = attrs.getOpt(SUMO_ATTR_EXCLUDE_EMPTY, id.c_str(), parsedOk, "default"); + const std::string excludeEmpty = attrs.getOpt(SUMO_ATTR_EXCLUDE_EMPTY, id.c_str(), parsedOk, SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::FALSES)); const bool withInternal = attrs.getOpt(SUMO_ATTR_WITH_INTERNAL, id.c_str(), parsedOk, false); const std::vector detectPersons = attrs.getOpt >(SUMO_ATTR_DETECT_PERSONS, id.c_str(), parsedOk, {}); const double minSamples = attrs.getOpt(SUMO_ATTR_MIN_SAMPLES, id.c_str(), parsedOk, 0); @@ -213,7 +213,7 @@ MeanDataHandler::parseLaneMeanData(const SUMOSAXAttributes& attrs) { const bool aggregate = attrs.getOpt(SUMO_ATTR_AGGREGATE, id.c_str(), parsedOk, false); const std::vector edges = attrs.getOpt >(SUMO_ATTR_EDGES, id.c_str(), parsedOk, {}); const std::string edgeFile = attrs.getOpt(SUMO_ATTR_EDGESFILE, id.c_str(), parsedOk, ""); - const std::string excludeEmpty = attrs.getOpt(SUMO_ATTR_EXCLUDE_EMPTY, id.c_str(), parsedOk, "default"); + const std::string excludeEmpty = attrs.getOpt(SUMO_ATTR_EXCLUDE_EMPTY, id.c_str(), parsedOk, SUMOXMLDefinitions::ExcludeEmptys.getString(ExcludeEmpty::FALSES)); const bool withInternal = attrs.getOpt(SUMO_ATTR_WITH_INTERNAL, id.c_str(), parsedOk, false); const std::vector detectPersons = attrs.getOpt >(SUMO_ATTR_DETECT_PERSONS, id.c_str(), parsedOk, {}); const double minSamples = attrs.getOpt(SUMO_ATTR_MIN_SAMPLES, id.c_str(), parsedOk, 0); diff --git a/src/utils/shapes/ShapeHandler.cpp b/src/utils/shapes/ShapeHandler.cpp index f839dbb363a2..17de1d2a410d 100644 --- a/src/utils/shapes/ShapeHandler.cpp +++ b/src/utils/shapes/ShapeHandler.cpp @@ -86,7 +86,6 @@ ShapeHandler::myStartElement(int element, const SUMOSAXAttributes& attrs) { } else if (!SUMOXMLDefinitions::isValidParameterKey(key)) { WRITE_WARNING(TL("Error parsing key from shape generic parameter. Key contains invalid characters")); } else { - WRITE_DEBUG("Inserting generic parameter '" + key + "|" + val + "' into shape."); myLastParameterised->setParameter(key, val); } } diff --git a/src/utils/xml/SUMOXMLDefinitions.cpp b/src/utils/xml/SUMOXMLDefinitions.cpp index 9db528c331c1..eace7abc1156 100644 --- a/src/utils/xml/SUMOXMLDefinitions.cpp +++ b/src/utils/xml/SUMOXMLDefinitions.cpp @@ -1660,6 +1660,12 @@ StringBijection::Entry SUMOXMLDefinitions::POIIconValues[] = { {"", POIIcon::NONE} //< must be the last one }; +StringBijection::Entry SUMOXMLDefinitions::excludeEmptyValues[] = { + {"true", ExcludeEmpty::TRUES}, + {"false", ExcludeEmpty::FALSES}, + {"defaults", ExcludeEmpty::DEFAULTS} //< must be the last one +}; + SequentialStringBijection SUMOXMLDefinitions::Tags( SUMOXMLDefinitions::tags, SUMO_TAG_NOTHING); @@ -1720,6 +1726,8 @@ StringBijection SUMOXMLDefinitions::TrainTypes( StringBijection SUMOXMLDefinitions::POIIcons( SUMOXMLDefinitions::POIIconValues, POIIcon::NONE, false); +StringBijection SUMOXMLDefinitions::ExcludeEmptys( + SUMOXMLDefinitions::excludeEmptyValues, ExcludeEmpty::DEFAULTS, false); std::string SUMOXMLDefinitions::getJunctionIDFromInternalEdge(const std::string internalEdge) { diff --git a/src/utils/xml/SUMOXMLDefinitions.h b/src/utils/xml/SUMOXMLDefinitions.h index ff2509511749..585c119f49d9 100644 --- a/src/utils/xml/SUMOXMLDefinitions.h +++ b/src/utils/xml/SUMOXMLDefinitions.h @@ -2247,6 +2247,13 @@ enum class POIIcon { NONE = 0, }; +/// @brief Exclude empty +enum class ExcludeEmpty { + TRUES, + FALSES, + DEFAULTS, +}; + // @} /** @@ -2324,6 +2331,10 @@ class SUMOXMLDefinitions { /// @brief POI icon values static StringBijection POIIcons; + + /// @brief exclude empty values + static StringBijection ExcludeEmptys; + /// @} /// @name Helper functions for ID-string manipulations @@ -2438,6 +2449,9 @@ class SUMOXMLDefinitions { /// @brief POI icon values static StringBijection::Entry POIIconValues[]; + /// @brief Exclude empty values + static StringBijection::Entry excludeEmptyValues[]; + /// @} /// @brief all allowed characters for phase state diff --git a/tests/complex/traci/person/moveToXY/keepRoute1_junction/errors.complex b/tests/complex/traci/person/moveToXY/keepRoute1_junction/errors.complex index 4450c07bb728..e69de29bb2d1 100644 --- a/tests/complex/traci/person/moveToXY/keepRoute1_junction/errors.complex +++ b/tests/complex/traci/person/moveToXY/keepRoute1_junction/errors.complex @@ -1 +0,0 @@ -Warning: Could not map position 111.59,113.40 onto lane ':C_w1_0' (fromLane=':C_c1_0' toLane='CN_0') for person 'p0' time=38.00. diff --git a/tests/complex/traci/person/moveToXY/keepRoute1_junction/fcd.complex b/tests/complex/traci/person/moveToXY/keepRoute1_junction/fcd.complex index ec527385b6f4..f3e1cc4d6435 100644 --- a/tests/complex/traci/person/moveToXY/keepRoute1_junction/fcd.complex +++ b/tests/complex/traci/person/moveToXY/keepRoute1_junction/fcd.complex @@ -1,6 +1,6 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netconvert/import/OSM/bugs/ticket16103/options.netconvert b/tests/netconvert/import/OSM/bugs/ticket16103/options.netconvert new file mode 100644 index 000000000000..1c042e8a7ade --- /dev/null +++ b/tests/netconvert/import/OSM/bugs/ticket16103/options.netconvert @@ -0,0 +1 @@ +--osm-files osm.xml diff --git a/tests/netconvert/import/OSM/bugs/ticket16103/osm.xml b/tests/netconvert/import/OSM/bugs/ticket16103/osm.xml new file mode 100644 index 000000000000..dc6e81d3d828 --- /dev/null +++ b/tests/netconvert/import/OSM/bugs/ticket16103/osm.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netconvert/import/OSM/bugs/ticket16103/output.netconvert b/tests/netconvert/import/OSM/bugs/ticket16103/output.netconvert new file mode 100644 index 000000000000..a9d787cc55cb --- /dev/null +++ b/tests/netconvert/import/OSM/bugs/ticket16103/output.netconvert @@ -0,0 +1 @@ +Success. diff --git a/tests/netconvert/import/OSM/bugs/ticket6470/errors.netconvert b/tests/netconvert/import/OSM/bugs/ticket6470/errors.netconvert index 07422015ba91..08f562a573b6 100644 --- a/tests/netconvert/import/OSM/bugs/ticket6470/errors.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket6470/errors.netconvert @@ -6,5 +6,3 @@ Warning: Could not find corresponding edge or compatible lane for pt stop '31517 Warning: Could not find corresponding edge or compatible lane for pt stop '34672434' (Am Magnitor). Thus, it will be removed! Warning: Converting invalid rail_crossing to priority junction '5653296833'. Warning: Converting invalid rail_crossing to priority junction '5789925951'. -Warning: The traffic light '34672430' does not control any links; it will not be build. -Warning: Could not build program '0' for traffic light '34672430' diff --git a/tests/netconvert/import/OSM/bugs/ticket6470/net.netconvert b/tests/netconvert/import/OSM/bugs/ticket6470/net.netconvert index dfaab245b0cd..063140a2eaa7 100644 --- a/tests/netconvert/import/OSM/bugs/ticket6470/net.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket6470/net.netconvert @@ -1,6 +1,6 @@ - @@ -66,6 +66,9 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + + + @@ -79,52 +82,61 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + + + + + + + - + + + + @@ -133,6 +145,9 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + + + @@ -148,8 +163,8 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - - + + @@ -161,7 +176,9 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + @@ -173,65 +190,76 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - - - - - + + + + + + + + + - - - + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/tests/netconvert/import/OSM/bugs/ticket8039/errors.netconvert b/tests/netconvert/import/OSM/bugs/ticket8039/errors.netconvert index db356c58868f..d17e2cb78ef7 100644 --- a/tests/netconvert/import/OSM/bugs/ticket8039/errors.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket8039/errors.netconvert @@ -6,10 +6,6 @@ Warning: Removing pt stop '250749715' on non existing edge '53650436#0'. Warning: Removing pt stop '4539421794' on non existing edge '23187673#1'. Warning: PT line 'Bus 414: Heideblick => Stadion (Schwarzer Berg)' in relation 76955 seems to be split, only keeping first part. Warning: PT line 'Bus 414: Stadion (Schwarzer Berg) => Heideblick' in relation 6768240 seems to be split, only keeping first part. -Warning: PT line in relation 6975161 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975162 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975163 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975164 with no stops ignored. Probably OSM file is incomplete. Warning: Could not find corresponding edge or compatible lane for pt stop '2078032882' (Heideblick). Thus, it will be removed! Warning: Cannot revise pt stop localization for pt line '2653085', which consist of one way only. Ignoring! Warning: Removed invalid stop '2078032882' from line '2653085'. @@ -25,9 +21,9 @@ Warning: Cannot revise pt stop localization for pt line '6768729', which has no Warning: Removed invalid stop '250749715' from line '6768729'. Warning: Cannot revise pt stop localization for pt line '6768731', which consist of one way only. Ignoring! Warning: Cannot revise pt stop localization for pt line '6974398', which consist of one way only. Ignoring! +Warning: Cannot revise pt stop localization for pt line '6975161', which has no route edges. Ignoring! +Warning: Cannot revise pt stop localization for pt line '6975163', which consist of one way only. Ignoring! Warning: Cannot assign stop 54142977 on edge '859066434' to pt line '7090406'. Ignoring! -Warning: Cannot revise pt stop localization for pt line '7378840', which consist of one way only. Ignoring! -Warning: Cannot revise pt stop localization for pt line '7378841', which has no route edges. Ignoring! Warning: Removing pt stop '250749715' on non existing edge ''. Warning: Removing pt stop '4103427181' on non existing edge ''. Warning: Removing pt stop '4539421794' on non existing edge ''. @@ -39,6 +35,6 @@ Warning: Found sharp turn with radius 7.88 at the end of edge '10426716#0'. Warning: The rail crossing '1882498697' does not have any roads. Warning: The rail crossing '54142974' does not have any roads. Warning: The rail crossing 'cluster_2525484869_366041397' does not have any roads. -Warning: 7 total messages of type: Cannot revise pt stop localization for pt line '%', which consist of one way only. Ignoring! -Warning: 8 total messages of type: Cannot revise pt stop localization for pt line '%', which has no route edges. Ignoring! -Warning: 14 total messages of type: Removed invalid stop '%' from line '%'. +Warning: 9 total messages of type: Cannot revise pt stop localization for pt line '%', which consist of one way only. Ignoring! +Warning: 10 total messages of type: Cannot revise pt stop localization for pt line '%', which has no route edges. Ignoring! +Warning: 18 total messages of type: Removed invalid stop '%' from line '%'. diff --git a/tests/netconvert/import/OSM/bugs/ticket8039/ptlines.netconvert b/tests/netconvert/import/OSM/bugs/ticket8039/ptlines.netconvert index 45b5a0978495..4f97189093e7 100644 --- a/tests/netconvert/import/OSM/bugs/ticket8039/ptlines.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket8039/ptlines.netconvert @@ -1,6 +1,6 @@ - @@ -79,13 +79,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - - + + + + + + - + diff --git a/tests/netconvert/import/OSM/bugs/ticket8587/additional.netconvert b/tests/netconvert/import/OSM/bugs/ticket8587/additional.netconvert index 338e98ebb7ca..26bad7dc1e40 100644 --- a/tests/netconvert/import/OSM/bugs/ticket8587/additional.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket8587/additional.netconvert @@ -1,6 +1,6 @@ - - + diff --git a/tests/netconvert/import/OSM/bugs/ticket8587/ptlines.netconvert b/tests/netconvert/import/OSM/bugs/ticket8587/ptlines.netconvert index c416ea69f5c4..ac94a9676f4e 100644 --- a/tests/netconvert/import/OSM/bugs/ticket8587/ptlines.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket8587/ptlines.netconvert @@ -1,6 +1,6 @@ - - + - + + diff --git a/tests/netconvert/import/OSM/bugs/ticket8791/ptlines.netconvert b/tests/netconvert/import/OSM/bugs/ticket8791/ptlines.netconvert index 50939ed0fccb..5d9f7a3458a4 100644 --- a/tests/netconvert/import/OSM/bugs/ticket8791/ptlines.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket8791/ptlines.netconvert @@ -1,6 +1,6 @@ - @@ -131,19 +131,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + - + - + diff --git a/tests/netconvert/import/OSM/bugs/ticket9701/ptlines.netconvert b/tests/netconvert/import/OSM/bugs/ticket9701/ptlines.netconvert index a23a28e92cbb..04db84add81b 100644 --- a/tests/netconvert/import/OSM/bugs/ticket9701/ptlines.netconvert +++ b/tests/netconvert/import/OSM/bugs/ticket9701/ptlines.netconvert @@ -1,6 +1,6 @@ - - + diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/additional.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/additional.netconvert index 607126ae4745..a5e9e43572dc 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/additional.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/additional.netconvert @@ -1,6 +1,6 @@ - @@ -99,14 +99,14 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/errors.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/errors.netconvert index b329b9136c74..2c60f3fc892b 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/errors.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/errors.netconvert @@ -6,8 +6,6 @@ Warning: No way found for reference '5001019' in relation '1057486' Warning: Ignoring restriction relation '1057486' with unknown from-way. Warning: Ignoring restriction relation '1057486' with unknown to-way. Warning: PT line in relation 2755611 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 3068086 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 4622890 with no stops ignored. Probably OSM file is incomplete. Warning: PT line in relation 5659550 with no stops ignored. Probably OSM file is incomplete. Warning: PT line in relation 5664147 with no stops ignored. Probably OSM file is incomplete. Warning: No way found for reference '634042794' in relation '9082479' @@ -31,5 +29,4 @@ Warning: Speed of straight connection '253362218_0->253362220#0_0' reduced by 7. Warning: Speed of straight connection '300873532#2_0->300873532#3_0' reduced by 8.92 due to turning radius of 3.67 (length=1.07, angle=36.47). Warning: Speed of straight connection '300873532#2_1->300873532#3_1' reduced by 7.31 due to turning radius of 6.77 (length=2.24, angle=36.47). Warning: 6 total messages of type: No way found for reference '%' in relation '%' -Warning: 9 total messages of type: PT line in relation % with no stops ignored. Probably OSM file is incomplete. Warning: 8 total messages of type: PT stop '%' has been moved to edge '%'. diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/ptlines.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/ptlines.netconvert index 158bf4ab353a..0ee1020b84b8 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/ptlines.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms/ptlines.netconvert @@ -1,6 +1,6 @@ - - + - + - + - + - + + + + + - + @@ -69,14 +73,14 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + @@ -84,7 +88,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -92,7 +96,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -100,7 +104,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -108,34 +112,38 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + - + - + - + - + - + @@ -143,7 +151,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -151,7 +159,11 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + @@ -159,7 +171,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -167,7 +179,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -175,7 +187,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -183,7 +195,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -191,7 +203,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -199,32 +211,36 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + - + - + - + - + - + @@ -232,7 +248,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -240,7 +256,15 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + + + + + @@ -248,12 +272,12 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/additional.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/additional.netconvert index 96f04df8de02..c39ef697b997 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/additional.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/additional.netconvert @@ -1,6 +1,6 @@ - @@ -103,14 +103,14 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/errors.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/errors.netconvert index a5e150c81ca9..218fcc9061ac 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/errors.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/errors.netconvert @@ -6,8 +6,6 @@ Warning: No way found for reference '5001019' in relation '1057486' Warning: Ignoring restriction relation '1057486' with unknown from-way. Warning: Ignoring restriction relation '1057486' with unknown to-way. Warning: PT line in relation 2755611 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 3068086 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 4622890 with no stops ignored. Probably OSM file is incomplete. Warning: PT line in relation 5659550 with no stops ignored. Probably OSM file is incomplete. Warning: PT line in relation 5664147 with no stops ignored. Probably OSM file is incomplete. Warning: No way found for reference '634042794' in relation '9082479' @@ -30,5 +28,4 @@ Warning: Speed of straight connection '24546642#0_0->24546642#1_0' reduced by 5. Warning: Speed of straight connection '300873532#2_0->300873532#3_0' reduced by 7.31 due to turning radius of 6.77 (length=2.24, angle=36.47). Warning: Speed of straight connection '300873532#2_1->300873532#3_1' reduced by 8.92 due to turning radius of 3.67 (length=1.07, angle=36.47). Warning: 6 total messages of type: No way found for reference '%' in relation '%' -Warning: 9 total messages of type: PT line in relation % with no stops ignored. Probably OSM file is incomplete. Warning: 8 total messages of type: PT stop '%' has been moved to edge '%'. diff --git a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/ptlines.netconvert b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/ptlines.netconvert index db67e8544655..9dc16056f55f 100644 --- a/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/ptlines.netconvert +++ b/tests/netconvert/import/OSM/public_transport/bus_stop_mix_stops_platforms_lefthand/ptlines.netconvert @@ -1,6 +1,6 @@ - - + - + - + - + - + + + + + - + @@ -73,14 +77,14 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + @@ -88,7 +92,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -96,7 +100,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -104,7 +108,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -112,34 +116,38 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + - + - + - + - + - + @@ -147,7 +155,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -155,7 +163,11 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + @@ -163,7 +175,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -171,7 +183,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -179,7 +191,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -187,7 +199,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -195,7 +207,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -203,32 +215,36 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + - + - + - + - + - + @@ -236,7 +252,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + @@ -244,7 +260,15 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + + + + + + + + + @@ -252,12 +276,12 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + diff --git a/tests/netconvert/import/OSM/public_transport/monorail/ptlines.netconvert b/tests/netconvert/import/OSM/public_transport/monorail/ptlines.netconvert index 47469994cdad..d90f95bf8ea4 100644 --- a/tests/netconvert/import/OSM/public_transport/monorail/ptlines.netconvert +++ b/tests/netconvert/import/OSM/public_transport/monorail/ptlines.netconvert @@ -1,6 +1,6 @@ - @@ -67,12 +67,12 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + diff --git a/tests/netconvert/import/OSM/railway/superfluous_edges/ptlines.netconvert b/tests/netconvert/import/OSM/railway/superfluous_edges/ptlines.netconvert index 26e0827bdb0d..623de56028de 100644 --- a/tests/netconvert/import/OSM/railway/superfluous_edges/ptlines.netconvert +++ b/tests/netconvert/import/OSM/railway/superfluous_edges/ptlines.netconvert @@ -1,6 +1,6 @@ - - + @@ -91,19 +91,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + - + - + - + @@ -131,7 +131,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - + diff --git a/tests/netconvert/import/OSM/ticket8155_orig/errors.netconvert b/tests/netconvert/import/OSM/ticket8155_orig/errors.netconvert index db356c58868f..d17e2cb78ef7 100644 --- a/tests/netconvert/import/OSM/ticket8155_orig/errors.netconvert +++ b/tests/netconvert/import/OSM/ticket8155_orig/errors.netconvert @@ -6,10 +6,6 @@ Warning: Removing pt stop '250749715' on non existing edge '53650436#0'. Warning: Removing pt stop '4539421794' on non existing edge '23187673#1'. Warning: PT line 'Bus 414: Heideblick => Stadion (Schwarzer Berg)' in relation 76955 seems to be split, only keeping first part. Warning: PT line 'Bus 414: Stadion (Schwarzer Berg) => Heideblick' in relation 6768240 seems to be split, only keeping first part. -Warning: PT line in relation 6975161 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975162 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975163 with no stops ignored. Probably OSM file is incomplete. -Warning: PT line in relation 6975164 with no stops ignored. Probably OSM file is incomplete. Warning: Could not find corresponding edge or compatible lane for pt stop '2078032882' (Heideblick). Thus, it will be removed! Warning: Cannot revise pt stop localization for pt line '2653085', which consist of one way only. Ignoring! Warning: Removed invalid stop '2078032882' from line '2653085'. @@ -25,9 +21,9 @@ Warning: Cannot revise pt stop localization for pt line '6768729', which has no Warning: Removed invalid stop '250749715' from line '6768729'. Warning: Cannot revise pt stop localization for pt line '6768731', which consist of one way only. Ignoring! Warning: Cannot revise pt stop localization for pt line '6974398', which consist of one way only. Ignoring! +Warning: Cannot revise pt stop localization for pt line '6975161', which has no route edges. Ignoring! +Warning: Cannot revise pt stop localization for pt line '6975163', which consist of one way only. Ignoring! Warning: Cannot assign stop 54142977 on edge '859066434' to pt line '7090406'. Ignoring! -Warning: Cannot revise pt stop localization for pt line '7378840', which consist of one way only. Ignoring! -Warning: Cannot revise pt stop localization for pt line '7378841', which has no route edges. Ignoring! Warning: Removing pt stop '250749715' on non existing edge ''. Warning: Removing pt stop '4103427181' on non existing edge ''. Warning: Removing pt stop '4539421794' on non existing edge ''. @@ -39,6 +35,6 @@ Warning: Found sharp turn with radius 7.88 at the end of edge '10426716#0'. Warning: The rail crossing '1882498697' does not have any roads. Warning: The rail crossing '54142974' does not have any roads. Warning: The rail crossing 'cluster_2525484869_366041397' does not have any roads. -Warning: 7 total messages of type: Cannot revise pt stop localization for pt line '%', which consist of one way only. Ignoring! -Warning: 8 total messages of type: Cannot revise pt stop localization for pt line '%', which has no route edges. Ignoring! -Warning: 14 total messages of type: Removed invalid stop '%' from line '%'. +Warning: 9 total messages of type: Cannot revise pt stop localization for pt line '%', which consist of one way only. Ignoring! +Warning: 10 total messages of type: Cannot revise pt stop localization for pt line '%', which has no route edges. Ignoring! +Warning: 18 total messages of type: Removed invalid stop '%' from line '%'. diff --git a/tests/netconvert/import/OSM/ticket8155_orig/ptlines.netconvert b/tests/netconvert/import/OSM/ticket8155_orig/ptlines.netconvert index 256253c90634..573be17fe016 100644 --- a/tests/netconvert/import/OSM/ticket8155_orig/ptlines.netconvert +++ b/tests/netconvert/import/OSM/ticket8155_orig/ptlines.netconvert @@ -1,6 +1,6 @@ - @@ -80,13 +80,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later - - + + + + + + - + diff --git a/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/log.netedit b/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/log.netedit index fadfbd2cc620..95f7c2b5744c 100644 --- a/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/log.netedit +++ b/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/log.netedit @@ -13,7 +13,7 @@ Warning: Overwritting person with ID 'p_0' Warning: Overwritting personFlow with ID 'pf_0' Warning: Overwritting container with ID 'c_0' Warning: Overwritting containerFlow with ID 'cf_0' -Warning: Overwritting routeEmbedded with ID 'f_4' +Warning: Overwritting flowWithRoute with ID 'f_4' Warning: Lane 'E4_0' is not connected from any incoming edge at junction 'J4'. Warning: Lane 'E8_0' is not connected from any incoming edge at junction 'J7'. Warning: Lane 'E4_0' is not connected from any incoming edge at junction 'J4'. diff --git a/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/meandatas.netedit b/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/meandatas.netedit index a670ac1e3249..56c38efa153c 100644 --- a/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/meandatas.netedit +++ b/tests/netedit/basic/configs/netecfg/open/overwritte/yes/demands/meandatas.netedit @@ -1,6 +1,6 @@ - + + + + diff --git a/tests/netedit/basic/quit/datas.dat.xml b/tests/netedit/basic/quit/datas.dat.xml new file mode 100644 index 000000000000..7e512fb3a2da --- /dev/null +++ b/tests/netedit/basic/quit/datas.dat.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/tests/netedit/basic/quit/datas.med.add.xml b/tests/netedit/basic/quit/datas.med.add.xml new file mode 100644 index 000000000000..6390e3e9758d --- /dev/null +++ b/tests/netedit/basic/quit/datas.med.add.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/tests/netedit/basic/quit/net.con.xml b/tests/netedit/basic/quit/net.con.xml new file mode 100644 index 000000000000..095bf8e011d7 --- /dev/null +++ b/tests/netedit/basic/quit/net.con.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/tests/netedit/basic/quit/net.edg.xml b/tests/netedit/basic/quit/net.edg.xml new file mode 100644 index 000000000000..90e7f7fcae76 --- /dev/null +++ b/tests/netedit/basic/quit/net.edg.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/tests/netedit/basic/quit/net.net.xml b/tests/netedit/basic/quit/net.net.xml new file mode 100644 index 000000000000..7f5a89fa0e64 --- /dev/null +++ b/tests/netedit/basic/quit/net.net.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/net.netccfg b/tests/netedit/basic/quit/net.netccfg new file mode 100644 index 000000000000..b202712ad4e3 --- /dev/null +++ b/tests/netedit/basic/quit/net.netccfg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/net.nod.xml b/tests/netedit/basic/quit/net.nod.xml new file mode 100644 index 000000000000..bb7a41234fd3 --- /dev/null +++ b/tests/netedit/basic/quit/net.nod.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/tests/netedit/basic/quit/net.tll.xml b/tests/netedit/basic/quit/net.tll.xml new file mode 100644 index 000000000000..c12ec0c8e38f --- /dev/null +++ b/tests/netedit/basic/quit/net.tll.xml @@ -0,0 +1,33 @@ + + + + + + diff --git a/tests/netedit/basic/quit/no_save_additionals/errors.netedit b/tests/netedit/basic/quit/no_saving/additionals/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/errors.netedit rename to tests/netedit/basic/quit/no_saving/additionals/errors.netedit diff --git a/tests/netedit/basic/quit/no_save_additionals/errors.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/additionals/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/errors.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/additionals/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_save/guisettingsoutput.netedit b/tests/netedit/basic/quit/no_saving/additionals/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save/guisettingsoutput.netedit rename to tests/netedit/basic/quit/no_saving/additionals/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/no_save/log.netedit b/tests/netedit/basic/quit/no_saving/additionals/log.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save/log.netedit rename to tests/netedit/basic/quit/no_saving/additionals/log.netedit diff --git a/tests/netedit/basic/quit/no_save_additionals/net.netedit b/tests/netedit/basic/quit/no_saving/additionals/net.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/net.netedit rename to tests/netedit/basic/quit/no_saving/additionals/net.netedit diff --git a/tests/netedit/basic/quit/no_save_additionals/output.netedit b/tests/netedit/basic/quit/no_saving/additionals/output.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/output.netedit rename to tests/netedit/basic/quit/no_saving/additionals/output.netedit diff --git a/tests/netedit/basic/quit/no_save_additionals/output.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/additionals/output.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/output.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/additionals/output.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_save_additionals/routes.netedit b/tests/netedit/basic/quit/no_saving/additionals/routes.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/routes.netedit rename to tests/netedit/basic/quit/no_saving/additionals/routes.netedit diff --git a/tests/netedit/basic/quit/save_all/test.py b/tests/netedit/basic/quit/no_saving/additionals/test.py similarity index 62% rename from tests/netedit/basic/quit/save_all/test.py rename to tests/netedit/basic/quit/no_saving/additionals/test.py index ea5781a2cbb3..ce9231e3fbc8 100644 --- a/tests/netedit/basic/quit/save_all/test.py +++ b/tests/netedit/basic/quit/no_saving/additionals/test.py @@ -32,8 +32,10 @@ netedit.createEdgeMode() # Create two nodes -netedit.leftClick(referencePosition, netedit.positions.tmp) -netedit.leftClick(referencePosition, netedit.positions.tmp) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) # go to additional mode netedit.additionalMode() @@ -42,7 +44,7 @@ netedit.changeElement("busStop") # create busStop in mode "reference left" -netedit.leftClick(referencePosition, netedit.positions.tmp) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) # go to demand mode netedit.supermodeDemand() @@ -51,11 +53,25 @@ netedit.routeMode() # create route using three edges -netedit.leftClick(referencePosition, netedit.positions.tmp) -netedit.leftClick(referencePosition, netedit.positions.tmp) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) # press enter to create route netedit.typeEnter() -# quit netedits saving all -netedit.quit(neteditProcess, True, True, True, True, True, True) +# Go to data supermode +netedit.supermodeData() + +# change to edgeData +netedit.edgeData() + +# create dataSet +netedit.createDataSet() + +# create data interval +netedit.createDataInterval() + +# create edgeData +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# quit netedit without saving +netedit.quit(neteditProcess, True, False, True, True, True, False, True, False) diff --git a/tests/netedit/basic/quit/no_save_demand/errors.netedit b/tests/netedit/basic/quit/no_saving/all/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/errors.netedit rename to tests/netedit/basic/quit/no_saving/all/errors.netedit diff --git a/tests/netedit/basic/quit/no_save/errors.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/all/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save/errors.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/all/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_saving/all/guisettingsoutput.netedit b/tests/netedit/basic/quit/no_saving/all/guisettingsoutput.netedit new file mode 100644 index 000000000000..549f0f6eef78 --- /dev/null +++ b/tests/netedit/basic/quit/no_saving/all/guisettingsoutput.netedit @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/no_save_additionals/log.netedit b/tests/netedit/basic/quit/no_saving/all/log.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/log.netedit rename to tests/netedit/basic/quit/no_saving/all/log.netedit diff --git a/tests/netedit/basic/quit/no_saving/all/output.netedit b/tests/netedit/basic/quit/no_saving/all/output.netedit new file mode 100644 index 000000000000..4aeda20d5994 --- /dev/null +++ b/tests/netedit/basic/quit/no_saving/all/output.netedit @@ -0,0 +1,15 @@ +TestFunctions: Netedit opened successfully +Finding reference +TestFunctions: 'reference.png' found. Position: 304 - 168 +TestFunctions: Clicked over position 582 - 405 +TestFunctions: Clicked over position 1010 - 400 +TestFunctions: Clicked over position 1010 - 400 +TestFunctions: Clicked over position 582 - 405 +busStop +TestFunctions: Clicked over position 802 - 424 +TestFunctions: Clicked over position 802 - 424 +newDataSet +0 +3600 +TestFunctions: Clicked over position 802 - 424 +TestFunctions: Netedit closed successfully diff --git a/tests/netedit/basic/quit/no_save_demand/output.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/all/output.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/output.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/all/output.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_saving/all/test.py b/tests/netedit/basic/quit/no_saving/all/test.py new file mode 100644 index 000000000000..f200cad51aa6 --- /dev/null +++ b/tests/netedit/basic/quit/no_saving/all/test.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo +# Copyright (C) 2009-2025 German Aerospace Center (DLR) and others. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/ +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the Eclipse +# Public License 2.0 are satisfied: GNU General Public License, version 2 +# or later which is available at +# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + +# @file test.py +# @author Pablo Alvarez Lopez +# @date 2016-11-25 + +# import common functions for netedit tests +import os +import sys + +testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests') +neteditTestRoot = os.path.join( + os.environ.get('TEXTTEST_HOME', testRoot), 'netedit') +sys.path.append(neteditTestRoot) +import neteditTestFunctions as netedit # noqa + +# Open netedit +neteditProcess, referencePosition = netedit.setupAndStart(neteditTestRoot) + +# Change to create mode +netedit.createEdgeMode() + +# Create two nodes +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) + +# go to additional mode +netedit.additionalMode() + +# select busStop +netedit.changeElement("busStop") + +# create busStop in mode "reference left" +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# go to demand mode +netedit.supermodeDemand() + +# go to route mode +netedit.routeMode() + +# create route using three edges +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# press enter to create route +netedit.typeEnter() + +# Go to data supermode +netedit.supermodeData() + +# change to edgeData +netedit.edgeData() + +# create dataSet +netedit.createDataSet() + +# create data interval +netedit.createDataInterval() + +# create edgeData +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# quit netedit without saving +netedit.quit(neteditProcess, True, False, True, False, True, False, True, False) diff --git a/tests/netedit/basic/quit/no_save_demand/additionals.netedit b/tests/netedit/basic/quit/no_saving/data/additionals.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/additionals.netedit rename to tests/netedit/basic/quit/no_saving/data/additionals.netedit diff --git a/tests/netedit/basic/quit/no_save_network/errors.netedit b/tests/netedit/basic/quit/no_saving/data/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_network/errors.netedit rename to tests/netedit/basic/quit/no_saving/data/errors.netedit diff --git a/tests/netedit/basic/quit/no_save_demand/errors.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/data/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/errors.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/data/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_save_additionals/guisettingsoutput.netedit b/tests/netedit/basic/quit/no_saving/data/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/guisettingsoutput.netedit rename to tests/netedit/basic/quit/no_saving/data/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/no_save_demand/log.netedit b/tests/netedit/basic/quit/no_saving/data/log.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/log.netedit rename to tests/netedit/basic/quit/no_saving/data/log.netedit diff --git a/tests/netedit/basic/quit/no_save_demand/meandatas.netedit b/tests/netedit/basic/quit/no_saving/data/meandatas.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/meandatas.netedit rename to tests/netedit/basic/quit/no_saving/data/meandatas.netedit diff --git a/tests/netedit/basic/quit/no_save_demand/net.netedit b/tests/netedit/basic/quit/no_saving/data/net.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/net.netedit rename to tests/netedit/basic/quit/no_saving/data/net.netedit diff --git a/tests/netedit/basic/quit/no_save/output.netedit b/tests/netedit/basic/quit/no_saving/data/output.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save/output.netedit rename to tests/netedit/basic/quit/no_saving/data/output.netedit diff --git a/tests/netedit/basic/quit/no_save_network/output.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/data/output.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/no_save_network/output.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/data/output.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_saving/data/test.py b/tests/netedit/basic/quit/no_saving/data/test.py new file mode 100644 index 000000000000..975433bd6425 --- /dev/null +++ b/tests/netedit/basic/quit/no_saving/data/test.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python +# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo +# Copyright (C) 2009-2025 German Aerospace Center (DLR) and others. +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License 2.0 which is available at +# https://www.eclipse.org/legal/epl-2.0/ +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the Eclipse +# Public License 2.0 are satisfied: GNU General Public License, version 2 +# or later which is available at +# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later + +# @file test.py +# @author Pablo Alvarez Lopez +# @date 2016-11-25 + +# import common functions for netedit tests +import os +import sys + +testRoot = os.path.join(os.environ.get('SUMO_HOME', '.'), 'tests') +neteditTestRoot = os.path.join( + os.environ.get('TEXTTEST_HOME', testRoot), 'netedit') +sys.path.append(neteditTestRoot) +import neteditTestFunctions as netedit # noqa + +# Open netedit +neteditProcess, referencePosition = netedit.setupAndStart(neteditTestRoot) + +# Change to create mode +netedit.createEdgeMode() + +# Create two nodes +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right) +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left) + +# go to additional mode +netedit.additionalMode() + +# select busStop +netedit.changeElement("busStop") + +# create busStop in mode "reference left" +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# go to demand mode +netedit.supermodeDemand() + +# go to route mode +netedit.routeMode() + +# create route using three edges +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# press enter to create route +netedit.typeEnter() + +# Go to data supermode +netedit.supermodeData() + +# change to edgeData +netedit.edgeData() + +# create dataSet +netedit.createDataSet() + +# create data interval +netedit.createDataInterval() + +# create edgeData +netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.center, offsetY=20) + +# quit netedit without saving +netedit.quit(neteditProcess, True, False, True, False, True, False, True, True) diff --git a/tests/netedit/basic/quit/save_additionals/additionals.netedit b/tests/netedit/basic/quit/no_saving/demand/additionals.netedit similarity index 83% rename from tests/netedit/basic/quit/save_additionals/additionals.netedit rename to tests/netedit/basic/quit/no_saving/demand/additionals.netedit index dc906a2d8d39..f80e055b17dc 100644 --- a/tests/netedit/basic/quit/save_additionals/additionals.netedit +++ b/tests/netedit/basic/quit/no_saving/demand/additionals.netedit @@ -1,6 +1,6 @@ - diff --git a/tests/netedit/basic/quit/save_additionals/errors.netedit b/tests/netedit/basic/quit/no_saving/demand/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/save_additionals/errors.netedit rename to tests/netedit/basic/quit/no_saving/demand/errors.netedit diff --git a/tests/netedit/basic/quit/save_additionals/errors.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/demand/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/save_additionals/errors.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/demand/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_save_demand/guisettingsoutput.netedit b/tests/netedit/basic/quit/no_saving/demand/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_demand/guisettingsoutput.netedit rename to tests/netedit/basic/quit/no_saving/demand/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/no_save_network/log.netedit b/tests/netedit/basic/quit/no_saving/demand/log.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_network/log.netedit rename to tests/netedit/basic/quit/no_saving/demand/log.netedit diff --git a/tests/netedit/basic/quit/no_save_network/meandatas.netedit b/tests/netedit/basic/quit/no_saving/demand/meandatas.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_network/meandatas.netedit rename to tests/netedit/basic/quit/no_saving/demand/meandatas.netedit diff --git a/tests/netedit/basic/quit/save_network/net.netedit b/tests/netedit/basic/quit/no_saving/demand/net.netedit similarity index 85% rename from tests/netedit/basic/quit/save_network/net.netedit rename to tests/netedit/basic/quit/no_saving/demand/net.netedit index fe53653e281d..e8eaec727a87 100644 --- a/tests/netedit/basic/quit/save_network/net.netedit +++ b/tests/netedit/basic/quit/no_saving/demand/net.netedit @@ -1,17 +1,17 @@ - diff --git a/tests/netedit/basic/quit/save_all/errors.netedit b/tests/netedit/basic/quit/no_saving/meandatas/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/save_all/errors.netedit rename to tests/netedit/basic/quit/no_saving/meandatas/errors.netedit diff --git a/tests/netedit/basic/quit/save_all/errors.neteditcheckoutput b/tests/netedit/basic/quit/no_saving/meandatas/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/save_all/errors.neteditcheckoutput rename to tests/netedit/basic/quit/no_saving/meandatas/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/no_save_network/guisettingsoutput.netedit b/tests/netedit/basic/quit/no_saving/meandatas/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/no_save_network/guisettingsoutput.netedit rename to tests/netedit/basic/quit/no_saving/meandatas/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/save_additionals/log.netedit b/tests/netedit/basic/quit/no_saving/meandatas/log.netedit similarity index 100% rename from tests/netedit/basic/quit/save_additionals/log.netedit rename to tests/netedit/basic/quit/no_saving/meandatas/log.netedit diff --git a/tests/netedit/basic/quit/save_additionals/meandatas.netedit b/tests/netedit/basic/quit/no_saving/meandatas/meandatas.netedit similarity index 100% rename from tests/netedit/basic/quit/save_additionals/meandatas.netedit rename to tests/netedit/basic/quit/no_saving/meandatas/meandatas.netedit diff --git a/tests/netedit/basic/quit/save_additionals/net.netedit b/tests/netedit/basic/quit/no_saving/meandatas/net.netedit similarity index 85% rename from tests/netedit/basic/quit/save_additionals/net.netedit rename to tests/netedit/basic/quit/no_saving/meandatas/net.netedit index 50c34daf42c3..e8eaec727a87 100644 --- a/tests/netedit/basic/quit/save_additionals/net.netedit +++ b/tests/netedit/basic/quit/no_saving/meandatas/net.netedit @@ -1,17 +1,17 @@ - - - + diff --git a/tests/netedit/basic/quit/save_all/routes.netedit b/tests/netedit/basic/quit/save_all/routes.netedit deleted file mode 100644 index a6dae0763a56..000000000000 --- a/tests/netedit/basic/quit/save_all/routes.netedit +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - diff --git a/tests/netedit/basic/quit/save_network/errors.netedit b/tests/netedit/basic/quit/saving/additionals/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/save_network/errors.netedit rename to tests/netedit/basic/quit/saving/additionals/errors.netedit diff --git a/tests/netedit/basic/quit/save_demand/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/additionals/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/save_demand/errors.neteditcheckoutput rename to tests/netedit/basic/quit/saving/additionals/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/save_all/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/additionals/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/save_all/guisettingsoutput.netedit rename to tests/netedit/basic/quit/saving/additionals/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/save_demand/log.netedit b/tests/netedit/basic/quit/saving/additionals/log.netedit similarity index 100% rename from tests/netedit/basic/quit/save_demand/log.netedit rename to tests/netedit/basic/quit/saving/additionals/log.netedit diff --git a/tests/netedit/basic/quit/saving/additionals/net.netedit b/tests/netedit/basic/quit/saving/additionals/net.netedit new file mode 100644 index 000000000000..708d21c3b12d --- /dev/null +++ b/tests/netedit/basic/quit/saving/additionals/net.netedit @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/save_additionals/output.netedit b/tests/netedit/basic/quit/saving/additionals/output.netedit similarity index 100% rename from tests/netedit/basic/quit/save_additionals/output.netedit rename to tests/netedit/basic/quit/saving/additionals/output.netedit diff --git a/tests/netedit/basic/quit/save_network/output.neteditcheckoutput b/tests/netedit/basic/quit/saving/additionals/output.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/save_network/output.neteditcheckoutput rename to tests/netedit/basic/quit/saving/additionals/output.neteditcheckoutput diff --git a/tests/netedit/basic/quit/save_demand/routes.netedit b/tests/netedit/basic/quit/saving/additionals/routes.netedit similarity index 81% rename from tests/netedit/basic/quit/save_demand/routes.netedit rename to tests/netedit/basic/quit/saving/additionals/routes.netedit index 8487972ca914..c5f97d3801d7 100644 --- a/tests/netedit/basic/quit/save_demand/routes.netedit +++ b/tests/netedit/basic/quit/saving/additionals/routes.netedit @@ -1,6 +1,6 @@ - diff --git a/tests/netedit/basic/quit/no_save_additionals/test.py b/tests/netedit/basic/quit/saving/additionals/test.py similarity index 100% rename from tests/netedit/basic/quit/no_save_additionals/test.py rename to tests/netedit/basic/quit/saving/additionals/test.py diff --git a/tests/netedit/basic/quit/save_network/log.netedit b/tests/netedit/basic/quit/saving/all/errors.netedit similarity index 100% rename from tests/netedit/basic/quit/save_network/log.netedit rename to tests/netedit/basic/quit/saving/all/errors.netedit diff --git a/tests/netedit/basic/quit/save_network/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/all/errors.neteditcheckoutput similarity index 100% rename from tests/netedit/basic/quit/save_network/errors.neteditcheckoutput rename to tests/netedit/basic/quit/saving/all/errors.neteditcheckoutput diff --git a/tests/netedit/basic/quit/save_demand/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/all/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/save_demand/guisettingsoutput.netedit rename to tests/netedit/basic/quit/saving/all/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/saving/all/log.netedit b/tests/netedit/basic/quit/saving/all/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_demand/output.netedit b/tests/netedit/basic/quit/saving/all/output.netedit similarity index 100% rename from tests/netedit/basic/quit/save_demand/output.netedit rename to tests/netedit/basic/quit/saving/all/output.netedit diff --git a/tests/netedit/basic/quit/saving/all/output.neteditcheckoutput b/tests/netedit/basic/quit/saving/all/output.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/no_save/test.py b/tests/netedit/basic/quit/saving/all/test.py similarity index 100% rename from tests/netedit/basic/quit/no_save/test.py rename to tests/netedit/basic/quit/saving/all/test.py diff --git a/tests/netedit/basic/quit/save_demand/additionals.netedit b/tests/netedit/basic/quit/saving/data/additionals.netedit similarity index 83% rename from tests/netedit/basic/quit/save_demand/additionals.netedit rename to tests/netedit/basic/quit/saving/data/additionals.netedit index eca14b3d34e2..f80e055b17dc 100644 --- a/tests/netedit/basic/quit/save_demand/additionals.netedit +++ b/tests/netedit/basic/quit/saving/data/additionals.netedit @@ -1,6 +1,6 @@ - diff --git a/tests/netedit/basic/quit/saving/data/errors.netedit b/tests/netedit/basic/quit/saving/data/errors.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/data/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/data/errors.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_network/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/data/guisettingsoutput.netedit similarity index 100% rename from tests/netedit/basic/quit/save_network/guisettingsoutput.netedit rename to tests/netedit/basic/quit/saving/data/guisettingsoutput.netedit diff --git a/tests/netedit/basic/quit/saving/data/log.netedit b/tests/netedit/basic/quit/saving/data/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_demand/meandatas.netedit b/tests/netedit/basic/quit/saving/data/meandatas.netedit similarity index 100% rename from tests/netedit/basic/quit/save_demand/meandatas.netedit rename to tests/netedit/basic/quit/saving/data/meandatas.netedit diff --git a/tests/netedit/basic/quit/save_all/net.netedit b/tests/netedit/basic/quit/saving/data/net.netedit similarity index 85% rename from tests/netedit/basic/quit/save_all/net.netedit rename to tests/netedit/basic/quit/saving/data/net.netedit index 9b27e17c2495..e8eaec727a87 100644 --- a/tests/netedit/basic/quit/save_all/net.netedit +++ b/tests/netedit/basic/quit/saving/data/net.netedit @@ -1,17 +1,17 @@ - diff --git a/tests/netedit/basic/quit/saving/demand/errors.netedit b/tests/netedit/basic/quit/saving/demand/errors.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/demand/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/demand/errors.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/demand/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/demand/guisettingsoutput.netedit new file mode 100644 index 000000000000..a6254b1b5e8f --- /dev/null +++ b/tests/netedit/basic/quit/saving/demand/guisettingsoutput.netedit @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/demand/log.netedit b/tests/netedit/basic/quit/saving/demand/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_network/meandatas.netedit b/tests/netedit/basic/quit/saving/demand/meandatas.netedit similarity index 100% rename from tests/netedit/basic/quit/save_network/meandatas.netedit rename to tests/netedit/basic/quit/saving/demand/meandatas.netedit diff --git a/tests/netedit/basic/quit/save_demand/net.netedit b/tests/netedit/basic/quit/saving/demand/net.netedit similarity index 85% rename from tests/netedit/basic/quit/save_demand/net.netedit rename to tests/netedit/basic/quit/saving/demand/net.netedit index f09e1062fee7..e8eaec727a87 100644 --- a/tests/netedit/basic/quit/save_demand/net.netedit +++ b/tests/netedit/basic/quit/saving/demand/net.netedit @@ -1,17 +1,17 @@ - + + + + + diff --git a/tests/netedit/basic/quit/saving/meandatas/errors.netedit b/tests/netedit/basic/quit/saving/meandatas/errors.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/meandatas/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/meandatas/errors.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/meandatas/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/meandatas/guisettingsoutput.netedit new file mode 100644 index 000000000000..a6254b1b5e8f --- /dev/null +++ b/tests/netedit/basic/quit/saving/meandatas/guisettingsoutput.netedit @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/meandatas/log.netedit b/tests/netedit/basic/quit/saving/meandatas/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/meandatas/meandatas.netedit b/tests/netedit/basic/quit/saving/meandatas/meandatas.netedit new file mode 100644 index 000000000000..4817a589d55c --- /dev/null +++ b/tests/netedit/basic/quit/saving/meandatas/meandatas.netedit @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/meandatas/net.netedit b/tests/netedit/basic/quit/saving/meandatas/net.netedit new file mode 100644 index 000000000000..e8eaec727a87 --- /dev/null +++ b/tests/netedit/basic/quit/saving/meandatas/net.netedit @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/meandatas/output.netedit b/tests/netedit/basic/quit/saving/meandatas/output.netedit new file mode 100644 index 000000000000..dcd64c6e1d45 --- /dev/null +++ b/tests/netedit/basic/quit/saving/meandatas/output.netedit @@ -0,0 +1,10 @@ +TestFunctions: Netedit opened successfully +Finding reference +TestFunctions: 'reference.png' found. Position: 304 - 168 +TestFunctions: Clicked over position 304 - 568 +TestFunctions: Clicked over position 804 - 568 +busStop +TestFunctions: Clicked over position 554 - 413 +TestFunctions: Clicked over position 464 - 413 +TestFunctions: Clicked over position 464 - 378 +TestFunctions: Netedit closed successfully diff --git a/tests/netedit/basic/quit/saving/meandatas/output.neteditcheckoutput b/tests/netedit/basic/quit/saving/meandatas/output.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_additionals/test.py b/tests/netedit/basic/quit/saving/meandatas/test.py similarity index 91% rename from tests/netedit/basic/quit/save_additionals/test.py rename to tests/netedit/basic/quit/saving/meandatas/test.py index 858ed3909e3b..8988ae940bc9 100644 --- a/tests/netedit/basic/quit/save_additionals/test.py +++ b/tests/netedit/basic/quit/saving/meandatas/test.py @@ -60,8 +60,8 @@ # save network netedit.saveNetwork(True, referencePosition) -# save routes -netedit.saveDemandElements(True, referencePosition) +# save additionals +netedit.saveAdditionalElements(True, referencePosition) -# quit netedit saving all -netedit.quit(neteditProcess, False, False, True, True, False, False) +# quit netedit without saving demand +netedit.quit(neteditProcess, False, False, False, False, True, False) diff --git a/tests/netedit/basic/quit/saving/network/additionals.netedit b/tests/netedit/basic/quit/saving/network/additionals.netedit new file mode 100644 index 000000000000..cb4b823c992b --- /dev/null +++ b/tests/netedit/basic/quit/saving/network/additionals.netedit @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/network/errors.netedit b/tests/netedit/basic/quit/saving/network/errors.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/network/errors.neteditcheckoutput b/tests/netedit/basic/quit/saving/network/errors.neteditcheckoutput new file mode 100644 index 000000000000..0cc2397fa705 --- /dev/null +++ b/tests/netedit/basic/quit/saving/network/errors.neteditcheckoutput @@ -0,0 +1,2 @@ +Error: File 'net.netedit' is not accessible (No such file or directory). +Quitting (on error). diff --git a/tests/netedit/basic/quit/saving/network/guisettingsoutput.netedit b/tests/netedit/basic/quit/saving/network/guisettingsoutput.netedit new file mode 100644 index 000000000000..a6254b1b5e8f --- /dev/null +++ b/tests/netedit/basic/quit/saving/network/guisettingsoutput.netedit @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/netedit/basic/quit/saving/network/log.netedit b/tests/netedit/basic/quit/saving/network/log.netedit new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/saving/network/meandatas.netedit b/tests/netedit/basic/quit/saving/network/meandatas.netedit new file mode 100644 index 000000000000..4817a589d55c --- /dev/null +++ b/tests/netedit/basic/quit/saving/network/meandatas.netedit @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/tests/netedit/basic/quit/save_network/output.netedit b/tests/netedit/basic/quit/saving/network/output.netedit similarity index 100% rename from tests/netedit/basic/quit/save_network/output.netedit rename to tests/netedit/basic/quit/saving/network/output.netedit diff --git a/tests/netedit/basic/quit/saving/network/output.neteditcheckoutput b/tests/netedit/basic/quit/saving/network/output.neteditcheckoutput new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/netedit/basic/quit/save_network/routes.netedit b/tests/netedit/basic/quit/saving/network/routes.netedit similarity index 81% rename from tests/netedit/basic/quit/save_network/routes.netedit rename to tests/netedit/basic/quit/saving/network/routes.netedit index 93baa4404482..51d9b84e7fe4 100644 --- a/tests/netedit/basic/quit/save_network/routes.netedit +++ b/tests/netedit/basic/quit/saving/network/routes.netedit @@ -1,6 +1,6 @@ - diff --git a/tests/netedit/basic/quit/no_save_network/test.py b/tests/netedit/basic/quit/saving/network/test.py similarity index 100% rename from tests/netedit/basic/quit/no_save_network/test.py rename to tests/netedit/basic/quit/saving/network/test.py diff --git a/tests/netedit/basic/quit/saving/testsuite.netedit b/tests/netedit/basic/quit/saving/testsuite.netedit new file mode 100644 index 000000000000..6b7a645c4515 --- /dev/null +++ b/tests/netedit/basic/quit/saving/testsuite.netedit @@ -0,0 +1,11 @@ +all + +network + +additionals + +demand + +data + +meandatas diff --git a/tests/netedit/basic/quit/saving/testsuite.neteditcheckoutput b/tests/netedit/basic/quit/saving/testsuite.neteditcheckoutput new file mode 100644 index 000000000000..6b7a645c4515 --- /dev/null +++ b/tests/netedit/basic/quit/saving/testsuite.neteditcheckoutput @@ -0,0 +1,11 @@ +all + +network + +additionals + +demand + +data + +meandatas diff --git a/tests/netedit/basic/quit/testsuite.netedit b/tests/netedit/basic/quit/testsuite.netedit index 24a3320b52f7..eb0f9fd3ceeb 100644 --- a/tests/netedit/basic/quit/testsuite.netedit +++ b/tests/netedit/basic/quit/testsuite.netedit @@ -1,15 +1,3 @@ -no_save +saving -no_save_network - -no_save_additionals - -no_save_demand - -save_network - -save_additionals - -save_demand - -save_all +no_saving diff --git a/tests/netedit/basic/quit/testsuite.neteditcheckoutput b/tests/netedit/basic/quit/testsuite.neteditcheckoutput index 45fea354f33d..eb0f9fd3ceeb 100644 --- a/tests/netedit/basic/quit/testsuite.neteditcheckoutput +++ b/tests/netedit/basic/quit/testsuite.neteditcheckoutput @@ -1,9 +1,3 @@ -no_save_additionals +saving -no_save_demand - -save_additionals - -save_demand - -save_all +no_saving diff --git a/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/errors.netedit b/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/errors.netedit index e69de29bb2d1..adafb52a0631 100644 --- a/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/errors.netedit +++ b/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/errors.netedit @@ -0,0 +1,3 @@ +Error: invalid character 0x8 in attribute value 'value' +Error: (At line/column 2/3180). +Error: Error parsing template of tool: cadytsIterate (Could not load template ''.) diff --git a/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/meandatas.netedit b/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/meandatas.netedit index dcfebe2b2846..6e9f2392ba78 100644 --- a/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/meandatas.netedit +++ b/tests/netedit/elements/meandatas/edgedata/inspect/exclude_empty/meandatas.netedit @@ -1,6 +1,6 @@ - - + diff --git a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/errors.netedit b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/errors.netedit index 2d451f2429e4..a218b0c2d1c6 100644 --- a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/errors.netedit +++ b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/errors.netedit @@ -1,2 +1,6 @@ +Error: invalid character 0x8 in attribute value 'value' +Error: (At line/column 2/3180). +Error: Error parsing template of tool: cadytsIterate (Could not load template ''.) Error: Attribute 'excludeEmpty' in definition of edgeData 'ed_0' is empty. -Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.10Dec124538.11152\netedit.gui\elements\meandatas\edgedata\load\exclude_empty\datas.med.add.xml failed. +Error: Could not build edgeData with ID 'ed_1' in netedit; Invalid value 'dummy' for excludeEmpty. +Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.30Jan121542.12896\netedit.gui\elements\meandatas\edgedata\load\exclude_empty\datas.med.add.xml failed. diff --git a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/log.netedit b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/log.netedit index 2d451f2429e4..e2193b10fa7a 100644 --- a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/log.netedit +++ b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/log.netedit @@ -1,2 +1,3 @@ Error: Attribute 'excludeEmpty' in definition of edgeData 'ed_0' is empty. -Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.10Dec124538.11152\netedit.gui\elements\meandatas\edgedata\load\exclude_empty\datas.med.add.xml failed. +Error: Could not build edgeData with ID 'ed_1' in netedit; Invalid value 'dummy' for excludeEmpty. +Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.30Jan121542.12896\netedit.gui\elements\meandatas\edgedata\load\exclude_empty\datas.med.add.xml failed. diff --git a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/meandatas.netedit b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/meandatas.netedit index 8b339a57b011..e33e59ec6d6f 100644 --- a/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/meandatas.netedit +++ b/tests/netedit/elements/meandatas/edgedata/load/exclude_empty/meandatas.netedit @@ -1,6 +1,6 @@ - - - + diff --git a/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/errors.netedit b/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/errors.netedit index e69de29bb2d1..adafb52a0631 100644 --- a/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/errors.netedit +++ b/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/errors.netedit @@ -0,0 +1,3 @@ +Error: invalid character 0x8 in attribute value 'value' +Error: (At line/column 2/3180). +Error: Error parsing template of tool: cadytsIterate (Could not load template ''.) diff --git a/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/meandatas.netedit b/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/meandatas.netedit index 7d0bb615723a..a68345288040 100644 --- a/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/meandatas.netedit +++ b/tests/netedit/elements/meandatas/lanedata/inspect/exclude_empty/meandatas.netedit @@ -1,6 +1,6 @@ - - + diff --git a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/errors.netedit b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/errors.netedit index 33f471afd7a0..befb2a464042 100644 --- a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/errors.netedit +++ b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/errors.netedit @@ -1,2 +1,6 @@ +Error: invalid character 0x8 in attribute value 'value' +Error: (At line/column 2/3180). +Error: Error parsing template of tool: cadytsIterate (Could not load template ''.) Error: Attribute 'excludeEmpty' in definition of laneData 'ld_0' is empty. -Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.10Dec144005.15220\netedit.gui\elements\meandatas\lanedata\load\exclude_empty\datas.med.add.xml failed. +Error: Could not build edgeData with ID 'ld_1' in netedit; Invalid value 'dummy' for excludeEmpty. +Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.30Jan121542.12896\netedit.gui\elements\meandatas\lanedata\load\exclude_empty\datas.med.add.xml failed. diff --git a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/log.netedit b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/log.netedit index 33f471afd7a0..9617634818ae 100644 --- a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/log.netedit +++ b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/log.netedit @@ -1,2 +1,3 @@ Error: Attribute 'excludeEmpty' in definition of laneData 'ld_0' is empty. -Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.10Dec144005.15220\netedit.gui\elements\meandatas\lanedata\load\exclude_empty\datas.med.add.xml failed. +Error: Could not build edgeData with ID 'ld_1' in netedit; Invalid value 'dummy' for excludeEmpty. +Error: Loading of C:\Users\alva_pa\.texttest\tmp\netedit.gui.30Jan121542.12896\netedit.gui\elements\meandatas\lanedata\load\exclude_empty\datas.med.add.xml failed. diff --git a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/meandatas.netedit b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/meandatas.netedit index 15d94880e91f..513eebd46025 100644 --- a/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/meandatas.netedit +++ b/tests/netedit/elements/meandatas/lanedata/load/exclude_empty/meandatas.netedit @@ -1,6 +1,6 @@ - - - + diff --git a/tests/sumo/pedestrian_model/jupedsim/bad_state_bug/fcd.sumo b/tests/sumo/pedestrian_model/jupedsim/bad_state_bug/fcd.sumo index e9d6fcce07b1..92504792fc9c 100644 --- a/tests/sumo/pedestrian_model/jupedsim/bad_state_bug/fcd.sumo +++ b/tests/sumo/pedestrian_model/jupedsim/bad_state_bug/fcd.sumo @@ -1,6 +1,6 @@ - @@ -89,7 +89,7 @@ - + @@ -132,7 +132,7 @@ - + @@ -384,6 +384,14 @@ + + + + + + + + @@ -479,7 +487,7 @@ - + @@ -487,7 +495,7 @@ - + diff --git a/tests/tools/import/OSM/webWizard/osmstops.tools b/tests/tools/import/OSM/webWizard/osmstops.tools index e17d9b3d35e0..b9c4bf1d2796 100644 --- a/tests/tools/import/OSM/webWizard/osmstops.tools +++ b/tests/tools/import/OSM/webWizard/osmstops.tools @@ -1,11 +1,11 @@ - @@ -422,14 +422,14 @@ - + - + diff --git a/tests/tools/import/OSM/webWizard/output.tools b/tests/tools/import/OSM/webWizard/output.tools index 9989088574b3..cc5b2f8cd07d 100644 --- a/tests/tools/import/OSM/webWizard/output.tools +++ b/tests/tools/import/OSM/webWizard/output.tools @@ -1,9 +1,9 @@ Success. Written configuration to 'osm.polycfg' -Parsing network projection from 'osm.net.xml.gz' ... done (6ms). -Parsing nodes from osm-file '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (244ms). -Parsing relations from osm-file '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (167ms). -Parsing edges from osm-file '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (186ms). +Parsing network projection from 'osm.net.xml.gz' ... done (21ms). +Parsing nodes from osm-file '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (244ms). +Parsing relations from osm-file '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (173ms). +Parsing edges from osm-file '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/osm_bbox.osm.xml' ... done (193ms). Assembled polygon from relation '3619' (name:Altes Museum) Assembled polygon from relation '6647' (name:Humboldt-Universität zu Berlin) Assembled polygon from relation '23745' (name:Altes Stadthaus) @@ -141,10 +141,12 @@ Assembled polygon from relation '8249214' (name:Hof V) Assembled polygon from relation '8249215' (name:) Assembled polygon from relation '8249216' (name:) Success. -Building scenario in '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test'. +Building scenario in '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test'. generating trips... Skipping line '2194813' because it only drives at night Skipping line '2194814' because it only drives at night +Cannot extend route to fringe for line '2227743' (not enough edges given) +Cannot extend route to fringe for line '2227744' (not enough edges given) Cannot extend route to fringe for line '2669183' (not enough edges given) Cannot extend route to fringe for line '2669184' (not enough edges given) Cannot extend route to fringe for line '2679013' (not enough edges given) @@ -153,10 +155,10 @@ Cannot extend route before first stop for line '300432' (stop edge 25946661 not Cannot extend route after last stop for line '300432' (stop edge 25946661 not in route) Cannot extend route before first stop for line '6593455' (stop edge 25946661 not in route) Cannot extend route after last stop for line '6593455' (stop edge 25946661 not in route) -Imported 84 lines with 317 stops and skipped 2 lines +Imported 86 lines with 319 stops and skipped 2 lines bus: 27 light_rail: 18 - subway: 6 + subway: 8 train: 13 tram: 20 done. @@ -172,56 +174,56 @@ Success. Success. Success. Written configuration to 'osm.sumocfg' -Loading net-file from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.net.xml.gz' ... done (270ms). -Loading additional-files from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.poly.xml.gz' ... done (112ms). -Loading additional-files from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm_stops.add.xml' ... done (8ms). -Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm_pt.rou.xml' -Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.bicycle.trips.xml' -Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.passenger.trips.xml' -Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.pedestrian.rou.xml' -Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.07Jan104829.1566787/tools/import/OSM/webWizard/test/osm.ship.trips.xml' +Loading net-file from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.net.xml.gz' ... done (251ms). +Loading additional-files from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.poly.xml.gz' ... done (104ms). +Loading additional-files from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm_stops.add.xml' ... done (8ms). +Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm_pt.rou.xml' +Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.bicycle.trips.xml' +Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.passenger.trips.xml' +Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.pedestrian.rou.xml' +Loading route-files incrementally from '/home/erdm_ja/.texttest/tmp/tools.30Jan103613.2789103/tools/import/OSM/webWizard/test/osm.ship.trips.xml' Loading done. -Simulation version v1_21_0+1697-7fb9a6a7246 started with time: 0.00. -Simulation ended at time: 3179.00. +Simulation version v1_21_0+2127-1e2a421b562 started with time: 0.00. +Simulation ended at time: 3103.00. Reason: All vehicles have left the simulation. Performance: - Duration: 1.17s - Real time factor: 2726.42 - UPS: 119502.572899 - UPS-Persons: 123560.891938 + Duration: 1.10s + Real time factor: 2823.48 + UPS: 127151.956324 + UPS-Persons: 133719.745223 Vehicles: - Inserted: 414 + Inserted: 420 Running: 0 Waiting: 0 Persons: Inserted: 183 Running: 0 -Statistics (avg of 344): - RouteLength: 1881.94 +Statistics (avg of 350): + RouteLength: 1857.20 Speed: 6.57 - Duration: 327.08 - WaitingTime: 54.36 - TimeLoss: 112.88 - DepartDelay: 3.81 + Duration: 322.35 + WaitingTime: 53.86 + TimeLoss: 111.59 + DepartDelay: 3.85 Bike Statistics (avg of 70): RouteLength: 1576.91 - Speed: 4.20 - Duration: 383.21 - WaitingTime: 51.66 - TimeLoss: 87.52 - DepartDelay: 0.48 -Pedestrian Statistics (avg of 434 walks): - RouteLength: 257.11 - Duration: 213.71 - TimeLoss: 28.19 -Ride Statistics (avg of 169 rides): - WaitingTime: 107.66 - RouteLength: 928.01 - Duration: 118.07 - Bus: 57 - Train: 107 - Aborted: 5 -DijkstraRouter answered 6475 queries and explored 10.80 edges on average. + Speed: 4.21 + Duration: 384.51 + WaitingTime: 52.71 + TimeLoss: 88.81 + DepartDelay: 0.46 +Pedestrian Statistics (avg of 433 walks): + RouteLength: 254.50 + Duration: 211.18 + TimeLoss: 27.86 +Ride Statistics (avg of 172 rides): + WaitingTime: 110.75 + RouteLength: 898.15 + Duration: 113.13 + Bus: 56 + Train: 109 + Aborted: 7 +DijkstraRouter answered 6422 queries and explored 10.86 edges on average. DijkstraRouter spent 0.01s answering queries (0.00ms on average). -DijkstraRouter answered 259 queries and explored 576.56 edges on average. -DijkstraRouter spent 0.03s answering queries (0.12ms on average). +DijkstraRouter answered 259 queries and explored 576.44 edges on average. +DijkstraRouter spent 0.03s answering queries (0.13ms on average). diff --git a/tests/tools/import/OSM/webWizard/ptroutes.tools b/tests/tools/import/OSM/webWizard/ptroutes.tools index 2fb936a2a82a..f97c59a6bf1c 100644 --- a/tests/tools/import/OSM/webWizard/ptroutes.tools +++ b/tests/tools/import/OSM/webWizard/ptroutes.tools @@ -1,14 +1,14 @@ - + + + + + + @@ -91,38 +97,38 @@ - - - - - + - - - + + + - - + + + + + + - + @@ -168,7 +174,7 @@ - + @@ -182,6 +188,11 @@ + + + + + @@ -195,50 +206,36 @@ - - - - - - + - + - + - - - - - - + + + - - - + + + - - - - - + + - - - - - + + @@ -250,15 +247,8 @@ - - - - - - - - - + + @@ -268,22 +258,30 @@ - - + + + + + + + + + + + + + + + + + + - - - - - - - - @@ -295,56 +293,48 @@ + + + + + + + + - + - - - + + + - - - - - - - - - + + - - - - + + + + - - - - - + + + - - - + + - - - - - - - - - - + + + + @@ -355,26 +345,23 @@ + + + + + + + + + + - - - - - - - - - - - - - - - + + @@ -392,6 +379,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -399,30 +406,14 @@ - - - - - - - - - - + - - - - - - - - - - - - - + + + + + + @@ -438,13 +429,28 @@ + + + + + + + + + - - + + + + + + + + @@ -458,12 +464,12 @@ - - - - - - + + + + + + @@ -476,37 +482,37 @@ - + - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + - - - - - - + + + + + + @@ -545,6 +551,14 @@ + + + + + + + + @@ -569,10 +583,6 @@ - - - - @@ -581,14 +591,18 @@ - - + + + + + + @@ -623,9 +637,9 @@ - + - + @@ -633,71 +647,59 @@ - + + + + + - + - + - - - - - + - + - - - - - + - + - - - + + + - - - - - + - - - - - - - + + + - + @@ -705,15 +707,23 @@ - + + + + + + + + + + + + + - - - - - + @@ -721,67 +731,59 @@ - + - - + + + + + + - + + + + + - + - - - - - - - - - - - - - + - - - - - - - + + + - - - + + + - - - + + + - + - + @@ -789,23 +791,27 @@ - - - - - - - - - - - + + + - + + + + + + + + + + + + + @@ -813,19 +819,27 @@ - + + + + + - + + + + + - + @@ -833,19 +847,19 @@ - + - - - - - + - + + + + + diff --git a/tests/traci/set_variable/Vehicle/MoveToXY/failed/errors.traci b/tests/traci/set_variable/Vehicle/MoveToXY/failed/errors.traci index b58b9984a2b0..b080b69b54dd 100644 --- a/tests/traci/set_variable/Vehicle/MoveToXY/failed/errors.traci +++ b/tests/traci/set_variable/Vehicle/MoveToXY/failed/errors.traci @@ -1 +1,4 @@ -Error: Answered with error to command 0xc4: Could not map vehicle 'veh0', distance to road is 111.60. +TraCIAPI is deprecated. Please use libtraci instead, see https://sumo.dlr.de/docs/Libtraci.html. +#Error while connecting: tcpip::Socket::connect() @ socket: Connection refused +TraCIAPI is deprecated. Please use libtraci instead, see https://sumo.dlr.de/docs/Libtraci.html. +Error: Answered with error to command 0xc4: Could not map vehicle 'veh0', distance to road is 110.00. diff --git a/tests/traci/set_variable/Vehicle/MoveToXY/failed/testclient_out.traci b/tests/traci/set_variable/Vehicle/MoveToXY/failed/testclient_out.traci index ca0210fbfb78..d6b1e94873a1 100644 --- a/tests/traci/set_variable/Vehicle/MoveToXY/failed/testclient_out.traci +++ b/tests/traci/set_variable/Vehicle/MoveToXY/failed/testclient_out.traci @@ -1,4 +1,4 @@ -TraCITestClient output file. Date: Fri Aug 16 10:25:33 2019 +TraCITestClient output file. Date: Thu Jan 30 13:10:17 2025 -> Command sent: : @@ -18,7 +18,7 @@ TraCITestClient output file. Date: Fri Aug 16 10:25:33 2019 -> Command sent: : domID=196 varID=180 objID=veh0 -.. Answered with error to command (196), [description: Could not map vehicle 'veh0', distance to road is 111.60.] +.. Answered with error to command (196), [description: Could not map vehicle 'veh0', distance to road is 110.00.] -> Command sent: : .. Command acknowledged (2), [description: ] diff --git a/tools/build_config/templates.py b/tools/build_config/templates.py index fbdc1062e7f5..39eeed0fe1e2 100755 --- a/tools/build_config/templates.py +++ b/tools/build_config/templates.py @@ -223,7 +223,7 @@ "assign/duaIterate_analysis.py", "assign/duaIterate_reroutingAnalysis.py", "assign/one-shot.py", - "assign/cadytsIterate.py", + # "assign/cadytsIterate.py", NOT_WORKING (on windows to due classpath default) "assign/costFunctionChecker.py", "assign/duaIterate.py", "detector/aggregateFlows.py", diff --git a/tools/osmGet.py b/tools/osmGet.py index b08037ed6618..ebeb28c6b3e7 100755 --- a/tools/osmGet.py +++ b/tools/osmGet.py @@ -82,6 +82,12 @@ def readCompressed(options, conn, urlpath, query, roadTypesJSON, getShapes, file regvQueryString = '' % (category, typeList) queryStringNode.append(commonQueryStringNode % (regvQueryString, query)) + if queryStringNode: + # include all nodes that are relevant for public transport + regvQueryString = '' + queryStringNode.append(commonQueryStringNode % (regvQueryString, query)) + + if queryStringNode and getShapes: unionQueryString = """