File network format

 

The network instances generate by randNet code are stored in an ASCII files with a format similar to the DIMACS format.

To make easier the description of the format we use, an example of a random directed network with four nodes, five arcs, and three criteria is presented (click here to download the network example):

 

c       seed = 123456789

c

c       Random directed network

c

T       r d

c

N       4

c

A       5

c

k       3

c

s       4

c

t       1

c

a       3 1 3 6 6

a       1 3 4 8 5

a       4 3 2 5 8

a       2 4 5 2 5

a       1 2 3 1 4

 

Each line of this file starts with one of the following character:

The next one concerns to the arc orientation:

a: arc information containing the tail node, the head node and the costs.

 

Notice that the seed used is written (as a comment) to make possible generate this instances at any time.

 

For Euclidean networks, the coordinates of each node are also displayed.

Thus, if the previous example concerns to this situation generated on a 100x100 mesh, one can see the following changes:

 

c       seed = 123456789

c

c       Euclidean directed network

c

T       e d

c

N       4

c

A       5

c

k       3

c

c       100x100

v       2 46 45

v       4 73 45

v       1 56 34

v       3 9 29

c

s       4

c

t       3

c

a       1 3 47 8 5

a       3 2 40 8 7

a       4 1 20 1 4

a       2 4 27 6 6

a       1 4 20 2 5

 

 

Character “v” is used to represent the coordinates (second and third values in that line) of each vertex (the first value).

So, the first node is positioned on the coordinates (56, 34) and the last one on (73, 45).

Let it remarks that the first component of the 3-uple cost (the value 20 in the last line) the nearest integer from sqrt((56-73)2 + (34-45)2) ~ 20.25