42 #ifdef CHECK_MEMORY_LEAKS
44 #endif // CHECK_MEMORY_LEAKS
56 oc.
addDescription(
"grid",
"Grid Network",
"Forces NETGEN to build a grid-like network");
61 oc.
addDescription(
"grid.number",
"Grid Network",
"The number of junctions in both dirs");
66 oc.
addDescription(
"grid.length",
"Grid Network",
"The length of streets in both dirs");
69 oc.
addSynonyme(
"grid.x-number",
"grid-x-number",
true);
71 oc.
addDescription(
"grid.x-number",
"Grid Network",
"The number of junctions in x-dir; Overrides --grid-number");
74 oc.
addSynonyme(
"grid.y-number",
"grid-y-number",
true);
76 oc.
addDescription(
"grid.y-number",
"Grid Network",
"The number of junctions in y-dir; Overrides --grid-number");
79 oc.
addSynonyme(
"grid.x-length",
"grid-x-length",
true);
81 oc.
addDescription(
"grid.x-length",
"Grid Network",
"The length of horizontal streets; Overrides --grid-length");
84 oc.
addSynonyme(
"grid.y-length",
"grid-y-length",
true);
86 oc.
addDescription(
"grid.y-length",
"Grid Network",
"The length of vertical streets; Overrides --grid-length");
89 oc.
addSynonyme(
"grid.attach-length",
"attach-length",
true);
90 oc.
addDescription(
"grid.attach-length",
"Grid Network",
"The length of streets attached at the boundary; 0 means no streets are attached");
96 oc.
addDescription(
"spider",
"Spider Network",
"Forces NETGEN to build a spider-net-like network");
99 oc.
addSynonyme(
"spider.arm-number",
"spider-arm-number",
true);
101 oc.
addDescription(
"spider.arm-number",
"Spider Network",
"The number of axes within the net");
104 oc.
addSynonyme(
"spider.circle-number",
"spider-circle-number",
true);
106 oc.
addDescription(
"spider.circle-number",
"Spider Network",
"The number of circles of the net");
109 oc.
addSynonyme(
"spider.space-radius",
"spider-space-rad",
true);
111 oc.
addDescription(
"spider.space-radius",
"Spider Network",
"The distances between the circles");
114 oc.
addSynonyme(
"spider.omit-center",
"spider-omit-center",
true);
116 oc.
addDescription(
"spider.omit-center",
"Spider Network",
"Omit the central node of the network");
122 oc.
addDescription(
"rand",
"Random Network",
"Forces NETGEN to build a random network");
125 oc.
addSynonyme(
"rand.iterations",
"rand-iterations",
true);
127 oc.
addDescription(
"rand.iterations",
"Random Network",
"Describes how many times an edge shall be added to the net");
130 oc.
addSynonyme(
"rand.bidi-probability",
"rand-bidi-probability",
true);
132 oc.
addDescription(
"rand.bidi-probability",
"Random Network",
"Defines the probability to build a reverse edge");
135 oc.
addSynonyme(
"rand.max-distance",
"rand-max-distance",
true);
140 oc.
addSynonyme(
"rand.min-distance",
"rand-min-distance",
true);
145 oc.
addSynonyme(
"rand.min-angle",
"rand-min-anglee",
true);
150 oc.
addSynonyme(
"rand.num-tries",
"rand-num-tries",
true);
155 oc.
addSynonyme(
"rand.connectivity",
"rand-connectivity",
true);
156 oc.
addSynonyme(
"rand.connectivity",
"connectivity");
160 oc.
addSynonyme(
"rand.neighbor-dist1",
"rand-neighbor-dist1",
true);
165 oc.
addSynonyme(
"rand.neighbor-dist2",
"rand-neighbor-dist2",
true);
170 oc.
addSynonyme(
"rand.neighbor-dist3",
"rand-neighbor-dist3",
true);
175 oc.
addSynonyme(
"rand.neighbor-dist4",
"rand-neighbor-dist4",
true);
180 oc.
addSynonyme(
"rand.neighbor-dist5",
"rand-neighbor-dist5",
true);
185 oc.
addSynonyme(
"rand.neighbor-dist6",
"rand-neighbor-dist6",
true);
207 WRITE_ERROR(
"You have to specify the type of network to generate.");
211 WRITE_ERROR(
"You may specify only one type of network to generate at once.");
215 if (oc.
isSet(
"default-junction-type")) {
216 std::string type = oc.
getString(
"default-junction-type");
225 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.