Line data Source code
1 : /****************************************************************************/
2 : // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 : // Copyright (C) 2001-2026 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 <utils/common/Translation.h>
34 : #include <router/ROFrame.h>
35 : #include <duarouter/RODUAFrame.h>
36 : #include <utils/common/SystemFrame.h>
37 : #include <utils/common/RandHelper.h>
38 : #include <utils/options/OptionsCont.h>
39 :
40 :
41 : // ===========================================================================
42 : // method definitions
43 : // ===========================================================================
44 14 : void AGFrame::fillOptions() {
45 14 : OptionsCont& oc = OptionsCont::getOptions();
46 : // Options handling
47 28 : oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --rand",
48 14 : TL("generate a trips file from a stats file on a given net using arbitrary random seed"));
49 28 : oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --duration-d <NBR_OF_DAYS>",
50 14 : TL("generate a trips file from a stats file on a given net for numerous days (with fixed random seed)"));
51 :
52 : // Add categories and insert the standard options
53 14 : SystemFrame::addConfigurationOptions(oc);
54 14 : oc.addOptionSubTopic("Input");
55 14 : oc.addOptionSubTopic("Output");
56 14 : oc.addOptionSubTopic("Processing");
57 14 : oc.addOptionSubTopic("Time");
58 :
59 : // Insert options
60 14 : oc.doRegister("net-file", 'n', new Option_FileName());
61 28 : oc.addSynonyme("net-file", "net");
62 28 : oc.addDescription("net-file", "Input", TL("Use FILE as SUMO-network to create trips for"));
63 :
64 14 : oc.doRegister("stat-file", 's', new Option_FileName());
65 28 : oc.addDescription("stat-file", "Input", TL("Loads the SUMO-statistics FILE"));
66 :
67 : // need to do this here to be able to check for network and route input options
68 14 : SystemFrame::addReportOptions(oc);
69 14 : RandHelper::insertRandOptions(oc);
70 :
71 14 : oc.doRegister("output-file", 'o', new Option_FileName());
72 28 : oc.addSynonyme("output-file", "output", true);
73 28 : oc.addDescription("output-file", "Output", TL("Write generated trips to FILE"));
74 :
75 14 : oc.doRegister("debug", new Option_Bool(false));
76 28 : oc.addDescription("debug", "Report",
77 : "Detailed messages about every single step");
78 :
79 : // TODO: What time options are consistent with other parts of SUMO and
80 : // useful for the user?
81 14 : oc.doRegister("begin", 'b', new Option_Integer(0));
82 28 : oc.addDescription("begin", "Time", TL("Sets the time of beginning of the simulation during the first day (in seconds)"));
83 :
84 14 : oc.doRegister("end", 'e', new Option_Integer(0));
85 28 : oc.addDescription("end", "Time", TL("Sets the time of ending of the simulation during the last day (in seconds)"));
86 :
87 14 : oc.doRegister("duration-d", new Option_Integer(1));
88 28 : oc.addDescription("duration-d", "Time", TL("Sets the duration of the simulation in days"));
89 14 : }
90 :
91 :
92 0 : bool AGFrame::checkOptions() {
93 0 : return true;
94 : }
|