Function Assignment(filename: string; Atype,Grouped: smallint): integer;
Assigns traffic to a network based on a list with traffic volumes between pairs of coordinates or node numbers.
Filename holds the name of the file with traffic to be assigned. This is the full filename and doesn't rely on property "Directory".
If Atype=0 each line in the file holds pairs of nodes and the traffic volume:
<node1 node2 volume>
If Atype=1 each line in the file holds pairs of coordinates and the traffic volume:
<x1 y1 x2 y2 volume>
If Grouped=1, it is assumed that multiple occurrences of node1 or (x1,y1) is grouped together.
If Grouped=0, it is assumed they are in random order.
The value of Grouped doesn't matter, but performance suffer if the wrong value is used as input.
If a traffic volume can not be assigned because the corresponding nodes are not connected, the function stops and returns a positive number which contains the line number with the problem.
The result can be saved with ResultSaveLink.
Possible error codes: -10 -40 -41 -43
Versions: Pro
ActiveX / VCL / CLX component: RWcalc