In this example, we will demonstrate how to build and edit .NET file in Cube. For building and editing networks, we will use NETWORK program.
First step, we would like to build network from text file.
Link file is the following:
the field names are A, B, Distance, Speed, Capacity, and class.
Class=2 centroid connectors
Node file is the following:
The field names are N, X, Y
N: the node number
X, Y: the X Y coordinates
Note: N is a mandatory field for a NODEI file. Also if you want to view your network in Cube, X Y coordinates must be provided as well.
After we build the network in Cube (as NETWORK 1 in the attached catalog), you can view the following network:
Now, we will show you how to obtain link and node information in Cube, see NETWORK 2 in the attached catalog.
If you want to obtain node X Y coordinates, you need to get them in the LINKMERGE phase, since those information is actually carried on the links (See NETWORK 2).
Deleting/adding links and nodes are demonstrated in NETWORK 3 and 4.
Note: for adding links and nodes, the LINKI and NODEI needs to be paired. In our example,
The LINKI is the file for new links. You need to specific NODEI for the new nodes!
The last step is to add new attributes to the links, see NETWORK 5.
Note: for any variable name not starting with '' , they will be added to your output network.
for variable names start with '', they are considered as temporal variables therefore, they won't be in the output network.
The sample catalog is attached. Feel free to change any script/input for your practice.
editNetwork.rar (21.5 KB)