#include <ROFrame.h>
Normally, these methods are called from another frame (ROJTRFrame, RODUAFrame)...
Definition at line 48 of file ROFrame.h.
Static Public Member Functions | |
| static bool | checkOptions (OptionsCont &oc) |
| Checks whether options are valid. | |
| static void | fillOptions (OptionsCont &oc) |
| Inserts options used by routing applications into the OptionsCont-singleton. | |
| bool ROFrame::checkOptions | ( | OptionsCont & | oc | ) | [static] |
Checks whether options are valid.
To be valid,
| [in] | oc | The options container to fill |
Definition at line 140 of file ROFrame.cpp.
References MsgHandler::getErrorInstance(), OptionsCont::getInt(), MsgHandler::inform(), and OptionsCont::isSet().
Referenced by ROJTRFrame::checkOptions(), and RODUAFrame::checkOptions().
00140 { 00141 // check whether the output is valid and can be build 00142 if (!oc.isSet("output")) { 00143 MsgHandler::getErrorInstance()->inform("No output specified."); 00144 return false; 00145 } 00146 // 00147 if (oc.getInt("max-alternatives")<2) { 00148 MsgHandler::getErrorInstance()->inform("At least two alternatives should be enabled"); 00149 return false; 00150 } 00151 // check departure/arrival options 00152 return true; 00153 }
| void ROFrame::fillOptions | ( | OptionsCont & | oc | ) | [static] |
Inserts options used by routing applications into the OptionsCont-singleton.
| [in] | oc | The options container to fill |
Definition at line 49 of file ROFrame.cpp.
References OptionsCont::addDescription(), OptionsCont::addSynonyme(), and OptionsCont::doRegister().
Referenced by ROJTRFrame::fillOptions(), and RODUAFrame::fillOptions().
00049 { 00050 // register options 00051 // register I/O options 00052 oc.doRegister("output", 'o', new Option_FileName()); 00053 oc.addSynonyme("output-file", "output"); 00054 oc.addDescription("output-file", "Output", "Write generated routes to FILE"); 00055 00056 oc.doRegister("net-file", 'n', new Option_FileName()); 00057 oc.addSynonyme("net-file", "net"); 00058 oc.addDescription("net-file", "Input", "Use FILE as SUMO-network to route on"); 00059 00060 oc.doRegister("districts", 'd', new Option_FileName()); 00061 oc.addDescription("districts", "Input", "Read (additional) districts from FILE"); 00062 00063 oc.doRegister("alternatives", 'a', new Option_FileName()); 00064 oc.addDescription("alternatives", "Input", "Read alternatives from FILE"); 00065 00066 oc.doRegister("weights", 'w', new Option_FileName()); 00067 oc.addSynonyme("weights", "weight-files"); 00068 oc.addDescription("weights", "Input", "Read network weights from FILE(s)"); 00069 00070 oc.doRegister("lane-weights", new Option_FileName()); 00071 oc.addDescription("lane-weights", "Input", "Read lane-weights from FILE(s)"); 00072 00073 oc.doRegister("measure", 'x', new Option_String("traveltime")); 00074 oc.addDescription("measure", "Input", "Name of the xml attribute which gives the edge weight"); 00075 00076 // register the time settings 00077 oc.doRegister("begin", 'b', new Option_String("0", "TIME")); 00078 oc.addDescription("begin", "Time", "Defines the begin time; Previous trips will be discarded"); 00079 00080 oc.doRegister("end", 'e', new Option_String("86400", "TIME")); 00081 oc.addDescription("end", "Time", "Defines the end time; Later trips will be discarded"); 00082 00083 00084 // register the processing options 00085 oc.doRegister("continue-on-unbuild", new Option_Bool(false)); 00086 oc.addDescription("continue-on-unbuild", "Processing", "Continue if a route could not be build"); 00087 00088 oc.doRegister("unsorted", new Option_Bool(false)); 00089 oc.addDescription("unsorted", "Processing", "Assume input is unsorted"); 00090 00091 oc.doRegister("randomize-flows", new Option_Bool(false)); // !!! undescibed 00092 oc.addDescription("randomize-flows", "Processing", ""); 00093 00094 oc.doRegister("max-alternatives", new Option_Integer(5)); 00095 oc.addDescription("max-alternatives", "Processing", "Prune the number of alternatives to INT"); 00096 00097 oc.doRegister("remove-loops", new Option_Bool(false)); 00098 oc.addDescription("remove-loops", "Processing", "Remove loops at start and end of the route"); 00099 00100 oc.doRegister("repair", new Option_Bool(false)); 00101 oc.addDescription("repair", "Processing", "Tries to correct a false route"); 00102 00103 oc.doRegister("interpolate", new Option_Bool(false)); 00104 oc.addDescription("interpolate", "Processing", "Interpolate edge weights at interval boundaries"); 00105 00106 oc.doRegister("with-taz", new Option_Bool(false)); 00107 oc.addDescription("with-taz", "Processing", "Use origin and destination zones (districts) for in- and output"); 00108 00109 00110 // register defaults options 00111 oc.doRegister("departlane", new Option_String()); 00112 oc.addDescription("departlane", "Defaults", "Assigns a default depart lane"); 00113 00114 oc.doRegister("departpos", new Option_String()); 00115 oc.addDescription("departpos", "Defaults", "Assigns a default depart position"); 00116 00117 oc.doRegister("departspeed", new Option_String()); 00118 oc.addDescription("departspeed", "Defaults", "Assigns a default depart speed"); 00119 00120 oc.doRegister("arrivallane", new Option_String()); 00121 oc.addDescription("arrivallane", "Defaults", "Assigns a default arrival lane"); 00122 00123 oc.doRegister("arrivalpos", new Option_String()); 00124 oc.addDescription("arrivalpos", "Defaults", "Assigns a default arrival position"); 00125 00126 oc.doRegister("arrivalspeed", new Option_String()); 00127 oc.addDescription("arrivalspeed", "Defaults", "Assigns a default arrival speed"); 00128 00129 oc.doRegister("defaults-override", new Option_Bool(false)); 00130 oc.addDescription("defaults-override", "Defaults", "Defaults will override given values"); 00131 00132 00133 // register report options 00134 oc.doRegister("stats-period", new Option_Integer(-1)); 00135 oc.addDescription("stats-period", "Report", "Defines how often statistics shall be printed"); 00136 }
1.5.6