RODUAFrame Class Reference

#include <RODUAFrame.h>


Detailed Description

Sets and checks options for dua-routing.

Definition at line 40 of file RODUAFrame.h.


Static Public Member Functions

static bool checkOptions ()
 Checks set options from the OptionsCont-singleton for being valid for usage within duarouter.
static void fillOptions ()
 Inserts options used by duarouter into the OptionsCont-singleton.

Static Protected Member Functions

static void addDUAOptions ()
 Inserts dua options used by duarouter into the OptionsCont-singleton.
static void addImportOptions ()
 Inserts import options used by duarouter into the OptionsCont-singleton.

Member Function Documentation

void RODUAFrame::addDUAOptions (  )  [static, protected]

Inserts dua options used by duarouter into the OptionsCont-singleton.

Definition at line 99 of file RODUAFrame.cpp.

References OptionsCont::addDescription(), OptionsCont::doRegister(), OptionsCont::getOptions(), and SUMOReal.

Referenced by fillOptions().

00099                           {
00100     OptionsCont &oc = OptionsCont::getOptions();
00101     // register Gawron's DUE-settings
00102     oc.doRegister("gBeta", new Option_Float(SUMOReal(0.3)));
00103     oc.addDescription("gBeta", "Processing", "Use FLOAT as Gawron's beta");
00104 
00105     oc.doRegister("gA", new Option_Float((SUMOReal) 0.05));
00106     oc.addDescription("gA", "Processing", "Use FLOAT as Gawron's alpha");
00107 
00108     oc.doRegister("exit-times", new Option_Bool(false));
00109     oc.addDescription("exit-times", "Output", "Write exit times (weights) for each edge");
00110 }

void RODUAFrame::addImportOptions (  )  [static, protected]

Inserts import options used by duarouter into the OptionsCont-singleton.

Definition at line 76 of file RODUAFrame.cpp.

References OptionsCont::addDescription(), OptionsCont::addSynonyme(), OptionsCont::doRegister(), and OptionsCont::getOptions().

Referenced by fillOptions().

00076                              {
00077     OptionsCont &oc = OptionsCont::getOptions();
00078     // register import options
00079     oc.doRegister("trip-defs", 't', new Option_FileName());
00080     oc.addSynonyme("trips", "trip-defs");
00081     oc.addDescription("trip-defs", "Input", "Read trip-definitions from FILE");
00082 
00083     oc.doRegister("flow-definition", 'f', new Option_FileName());
00084     oc.addSynonyme("flow-definition", "flows");
00085     oc.addDescription("flow-definition", "Input", "Read flow-definitions from FILE");
00086 
00087     oc.doRegister("sumo-input", 's', new Option_FileName());
00088     oc.addSynonyme("sumo", "sumo-input");
00089     oc.addDescription("sumo-input", "Input", "Read sumo-routes from FILE");
00090 
00091     // register further processing options
00092     // ! The subtopic "Processing" must be initialised earlier !
00093     oc.doRegister("expand-weights", new Option_Bool(false));
00094     oc.addDescription("expand-weights", "Processing", "Expand weights behind the simulation's end");
00095 }

bool RODUAFrame::checkOptions (  )  [static]

Checks set options from the OptionsCont-singleton for being valid for usage within duarouter.

Currently, this is done via a call to "ROFrame::checkOptions".

Returns:
Whether all needed options are set
Todo:
probably, more things should be checked...

Definition at line 114 of file RODUAFrame.cpp.

References SUMOVehicleParameter::arrivallaneValidate(), SUMOVehicleParameter::arrivalposValidate(), SUMOVehicleParameter::arrivalspeedValidate(), ROFrame::checkOptions(), SUMOVehicleParameter::departlaneValidate(), SUMOVehicleParameter::departposValidate(), SUMOVehicleParameter::departspeedValidate(), OptionsCont::getOptions(), OptionsCont::getString(), and OptionsCont::isSet().

Referenced by main().

00114                          {
00115     OptionsCont &oc = OptionsCont::getOptions();
00116     bool ok = ROFrame::checkOptions(oc);
00117     ok &= (!oc.isSet("departlane") || SUMOVehicleParameter::departlaneValidate(oc.getString("departlane")));
00118     ok &= (!oc.isSet("departpos") || SUMOVehicleParameter::departposValidate(oc.getString("departpos")));
00119     ok &= (!oc.isSet("departspeed") || SUMOVehicleParameter::departspeedValidate(oc.getString("departspeed")));
00120     ok &= (!oc.isSet("arrivallane") || SUMOVehicleParameter::arrivallaneValidate(oc.getString("arrivallane")));
00121     ok &= (!oc.isSet("arrivalpos") || SUMOVehicleParameter::arrivalposValidate(oc.getString("arrivalpos")));
00122     ok &= (!oc.isSet("arrivalspeed") || SUMOVehicleParameter::arrivalspeedValidate(oc.getString("arrivalspeed")));
00123     return ok;
00124 }

void RODUAFrame::fillOptions (  )  [static]

Inserts options used by duarouter into the OptionsCont-singleton.

As duarouter shares several options with other routing appplications, the insertion of these is done via a call to ROFrame::fillOptions.

duarouter-specific options are added afterwards via calls to "addImportOptions" and "addDUAOptions".

Definition at line 53 of file RODUAFrame.cpp.

References OptionsCont::addCallExample(), SystemFrame::addConfigurationOptions(), addDUAOptions(), addImportOptions(), OptionsCont::addOptionSubTopic(), SystemFrame::addReportOptions(), ROFrame::fillOptions(), OptionsCont::getOptions(), and RandHelper::insertRandOptions().

Referenced by main().

00053                         {
00054     OptionsCont &oc = OptionsCont::getOptions();
00055     oc.addCallExample("-c <CONFIGURATION>");
00056 
00057     // insert options sub-topics
00058     SystemFrame::addConfigurationOptions(oc); // fill this subtopic, too
00059     oc.addOptionSubTopic("Input");
00060     oc.addOptionSubTopic("Output");
00061     oc.addOptionSubTopic("Processing");
00062     oc.addOptionSubTopic("Defaults");
00063     oc.addOptionSubTopic("Time");
00064     SystemFrame::addReportOptions(oc); // fill this subtopic, too
00065 
00066     // insert options
00067     ROFrame::fillOptions(oc);
00068     addImportOptions();
00069     addDUAOptions();
00070     // add rand options
00071     RandHelper::insertRandOptions();
00072 }


The documentation for this class was generated from the following files:

Generated on Wed May 5 00:06:59 2010 for Sumo - Simulation of Urban MObility by  doxygen 1.5.6