SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AGFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
10 // Configuration of the options of ActivityGen
11 /****************************************************************************/
12 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
14 // activitygen module
15 // Copyright 2010 TUM (Technische Universitaet Muenchen, http://www.tum.de/)
16 /****************************************************************************/
17 //
18 // This file is part of SUMO.
19 // SUMO is free software: you can redistribute it and/or modify
20 // it under the terms of the GNU General Public License as published by
21 // the Free Software Foundation, either version 3 of the License, or
22 // (at your option) any later version.
23 //
24 /****************************************************************************/
25 
26 
27 // ===========================================================================
28 // included modules
29 // ===========================================================================
30 #ifdef _MSC_VER
31 #include <windows_config.h>
32 #else
33 #include <config.h>
34 #endif
35 
36 #ifdef HAVE_VERSION_H
37 #include <version.h>
38 #endif
39 
40 #include "AGFrame.h"
41 #include <router/ROFrame.h>
42 #include <duarouter/RODUAFrame.h>
46 
47 
48 // ===========================================================================
49 // method definitions
50 // ===========================================================================
53  // give some application descriptions
55  "Generates routes of persons throughout a day for the microscopic road traffic simulation SUMO.");
56  oc.setApplicationName("activitygen", "SUMO activitygen Version " + (std::string)VERSION_STRING);
57  oc.addCopyrightNotice("Copyright (C) 2010-2011 Technische Universitaet Muenchen");
58  // Options handling
59  oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --rand",
60  "generate a route file from a stats file on a given net using arbitrary random seed");
61  oc.addCallExample("--net-file <INPUT>.net.xml --stat-file <INPUT>.stat.xml --output <OUTPUT>.rou.xml --duration-d <NBR_OF_DAYS>",
62  "generate a route file from a stats file on a given net for numerous days (with fixed random seed)");
63 
64  // Add categories and insert the standard options
66  oc.addOptionSubTopic("Input");
67  oc.addOptionSubTopic("Output");
68  oc.addOptionSubTopic("Processing");
69  oc.addOptionSubTopic("Time");
72 
73  // Insert options
74  oc.doRegister("net-file", 'n', new Option_FileName());
75  oc.addSynonyme("net-file", "net");
76  oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on");
77 
78  oc.doRegister("stat-file", 's', new Option_FileName());
79  oc.addDescription("stat-file", "Input", "Loads the SUMO-statistics FILE");
80 
81  oc.doRegister("output-file", 'o', new Option_FileName());
82  oc.addSynonyme("output-file", "output", true);
83  oc.addDescription("output-file", "Output", "Write generated routes to FILE");
84 
85  oc.doRegister("debug", new Option_Bool(false));
86  oc.addDescription("debug", "Report",
87  "Detailed messages about every single step");
88 
89  // TODO: What time options are consistent with other parts of SUMO and
90  // useful for the user?
91  oc.doRegister("begin", 'b', new Option_Integer());
92  oc.addDescription("begin", "Time", "Sets the time of beginning of the simulation during the first day (in seconds)");
93 
94  oc.doRegister("end", 'e', new Option_Integer());
95  oc.addDescription("end", "Time", "Sets the time of ending of the simulation during the last day (in seconds)");
96 
97  oc.doRegister("duration-d", new Option_Integer());
98  oc.addDescription("duration-d", "Time", "Sets the duration of the simulation in days");
99 
100  // Options needed by the router
101  oc.doRegister("weights.interpolate", new Option_Bool(false));
102  oc.addSynonyme("weights.interpolate", "interpolate", true);
103  oc.addDescription("weights.interpolate", "Processing", "Interpolate edge weights at interval boundaries");
104 
105  oc.doRegister("weights.expand", new Option_Bool(false));
106  oc.addSynonyme("weights.expand", "expand-weights", true);
107  oc.addDescription("weights.expand", "Processing", "Expand weights behind the simulation's end");
108 }
109 
110 
112  return true;
113 }