41 #ifdef CHECK_MEMORY_LEAKS
43 #endif // CHECK_MEMORY_LEAKS
55 oc.
addDescription(
"grid",
"Grid Network",
"Forces NETGEN to build a grid-like network");
60 oc.
addDescription(
"grid.number",
"Grid Network",
"The number of junctions in both dirs");
65 oc.
addDescription(
"grid.length",
"Grid Network",
"The length of streets in both dirs");
68 oc.
addSynonyme(
"grid.x-number",
"grid-x-number",
true);
70 oc.
addDescription(
"grid.x-number",
"Grid Network",
"The number of junctions in x-dir; Overrides --grid-number");
73 oc.
addSynonyme(
"grid.y-number",
"grid-y-number",
true);
75 oc.
addDescription(
"grid.y-number",
"Grid Network",
"The number of junctions in y-dir; Overrides --grid-number");
78 oc.
addSynonyme(
"grid.x-length",
"grid-x-length",
true);
80 oc.
addDescription(
"grid.x-length",
"Grid Network",
"The length of horizontal streets; Overrides --grid-length");
83 oc.
addSynonyme(
"grid.y-length",
"grid-y-length",
true);
85 oc.
addDescription(
"grid.y-length",
"Grid Network",
"The length of vertical streets; Overrides --grid-length");
88 oc.
addSynonyme(
"grid.attach-length",
"attach-length",
true);
89 oc.
addDescription(
"grid.attach-length",
"Grid Network",
"The length of streets attached at the boundary; 0 means no streets are attached");
95 oc.
addDescription(
"spider",
"Spider Network",
"Forces NETGEN to build a spider-net-like network");
98 oc.
addSynonyme(
"spider.arm-number",
"spider-arm-number",
true);
100 oc.
addDescription(
"spider.arm-number",
"Spider Network",
"The number of axes within the net");
103 oc.
addSynonyme(
"spider.circle-number",
"spider-circle-number",
true);
105 oc.
addDescription(
"spider.circle-number",
"Spider Network",
"The number of circles of the net");
108 oc.
addSynonyme(
"spider.space-radius",
"spider-space-rad",
true);
110 oc.
addDescription(
"spider.space-radius",
"Spider Network",
"The distances between the circles");
113 oc.
addSynonyme(
"spider.omit-center",
"spider-omit-center",
true);
115 oc.
addDescription(
"spider.omit-center",
"Spider Network",
"Omit the central node of the network");
121 oc.
addDescription(
"rand",
"Random Network",
"Forces NETGEN to build a random network");
124 oc.
addSynonyme(
"rand.iterations",
"rand-iterations",
true);
126 oc.
addDescription(
"rand.iterations",
"Random Network",
"Describes how many times an edge shall be added to the net");
129 oc.
addSynonyme(
"rand.bidi-probability",
"rand-bidi-probability",
true);
131 oc.
addDescription(
"rand.bidi-probability",
"Random Network",
"Defines the probability to build a reverse edge");
134 oc.
addSynonyme(
"rand.max-distance",
"rand-max-distance",
true);
139 oc.
addSynonyme(
"rand.min-distance",
"rand-min-distance",
true);
144 oc.
addSynonyme(
"rand.min-angle",
"rand-min-anglee",
true);
149 oc.
addSynonyme(
"rand.num-tries",
"rand-num-tries",
true);
154 oc.
addSynonyme(
"rand.connectivity",
"rand-connectivity",
true);
155 oc.
addSynonyme(
"rand.connectivity",
"connectivity");
159 oc.
addSynonyme(
"rand.neighbor-dist1",
"rand-neighbor-dist1",
true);
164 oc.
addSynonyme(
"rand.neighbor-dist2",
"rand-neighbor-dist2",
true);
169 oc.
addSynonyme(
"rand.neighbor-dist3",
"rand-neighbor-dist3",
true);
174 oc.
addSynonyme(
"rand.neighbor-dist4",
"rand-neighbor-dist4",
true);
179 oc.
addSynonyme(
"rand.neighbor-dist5",
"rand-neighbor-dist5",
true);
184 oc.
addSynonyme(
"rand.neighbor-dist6",
"rand-neighbor-dist6",
true);
206 WRITE_ERROR(
"You have to specify the type of network to generate.");
210 WRITE_ERROR(
"You may specify only one type of network to generate at once.");
214 if (oc.
isSet(
"default-junction-type")) {
215 std::string type = oc.
getString(
"default-junction-type");
222 WRITE_ERROR(
"Only the following junction types are known: " +
void doRegister(const std::string &name, Option *v)
Adds an option under the given name.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
A storage for options typed value containers)
static void fillOptions()
Inserts options used by the network generator.
void addDescription(const std::string &name, const std::string &subtopic, const std::string &description)
Adds a description for an option.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.