LCOV - code coverage report
Current view: top level - src/activitygen - AGFrame.cpp (source / functions) Hit Total Coverage
Test: lcov.info Lines: 28 30 93.3 %
Date: 2024-05-01 15:34:42 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /****************************************************************************/
       2             : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
       3             : // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
       4             : // activitygen module
       5             : // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
       6             : // This program and the accompanying materials are made available under the
       7             : // terms of the Eclipse Public License 2.0 which is available at
       8             : // https://www.eclipse.org/legal/epl-2.0/
       9             : // This Source Code may also be made available under the following Secondary
      10             : // Licenses when the conditions for such availability set forth in the Eclipse
      11             : // Public License 2.0 are satisfied: GNU General Public License, version 2
      12             : // or later which is available at
      13             : // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
      14             : // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
      15             : /****************************************************************************/
      16             : /// @file    AGFrame.cpp
      17             : /// @author  Walter Bamberger
      18             : /// @author  Daniel Krajzewicz
      19             : /// @author  Jakob Erdmann
      20             : /// @author  Michael Behrisch
      21             : /// @date    Mo, 13 Sept 2010
      22             : ///
      23             : // Configuration of the options of ActivityGen
      24             : /****************************************************************************/
      25             : #include <config.h>
      26             : 
      27             : #ifdef HAVE_VERSION_H
      28             : #include <version.h>
      29             : #endif
      30             : 
      31             : #include "AGFrame.h"
      32             : #include <utils/common/StdDefs.h>
      33             : #include <router/ROFrame.h>
      34             : #include <duarouter/RODUAFrame.h>
      35             : #include <utils/common/SystemFrame.h>
      36             : #include <utils/common/RandHelper.h>
      37             : #include <utils/options/OptionsCont.h>
      38             : 
      39             : 
      40             : // ===========================================================================
      41             : // method definitions
      42             : // ===========================================================================
      43          14 : void AGFrame::fillOptions() {
      44          14 :     OptionsCont& oc = OptionsCont::getOptions();
      45             :     // Options handling
      46          28 :     oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --rand",
      47             :                       "generate a trips file from a stats file on a given net using arbitrary random seed");
      48          28 :     oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --duration-d <NBR_OF_DAYS>",
      49             :                       "generate a trips file from a stats file on a given net for numerous days (with fixed random seed)");
      50             : 
      51             :     // Add categories and insert the standard options
      52          14 :     SystemFrame::addConfigurationOptions(oc);
      53          14 :     oc.addOptionSubTopic("Input");
      54          14 :     oc.addOptionSubTopic("Output");
      55          14 :     oc.addOptionSubTopic("Processing");
      56          14 :     oc.addOptionSubTopic("Time");
      57             : 
      58             :     // Insert options
      59          28 :     oc.doRegister("net-file", 'n', new Option_FileName());
      60          28 :     oc.addSynonyme("net-file", "net");
      61          28 :     oc.addDescription("net-file", "Input", TL("Use FILE as SUMO-network to create trips for"));
      62             : 
      63          28 :     oc.doRegister("stat-file", 's', new Option_FileName());
      64          28 :     oc.addDescription("stat-file", "Input", TL("Loads the SUMO-statistics FILE"));
      65             : 
      66             :     // need to do this here to be able to check for network and route input options
      67          14 :     SystemFrame::addReportOptions(oc);
      68          14 :     RandHelper::insertRandOptions(oc);
      69             : 
      70          28 :     oc.doRegister("output-file", 'o', new Option_FileName());
      71          28 :     oc.addSynonyme("output-file", "output", true);
      72          28 :     oc.addDescription("output-file", "Output", TL("Write generated trips to FILE"));
      73             : 
      74          14 :     oc.doRegister("debug", new Option_Bool(false));
      75          28 :     oc.addDescription("debug", "Report",
      76             :                       "Detailed messages about every single step");
      77             : 
      78             :     // TODO: What time options are consistent with other parts of SUMO and
      79             :     // useful for the user?
      80          14 :     oc.doRegister("begin", 'b', new Option_Integer(0));
      81          28 :     oc.addDescription("begin", "Time", TL("Sets the time of beginning of the simulation during the first day (in seconds)"));
      82             : 
      83          14 :     oc.doRegister("end", 'e', new Option_Integer(0));
      84          28 :     oc.addDescription("end", "Time", TL("Sets the time of ending of the simulation during the last day (in seconds)"));
      85             : 
      86          14 :     oc.doRegister("duration-d", new Option_Integer(1));
      87          28 :     oc.addDescription("duration-d", "Time", TL("Sets the duration of the simulation in days"));
      88          14 : }
      89             : 
      90             : 
      91           0 : bool AGFrame::checkOptions() {
      92           0 :     return true;
      93             : }

Generated by: LCOV version 1.14