00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifdef _MSC_VER
00025 #include <windows_config.h>
00026 #else
00027 #include <config.h>
00028 #endif
00029
00030 #include <iostream>
00031 #include <fstream>
00032 #include <ctime>
00033 #include <utils/options/OptionsCont.h>
00034 #include <utils/options/Option.h>
00035 #include <utils/common/MsgHandler.h>
00036 #include <utils/common/UtilExceptions.h>
00037 #include <utils/common/ToString.h>
00038 #include <utils/common/SystemFrame.h>
00039 #include "RODFFrame.h"
00040 #include <router/ROFrame.h>
00041 #include <utils/common/RandHelper.h>
00042
00043
00044 #ifdef CHECK_MEMORY_LEAKS
00045 #include <foreign/nvwa/debug_new.h>
00046 #endif // CHECK_MEMORY_LEAKS
00047
00048
00049
00050
00051
00052 void
00053 RODFFrame::fillOptions() {
00054 OptionsCont &oc = OptionsCont::getOptions();
00055 oc.addCallExample("-c <CONFIGURATION>");
00056
00057
00058 SystemFrame::addConfigurationOptions(oc);
00059 oc.addOptionSubTopic("Input");
00060 oc.addOptionSubTopic("Output");
00061 oc.addOptionSubTopic("Processing");
00062 oc.addOptionSubTopic("Time");
00063 SystemFrame::addReportOptions(oc);
00064
00065
00066
00067
00068 oc.doRegister("net-file", 'n', new Option_FileName());
00069 oc.addSynonyme("net-file", "net");
00070 oc.addDescription("net-file", "Input", "Loads the SUMO-network FILE");
00071
00072 oc.doRegister("routes-input", 'r', new Option_FileName());
00073 oc.addDescription("routes-input", "Input", "Loads SUMO-routes from FILE");
00074
00075 oc.doRegister("detector-files", 'd', new Option_FileName());
00076 oc.addSynonyme("detector-files", "detectors");
00077 oc.addDescription("detector-files", "Input", "Loads detector descriptions from FILE");
00078
00079 oc.doRegister("detector-flow-files", 'f', new Option_FileName());
00080 oc.addSynonyme("detector-flow-files", "detflows");
00081 oc.addDescription("detector-flow-files", "Input", "Loads detector flows from FILE(s)");
00082
00083
00084
00085 oc.doRegister("routes-output", 'o', new Option_FileName());
00086 oc.addDescription("routes-output", "Output", "Saves computed routes to FILE");
00087
00088 oc.doRegister("routes-for-all", new Option_Bool(false));
00089 oc.addDescription("routes-for-all", "Output", "Forces DFROUTER to compute routes for in-between detectors");
00090
00091 oc.doRegister("detectors-output", new Option_FileName());
00092 oc.addDescription("detectors-output", "Output", "Saves typed detectors to FILE");
00093
00094 oc.doRegister("detectors-poi-output", new Option_FileName());
00095 oc.addDescription("detectors-poi-output", "Output", "Saves detector positions as pois to FILE");
00096
00097 oc.doRegister("emitters-output", new Option_FileName());
00098 oc.addDescription("emitters-output", "Output", "Saves emitter definitions for source detectors to FILE");
00099
00100 oc.doRegister("emitters-poi-output", new Option_FileName());
00101 oc.addDescription("emitters-poi-output", "Output", "Saves emitter positions as pois to FILE");
00102
00103 oc.doRegister("speed-trigger-output", new Option_FileName());
00104 oc.addDescription("speed-trigger-output", "Output", "Saves variable seed sign definitions for sink detectors to FILE");
00105
00106 oc.doRegister("end-reroute-output", new Option_FileName());
00107 oc.addDescription("end-reroute-output", "Output", "Saves rerouter definitions for sink detectors to FILE");
00108
00109 oc.doRegister("validation-output", new Option_FileName());
00110 oc.addDescription("validation-output", "Output", "");
00111
00112 oc.doRegister("validation-output.add-sources", new Option_Bool(false));
00113 oc.addDescription("validation-output.add-sources", "Output", "");
00114
00115
00116
00117
00118 oc.doRegister("guess-empty-flows", new Option_Bool(false));
00119 oc.addDescription("guess-empty-flows", "Processing", "");
00120
00121
00122 oc.doRegister("highway-mode", 'h', new Option_Bool(false));
00123 oc.addDescription("highway-mode", "Processing", "Switches to highway-mode");
00124
00125
00126 oc.doRegister("ignore-invalid-detectors", new Option_Bool(false));
00127 oc.addDescription("ignore-invalid-detectors", "Processing", "Only warn about unparseable detectors");
00128
00129
00130 oc.doRegister("revalidate-detectors", new Option_Bool(false));
00131 oc.addDescription("revalidate-detectors", "Processing", "Recomputes detector types even if given");
00132
00133
00134 oc.doRegister("revalidate-routes", new Option_Bool(false));
00135 oc.addDescription("revalidate-routes", "Processing", "Recomputes routes even if given");
00136
00137 oc.doRegister("all-end-follower", new Option_Bool(false));
00138 oc.addDescription("all-end-follower", "Processing", "Continues routes till the first street after a sink");
00139
00140 oc.doRegister("keep-unfound-ends", new Option_Bool(false));
00141 oc.addDescription("keep-unfound-ends", "Processing", "Keeps routes ending at no sinks");
00142
00143 oc.doRegister("keep-longer-routes", new Option_Bool(false));
00144 oc.addDescription("keep-longer-routes", "Processing", "Keeps routes even if a shorter one exists");
00145
00146 oc.doRegister("max-nodet-follower", new Option_Integer(30));
00147 oc.addDescription("max-nodet-follower", "Processing", "Number of edges until which a route is followed");
00148
00149 oc.doRegister("emissions-only", new Option_Bool(false));
00150 oc.addDescription("emissions-only", "Processing", "Writes only emission times");
00151
00152 oc.doRegister("disallowed-edges", new Option_String(""));
00153 oc.addDescription("disallowed-edges", "Processing", "Do not route on these edges");
00154
00155 oc.doRegister("keep-turnarounds", new Option_Bool(false));
00156 oc.addDescription("keep-turnarounds", "Processing", "Allow turnarounds as route continuations");
00157
00158 oc.doRegister("min-distance", new Option_Float(-1));
00159 oc.addSynonyme("min-distance", "min-dist");
00160 oc.addDescription("min-distance", "Processing", "According sink must be at least that far away");
00161
00162
00163
00164 oc.doRegister("time-offset", new Option_String("0", "TIME"));
00165 oc.addDescription("time-offset", "Processing", "Subtracts INT from flow times");
00166
00167
00168 oc.doRegister("write-calibrators", new Option_Bool(false));
00169 oc.addDescription("write-calibrators", "Processing", "");
00170
00171 oc.doRegister("include-unused-routes", new Option_Bool(false));
00172 oc.addDescription("include-unused-routes", "Processing", "");
00173
00174
00175 oc.doRegister("revalidate-flows", new Option_Bool(false));
00176 oc.addDescription("revalidate-flows", "Processing", "");
00177
00178 oc.doRegister("remove-empty-detectors", new Option_Bool(false));
00179 oc.addDescription("remove-empty-detectors", "Processing", "Removes empty detectors from the list");
00180
00181 oc.doRegister("strict-sources", new Option_Bool(false));
00182 oc.addDescription("strict-sources", "Processing", "");
00183
00184
00185 oc.doRegister("mesosim", new Option_Bool(false));
00186 oc.addDescription("mesosim", "Processing", "Joins detectors lying on same height");
00187
00188
00189 oc.doRegister("scale", new Option_Float(1.));
00190 oc.addDescription("scale", "Processing", "Scale factor for flows");
00191
00192
00193
00194
00195 oc.doRegister("begin", 'b', new Option_String("0", "TIME"));
00196 oc.addDescription("begin", "Time", "Defines the begin time; Previous defs will be discarded");
00197
00198 oc.doRegister("end", 'e', new Option_String("86400", "TIME"));
00199 oc.addDescription("end", "Time", "Defines the end time; Later defs will be discarded");
00200
00201
00202
00203 oc.doRegister("report-empty-detectors", new Option_Bool(false));
00204 oc.addDescription("report-empty-detectors", "Report", "Lists detectors with no flow (enable -v)");
00205
00206 oc.doRegister("print-absolute-flows", new Option_Bool(false));
00207 oc.addDescription("print-absolute-flows", "Report", "Prints aggregated detector flows");
00208
00209 RandHelper::insertRandOptions();
00210 }
00211
00212
00213 bool
00214 RODFFrame::checkOptions() {
00215 return true;
00216 }
00217
00218
00219
00220
00221