41 oc.
addDescription(
"type-files",
"Input",
TL(
"Read edge-type defs from FILE"));
44 oc.
addDescription(
"alphanumerical-ids",
"Output",
TL(
"The Ids of generated nodes use an alphanumerical code for easier readability when possible"));
48 oc.
addDescription(
"turn-lanes",
"Processing",
TL(
"Generate INT left-turn lanes"));
50 oc.
addDescription(
"turn-lanes.length",
"Processing",
TL(
"Set the length of generated turning lanes to FLOAT"));
53 oc.
addDescription(
"perturb-x",
"Processing",
TL(
"Apply random spatial perturbation in x direction according to the given distribution"));
55 oc.
addDescription(
"perturb-y",
"Processing",
TL(
"Apply random spatial perturbation in y direction according to the given distribution"));
57 oc.
addDescription(
"perturb-z",
"Processing",
TL(
"Apply random spatial perturbation in z direction according to the given distribution"));
60 oc.
addSynonyme(
"bidi-probability",
"rand-bidi-probability",
true);
61 oc.
addSynonyme(
"bidi-probability",
"rand.bidi-probability");
63 oc.
addDescription(
"bidi-probability",
"Processing",
TL(
"Defines the probability to build a reverse edge"));
66 oc.
addSynonyme(
"random-lanenumber",
"rand.random-lanenumber",
false);
67 oc.
addDescription(
"random-lanenumber",
"Processing",
TL(
"Draw lane numbers randomly from [1,default.lanenumber]"));
70 oc.
addSynonyme(
"random-priority",
"rand.random-priority",
false);
71 oc.
addDescription(
"random-priority",
"Processing",
TL(
"Draw edge priority randomly from [1,default.priority]"));
74 oc.
addDescription(
"random-type",
"Processing",
TL(
"Draw edge type randomly from all loaded types"));
80 oc.
addDescription(
"grid",
"Grid Network",
TL(
"Forces NETGEN to build a grid-like network"));
85 oc.
addDescription(
"grid.number",
"Grid Network",
TL(
"The number of junctions in both dirs"));
90 oc.
addDescription(
"grid.length",
"Grid Network",
TL(
"The length of streets in both dirs"));
93 oc.
addSynonyme(
"grid.x-number",
"grid-x-number",
true);
95 oc.
addDescription(
"grid.x-number",
"Grid Network",
TL(
"The number of junctions in x-dir; Overrides --grid-number"));
98 oc.
addSynonyme(
"grid.y-number",
"grid-y-number",
true);
100 oc.
addDescription(
"grid.y-number",
"Grid Network",
TL(
"The number of junctions in y-dir; Overrides --grid-number"));
103 oc.
addSynonyme(
"grid.x-length",
"grid-x-length",
true);
105 oc.
addDescription(
"grid.x-length",
"Grid Network",
TL(
"The length of horizontal streets; Overrides --grid-length"));
108 oc.
addSynonyme(
"grid.y-length",
"grid-y-length",
true);
110 oc.
addDescription(
"grid.y-length",
"Grid Network",
TL(
"The length of vertical streets; Overrides --grid-length"));
113 oc.
addSynonyme(
"grid.attach-length",
"attach-length",
true);
114 oc.
addDescription(
"grid.attach-length",
"Grid Network",
TL(
"The length of streets attached at the boundary; 0 means no streets are attached"));
117 oc.
addDescription(
"grid.x-attach-length",
"Grid Network",
TL(
"The length of streets attached at the boundary in x direction; 0 means no streets are attached"));
119 oc.
addDescription(
"grid.y-attach-length",
"Grid Network",
TL(
"The length of streets attached at the boundary in y direction; 0 means no streets are attached"));
124 oc.
addDescription(
"spider",
"Spider Network",
TL(
"Forces NETGEN to build a spider-net-like network"));
127 oc.
addSynonyme(
"spider.arm-number",
"spider-arm-number",
true);
129 oc.
addDescription(
"spider.arm-number",
"Spider Network",
TL(
"The number of axes within the net"));
132 oc.
addSynonyme(
"spider.circle-number",
"spider-circle-number",
true);
134 oc.
addDescription(
"spider.circle-number",
"Spider Network",
TL(
"The number of circles of the net"));
137 oc.
addSynonyme(
"spider.space-radius",
"spider-space-rad",
true);
139 oc.
addDescription(
"spider.space-radius",
"Spider Network",
TL(
"The distances between the circles"));
142 oc.
addSynonyme(
"spider.omit-center",
"spider-omit-center",
true);
144 oc.
addDescription(
"spider.omit-center",
"Spider Network",
TL(
"Omit the central node of the network"));
147 oc.
addDescription(
"spider.attach-length",
"Spider Network",
TL(
"The length of streets attached at the boundary; 0 means no streets are attached"));
152 oc.
addDescription(
"rand",
"Random Network",
TL(
"Forces NETGEN to build a random network"));
155 oc.
addSynonyme(
"rand.iterations",
"rand-iterations",
true);
157 oc.
addDescription(
"rand.iterations",
"Random Network",
TL(
"Describes how many times an edge shall be added to the net"));
160 oc.
addSynonyme(
"rand.max-distance",
"rand-max-distance",
true);
162 oc.
addDescription(
"rand.max-distance",
"Random Network",
TL(
"The maximum distance for each edge"));
165 oc.
addSynonyme(
"rand.min-distance",
"rand-min-distance",
true);
167 oc.
addDescription(
"rand.min-distance",
"Random Network",
TL(
"The minimum distance for each edge"));
170 oc.
addSynonyme(
"rand.min-angle",
"rand-min-anglee",
true);
172 oc.
addDescription(
"rand.min-angle",
"Random Network",
TL(
"The minimum angle for each pair of (bidirectional) roads in DEGREES"));
175 oc.
addSynonyme(
"rand.num-tries",
"rand-num-tries",
true);
177 oc.
addDescription(
"rand.num-tries",
"Random Network",
TL(
"The number of tries for creating each node"));
180 oc.
addSynonyme(
"rand.connectivity",
"rand-connectivity",
true);
181 oc.
addSynonyme(
"rand.connectivity",
"connectivity");
182 oc.
addDescription(
"rand.connectivity",
"Random Network",
TL(
"Probability for roads to continue at each node"));
185 oc.
addSynonyme(
"rand.neighbor-dist1",
"rand-neighbor-dist1",
true);
187 oc.
addDescription(
"rand.neighbor-dist1",
"Random Network",
TL(
"Probability for a node having exactly 1 neighbor"));
190 oc.
addSynonyme(
"rand.neighbor-dist2",
"rand-neighbor-dist2",
true);
192 oc.
addDescription(
"rand.neighbor-dist2",
"Random Network",
TL(
"Probability for a node having exactly 2 neighbors"));
195 oc.
addSynonyme(
"rand.neighbor-dist3",
"rand-neighbor-dist3",
true);
197 oc.
addDescription(
"rand.neighbor-dist3",
"Random Network",
TL(
"Probability for a node having exactly 3 neighbors"));
200 oc.
addSynonyme(
"rand.neighbor-dist4",
"rand-neighbor-dist4",
true);
202 oc.
addDescription(
"rand.neighbor-dist4",
"Random Network",
TL(
"Probability for a node having exactly 4 neighbors"));
205 oc.
addSynonyme(
"rand.neighbor-dist5",
"rand-neighbor-dist5",
true);
207 oc.
addDescription(
"rand.neighbor-dist5",
"Random Network",
TL(
"Probability for a node having exactly 5 neighbors"));
210 oc.
addSynonyme(
"rand.neighbor-dist6",
"rand-neighbor-dist6",
true);
212 oc.
addDescription(
"rand.neighbor-dist6",
"Random Network",
TL(
"Probability for a node having exactly 6 neighbors"));
215 oc.
addDescription(
"rand.grid",
"Random Network",
TL(
"Place nodes on a regular grid with spacing rand.min-distance"));
235 WRITE_ERROR(
TL(
"You have to specify the type of network to generate."));
239 WRITE_ERROR(
TL(
"You may specify only one type of network to generate at once."));
243 if (oc.
isSet(
"default-junction-type")) {
244 std::string type = oc.
getString(
"default-junction-type");
257 WRITE_ERROR(
"Only the following junction types are known: " +
273 if (oc.
getBool(
"random-type") && !oc.
isSet(
"type-files")) {
274 WRITE_WARNING(
TL(
"Option 'random-type' takes no effect unless 'type-files' are loaded"));
#define WRITE_WARNING(msg)
@ TRAFFIC_LIGHT_RIGHT_ON_RED
@ TRAFFIC_LIGHT_NOJUNCTION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
static void fillOptions()
Inserts options used by the network generator.
static bool checkOptions()
Checks set options from the OptionsCont-singleton for being valid.
A storage for options typed value containers)
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.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
void addSynonyme(const std::string &name1, const std::string &name2, bool isDeprecated=false)
Adds a synonyme for an options name (any order)
void doRegister(const std::string &name, Option *o)
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.