LCOV - code coverage report
Current view: top level - src/microsim - MSFrame.cpp (source / functions) Coverage Total Hit
Test: lcov.info Lines: 96.9 % 771 747
Test Date: 2026-03-26 16:31:35 Functions: 100.0 % 4 4

            Line data    Source code
       1              : /****************************************************************************/
       2              : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3              : // Copyright (C) 2002-2026 German Aerospace Center (DLR) and others.
       4              : // This program and the accompanying materials are made available under the
       5              : // terms of the Eclipse Public License 2.0 which is available at
       6              : // https://www.eclipse.org/legal/epl-2.0/
       7              : // This Source Code may also be made available under the following Secondary
       8              : // Licenses when the conditions for such availability set forth in the Eclipse
       9              : // Public License 2.0 are satisfied: GNU General Public License, version 2
      10              : // or later which is available at
      11              : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      12              : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      13              : /****************************************************************************/
      14              : /// @file    MSFrame.cpp
      15              : /// @author  Daniel Krajzewicz
      16              : /// @author  Eric Nicolay
      17              : /// @author  Jakob Erdmann
      18              : /// @author  Axel Wegener
      19              : /// @author  Thimor Bohn
      20              : /// @author  Mario Krumnow
      21              : /// @author  Michael Behrisch
      22              : /// @date    Sept 2002
      23              : ///
      24              : // Sets and checks options for microsim; inits global outputs and settings
      25              : /****************************************************************************/
      26              : #include <config.h>
      27              : 
      28              : #include <iostream>
      29              : #include <iomanip>
      30              : #include <fstream>
      31              : #include <ctime>
      32              : #include <utils/options/OptionsCont.h>
      33              : #include <utils/options/Option.h>
      34              : #include <utils/common/MsgHandler.h>
      35              : #include <utils/common/UtilExceptions.h>
      36              : #include <utils/common/ToString.h>
      37              : #include <utils/common/StringUtils.h>
      38              : #include <utils/geom/GeoConvHelper.h>
      39              : #include <utils/iodevices/OutputDevice.h>
      40              : #include <utils/vehicle/SUMOVehicleParserHelper.h>
      41              : #include <microsim/MSBaseVehicle.h>
      42              : #include <microsim/MSJunction.h>
      43              : #include <microsim/MSRoute.h>
      44              : #include <microsim/MSNet.h>
      45              : #include <microsim/MSLane.h>
      46              : #include <microsim/MSEdge.h>
      47              : #include <microsim/MSGlobals.h>
      48              : #include <microsim/lcmodels/MSAbstractLaneChangeModel.h>
      49              : #include <microsim/devices/MSDevice.h>
      50              : #include <microsim/devices/MSDevice_Vehroutes.h>
      51              : #include <microsim/output/MSStopOut.h>
      52              : #include <microsim/traffic_lights/MSRailSignalControl.h>
      53              : #include <utils/common/RandHelper.h>
      54              : #include <utils/common/SystemFrame.h>
      55              : #include "MSFrame.h"
      56              : 
      57              : 
      58              : // ===========================================================================
      59              : // method definitions
      60              : // ===========================================================================
      61              : void
      62        44303 : MSFrame::fillOptions() {
      63        44303 :     OptionsCont& oc = OptionsCont::getOptions();
      64        88606 :     oc.addCallExample("-b 0 -e 1000 -n net.xml -r routes.xml", TL("start a simulation from time 0 to 1000 with given net and routes"));
      65        88606 :     oc.addCallExample("-c munich_config.cfg", TL("start with a configuration file"));
      66        88606 :     oc.addCallExample("--help", TL("print help"));
      67              : 
      68              :     // insert options sub-topics
      69        44303 :     SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too
      70        44303 :     oc.addOptionSubTopic("Input");
      71        44303 :     oc.addOptionSubTopic("Output");
      72        44303 :     oc.addOptionSubTopic("Time");
      73        44303 :     oc.addOptionSubTopic("Processing");
      74        44303 :     oc.addOptionSubTopic("Routing");
      75              : 
      76              :     // register configuration options
      77              :     //  register input options
      78        44303 :     oc.doRegister("net-file", 'n', new Option_FileName());
      79        88606 :     oc.addSynonyme("net-file", "net");
      80        88606 :     oc.addDescription("net-file", "Input", TL("Load road network description from FILE"));
      81        88606 :     oc.addXMLDefault("net-file", "net");
      82              : 
      83        44303 :     oc.doRegister("route-files", 'r', new Option_FileName());
      84        88606 :     oc.addSynonyme("route-files", "routes");
      85        88606 :     oc.addDescription("route-files", "Input", TL("Load routes descriptions from FILE(s)"));
      86              : 
      87        44303 :     oc.doRegister("additional-files", 'a', new Option_FileName());
      88        88606 :     oc.addSynonyme("additional-files", "additional");
      89        88606 :     oc.addDescription("additional-files", "Input", TL("Load further descriptions from FILE(s)"));
      90              : 
      91        44303 :     oc.doRegister("weight-files", 'w', new Option_FileName());
      92        88606 :     oc.addSynonyme("weight-files", "weights");
      93        88606 :     oc.addDescription("weight-files", "Input", TL("Load edge/lane weights for online rerouting from FILE"));
      94        88606 :     oc.doRegister("weight-attribute", 'x', new Option_String("traveltime"));
      95        88606 :     oc.addSynonyme("weight-attribute", "measure", true);
      96        88606 :     oc.addDescription("weight-attribute", "Input", TL("Name of the xml attribute which gives the edge weight"));
      97              : 
      98        44303 :     oc.doRegister("load-state", new Option_FileName());//!!! check, describe
      99        88606 :     oc.addDescription("load-state", "Input", TL("Loads a network state from FILE"));
     100        88606 :     oc.doRegister("load-state.offset", new Option_String("0", "TIME"));//!!! check, describe
     101        88606 :     oc.addDescription("load-state.offset", "Input", TL("Shifts all times loaded from a saved state by the given offset"));
     102       177212 :     oc.doRegister("load-state.remove-vehicles", new Option_StringVector(StringVector({""})));
     103        88606 :     oc.addDescription("load-state.remove-vehicles", "Input", TL("Removes vehicles with the given IDs from the loaded state"));
     104              : 
     105        44303 :     oc.doRegister("junction-taz", new Option_Bool(false));
     106        88606 :     oc.addDescription("junction-taz", "Input", TL("Initialize a TAZ for every junction to use attributes toJunction and fromJunction"));
     107              : 
     108              :     // need to do this here to be able to check for network and route input options
     109        44303 :     SystemFrame::addReportOptions(oc);
     110              : 
     111              :     //  register output options
     112        44303 :     oc.doRegister("netstate-dump", new Option_FileName());
     113        88606 :     oc.addSynonyme("netstate-dump", "ndump");
     114        88606 :     oc.addSynonyme("netstate-dump", "netstate");
     115        88606 :     oc.addSynonyme("netstate-dump", "netstate-output");
     116        88606 :     oc.addDescription("netstate-dump", "Output", TL("Save complete network states into FILE"));
     117        44303 :     oc.doRegister("netstate-dump.empty-edges", new Option_Bool(false));
     118        88606 :     oc.addSynonyme("netstate-dump.empty-edges", "netstate.empty-edges");
     119        88606 :     oc.addSynonyme("netstate-dump.empty-edges", "netstate-output.empty-edges");
     120        88606 :     oc.addSynonyme("netstate-dump.empty-edges", "dump-empty-edges", true);
     121        88606 :     oc.addDescription("netstate-dump.empty-edges", "Output", TL("Write also empty edges completely when dumping"));
     122        44303 :     oc.doRegister("netstate-dump.precision", new Option_Integer(2));
     123        88606 :     oc.addSynonyme("netstate-dump.precision", "netstate.precision");
     124        88606 :     oc.addSynonyme("netstate-dump.precision", "netstate-output.precision");
     125        88606 :     oc.addSynonyme("netstate-dump.precision", "dump-precision", true);
     126        88606 :     oc.addDescription("netstate-dump.precision", "Output", TL("Write positions and speeds with the given precision (default 2)"));
     127              : 
     128        44303 :     oc.doRegister("emission-output", new Option_FileName());
     129        88606 :     oc.addDescription("emission-output", "Output", TL("Save the emission values of each vehicle"));
     130        44303 :     oc.doRegister("emission-output.precision", new Option_Integer(2));
     131        88606 :     oc.addDescription("emission-output.precision", "Output", TL("Write emission values with the given precision (default 2)"));
     132        44303 :     oc.doRegister("emission-output.geo", new Option_Bool(false));
     133        88606 :     oc.addDescription("emission-output.geo", "Output", TL("Save the positions in emission output using geo-coordinates (lon/lat)"));
     134        44303 :     oc.doRegister("emission-output.step-scaled", new Option_Bool(false));
     135        88606 :     oc.addDescription("emission-output.step-scaled", "Output", TL("Write emission values scaled to the step length rather than as per-second values"));
     136        44303 :     oc.doRegister("emission-output.attributes", new Option_StringVector());
     137        88606 :     oc.addDescription("emission-output.attributes", "Output", TL("List attributes that should be included in the emission output"));
     138              : 
     139        44303 :     oc.doRegister("battery-output", new Option_FileName());
     140        88606 :     oc.addDescription("battery-output", "Output", TL("Save the battery values of each vehicle"));
     141        44303 :     oc.doRegister("battery-output.precision", new Option_Integer(2));
     142        88606 :     oc.addDescription("battery-output.precision", "Output", TL("Write battery values with the given precision (default 2)"));
     143              : 
     144        44303 :     oc.doRegister("elechybrid-output", new Option_FileName());
     145        88606 :     oc.addDescription("elechybrid-output", "Output", TL("Save the elecHybrid values of each vehicle"));
     146        44303 :     oc.doRegister("elechybrid-output.precision", new Option_Integer(2));
     147        88606 :     oc.addDescription("elechybrid-output.precision", "Output", TL("Write elecHybrid values with the given precision (default 2)"));
     148        44303 :     oc.doRegister("elechybrid-output.aggregated", new Option_Bool(false));
     149        88606 :     oc.addDescription("elechybrid-output.aggregated", "Output", TL("Write elecHybrid values into one aggregated file"));
     150              : 
     151        44303 :     oc.doRegister("chargingstations-output", new Option_FileName());
     152        88606 :     oc.addDescription("chargingstations-output", "Output", TL("Write data of charging stations"));
     153        44303 :     oc.doRegister("chargingstations-output.aggregated", new Option_Bool(false));
     154        88606 :     oc.addDescription("chargingstations-output.aggregated", "Output", TL("Write aggregated charging event data instead of single time steps"));
     155        44303 :     oc.doRegister("chargingstations-output.aggregated.write-unfinished", new Option_Bool(false));
     156        88606 :     oc.addDescription("chargingstations-output.aggregated.write-unfinished", "Output", TL("Write aggregated charging event data for vehicles which have not arrived at simulation end"));
     157              : 
     158        44303 :     oc.doRegister("overheadwiresegments-output", new Option_FileName());
     159        88606 :     oc.addDescription("overheadwiresegments-output", "Output", TL("Write data of overhead wire segments"));
     160              : 
     161        44303 :     oc.doRegister("substations-output", new Option_FileName());
     162        88606 :     oc.addDescription("substations-output", "Output", TL("Write data of electrical substation stations"));
     163        44303 :     oc.doRegister("substations-output.precision", new Option_Integer(2));
     164        88606 :     oc.addDescription("substations-output.precision", "Output", TL("Write substation values with the given precision (default 2)"));
     165              : 
     166        44303 :     oc.doRegister("fcd-output", new Option_FileName());
     167        88606 :     oc.addDescription("fcd-output", "Output", TL("Save the Floating Car Data"));
     168        44303 :     oc.doRegister("fcd-output.geo", new Option_Bool(false));
     169        88606 :     oc.addDescription("fcd-output.geo", "Output", TL("Save the Floating Car Data using geo-coordinates (lon/lat)"));
     170        44303 :     oc.doRegister("fcd-output.signals", new Option_Bool(false));
     171        88606 :     oc.addDescription("fcd-output.signals", "Output", TL("Add the vehicle signal state to the FCD output (brake lights etc.)"));
     172        44303 :     oc.doRegister("fcd-output.distance", new Option_Bool(false));
     173        88606 :     oc.addDescription("fcd-output.distance", "Output", TL("Add kilometrage to the FCD output (linear referencing)"));
     174        44303 :     oc.doRegister("fcd-output.acceleration", new Option_Bool(false));
     175        88606 :     oc.addDescription("fcd-output.acceleration", "Output", TL("Add acceleration to the FCD output"));
     176        44303 :     oc.doRegister("fcd-output.max-leader-distance", new Option_Float(-1));
     177        88606 :     oc.addDescription("fcd-output.max-leader-distance", "Output", TL("Add leader vehicle information to the FCD output (within the given distance)"));
     178        44303 :     oc.doRegister("fcd-output.params", new Option_StringVector());
     179        88606 :     oc.addDescription("fcd-output.params", "Output", TL("Add generic parameter values to the FCD output"));
     180        44303 :     oc.doRegister("fcd-output.filter-edges.input-file", new Option_FileName());
     181        88606 :     oc.addDescription("fcd-output.filter-edges.input-file", "Output", TL("Restrict fcd output to the edge selection from the given input file"));
     182        44303 :     oc.doRegister("fcd-output.attributes", new Option_StringVector());
     183        88606 :     oc.addDescription("fcd-output.attributes", "Output", TL("List attributes that should be included in the FCD output"));
     184        44303 :     oc.doRegister("fcd-output.filter-shapes", new Option_StringVector());
     185        88606 :     oc.addDescription("fcd-output.filter-shapes", "Output", TL("List shape names that should be used to filter the FCD output"));
     186              : 
     187        44303 :     oc.doRegister("person-fcd-output", new Option_FileName());
     188        88606 :     oc.addSynonyme("person-fcd-output", "person-fcd");
     189        88606 :     oc.addDescription("person-fcd-output", "Output", TL("Save fcd for persons and container to separate FILE"));
     190              : 
     191        44303 :     oc.doRegister("device.ssm.filter-edges.input-file", new Option_FileName());
     192        88606 :     oc.addDescription("device.ssm.filter-edges.input-file", "Output", TL("Restrict SSM device output to the edge selection from the given input file"));
     193              : 
     194        44303 :     oc.doRegister("full-output", new Option_FileName());
     195        88606 :     oc.addDescription("full-output", "Output", TL("Save a lot of information for each timestep (very redundant)"));
     196              : 
     197        44303 :     oc.doRegister("queue-output", new Option_FileName());
     198        88606 :     oc.addDescription("queue-output", "Output", TL("Save the vehicle queues at the junctions (experimental)"));
     199        88606 :     oc.doRegister("queue-output.period", new Option_String("-1", "TIME"));
     200        88606 :     oc.addDescription("queue-output.period", "Output", TL("Save vehicle queues with the given period"));
     201              : 
     202        44303 :     oc.doRegister("vtk-output", new Option_FileName());
     203        88606 :     oc.addDescription("vtk-output", "Output", TL("Save complete vehicle positions inclusive speed values in the VTK Format (usage: /path/out will produce /path/out_$TIMESTEP$.vtp files)"));
     204        44303 :     oc.doRegister("amitran-output", new Option_FileName());
     205        88606 :     oc.addDescription("amitran-output", "Output", TL("Save the vehicle trajectories in the Amitran format"));
     206              : 
     207              : 
     208        44303 :     oc.doRegister("summary-output", new Option_FileName());
     209        88606 :     oc.addSynonyme("summary-output", "summary");
     210        88606 :     oc.addDescription("summary-output", "Output", TL("Save aggregated vehicle departure info into FILE"));
     211              : 
     212        88606 :     oc.doRegister("summary-output.period", new Option_String("-1", "TIME"));
     213        88606 :     oc.addDescription("summary-output.period", "Output", TL("Save summary-output with the given period"));
     214              : 
     215        44303 :     oc.doRegister("person-summary-output", new Option_FileName());
     216        88606 :     oc.addDescription("person-summary-output", "Output", TL("Save aggregated person counts into FILE"));
     217              : 
     218        44303 :     oc.doRegister("tripinfo-output", new Option_FileName());
     219        88606 :     oc.addSynonyme("tripinfo-output", "tripinfo");
     220        88606 :     oc.addDescription("tripinfo-output", "Output", TL("Save single vehicle trip info into FILE"));
     221              : 
     222        44303 :     oc.doRegister("tripinfo-output.write-unfinished", new Option_Bool(false));
     223        88606 :     oc.addDescription("tripinfo-output.write-unfinished", "Output", TL("Write tripinfo output for vehicles which have not arrived at simulation end"));
     224              : 
     225        44303 :     oc.doRegister("tripinfo-output.write-undeparted", new Option_Bool(false));
     226        88606 :     oc.addDescription("tripinfo-output.write-undeparted", "Output", TL("Write tripinfo output for vehicles which have not departed at simulation end because of depart delay"));
     227              : 
     228        44303 :     oc.doRegister("personinfo-output", new Option_FileName());
     229        88606 :     oc.addSynonyme("personinfo-output", "personinfo");
     230        88606 :     oc.addDescription("personinfo-output", "Output", TL("Save personinfo and containerinfo to separate FILE"));
     231              : 
     232        44303 :     oc.doRegister("vehroute-output", new Option_FileName());
     233        88606 :     oc.addSynonyme("vehroute-output", "vehroutes");
     234        88606 :     oc.addDescription("vehroute-output", "Output", TL("Save single vehicle route info into FILE"));
     235              : 
     236        44303 :     oc.doRegister("vehroute-output.exit-times", new Option_Bool(false));
     237        88606 :     oc.addSynonyme("vehroute-output.exit-times", "vehroutes.exit-times");
     238        88606 :     oc.addDescription("vehroute-output.exit-times", "Output", TL("Write the exit times for all edges"));
     239              : 
     240        44303 :     oc.doRegister("vehroute-output.last-route", new Option_Bool(false));
     241        88606 :     oc.addSynonyme("vehroute-output.last-route", "vehroutes.last-route");
     242        88606 :     oc.addDescription("vehroute-output.last-route", "Output", TL("Write the last route only"));
     243              : 
     244        44303 :     oc.doRegister("vehroute-output.sorted", new Option_Bool(false));
     245        88606 :     oc.addSynonyme("vehroute-output.sorted", "vehroutes.sorted");
     246        88606 :     oc.addDescription("vehroute-output.sorted", "Output", TL("Sorts the output by departure time"));
     247              : 
     248        44303 :     oc.doRegister("vehroute-output.dua", new Option_Bool(false));
     249        88606 :     oc.addSynonyme("vehroute-output.dua", "vehroutes.dua");
     250        88606 :     oc.addDescription("vehroute-output.dua", "Output", TL("Write the output in the duarouter alternatives style"));
     251              : 
     252        44303 :     oc.doRegister("vehroute-output.cost", new Option_Bool(false));
     253        88606 :     oc.addDescription("vehroute-output.cost", "Output", TL("Write costs for all routes"));
     254              : 
     255        44303 :     oc.doRegister("vehroute-output.intended-depart", new Option_Bool(false));
     256        88606 :     oc.addSynonyme("vehroute-output.intended-depart", "vehroutes.intended-depart");
     257        88606 :     oc.addDescription("vehroute-output.intended-depart", "Output", TL("Write the output with the intended instead of the real departure time"));
     258              : 
     259        44303 :     oc.doRegister("vehroute-output.route-length", new Option_Bool(false));
     260        88606 :     oc.addSynonyme("vehroute-output.route-length", "vehroutes.route-length");
     261        88606 :     oc.addDescription("vehroute-output.route-length", "Output", TL("Include total route length in the output"));
     262              : 
     263        44303 :     oc.doRegister("vehroute-output.write-unfinished", new Option_Bool(false));
     264        88606 :     oc.addDescription("vehroute-output.write-unfinished", "Output", TL("Write vehroute output for vehicles which have not arrived at simulation end"));
     265              : 
     266        44303 :     oc.doRegister("vehroute-output.skip-ptlines", new Option_Bool(false));
     267        88606 :     oc.addDescription("vehroute-output.skip-ptlines", "Output", TL("Skip vehroute output for public transport vehicles"));
     268              : 
     269        44303 :     oc.doRegister("vehroute-output.incomplete", new Option_Bool(false));
     270        88606 :     oc.addDescription("vehroute-output.incomplete", "Output", TL("Include invalid routes and route stubs in vehroute output"));
     271              : 
     272        44303 :     oc.doRegister("vehroute-output.stop-edges", new Option_Bool(false));
     273        88606 :     oc.addDescription("vehroute-output.stop-edges", "Output", TL("Include information about edges between stops"));
     274              : 
     275        44303 :     oc.doRegister("vehroute-output.speedfactor", new Option_Bool(false));
     276        88606 :     oc.addDescription("vehroute-output.speedfactor", "Output", TL("Write the vehicle speedFactor (defaults to 'true' if departSpeed is written)"));
     277              : 
     278        44303 :     oc.doRegister("vehroute-output.internal", new Option_Bool(false));
     279        88606 :     oc.addDescription("vehroute-output.internal", "Output", TL("Include internal edges in the output"));
     280              : 
     281        44303 :     oc.doRegister("personroute-output", new Option_FileName());
     282        88606 :     oc.addSynonyme("personroute-output", "personroutes");
     283        88606 :     oc.addDescription("personroute-output", "Output", TL("Save person and container routes to separate FILE"));
     284              : 
     285        44303 :     oc.doRegister("link-output", new Option_FileName());
     286        88606 :     oc.addDescription("link-output", "Output", TL("Save links states into FILE"));
     287              : 
     288        44303 :     oc.doRegister("railsignal-block-output", new Option_FileName());
     289        88606 :     oc.addDescription("railsignal-block-output", "Output", TL("Save railsignal-blocks into FILE"));
     290              : 
     291        44303 :     oc.doRegister("railsignal-vehicle-output", new Option_FileName());
     292        88606 :     oc.addDescription("railsignal-vehicle-output", "Output", TL("Record entry and exit times of vehicles for railsignal blocks into FILE"));
     293              : 
     294        44303 :     oc.doRegister("bt-output", new Option_FileName());
     295        88606 :     oc.addDescription("bt-output", "Output", TL("Save bluetooth visibilities into FILE (in conjunction with device.btreceiver and device.btsender)"));
     296              : 
     297        44303 :     oc.doRegister("lanechange-output", new Option_FileName());
     298        88606 :     oc.addDescription("lanechange-output", "Output", TL("Record lane changes and their motivations for all vehicles into FILE"));
     299              : 
     300        44303 :     oc.doRegister("lanechange-output.started", new Option_Bool(false));
     301        88606 :     oc.addDescription("lanechange-output.started", "Output", TL("Record start of lane change manoeuvres"));
     302              : 
     303        44303 :     oc.doRegister("lanechange-output.ended", new Option_Bool(false));
     304        88606 :     oc.addDescription("lanechange-output.ended", "Output", TL("Record end of lane change manoeuvres"));
     305              : 
     306        44303 :     oc.doRegister("lanechange-output.xy", new Option_Bool(false));
     307        88606 :     oc.addDescription("lanechange-output.xy", "Output", TL("Record coordinates of lane change manoeuvres"));
     308              : 
     309        44303 :     oc.doRegister("stop-output", new Option_FileName());
     310        88606 :     oc.addDescription("stop-output", "Output", TL("Record stops and loading/unloading of passenger and containers for all vehicles into FILE"));
     311        44303 :     oc.doRegister("stop-output.write-unfinished", new Option_Bool(false));
     312        88606 :     oc.addDescription("stop-output.write-unfinished", "Output", TL("Write stop output for stops which have not ended at simulation end"));
     313              : 
     314        44303 :     oc.doRegister("collision-output", new Option_FileName());
     315        88606 :     oc.addDescription("collision-output", "Output", TL("Write collision information into FILE"));
     316              : 
     317        44303 :     oc.doRegister("edgedata-output", new Option_FileName());
     318        88606 :     oc.addDescription("edgedata-output", "Output", TL("Write aggregated traffic statistics for all edges into FILE"));
     319        44303 :     oc.doRegister("lanedata-output", new Option_FileName());
     320        88606 :     oc.addDescription("lanedata-output", "Output", TL("Write aggregated traffic statistics for all lanes into FILE"));
     321              : 
     322        44303 :     oc.doRegister("statistic-output", new Option_FileName());
     323        88606 :     oc.addSynonyme("statistic-output", "statistics-output");
     324        88606 :     oc.addDescription("statistic-output", "Output", TL("Write overall statistics into FILE"));
     325              : 
     326        44303 :     oc.doRegister("deadlock-output", new Option_FileName());
     327        88606 :     oc.addDescription("deadlock-output", "Output", TL("Write reports on deadlocks FILE"));
     328              : 
     329              : #ifdef _DEBUG
     330              :     oc.doRegister("movereminder-output", new Option_FileName());
     331              :     oc.addDescription("movereminder-output", "Output", TL("Save movereminder states of selected vehicles into FILE"));
     332              :     oc.doRegister("movereminder-output.vehicles", new Option_StringVector());
     333              :     oc.addDescription("movereminder-output.vehicles", "Output", TL("List of vehicle ids which shall save their movereminder states"));
     334              : #endif
     335              : 
     336        44303 :     oc.doRegister("save-state.times", new Option_StringVector());
     337        88606 :     oc.addDescription("save-state.times", "Output", TL("Use TIME[] as times at which a network state written"));
     338        88606 :     oc.doRegister("save-state.period", new Option_String("-1", "TIME"));
     339        88606 :     oc.addDescription("save-state.period", "Output", TL("save state repeatedly after TIME period"));
     340        44303 :     oc.doRegister("save-state.period.keep", new Option_Integer(0));
     341        88606 :     oc.addDescription("save-state.period.keep", "Output", TL("Keep only the last INT periodic state files"));
     342       177212 :     oc.doRegister("save-state.prefix", new Option_FileName(StringVector({ "state" })));
     343        88606 :     oc.addDescription("save-state.prefix", "Output", TL("Prefix for network states"));
     344        88606 :     oc.doRegister("save-state.suffix", new Option_String(".xml.gz"));
     345        88606 :     oc.addDescription("save-state.suffix", "Output", TL("Suffix for network states (.xml.gz or .xml)"));
     346        44303 :     oc.doRegister("save-state.files", new Option_FileName());
     347        88606 :     oc.addDescription("save-state.files", "Output", TL("Files for network states"));
     348        44303 :     oc.doRegister("save-state.rng", new Option_Bool(false));
     349        88606 :     oc.addDescription("save-state.rng", "Output", TL("Save random number generator states"));
     350        44303 :     oc.doRegister("save-state.transportables", new Option_Bool(false));
     351        88606 :     oc.addDescription("save-state.transportables", "Output", TL("Save person and container states (experimental)"));
     352        44303 :     oc.doRegister("save-state.constraints", new Option_Bool(false));
     353        88606 :     oc.addDescription("save-state.constraints", "Output", TL("Save rail signal constraints"));
     354        44303 :     oc.doRegister("save-state.precision", new Option_Integer(2));
     355        88606 :     oc.addDescription("save-state.precision", "Output", TL("Write internal state values with the given precision (default 2)"));
     356              : 
     357              :     // register the simulation settings
     358        88606 :     oc.doRegister("begin", 'b', new Option_String("0", "TIME"));
     359        88606 :     oc.addDescription("begin", "Time", TL("Defines the begin time in seconds; The simulation starts at this time"));
     360              : 
     361        88606 :     oc.doRegister("end", 'e', new Option_String("-1", "TIME"));
     362        88606 :     oc.addDescription("end", "Time", TL("Defines the end time in seconds; The simulation ends at this time"));
     363              : 
     364        88606 :     oc.doRegister("step-length", new Option_String("1", "TIME"));
     365        88606 :     oc.addDescription("step-length", "Time", TL("Defines the step duration in seconds"));
     366              : 
     367        44303 :     oc.doRegister("step-method.ballistic", new Option_Bool(false));
     368        88606 :     oc.addDescription("step-method.ballistic", "Processing", TL("Whether to use ballistic method for the positional update of vehicles (default is a semi-implicit Euler method)."));
     369              : 
     370        44303 :     oc.doRegister("extrapolate-departpos", new Option_Bool(false));
     371        88606 :     oc.addDescription("extrapolate-departpos", "Processing", TL("Whether vehicles that depart between simulation steps should extrapolate the depart position"));
     372              : 
     373        44303 :     oc.doRegister("threads", new Option_Integer(1));
     374        88606 :     oc.addDescription("threads", "Processing", TL("Defines the number of threads for parallel simulation"));
     375              : 
     376        44303 :     oc.doRegister("lateral-resolution", new Option_Float(-1));
     377        88606 :     oc.addDescription("lateral-resolution", "Processing", TL("Defines the resolution in m when handling lateral positioning within a lane (with -1 all vehicles drive at the center of their lane"));
     378              : 
     379              :     // register the processing options
     380        88606 :     oc.doRegister("route-steps", 's', new Option_String("200", "TIME"));
     381        88606 :     oc.addDescription("route-steps", "Processing", TL("Load routes for the next number of seconds ahead"));
     382              : 
     383        44303 :     oc.doRegister("no-internal-links", new Option_Bool(false));
     384        88606 :     oc.addDescription("no-internal-links", "Processing", TL("Disable (junction) internal links"));
     385              : 
     386        88606 :     oc.doRegister("ignore-junction-blocker", new Option_String("-1", "TIME"));
     387        88606 :     oc.addDescription("ignore-junction-blocker", "Processing", TL("Ignore vehicles which block the junction after they have been standing for SECONDS (-1 means never ignore)"));
     388              : 
     389        44303 :     oc.doRegister("ignore-route-errors", new Option_Bool(false));
     390        88606 :     oc.addDescription("ignore-route-errors", "Processing", TL("Do not check whether routes are connected"));
     391              : 
     392        44303 :     oc.doRegister("ignore-accidents", new Option_Bool(false));
     393        88606 :     oc.addDescription("ignore-accidents", "Processing", TL("Do not check whether accidents occur"));
     394              : 
     395        88606 :     oc.doRegister("collision.action", new Option_String("teleport"));
     396        88606 :     oc.addDescription("collision.action", "Processing", TL("How to deal with collisions: [none,warn,teleport,remove]"));
     397              : 
     398        88606 :     oc.doRegister("intermodal-collision.action", new Option_String("warn"));
     399        88606 :     oc.addDescription("intermodal-collision.action", "Processing", TL("How to deal with collisions between vehicle and pedestrian: [none,warn,teleport,remove]"));
     400              : 
     401        88606 :     oc.doRegister("collision.stoptime", new Option_String("0", "TIME"));
     402        88606 :     oc.addDescription("collision.stoptime", "Processing", TL("Let vehicle stop for TIME before performing collision.action (except for action 'none')"));
     403              : 
     404        88606 :     oc.doRegister("intermodal-collision.stoptime", new Option_String("0", "TIME"));
     405        88606 :     oc.addDescription("intermodal-collision.stoptime", "Processing", TL("Let vehicle stop for TIME before performing intermodal-collision.action (except for action 'none')"));
     406              : 
     407        44303 :     oc.doRegister("collision.check-junctions", new Option_Bool(false));
     408        88606 :     oc.addDescription("collision.check-junctions", "Processing", TL("Enables collisions checks on junctions"));
     409              : 
     410        44303 :     oc.doRegister("collision.check-junctions.mingap", new Option_Float(0));
     411        88606 :     oc.addDescription("collision.check-junctions.mingap", "Processing", TL("Increase or decrease sensitivity for junction collision check"));
     412              : 
     413        44303 :     oc.doRegister("collision.mingap-factor", new Option_Float(-1));
     414        88606 :     oc.addDescription("collision.mingap-factor", "Processing", TL("Sets the fraction of minGap that must be maintained to avoid collision detection. If a negative value is given, the carFollowModel parameter is used"));
     415              : 
     416        88606 :     oc.doRegister("keep-after-arrival", new Option_String("0", "TIME"));
     417        88606 :     oc.addDescription("keep-after-arrival", "Processing", TL("After a vehicle arrives, keep it in memory for the given TIME (for TraCI access)"));
     418              : 
     419        44303 :     oc.doRegister("max-num-vehicles", new Option_Integer(-1));
     420        88606 :     oc.addDescription("max-num-vehicles", "Processing", TL("Delay vehicle insertion to stay within the given maximum number"));
     421              : 
     422        44303 :     oc.doRegister("max-num-persons", new Option_Integer(-1));
     423        88606 :     oc.addDescription("max-num-persons", "Processing", TL("Delay person insertion to stay within the given maximum number"));
     424              : 
     425        44303 :     oc.doRegister("max-num-teleports", new Option_Integer(-1));
     426        88606 :     oc.addDescription("max-num-teleports", "Processing", TL("Abort the simulation if the given maximum number of teleports is exceeded"));
     427              : 
     428        44303 :     oc.doRegister("scale", new Option_Float(1.));
     429        88606 :     oc.addDescription("scale", "Processing", TL("Scale demand by the given factor (by discarding or duplicating vehicles)"));
     430              : 
     431        88606 :     oc.doRegister("scale-suffix", new Option_String("."));
     432        88606 :     oc.addDescription("scale-suffix", "Processing", TL("Suffix to be added when creating ids for cloned vehicles"));
     433              : 
     434        88606 :     oc.doRegister("time-to-teleport", new Option_String("300", "TIME"));
     435        88606 :     oc.addDescription("time-to-teleport", "Processing", TL("Specify how long a vehicle may wait until being teleported, defaults to 300, non-positive values disable teleporting"));
     436              : 
     437        88606 :     oc.doRegister("time-to-teleport.highways", new Option_String("0", "TIME"));
     438        88606 :     oc.addDescription("time-to-teleport.highways", "Processing", TL("The waiting time after which vehicles on a fast road (speed > 69km/h) are teleported if they are on a non-continuing lane"));
     439              : 
     440        44303 :     oc.doRegister("time-to-teleport.highways.min-speed", new Option_Float(69 / 3.6));
     441        88606 :     oc.addDescription("time-to-teleport.highways.min-speed", "Processing", TL("The waiting time after which vehicles on a fast road (default: speed > 69km/h) are teleported if they are on a non-continuing lane"));
     442              : 
     443        88606 :     oc.doRegister("time-to-teleport.disconnected", new Option_String("-1", "TIME"));
     444        88606 :     oc.addDescription("time-to-teleport.disconnected", "Processing", TL("The waiting time after which vehicles with a disconnected route are teleported. Negative values disable teleporting"));
     445              : 
     446        44303 :     oc.doRegister("time-to-teleport.remove", new Option_Bool(false));
     447        88606 :     oc.addDescription("time-to-teleport.remove", "Processing", TL("Whether vehicles shall be removed after waiting too long instead of being teleported"));
     448              : 
     449        44303 :     oc.doRegister("time-to-teleport.remove-constraint", new Option_Bool(false));
     450        88606 :     oc.addDescription("time-to-teleport.remove-constraint", "Processing", TL("Whether rail-signal-constraint based deadlocks shall be cleared by removing a constraint"));
     451              : 
     452        88606 :     oc.doRegister("time-to-teleport.ride", new Option_String("-1", "TIME"));
     453        88606 :     oc.addDescription("time-to-teleport.ride", "Processing", TL("The waiting time after which persons / containers waiting for a pickup are teleported. Negative values disable teleporting"));
     454              : 
     455        88606 :     oc.doRegister("time-to-teleport.bidi", new Option_String("-1", "TIME"));
     456        88606 :     oc.addDescription("time-to-teleport.bidi", "Processing", TL("The waiting time after which vehicles on bidirectional edges are teleported"));
     457              : 
     458        88606 :     oc.doRegister("time-to-teleport.railsignal-deadlock", new Option_String("-1", "TIME"));
     459        88606 :     oc.addDescription("time-to-teleport.railsignal-deadlock", "Processing", TL("The waiting time after which vehicles in a rail-signal based deadlock are teleported"));
     460              : 
     461        88606 :     oc.doRegister("waiting-time-memory", new Option_String("100", "TIME"));
     462        88606 :     oc.addDescription("waiting-time-memory", "Processing", TL("Length of time interval, over which accumulated waiting time is taken into account (default is 100s.)"));
     463              : 
     464        88606 :     oc.doRegister("startup-wait-threshold", new Option_String("2", "TIME"));
     465        88606 :     oc.addDescription("startup-wait-threshold", "Processing", TL("Minimum consecutive waiting time before applying startupDelay"));
     466              : 
     467        88606 :     oc.doRegister("max-depart-delay", new Option_String("-1", "TIME"));
     468        88606 :     oc.addDescription("max-depart-delay", "Processing", TL("How long vehicles wait for departure before being skipped, defaults to -1 which means vehicles are never skipped"));
     469              : 
     470        44303 :     oc.doRegister("sloppy-insert", new Option_Bool(false));
     471        88606 :     oc.addDescription("sloppy-insert", "Processing", TL("Whether insertion on an edge shall not be repeated in same step once failed"));
     472              : 
     473        44303 :     oc.doRegister("eager-insert", new Option_Bool(false));
     474        88606 :     oc.addDescription("eager-insert", "Processing", TL("Whether each vehicle is checked separately for insertion on an edge"));
     475              : 
     476        44303 :     oc.doRegister("emergency-insert", new Option_Bool(false));
     477        88606 :     oc.addDescription("emergency-insert", "Processing", TL("Allow inserting a vehicle in a situation which requires emergency braking"));
     478              : 
     479        88606 :     oc.doRegister("insertion-checks", new Option_String("all"));
     480        88606 :     oc.addDescription("insertion-checks", "Processing", TL("Override default value for vehicle attribute insertionChecks"));
     481              : 
     482        88606 :     oc.doRegister("random-depart-offset", new Option_String("0", "TIME"));
     483        88606 :     oc.addDescription("random-depart-offset", "Processing", TL("Each vehicle receives a random offset to its depart value drawn uniformly from [0, TIME]"));
     484              : 
     485        88606 :     oc.doRegister("lanechange.duration", new Option_String("0", "TIME"));
     486        88606 :     oc.addDescription("lanechange.duration", "Processing", TL("Duration of a lane change maneuver (default 0)"));
     487              : 
     488        44303 :     oc.doRegister("lanechange.overtake-right", new Option_Bool(false));
     489        88606 :     oc.addDescription("lanechange.overtake-right", "Processing", TL("Whether overtaking on the right on motorways is permitted"));
     490              : 
     491        44303 :     oc.doRegister("tls.all-off", new Option_Bool(false));
     492        88606 :     oc.addDescription("tls.all-off", "Processing", TL("Switches off all traffic lights."));
     493              : 
     494        44303 :     oc.doRegister("tls.actuated.show-detectors", new Option_Bool(false));
     495        88606 :     oc.addDescription("tls.actuated.show-detectors", "Processing", TL("Sets default visibility for actuation detectors"));
     496              : 
     497        44303 :     oc.doRegister("tls.actuated.jam-threshold", new Option_Float(-1));
     498        88606 :     oc.addDescription("tls.actuated.jam-threshold", "Processing", TL("Sets default jam-threshold parameter for all actuation detectors"));
     499              : 
     500        44303 :     oc.doRegister("tls.actuated.detector-length", new Option_Float(0));
     501        88606 :     oc.addDescription("tls.actuated.detector-length", "Processing", TL("Sets default detector length parameter for all actuation detectors"));
     502              : 
     503        44303 :     oc.doRegister("tls.delay_based.detector-range", new Option_Float(100));
     504        88606 :     oc.addDescription("tls.delay_based.detector-range", "Processing", TL("Sets default range for detecting delayed vehicles"));
     505              : 
     506        44303 :     oc.doRegister("tls.yellow.min-decel", new Option_Float(3.0));
     507        88606 :     oc.addDescription("tls.yellow.min-decel", "Processing", TL("Minimum deceleration when braking at yellow"));
     508              : 
     509        44303 :     oc.doRegister("railsignal-moving-block", new Option_Bool(false));
     510        88606 :     oc.addDescription("railsignal-moving-block", "Processing", TL("Let railsignals operate in moving-block mode by default"));
     511        88606 :     oc.addSynonyme("railsignal-moving-block", "railsignal.moving-block");
     512              : 
     513       221515 :     oc.doRegister("railsignal.moving-block.default-classes", new Option_StringVector(StringVector({"tram", "cable_car"})));
     514        88606 :     oc.addDescription("railsignal.moving-block.default-classes", "Processing", TL("List vehicle classes that default to moving-block operations"));
     515              : 
     516        44303 :     oc.doRegister("railsignal.moving-block.max-dist", new Option_Float(200));
     517        88606 :     oc.addDescription("railsignal.moving-block.max-dist", "Processing", TL("Maximum signal distance above which zipper conflicts are ignored"));
     518              : 
     519        44303 :     oc.doRegister("railsignal.max-block-length", new Option_Float(2e4));
     520        88606 :     oc.addDescription("railsignal.max-block-length", "Processing", TL("Do not build blocks longer than FLOAT and issue a warning instead"));
     521              : 
     522       354424 :     oc.doRegister("railsignal.default-classes", new Option_StringVector(StringVector({"rail", "rail_fast", "rail_electric", "rail_urban", "subway"})));
     523        88606 :     oc.addDescription("railsignal.default-classes", "Processing", TL("List vehicle classes that uses block-based insertion checks even when the network has no rail signals for them"));
     524              : 
     525        88606 :     oc.doRegister("time-to-impatience", new Option_String("180", "TIME"));
     526        88606 :     oc.addDescription("time-to-impatience", "Processing", TL("Specify how long a vehicle may wait until impatience grows from 0 to 1, defaults to 300, non-positive values disable impatience growth"));
     527              : 
     528        88606 :     oc.doRegister("default.departspeed", new Option_String("0"));
     529        88606 :     oc.addDescription("default.departspeed", "Processing", TL("Select default depart speed"));
     530              : 
     531        88606 :     oc.doRegister("default.departlane", new Option_String("first"));
     532        88606 :     oc.addDescription("default.departlane", "Processing", TL("Select default depart lane"));
     533              : 
     534        44303 :     oc.doRegister("default.action-step-length", new Option_Float(0.0));
     535        88606 :     oc.addDescription("default.action-step-length", "Processing", TL("Length of the default interval length between action points for the car-following and lane-change models (in seconds). If not specified, the simulation step-length is used per default. Vehicle- or VType-specific settings override the default. Must be a multiple of the simulation step-length."));
     536              : 
     537        88606 :     oc.doRegister("default.carfollowmodel", new Option_String("Krauss"));
     538        88606 :     oc.addDescription("default.carfollowmodel", "Processing", TL("Select default car following model (Krauss, IDM, ...)"));
     539        88606 :     oc.addSynonyme("default.carfollowmodel", "carfollow.model");
     540              : 
     541        44303 :     oc.doRegister("default.speeddev", new Option_Float(-1));
     542        88606 :     oc.addDescription("default.speeddev", "Processing", TL("Select default speed deviation. A negative value implies vClass specific defaults (0.1 for the default passenger class)"));
     543              : 
     544        88606 :     oc.doRegister("default.emergencydecel", new Option_String("default"));
     545        88606 :     oc.addDescription("default.emergencydecel", "Processing", TL("Select default emergencyDecel value among ('decel', 'default', FLOAT) which sets the value either to the same as the deceleration value, a vClass-class specific default or the given FLOAT in m/s^2"));
     546              : 
     547        44303 :     oc.doRegister("overhead-wire.solver", new Option_Bool(true));
     548        88606 :     oc.addDescription("overhead-wire.solver", "Processing", TL("Use Kirchhoff's laws for solving overhead wire circuit"));
     549              : 
     550        44303 :     oc.doRegister("overhead-wire.recuperation", new Option_Bool(true));
     551        88606 :     oc.addDescription("overhead-wire.recuperation", "Processing", TL("Enable recuperation from the vehicle equipped with elecHybrid device into the overhead wire."));
     552              : 
     553        44303 :     oc.doRegister("overhead-wire.substation-current-limits", new Option_Bool(true));
     554        88606 :     oc.addDescription("overhead-wire.substation-current-limits", "Processing", TL("Enable current limits of traction substation during solving the overhead wire electrical circuit."));
     555              : 
     556        44303 :     oc.doRegister("emergencydecel.warning-threshold", new Option_Float(1));
     557        88606 :     oc.addDescription("emergencydecel.warning-threshold", "Processing", TL("Sets the fraction of emergency decel capability that must be used to trigger a warning."));
     558              : 
     559        44303 :     oc.doRegister("parking.maneuver", new Option_Bool(false));
     560        88606 :     oc.addDescription("parking.maneuver", "Processing", TL("Whether parking simulation includes maneuvering time and associated lane blocking"));
     561              : 
     562        44303 :     oc.doRegister("use-stop-ended", new Option_Bool(false));
     563        88606 :     oc.addDescription("use-stop-ended", "Processing", TL("Override stop until times with stop ended times when given"));
     564              : 
     565        44303 :     oc.doRegister("use-stop-started", new Option_Bool(false));
     566        88606 :     oc.addDescription("use-stop-started", "Processing", TL("Override stop arrival times with stop started times when given"));
     567              : 
     568              :     // pedestrian model
     569        88606 :     oc.doRegister("pedestrian.model", new Option_String("striping"));
     570        88606 :     oc.addDescription("pedestrian.model", "Processing", TL("Select among pedestrian models ['nonInteracting', 'striping', 'jupedsim', 'remote']"));
     571              : 
     572        44303 :     oc.doRegister("pedestrian.timegap-crossing", new Option_Float(2.));
     573        88606 :     oc.addDescription("pedestrian.timegap-crossing", "Processing", TL("Minimal acceptable gap (in seconds) between two vehicles before starting to cross"));
     574              : 
     575        44303 :     oc.doRegister("pedestrian.striping.stripe-width", new Option_Float(0.64));
     576        88606 :     oc.addDescription("pedestrian.striping.stripe-width", "Processing", TL("Width of parallel stripes for segmenting a sidewalk (meters) for use with model 'striping'"));
     577              : 
     578        44303 :     oc.doRegister("pedestrian.striping.dawdling", new Option_Float(0.2));
     579        88606 :     oc.addDescription("pedestrian.striping.dawdling", "Processing", TL("Factor for random slow-downs [0,1] for use with model 'striping'"));
     580              : 
     581        44303 :     oc.doRegister("pedestrian.striping.mingap-to-vehicle", new Option_Float(0.25));
     582        88606 :     oc.addDescription("pedestrian.striping.mingap-to-vehicle", "Processing", TL("Minimal gap / safety buffer (in meters) from a pedestrian to another vehicle for use with model 'striping'"));
     583              : 
     584        88606 :     oc.doRegister("pedestrian.striping.jamtime", new Option_String("300", "TIME"));
     585        88606 :     oc.addDescription("pedestrian.striping.jamtime", "Processing", TL("Time in seconds after which pedestrians start squeezing through a jam when using model 'striping' (non-positive values disable squeezing)"));
     586        88606 :     oc.doRegister("pedestrian.striping.jamtime.crossing", new Option_String("10", "TIME"));
     587        88606 :     oc.addDescription("pedestrian.striping.jamtime.crossing", "Processing", TL("Time in seconds after which pedestrians start squeezing through a jam while on a pedestrian crossing when using model 'striping' (non-positive values disable squeezing)"));
     588        88606 :     oc.doRegister("pedestrian.striping.jamtime.narrow", new Option_String("1", "TIME"));
     589        88606 :     oc.addDescription("pedestrian.striping.jamtime.narrow", "Processing", TL("Time in seconds after which pedestrians start squeezing through a jam while on a narrow lane when using model 'striping'"));
     590              : 
     591        44303 :     oc.doRegister("pedestrian.striping.jamfactor", new Option_Float(0.25));
     592        88606 :     oc.addDescription("pedestrian.striping.jamfactor", "Processing", TL("Factor for reducing speed of pedestrian in jammed state"));
     593              : 
     594        44303 :     oc.doRegister("pedestrian.striping.reserve-oncoming", new Option_Float(0.0));
     595        88606 :     oc.addDescription("pedestrian.striping.reserve-oncoming", "Processing", TL("Fraction of stripes to reserve for oncoming pedestrians"));
     596              : 
     597        44303 :     oc.doRegister("pedestrian.striping.reserve-oncoming.junctions", new Option_Float(0.34));
     598        88606 :     oc.addDescription("pedestrian.striping.reserve-oncoming.junctions", "Processing", TL("Fraction of stripes to reserve for oncoming pedestrians on crossings and walkingareas"));
     599              : 
     600        44303 :     oc.doRegister("pedestrian.striping.reserve-oncoming.max", new Option_Float(1.28));
     601        88606 :     oc.addDescription("pedestrian.striping.reserve-oncoming.max", "Processing", TL("Maximum width in m to reserve for oncoming pedestrians"));
     602              : 
     603        44303 :     oc.doRegister("pedestrian.striping.legacy-departposlat", new Option_Bool(false));
     604        88606 :     oc.addDescription("pedestrian.striping.legacy-departposlat", "Processing", TL("Interpret departPosLat for walks in legacy style"));
     605              : 
     606        44303 :     oc.doRegister("pedestrian.striping.walkingarea-detail", new Option_Integer(4));
     607        88606 :     oc.addDescription("pedestrian.striping.walkingarea-detail", "Processing", TL("Generate INT intermediate points to smooth out lanes within the walkingarea"));
     608              : 
     609              : #ifdef HAVE_JUPEDSIM
     610              :     oc.doRegister("pedestrian.jupedsim.step-length", new Option_String("0.01", "TIME"));
     611              :     oc.addDescription("pedestrian.jupedsim.step-length", "Processing", TL("The update interval of the JuPedSim simulation (in seconds)"));
     612              :     oc.doRegister("pedestrian.jupedsim.exit-tolerance", new Option_Float(1.));
     613              :     oc.addDescription("pedestrian.jupedsim.exit-tolerance", "Processing", TL("The distance to accept the JuPedSim arrival point (in meters)"));
     614              :     oc.doRegister("pedestrian.jupedsim.model", new Option_String("CollisionFreeSpeed"));
     615              :     oc.addDescription("pedestrian.jupedsim.model", "Processing", TL("The submodel to use in JuPedSim ('CollisionFreeSpeed', 'CollisionFreeSpeedV2', 'GeneralizedCentrifugalForce', 'SocialForce')"));
     616              :     oc.doRegister("pedestrian.jupedsim.strength-neighbor-repulsion", new Option_Float(8.));
     617              :     oc.addDescription("pedestrian.jupedsim.strength-neighbor-repulsion", "Processing", TL("The neighbor repulsion strength of the JuPedSim model"));
     618              :     oc.doRegister("pedestrian.jupedsim.range-neighbor-repulsion", new Option_Float(.1));
     619              :     oc.addDescription("pedestrian.jupedsim.range-neighbor-repulsion", "Processing", TL("The neighbor repulsion range of the JuPedSim model (in meters)"));
     620              :     oc.doRegister("pedestrian.jupedsim.strength-geometry-repulsion", new Option_Float(5.));
     621              :     oc.addDescription("pedestrian.jupedsim.strength-geometry-repulsion", "Processing", TL("The geometry repulsion strength of the JuPedSim model"));
     622              :     oc.doRegister("pedestrian.jupedsim.range-geometry-repulsion", new Option_Float(.02));
     623              :     oc.addDescription("pedestrian.jupedsim.range-geometry-repulsion", "Processing", TL("The geometry repulsion range of the JuPedSim model (in meters)"));
     624              :     oc.doRegister("pedestrian.jupedsim.wkt", new Option_FileName());
     625              :     oc.addDescription("pedestrian.jupedsim.wkt", "Output", TL("The filename to output the JuPedSim network as WKT"));
     626              :     oc.doRegister("pedestrian.jupedsim.wkt.geo", new Option_Bool(false));
     627              :     oc.addDescription("pedestrian.jupedsim.wkt.geo", "Output", TL("Whether to output JuPedSim network as WKT using geo-coordinates (lon/lat)"));
     628              :     oc.doRegister("pedestrian.jupedsim.py", new Option_FileName());
     629              :     oc.addDescription("pedestrian.jupedsim.py", "Output", TL("The filename to output the JuPedSim setup as Python script"));
     630              : #endif
     631              : 
     632        44303 :     oc.doRegister("ride.stop-tolerance", new Option_Float(10.));
     633        88606 :     oc.addDescription("ride.stop-tolerance", "Processing", TL("Tolerance to apply when matching pedestrian and vehicle positions on boarding at individual stops"));
     634              : 
     635        44303 :     oc.doRegister("mapmatch.distance", new Option_Float(100));
     636        88606 :     oc.addDescription("mapmatch.distance", "Processing", TL("Maximum distance when mapping input coordinates (fromXY etc.) to the road network"));
     637              : 
     638        44303 :     oc.doRegister("mapmatch.junctions", new Option_Bool(false));
     639        88606 :     oc.addDescription("mapmatch.junctions", "Processing", TL("Match positions to junctions instead of edges"));
     640              : 
     641        44303 :     oc.doRegister("mapmatch.taz", new Option_Bool(false));
     642        88606 :     oc.addDescription("mapmatch.taz", "Processing", TL("Match positions to taz instead of edges"));
     643              : 
     644              :     // generic routing options
     645        88606 :     oc.doRegister("routing-algorithm", new Option_String("dijkstra"));
     646        88606 :     oc.addDescription("routing-algorithm", "Routing",
     647              :                       "Select among routing algorithms ['dijkstra', 'astar', 'CH', 'CHWrapper']");
     648              : 
     649        44303 :     oc.doRegister("weights.random-factor", new Option_Float(1.));
     650        88606 :     oc.addDescription("weights.random-factor", "Routing", TL("Edge weights for routing are dynamically disturbed by a random factor drawn uniformly from [1,FLOAT)"));
     651              : 
     652        44303 :     oc.doRegister("weights.random-factor.dynamic", new Option_Bool(false));
     653        88606 :     oc.addDescription("weights.random-factor.dynamic", "Routing", TL("When using option --weights.random-factor, vary the randomness over time"));
     654              : 
     655        44303 :     oc.doRegister("weights.minor-penalty", new Option_Float(1.5));
     656        88606 :     oc.addDescription("weights.minor-penalty", "Routing", TL("Apply the given time penalty when computing minimum routing costs for minor-link internal lanes"));
     657              : 
     658        44303 :     oc.doRegister("weights.tls-penalty", new Option_Float(0));
     659        88606 :     oc.addDescription("weights.tls-penalty", "Routing", TL("Apply scaled travel time penalties based on green split when computing minimum routing costs for internal lanes at traffic lights"));
     660              : 
     661        44303 :     oc.doRegister("weights.turnaround-penalty", new Option_Float(5.0));
     662        88606 :     oc.addDescription("weights.turnaround-penalty", "Processing", TL("Apply the given time penalty when computing routing costs for turnaround internal lanes"));
     663              : 
     664        44303 :     oc.doRegister("weights.reversal-penalty", new Option_Float(60));
     665        88606 :     oc.addDescription("weights.reversal-penalty", "Processing", TL("Apply the given time penalty when computing routing costs for train reversal. Negative values disable reversal"));
     666              : 
     667        44303 :     oc.doRegister("weights.priority-factor", new Option_Float(0));
     668        88606 :     oc.addDescription("weights.priority-factor", "Routing", TL("Consider edge priorities in addition to travel times, weighted by factor"));
     669              : 
     670        44303 :     oc.doRegister("weights.separate-turns", new Option_Float(0));
     671        88606 :     oc.addDescription("weights.separate-turns", "Routing", TL("Distinguish travel time by turn direction and shift a fraction of the estimated time loss ahead of the intersection onto the internal edges"));
     672              : 
     673        44303 :     oc.doRegister("astar.all-distances", new Option_FileName());
     674        88606 :     oc.addDescription("astar.all-distances", "Routing", TL("Initialize lookup table for astar from the given file (generated by marouter --all-pairs-output)"));
     675              : 
     676        44303 :     oc.doRegister("astar.landmark-distances", new Option_FileName());
     677        88606 :     oc.addDescription("astar.landmark-distances", "Routing", TL("Initialize lookup table for astar ALT-variant from the given file"));
     678              : 
     679        44303 :     oc.doRegister("persontrip.walkfactor", new Option_Float(double(0.75)));
     680        88606 :     oc.addDescription("persontrip.walkfactor", "Routing", TL("Use FLOAT as a factor on pedestrian maximum speed during intermodal routing"));
     681              : 
     682        44303 :     oc.doRegister("persontrip.walk-opposite-factor", new Option_Float(1.0));
     683        88606 :     oc.addDescription("persontrip.walk-opposite-factor", "Processing", TL("Use FLOAT as a factor on walking speed against vehicle traffic direction"));
     684              : 
     685       177212 :     oc.doRegister("persontrip.transfer.car-walk", new Option_StringVector(StringVector({ "parkingAreas" })));
     686        88606 :     oc.addDescription("persontrip.transfer.car-walk", "Routing",
     687              :                       "Where are mode changes from car to walking allowed (possible values: 'parkingAreas', 'ptStops', 'allJunctions' and combinations)");
     688              : 
     689        44303 :     oc.doRegister("persontrip.transfer.taxi-walk", new Option_StringVector());
     690        88606 :     oc.addDescription("persontrip.transfer.taxi-walk", "Routing", TL("Where taxis can drop off customers ('allJunctions, 'ptStops', 'parkingAreas')"));
     691              : 
     692        44303 :     oc.doRegister("persontrip.transfer.walk-taxi", new Option_StringVector());
     693        88606 :     oc.addDescription("persontrip.transfer.walk-taxi", "Routing", TL("Where taxis can pick up customers ('allJunctions, 'ptStops', 'parkingAreas')"));
     694              : 
     695        44303 :     oc.doRegister("persontrip.default.group", new Option_String());
     696        88606 :     oc.addDescription("persontrip.default.group", "Routing", TL("When set, trips between the same origin and destination will share a taxi by default"));
     697              : 
     698        88606 :     oc.doRegister("persontrip.taxi.waiting-time", new Option_String("300", "TIME"));
     699        88606 :     oc.addDescription("persontrip.taxi.waiting-time", "Routing", TL("Estimated time for taxi pickup"));
     700              : 
     701        44303 :     oc.doRegister("persontrip.ride-public-line", new Option_Bool(false));
     702        88606 :     oc.addDescription("persontrip.ride-public-line", "Routing", TL("Only use the intended public transport line rather than any alternative line that stops at the destination"));
     703              : 
     704        44303 :     oc.doRegister("railway.max-train-length", new Option_Float(1000.0));
     705        88606 :     oc.addDescription("railway.max-train-length", "Routing", TL("Use FLOAT as a maximum train length when initializing the railway router"));
     706              : 
     707        44303 :     oc.doRegister("replay-rerouting", new Option_Bool(false));
     708        88606 :     oc.addDescription("replay-rerouting", "Routing", TL("Replay exact rerouting sequence from vehroute-output"));
     709              : 
     710              :     // devices
     711        44303 :     oc.addOptionSubTopic("Emissions");
     712        44303 :     oc.doRegister("emissions.volumetric-fuel", new Option_Bool(false));
     713        88606 :     oc.addDescription("emissions.volumetric-fuel", "Emissions", TL("Return fuel consumption values in (legacy) unit l instead of mg"));
     714              : 
     715       177212 :     oc.doRegister("phemlight-path", new Option_FileName(StringVector({ "./PHEMlight/" })));
     716        88606 :     oc.addDescription("phemlight-path", "Emissions", TL("Determines where to load PHEMlight definitions from"));
     717              : 
     718        44303 :     oc.doRegister("phemlight-year", new Option_Integer(0));
     719        88606 :     oc.addDescription("phemlight-year", "Emissions", TL("Enable fleet age modelling with the given reference year in PHEMlight5"));
     720              : 
     721        44303 :     oc.doRegister("phemlight-temperature", new Option_Float(INVALID_DOUBLE));
     722        88606 :     oc.addDescription("phemlight-temperature", "Emissions", TL("Set ambient temperature to correct NOx emissions in PHEMlight5"));
     723              : 
     724        44303 :     oc.addOptionSubTopic("Communication");
     725        44303 :     oc.addOptionSubTopic("Battery");
     726        44303 :     MSDevice::insertOptions(oc);
     727              : 
     728              :     // register report options
     729        44303 :     oc.doRegister("duration-log.disable", new Option_Bool(false));
     730        88606 :     oc.addSynonyme("duration-log.disable", "no-duration-log", false);
     731        88606 :     oc.addDescription("duration-log.disable", "Report", TL("Disable performance reports for individual simulation steps"));
     732              : 
     733        44303 :     oc.doRegister("duration-log.statistics", 't', new Option_Bool(false));
     734        88606 :     oc.addDescription("duration-log.statistics", "Report", TL("Enable statistics on vehicle trips"));
     735              : 
     736        44303 :     oc.doRegister("no-step-log", new Option_Bool(false));
     737        88606 :     oc.addDescription("no-step-log", "Report", TL("Disable console output of current simulation step"));
     738              : 
     739        44303 :     oc.doRegister("step-log.period", new Option_Integer(100));
     740        88606 :     oc.addDescription("step-log.period", "Report", TL("Number of simulation steps between step-log outputs"));
     741              : 
     742              :     //remote port 0 if not used
     743        44303 :     oc.addOptionSubTopic("TraCI Server");
     744        44303 :     oc.doRegister("remote-port", new Option_Integer(0));
     745        88606 :     oc.addDescription("remote-port", "TraCI Server", TL("Enables TraCI Server if set"));
     746        44303 :     oc.doRegister("num-clients", new Option_Integer(1));
     747        88606 :     oc.addDescription("num-clients", "TraCI Server", TL("Expected number of connecting clients"));
     748              : 
     749        44303 :     oc.addOptionSubTopic("Mesoscopic");
     750        44303 :     oc.doRegister("mesosim", new Option_Bool(false));
     751        88606 :     oc.addDescription("mesosim", "Mesoscopic", TL("Enables mesoscopic simulation"));
     752        44303 :     oc.doRegister("meso-edgelength", new Option_Float(98.0f));
     753        88606 :     oc.addDescription("meso-edgelength", "Mesoscopic", TL("Length of an edge segment in mesoscopic simulation"));
     754        88606 :     oc.doRegister("meso-tauff", new Option_String("1.13", "TIME"));
     755        88606 :     oc.addDescription("meso-tauff", "Mesoscopic", TL("Factor for calculating the net free-free headway time"));
     756        88606 :     oc.doRegister("meso-taufj", new Option_String("1.13", "TIME"));
     757        88606 :     oc.addDescription("meso-taufj", "Mesoscopic", TL("Factor for calculating the net free-jam headway time"));
     758        88606 :     oc.doRegister("meso-taujf", new Option_String("1.73", "TIME"));
     759        88606 :     oc.addDescription("meso-taujf", "Mesoscopic", TL("Factor for calculating the jam-free headway time"));
     760        88606 :     oc.doRegister("meso-taujj", new Option_String("1.4", "TIME"));
     761        88606 :     oc.addDescription("meso-taujj", "Mesoscopic", TL("Factor for calculating the jam-jam headway time"));
     762        44303 :     oc.doRegister("meso-jam-threshold", new Option_Float(-1));
     763        88606 :     oc.addDescription("meso-jam-threshold", "Mesoscopic",
     764              :                       "Minimum percentage of occupied space to consider a segment jammed. A negative argument causes thresholds to be computed based on edge speed and tauff (default)");
     765        44303 :     oc.doRegister("meso-multi-queue", new Option_Bool(true));
     766        88606 :     oc.addDescription("meso-multi-queue", "Mesoscopic", TL("Enable multiple queues at edge ends"));
     767        44303 :     oc.doRegister("meso-lane-queue", new Option_Bool(false));
     768        88606 :     oc.addDescription("meso-lane-queue", "Mesoscopic", TL("Enable separate queues for every lane"));
     769       221515 :     oc.doRegister("meso-ignore-lanes-by-vclass", new Option_StringVector(StringVector({ "pedestrian", "bicycle" })));
     770        88606 :     oc.addDescription("meso-ignore-lanes-by-vclass", "Mesoscopic", TL("Do not build queues (or reduce capacity) for lanes allowing only the given vclasses"));
     771        88606 :     oc.addSynonyme("meso-ignore-lanes-by-vclass", "meso.ignore-lanes.by-vclass");
     772        44303 :     oc.doRegister("meso-junction-control", new Option_Bool(false));
     773        88606 :     oc.addDescription("meso-junction-control", "Mesoscopic", TL("Enable mesoscopic traffic light and priority junction handling"));
     774        44303 :     oc.doRegister("meso-junction-control.limited", new Option_Bool(false));
     775        88606 :     oc.addDescription("meso-junction-control.limited", "Mesoscopic",
     776              :                       "Enable mesoscopic traffic light and priority junction handling for saturated links. This prevents faulty traffic lights from hindering flow in low-traffic situations");
     777        44303 :     oc.doRegister("meso-tls-penalty", new Option_Float(0));
     778        88606 :     oc.addDescription("meso-tls-penalty", "Mesoscopic",
     779              :                       "Apply scaled travel time penalties when driving across tls controlled junctions based on green split instead of checking actual phases");
     780        44303 :     oc.doRegister("meso-tls-flow-penalty", new Option_Float(0));
     781        88606 :     oc.addDescription("meso-tls-flow-penalty", "Mesoscopic",
     782              :                       "Apply scaled headway penalties when driving across tls controlled junctions based on green split instead of checking actual phases");
     783        88606 :     oc.doRegister("meso-minor-penalty", new Option_String("0", "TIME"));
     784        88606 :     oc.addDescription("meso-minor-penalty", "Mesoscopic",
     785              :                       "Apply fixed time penalty when driving across a minor link. When using --meso-junction-control.limited, the penalty is not applied whenever limited control is active.");
     786        44303 :     oc.doRegister("meso-overtaking", new Option_Bool(false));
     787        88606 :     oc.addDescription("meso-overtaking", "Mesoscopic", TL("Enable mesoscopic overtaking"));
     788        88606 :     oc.doRegister("meso-recheck", new Option_String("0", "TIME"));
     789        88606 :     oc.addDescription("meso-recheck", "Mesoscopic", TL("Time interval for rechecking insertion into the next segment after failure"));
     790              : 
     791              :     // add rand options
     792        44303 :     RandHelper::insertRandOptions(oc);
     793        44303 :     oc.doRegister("thread-rngs", new Option_Integer(64));
     794        88606 :     oc.addDescription("thread-rngs", "Random Number",
     795              :                       "Number of pre-allocated random number generators to ensure repeatable multi-threaded simulations (should be at least the number of threads for repeatable simulations).");
     796              : 
     797              :     // add GUI options
     798              :     // the reason that we include them in vanilla sumo as well is to make reusing config files easy
     799        44303 :     oc.addOptionSubTopic("GUI Only");
     800        44303 :     oc.doRegister("gui-settings-file", 'g', new Option_FileName());
     801        88606 :     oc.addDescription("gui-settings-file", "GUI Only", TL("Load visualisation settings from FILE"));
     802              : 
     803        44303 :     oc.doRegister("quit-on-end", 'Q', new Option_Bool(false));
     804        44303 :     oc.addDescription("quit-on-end", "GUI Only", TL("Quits the GUI when the simulation stops"));
     805              : 
     806        44303 :     oc.doRegister("game", 'G', new Option_Bool(false));
     807        88606 :     oc.addDescription("game", "GUI Only", TL("Start the GUI in gaming mode"));
     808              : 
     809        88606 :     oc.doRegister("game.mode", new Option_String("tls"));
     810        88606 :     oc.addDescription("game.mode", "GUI Only", TL("Select the game type ('tls', 'drt')"));
     811              : 
     812        44303 :     oc.doRegister("start", 'S', new Option_Bool(false));
     813        88606 :     oc.addDescription("start", "GUI Only", TL("Start the simulation after loading"));
     814              : 
     815        44303 :     oc.doRegister("delay", 'd', new Option_Float(0.0));
     816        88606 :     oc.addDescription("delay", "GUI Only", TL("Use FLOAT in ms as delay between simulation steps"));
     817              : 
     818        44303 :     oc.doRegister("breakpoints", 'B', new Option_StringVector());
     819        88606 :     oc.addDescription("breakpoints", "GUI Only", TL("Use TIME[] as times when the simulation should halt"));
     820              : 
     821        44303 :     oc.doRegister("edgedata-files", 'm', new Option_FileName());
     822        88606 :     oc.addSynonyme("edgedata-files", "data-files");
     823        88606 :     oc.addDescription("edgedata-files", "GUI Only", TL("Load edge/lane weights for visualization from FILE"));
     824              : 
     825        44303 :     oc.doRegister("alternative-net-file", 'N', new Option_FileName());
     826        88606 :     oc.addDescription("alternative-net-file", "GUI Only", TL("Load a secondary road network for abstract visualization from FILE"));
     827              : 
     828        44303 :     oc.doRegister("selection-file", new Option_FileName());
     829        88606 :     oc.addDescription("selection-file", "GUI Only", TL("Load pre-selected elements from FILE"));
     830              : 
     831        44303 :     oc.doRegister("demo", 'D', new Option_Bool(false));
     832        88606 :     oc.addDescription("demo", "GUI Only", TL("Restart the simulation after ending (demo mode)"));
     833              : 
     834        44303 :     oc.doRegister("disable-textures", 'T', new Option_Bool(false));
     835        88606 :     oc.addDescription("disable-textures", "GUI Only", TL("Do not load background pictures"));
     836              : 
     837        44303 :     oc.doRegister("registry-viewport", new Option_Bool(false));
     838        88606 :     oc.addDescription("registry-viewport", "GUI Only", TL("Load current viewport from registry"));
     839              : 
     840        44303 :     oc.doRegister("window-size", new Option_StringVector());
     841        88606 :     oc.addDescription("window-size", "GUI Only", TL("Create initial window with the given x,y size"));
     842              : 
     843        44303 :     oc.doRegister("window-pos", new Option_StringVector());
     844        88606 :     oc.addDescription("window-pos", "GUI Only", TL("Create initial window at the given x,y position"));
     845              : 
     846        88606 :     oc.doRegister("tracker-interval", new Option_String("1", "TIME"));
     847        88606 :     oc.addDescription("tracker-interval", "GUI Only", TL("The aggregation period for value tracker windows"));
     848              : 
     849              : #ifdef HAVE_OSG
     850        44303 :     oc.doRegister("osg-view", new Option_Bool(false));
     851        88606 :     oc.addDescription("osg-view", "GUI Only", TL("Start with an OpenSceneGraph view instead of the regular 2D view"));
     852              : #endif
     853              : 
     854              :     // gui testing
     855        44303 :     oc.doRegister("gui-testing", new Option_Bool(false));
     856        88606 :     oc.addDescription("gui-testing", "GUI Only", TL("Enable overlay for screen recognition"));
     857              : 
     858              :     // gui testing - debug
     859        44303 :     oc.doRegister("gui-testing-debug", new Option_Bool(false));
     860        88606 :     oc.addDescription("gui-testing-debug", "GUI Only", TL("Enable output messages during GUI-Testing"));
     861              : 
     862              :     // gui testing - settings output
     863        44303 :     oc.doRegister("gui-testing.setting-output", new Option_FileName());
     864        88606 :     oc.addDescription("gui-testing.setting-output", "GUI Only", TL("Save gui settings in the given settings output file"));
     865       664545 : }
     866              : 
     867              : 
     868              : void
     869        41222 : MSFrame::buildStreams() {
     870              :     // standard outputs
     871        82450 :     if (OutputDevice::createDeviceByOption("netstate-dump", "netstate", "netstate_file.xsd")) {
     872          100 :         WRITE_WARNING(TL("Raw netstate dumps are deprecated. Use fcd-output instead."));
     873              :     }
     874        82438 :     OutputDevice::createDeviceByOption("summary-output", "summary", "summary_file.xsd");
     875        82420 :     OutputDevice::createDeviceByOption("person-summary-output", "personSummary", "person_summary_file.xsd");
     876        82426 :     OutputDevice::createDeviceByOption("tripinfo-output", "tripinfos", "tripinfo_file.xsd");
     877              : 
     878              :     //extended
     879        82408 :     OutputDevice::createDeviceByOption("fcd-output", "fcd-export", "fcd_file.xsd");
     880        82408 :     OutputDevice::createDeviceByOption("person-fcd-output", "fcd-export", "fcd_file.xsd");
     881        82414 :     OutputDevice::createDeviceByOption("emission-output", "emission-export", "emission_file.xsd");
     882        82396 :     OutputDevice::createDeviceByOption("battery-output", "battery-export", "battery_file.xsd");
     883        82396 :     if (OptionsCont::getOptions().getBool("elechybrid-output.aggregated")) {
     884              :         // RICE_TODO: Add path to elechybrid-output.aggregated xsd file
     885            8 :         OutputDevice::createDeviceByOption("elechybrid-output", "elecHybrid-export-aggregated", "\" recuperationEnabled=\"" + toString(MSGlobals::gOverheadWireRecuperation));
     886              :     }
     887              :     //OutputDevice::createDeviceByOption("elecHybrid-output", "elecHybrid-export");
     888        82396 :     OutputDevice::createDeviceByOption("chargingstations-output", "chargingstations-export");
     889        82396 :     OutputDevice::createDeviceByOption("overheadwiresegments-output", "overheadWireSegments-export");
     890        82396 :     OutputDevice::createDeviceByOption("substations-output", "substations-export");
     891        82402 :     OutputDevice::createDeviceByOption("full-output", "full-export", "full_file.xsd");
     892        82390 :     OutputDevice::createDeviceByOption("queue-output", "queue-export", "queue_file.xsd", 3);
     893       123558 :     OutputDevice::createDeviceByOption("amitran-output", "trajectories", "amitran/trajectories.xsd\" timeStepSize=\"" + toString(STEPS2MS(DELTA_T)));
     894              : 
     895              :     //OutputDevice::createDeviceByOption("vtk-output", "vtk-export");
     896        82372 :     OutputDevice::createDeviceByOption("link-output", "link-output");
     897        82372 :     OutputDevice::createDeviceByOption("railsignal-block-output", "railsignal-block-output");
     898        82372 :     OutputDevice::createDeviceByOption("railsignal-vehicle-output", "railsignal-vehicle-output");
     899        82372 :     OutputDevice::createDeviceByOption("bt-output", "bt-output");
     900        82372 :     OutputDevice::createDeviceByOption("lanechange-output", "lanechanges");
     901        82372 :     OutputDevice::createDeviceByOption("stop-output", "stops", "stopinfo_file.xsd");
     902        82372 :     OutputDevice::createDeviceByOption("collision-output", "collisions", "collision_file.xsd");
     903        82372 :     OutputDevice::createDeviceByOption("statistic-output", "statistics", "statistic_file.xsd");
     904        82372 :     OutputDevice::createDeviceByOption("deadlock-output", "additional", "additional_file.xsd");
     905              : 
     906              : #ifdef _DEBUG
     907              :     OutputDevice::createDeviceByOption("movereminder-output", "movereminder-output");
     908              : #endif
     909              : 
     910        41186 :     MSDevice_Vehroutes::init();
     911        41180 :     MSStopOut::init();
     912        41180 : }
     913              : 
     914              : 
     915              : bool
     916        43606 : MSFrame::checkOptions() {
     917        43606 :     OptionsCont& oc = OptionsCont::getOptions();
     918              :     bool ok = true;
     919        43606 :     if (!oc.isSet("net-file") && oc.isDefault("remote-port")) {
     920            0 :         WRITE_ERROR(TL("No network file (-n) specified."));
     921              :         ok = false;
     922              :     }
     923        87212 :     if (oc.getFloat("scale") < 0.) {
     924            0 :         WRITE_ERROR(TL("Invalid scaling factor."));
     925              :         ok = false;
     926              :     }
     927        44574 :     if (oc.getBool("vehroute-output.exit-times") && !oc.isSet("vehroute-output")) {
     928            0 :         WRITE_ERROR(TL("A vehroute-output file is needed for exit times."));
     929              :         ok = false;
     930              :     }
     931        87368 :     if (oc.isSet("gui-settings-file") &&
     932        87524 :             oc.getString("gui-settings-file") != "" &&
     933        43918 :             !oc.isUsableFileList("gui-settings-file")) {
     934              :         ok = false;
     935              :     }
     936        43606 :     if (oc.getBool("demo") && oc.isDefault("start")) {
     937            0 :         oc.setDefault("start", "true");
     938              :     }
     939        43606 :     if (oc.getBool("demo") && oc.getBool("quit-on-end")) {
     940            0 :         WRITE_ERROR(TL("You can either restart or quit on end."));
     941              :         ok = false;
     942              :     }
     943        43628 :     if (oc.getBool("meso-junction-control.limited") && !oc.getBool("meso-junction-control")) {
     944           44 :         if (!oc.isDefault("meso-junction-control")) {
     945            0 :             WRITE_WARNING(TL("The option 'meso-junction-control.limited' implies 'meso-junction-control'."))
     946              :         }
     947           44 :         oc.setDefault("meso-junction-control", "true");
     948              :     }
     949        87212 :     if (oc.getBool("mesosim")) {
     950        16794 :         if (oc.isDefault("pedestrian.model")) {
     951        16140 :             oc.setDefault("pedestrian.model", "nonInteracting");
     952              :         }
     953              :     }
     954        87212 :     if (string2time(oc.getString("device.fcd.begin")) < 0) {
     955       130728 :         oc.setDefault("device.fcd.begin", oc.getString("begin"));
     956              :     }
     957        87212 :     if (string2time(oc.getString("device.emissions.begin")) < 0) {
     958       130782 :         oc.setDefault("device.emissions.begin", oc.getString("begin"));
     959              :     }
     960        43606 :     const SUMOTime begin = string2time(oc.getString("begin"));
     961        43600 :     const SUMOTime end = string2time(oc.getString("end"));
     962        43594 :     if (begin < 0) {
     963           12 :         WRITE_ERROR(TL("The begin time should not be negative."));
     964              :         ok = false;
     965              :     }
     966              :     // DELTA_T not yet initialized
     967        43594 :     const SUMOTime deltaT = MAX2((SUMOTime)1, string2time(oc.getString("step-length")));
     968        43594 :     if (begin < TIME2STEPS(1)) {
     969        85140 :         checkStepLengthMultiple(begin, " for begin", deltaT);
     970              :     }
     971        87188 :     if (end != string2time("-1")) {
     972         9369 :         if (end < begin) {
     973           24 :             WRITE_ERROR(TL("The end time should be after the begin time."));
     974              :             ok = false;
     975              :         }
     976              :     }
     977        87188 :     if (string2time(oc.getString("step-length")) <= 0) {
     978           12 :         WRITE_ERROR(TL("the minimum step-length is 0.001."));
     979              :         ok = false;
     980              :     }
     981        43594 :     const SUMOTime period = string2time(oc.getString("device.fcd.period"));
     982        43594 :     if (period > 0) {
     983          136 :         checkStepLengthMultiple(period, " for device.fcd.period", deltaT);
     984              :     }
     985        43594 :     const SUMOTime statePeriod = string2time(oc.getString("save-state.period"));
     986        43594 :     if (statePeriod > 0) {
     987           38 :         checkStepLengthMultiple(statePeriod, " for save-state.period", deltaT);
     988              :     }
     989        87530 :     for (const std::string& timeStr : oc.getStringVector("save-state.times")) {
     990              :         try {
     991          342 :             const SUMOTime saveT = string2time(timeStr);
     992          336 :             if (end > 0 && saveT >= end) {
     993           18 :                 WRITE_WARNINGF(TL("The save-state time=% will not be used before simulation end at %."), timeStr, time2string(end));
     994              :             } else {
     995          660 :                 checkStepLengthMultiple(saveT, " for save-state.times", deltaT, begin);
     996              :             }
     997            6 :         } catch (ProcessError& e) {
     998           12 :             WRITE_ERROR("Invalid time '" + timeStr + "' for option 'save-state.times'. " + e.what());
     999              :             ok = false;
    1000            6 :         }
    1001              :     }
    1002              : 
    1003              : #ifdef _DEBUG
    1004              :     if (oc.isSet("movereminder-output.vehicles") && !oc.isSet("movereminder-output")) {
    1005              :         WRITE_ERROR(TL("option movereminder-output.vehicles requires option movereminder-output to be set"));
    1006              :         ok = false;
    1007              :     }
    1008              : #endif
    1009        87188 :     if (oc.getBool("sloppy-insert")) {
    1010            0 :         WRITE_WARNING(TL("The option 'sloppy-insert' is deprecated, because it is now activated by default, see the new option 'eager-insert'."));
    1011              :     }
    1012        44188 :     if (string2time(oc.getString("lanechange.duration")) > 0 && oc.getFloat("lateral-resolution") > 0) {
    1013            4 :         WRITE_ERROR(TL("Only one of the options 'lanechange.duration' or 'lateral-resolution' may be given."));
    1014              :         ok = false;
    1015              :     }
    1016        64900 :     if (oc.getBool("mesosim") && (oc.getFloat("lateral-resolution") > 0 || string2time(oc.getString("lanechange.duration")) > 0)) {
    1017         4062 :         WRITE_ERROR(TL("Sublane dynamics are not supported by mesoscopic simulation."));
    1018              :         ok = false;
    1019              :     }
    1020        87188 :     if (oc.getBool("ignore-accidents")) {
    1021            0 :         WRITE_WARNING(TL("The option 'ignore-accidents' is deprecated. Use 'collision.action none' instead."));
    1022              :     }
    1023        46737 :     if (oc.getBool("duration-log.statistics") && oc.isDefault("verbose")) {
    1024         5956 :         oc.setDefault("verbose", "true");
    1025              :     }
    1026       174229 :     if (oc.isDefault("precision") && string2time(oc.getString("step-length")) % 10 != 0) {
    1027           84 :         oc.setDefault("precision", "3");
    1028              :     }
    1029       127031 :     if (oc.isDefault("tracker-interval") && !oc.isDefault("step-length")) {
    1030        11253 :         oc.setDefault("tracker-interval", oc.getString("step-length"));
    1031              :     }
    1032        87188 :     if (oc.getBool("tripinfo-output.write-undeparted")) {
    1033           94 :         if (!oc.isDefault("tripinfo-output.write-unfinished") && !oc.getBool("tripinfo-output.write-unfinished")) {
    1034            0 :             WRITE_WARNING(TL("The option tripinfo-output.write-undeparted implies tripinfo-output.write-unfinished."));
    1035              :         }
    1036          188 :         oc.setDefault("tripinfo-output.write-unfinished", "true");
    1037              :     }
    1038        87188 :     if (oc.getInt("precision") > 2) {
    1039          154 :         if (oc.isDefault("netstate-dump.precision")) {
    1040          213 :             oc.setDefault("netstate-dump.precision", toString(oc.getInt("precision")));
    1041              :         }
    1042          154 :         if (oc.isDefault("emission-output.precision")) {
    1043          231 :             oc.setDefault("emission-output.precision", toString(oc.getInt("precision")));
    1044              :         }
    1045          154 :         if (oc.isDefault("battery-output.precision")) {
    1046          231 :             oc.setDefault("battery-output.precision", toString(oc.getInt("precision")));
    1047              :         }
    1048          154 :         if (oc.isDefault("elechybrid-output.precision")) {
    1049          231 :             oc.setDefault("elechybrid-output.precision", toString(oc.getInt("precision")));
    1050              :         }
    1051          154 :         if (oc.isDefault("substations-output.precision")) {
    1052          231 :             oc.setDefault("substations-output.precision", toString(oc.getInt("precision")));
    1053              :         }
    1054              :     }
    1055        87188 :     if (!SUMOXMLDefinitions::CarFollowModels.hasString(oc.getString("carfollow.model"))) {
    1056            0 :         WRITE_ERRORF(TL("Unknown model '%' for option 'carfollow.model'."), oc.getString("carfollow.model"));
    1057              :         ok = false;
    1058              :     }
    1059        87188 :     if (oc.isSet("default.emergencydecel")) {
    1060        87188 :         const std::string val = oc.getString("default.emergencydecel");
    1061        43594 :         if (val != "default" && val != "decel") {
    1062              :             try {
    1063           16 :                 StringUtils::toDouble(val);
    1064            0 :             } catch (NumberFormatException&) {
    1065            0 :                 WRITE_ERRORF(TL("Invalid value '%' for option 'default.emergencydecel'. Must be a FLOAT or 'default' or 'decel'."), val);
    1066              :                 ok = false;
    1067            0 :             }
    1068              :         }
    1069              :     }
    1070              : 
    1071        87188 :     if (oc.isSet("time-to-teleport.railsignal-deadlock")) {
    1072        43594 :         SUMOTime t1 = string2time(oc.getString("time-to-teleport"));
    1073        43594 :         SUMOTime t2 = string2time(oc.getString("time-to-teleport.railsignal-deadlock"));
    1074        43594 :         if (t1 > 0 && t2 > 0 && t1 <= t2) {
    1075            6 :             WRITE_WARNINGF(TL("Railsignal-deadlock will not be detected because time-to-teleport (%) is lower than time-to-teleport.railsignal-deadlock (%)."), time2string(t1), time2string(t2));
    1076              :         }
    1077              :     }
    1078              : 
    1079        87188 :     oc.doRegister("", new Option_String("-1", "TIME"));
    1080              : 
    1081              : 
    1082        87188 :     if (oc.getFloat("delay") < 0.0) {
    1083            0 :         WRITE_ERROR(TL("You need a non-negative delay."));
    1084              :         ok = false;
    1085              :     }
    1086        87188 :     for (const std::string& val : oc.getStringVector("breakpoints")) {
    1087              :         try {
    1088            0 :             string2time(val);
    1089            0 :         } catch (ProcessError& e) {
    1090            0 :             WRITE_ERROR("Invalid time '" + val + "' for option 'breakpoints'. " + e.what());
    1091              :             ok = false;
    1092            0 :         }
    1093              :     }
    1094              : #ifndef HAVE_FOX
    1095              :     if (oc.getInt("threads") > 1) {
    1096              :         WRITE_ERROR(TL("Parallel simulation is only possible when compiled with Fox."));
    1097              :         ok = false;
    1098              :     }
    1099              : #endif
    1100        87188 :     if (oc.getInt("threads") < 1) {
    1101            0 :         WRITE_ERROR(TL("You need at least one thread."));
    1102              :         ok = false;
    1103              :     }
    1104        87188 :     if (oc.getInt("threads") > oc.getInt("thread-rngs")) {
    1105            0 :         WRITE_WARNING(TL("Number of threads exceeds number of thread-rngs. Simulation runs with the same seed may produce different results."));
    1106              :     }
    1107        43594 :     if (oc.getString("game.mode") != "tls" && oc.getString("game.mode") != "drt") {
    1108            0 :         WRITE_ERROR(TL("game.mode must be one of ['tls', 'drt']"));
    1109              :         ok = false;
    1110              :     }
    1111              : 
    1112        87188 :     if (oc.isSet("persontrip.transfer.car-walk")) {
    1113       130782 :         for (const std::string& opt : OptionsCont::getOptions().getStringVector("persontrip.transfer.car-walk")) {
    1114        43594 :             if (opt != "parkingAreas" && opt != "ptStops" && opt != "allJunctions") {
    1115            0 :                 WRITE_ERRORF(TL("Invalid transfer option '%'. Must be one of 'parkingAreas', 'ptStops' or 'allJunctions'."), opt);
    1116              :                 ok = false;
    1117              :             }
    1118              :         }
    1119              :     }
    1120        43690 :     if (!oc.isDefault("weights.random-factor") && (oc.isSet("astar.all-distances") || oc.isSet("astar.landmark-distances"))) {
    1121           14 :         WRITE_WARNING(TL("The option --weights.random-factor should not be used together with astar and precomputed distances."));
    1122              :     }
    1123        87188 :     if (oc.getInt("threads") > 1) {
    1124         8862 :         WRITE_WARNING(TL("The option --threads has known problems and does NOT provide meaningful speedup at this time (https://github.com/eclipse-sumo/sumo/issues/4767). Using it is not recommended!"));
    1125              :     }
    1126        43643 :     if (oc.getBool("mapmatch.junctions") && oc.isDefault("junction-taz")) {
    1127           14 :         oc.setDefault("junction-taz", "true");
    1128              :     }
    1129              : 
    1130              : #ifdef HAVE_JUPEDSIM
    1131              :     const std::string pedestrianJPSModel = oc.getString("pedestrian.jupedsim.model");
    1132              :     const std::vector<std::string> allowedPedestrianJPSModels = {"CollisionFreeSpeed", "CollisionFreeSpeedV2", "GeneralizedCentrifugalForce", "SocialForce"};
    1133              :     if (std::find(allowedPedestrianJPSModels.begin(), allowedPedestrianJPSModels.end(), pedestrianJPSModel) == allowedPedestrianJPSModels.end()) {
    1134              :         WRITE_ERRORF(TL("Invalid JuPedSim model '%'. Must be one of 'CollisionFreeSpeed', 'CollisionFreeSpeedV2', 'GeneralizedCentrifugalForce' or 'SocialForce'."), pedestrianJPSModel);
    1135              :         ok = false;
    1136              :     }
    1137              : #endif
    1138              : 
    1139        43594 :     ok &= MSDevice::checkOptions(oc);
    1140        43594 :     ok &= SystemFrame::checkOptions(oc);
    1141              : 
    1142        43594 :     return ok;
    1143              : }
    1144              : 
    1145              : 
    1146              : void
    1147        41523 : MSFrame::setMSGlobals(OptionsCont& oc) {
    1148              :     // pre-initialise the network
    1149              :     // set whether empty edges shall be printed on dump
    1150        41523 :     MSGlobals::gOmitEmptyEdgesOnDump = !oc.getBool("netstate-dump.empty-edges");
    1151              :     // set whether internal lanes shall be used
    1152        41523 :     MSGlobals::gUsingInternalLanes = !oc.getBool("no-internal-links");
    1153        41523 :     MSGlobals::gIgnoreJunctionBlocker = string2time(oc.getString("ignore-junction-blocker")) < 0 ?
    1154        41567 :                                         std::numeric_limits<SUMOTime>::max() : string2time(oc.getString("ignore-junction-blocker"));
    1155              :     // set the grid lock time
    1156       121339 :     MSGlobals::gTimeToGridlock = string2time(oc.getString("time-to-teleport")) < 0 ? 0 : string2time(oc.getString("time-to-teleport"));
    1157        41523 :     MSGlobals::gTimeToImpatience = string2time(oc.getString("time-to-impatience"));
    1158       124569 :     MSGlobals::gTimeToGridlockHighways = string2time(oc.getString("time-to-teleport.highways")) < 0 ? 0 : string2time(oc.getString("time-to-teleport.highways"));
    1159        41523 :     MSGlobals::gGridlockHighwaysSpeed = oc.getFloat("time-to-teleport.highways.min-speed");
    1160        41523 :     MSGlobals::gTimeToTeleportDisconnected = string2time(oc.getString("time-to-teleport.disconnected"));
    1161        41523 :     MSGlobals::gTimeToTeleportBidi = string2time(oc.getString("time-to-teleport.bidi"));
    1162        41523 :     MSGlobals::gTimeToTeleportRSDeadlock = string2time(oc.getString("time-to-teleport.railsignal-deadlock"));
    1163        41523 :     MSGlobals::gRemoveGridlocked = oc.getBool("time-to-teleport.remove");
    1164        41523 :     MSGlobals::gCheck4Accidents = !oc.getBool("ignore-accidents");
    1165        41523 :     MSGlobals::gCheckRoutes = !oc.getBool("ignore-route-errors");
    1166        41523 :     MSGlobals::gEmergencyInsert = oc.getBool("emergency-insert");
    1167        41523 :     MSGlobals::gWeightsSeparateTurns = oc.getFloat("weights.separate-turns");
    1168        41523 :     MSGlobals::gStartupWaitThreshold = string2time(oc.getString("startup-wait-threshold"));
    1169        41523 :     MSGlobals::gLaneChangeDuration = string2time(oc.getString("lanechange.duration"));
    1170        41523 :     MSGlobals::gLateralResolution = oc.getFloat("lateral-resolution");
    1171        41523 :     MSGlobals::gSublane = (MSGlobals::gLaneChangeDuration > 0 || MSGlobals::gLateralResolution > 0);
    1172        41523 :     MSGlobals::gStateLoaded = oc.isSet("load-state");
    1173        41523 :     MSGlobals::gUseMesoSim = oc.getBool("mesosim");
    1174        41523 :     MSGlobals::gMesoLimitedJunctionControl = oc.getBool("meso-junction-control.limited");
    1175        41523 :     if (MSGlobals::gUseMesoSim) {
    1176         6350 :         MSGlobals::gUsingInternalLanes = false;
    1177              :     }
    1178        41523 :     MSGlobals::gWaitingTimeMemory = string2time(oc.getString("waiting-time-memory"));
    1179        41523 :     MSAbstractLaneChangeModel::initGlobalOptions(oc);
    1180        41523 :     MSGlobals::gOverheadWireSolver = oc.getBool("overhead-wire.solver");
    1181        41523 :     MSGlobals::gOverheadWireRecuperation = oc.getBool("overhead-wire.recuperation");
    1182        41523 :     MSGlobals::gOverheadWireCurrentLimits = oc.getBool("overhead-wire.substation-current-limits");
    1183        41523 :     MSGlobals::gInsertionChecks = SUMOVehicleParameter::parseInsertionChecks(oc.getString("insertion-checks"));
    1184        41523 :     MSGlobals::gMaxRailSignalBlockLength = oc.getFloat("railsignal.max-block-length");
    1185              : 
    1186        41523 :     MSLane::initCollisionOptions(oc);
    1187              : 
    1188        41523 :     DELTA_T = string2time(oc.getString("step-length"));
    1189              : 
    1190        41523 :     const bool integrationMethodSet = !oc.isDefault("step-method.ballistic");
    1191        41523 :     const bool actionStepLengthSet  = !oc.isDefault("default.action-step-length");
    1192        41523 :     MSGlobals::gSemiImplicitEulerUpdate = !oc.getBool("step-method.ballistic");
    1193              :     // Init default value for gActionStepLength
    1194        41523 :     if (MSGlobals::gSemiImplicitEulerUpdate && actionStepLengthSet && !integrationMethodSet) {
    1195           55 :         WRITE_MESSAGE(TL("Integration method was set to 'ballistic', since a default action step length was specified."));
    1196           55 :         MSGlobals::gSemiImplicitEulerUpdate = false;
    1197              :     }
    1198        41523 :     double givenDefaultActionStepLength = oc.getFloat("default.action-step-length");
    1199        41523 :     MSGlobals::gActionStepLength = SUMOVehicleParserHelper::processActionStepLength(givenDefaultActionStepLength);
    1200              : 
    1201        41523 :     const std::string defaultEmergencyDecelOption = OptionsCont::getOptions().getString("default.emergencydecel");
    1202        41523 :     if (defaultEmergencyDecelOption == "default") {
    1203        41150 :         MSGlobals::gDefaultEmergencyDecel = VTYPEPARS_DEFAULT_EMERGENCYDECEL_DEFAULT;
    1204          373 :     } else if (defaultEmergencyDecelOption == "decel") {
    1205          357 :         MSGlobals::gDefaultEmergencyDecel = VTYPEPARS_DEFAULT_EMERGENCYDECEL_DECEL;
    1206              :     } else {
    1207              :         // value already checked in checkOptions()
    1208           16 :         MSGlobals::gDefaultEmergencyDecel = StringUtils::toDouble(defaultEmergencyDecelOption);
    1209              :     }
    1210        41523 :     MSGlobals::gNumSimThreads = oc.getInt("threads");
    1211        41523 :     MSGlobals::gNumThreads = MAX2(MSGlobals::gNumSimThreads, oc.getInt("device.rerouting.threads"));
    1212              : 
    1213        41523 :     MSGlobals::gEmergencyDecelWarningThreshold = oc.getFloat("emergencydecel.warning-threshold");
    1214        41523 :     MSGlobals::gMinorPenalty = oc.getFloat("weights.minor-penalty");
    1215        41523 :     MSGlobals::gTLSPenalty = oc.getFloat("weights.tls-penalty");
    1216        41523 :     MSGlobals::gTurnaroundPenalty = oc.getFloat("weights.turnaround-penalty");
    1217              : 
    1218        41523 :     MSGlobals::gModelParkingManoeuver = oc.getBool("parking.maneuver");
    1219              : 
    1220        41523 :     MSGlobals::gStopTolerance = oc.getFloat("ride.stop-tolerance");
    1221        41523 :     MSGlobals::gTLSYellowMinDecel = oc.getFloat("tls.yellow.min-decel");
    1222        41523 :     MSGlobals::gUseStopEnded = oc.getBool("use-stop-ended");
    1223        41523 :     MSGlobals::gUseStopStarted = oc.getBool("use-stop-started");
    1224              : 
    1225              :     SVCPermissions defaultClasses = 0;
    1226       290649 :     for (const std::string& vClassName : oc.getStringVector("railsignal.default-classes")) {
    1227       207603 :         defaultClasses |= parseVehicleClasses(vClassName);
    1228              :     }
    1229              :     SVCPermissions mBdefaultClasses = 0;
    1230       166087 :     for (const std::string& vClassName : oc.getStringVector("railsignal.moving-block.default-classes")) {
    1231        83041 :         mBdefaultClasses |= parseVehicleClasses(vClassName);
    1232              :     }
    1233              :     MSRailSignalControl::initSignalized(defaultClasses, mBdefaultClasses);
    1234              : 
    1235              :     std::string error;
    1236        83046 :     if (!SUMOVehicleParameter::parseDepartLane(oc.getString("default.departlane"), "options", "",
    1237              :             MSEdge::getDefaultDepartLane(),
    1238              :             MSEdge::getDefaultDepartLaneDefinition(), error)) {
    1239            0 :         WRITE_ERROR(error);
    1240              :     }
    1241        83046 :     if (!SUMOVehicleParameter::parseDepartSpeed(oc.getString("default.departspeed"), "options", "",
    1242              :             MSLane::getDefaultDepartSpeed(),
    1243              :             MSLane::getDefaultDepartSpeedDefinition(), error)) {
    1244            0 :         WRITE_ERROR(error);
    1245              :     }
    1246              : 
    1247              : #ifdef _DEBUG
    1248              :     if (oc.isSet("movereminder-output")) {
    1249              :         MSBaseVehicle::initMoveReminderOutput(oc);
    1250              :     }
    1251              : #endif
    1252        41523 : }
    1253              : 
    1254              : 
    1255              : /****************************************************************************/
        

Generated by: LCOV version 2.0-1