Environmental Engineering Reference
In-Depth Information
4.4.2 Random Generation
In case of larger number of nodes, a choice can be made to connect them entirely randomly.
Pseudo-random number generator (PRNG) can be linked with serial number of combinations
in each row, as it is shown in Table 4.9; the random number i picks the i +1 th combination of
edges Skipping of the rows is also possible in this case; an example of row 2 is shown in
Table 4.10.
Randomly generated networks will be erratic in terms of complexity and connectivity. Also,
the number of useless layouts within the number of selected generations can be high i.e. the
real number of generated networks that can be of proper use is unpredictable. This becomes
clear only after the screening process has been completed.
Table 4.9 Random generation of a sub-graph
Random
number
Selected
edge(s)
Selected
connectivity
Combination of edges
Unselected edge combinations
1, 2, 3, (1,2), (1,3), (2,3),
(1,2,3)
Row 1
2
3
{3}
1, 2, (1,2), (1,3), (2,3), (1, 2, 3)
Row 2
5
0
5
{3,5}
-
Row 3
6
0
6
{3,5,6}
-
Table 4.10 Random generation of a sub-graph
Random
number
Selected
edge(s)
Selected
connectivity
Combination of edges
Unselected edge combinations
1, 2, 3, (1,2), (1,3), (2,3),
(1,2,3)
Row 1
4
(1,3)
{1,3}
1,2,3, (1,2), (2,3), (1,2,3)
Row 2
(skipped)
-
-
-
-
-
Row 3
6
0
6
{1,3,6}
-
4.5
ALGORITHM OF NETWORK GENERATION TOOL
The NGT works with EPANET file in INP-format that contains preferred set of junctions
with default or user-defined values; that file is prepared in advance. Two additional text files
with unique names, Rep1.txt and Rep2.txt , are also to be prepared in advance based on the
total number of nodes in the *.inp file. Rep1.txt contains codes MX (stored one per row) used
to represent dual edges from the combination list in Table 4.8, while Rep2.txt contains codes
NX (also stored one per row) representing triple edge combinations. Both files can be used
for multiple *.inp files provided that MX and NX are not less than 6( n -1) and 3( n -1),
respectively. For example, for networks up to 200 nodes Rep1.txt should contain the column
Search WWH ::




Custom Search