Node
A Node is a point in network. A Node can have multiple input nodes and only one output node. And a Node can also have multiple attributes identifiable with their unique name, along with timeseries values also identifiable with their names.
If you understand graph theory, then node in nadi network is the same as a node in a graph.
Nodes in NADI Network are identified by their name, that is loaded from the network file. Node names are string values, even if they are integer or float, they are read and internally stored as strings. If the node name contains characters outside of alphanumeric and underscore (_
), it has to be quoted.
i.e. valid names like 123
or node_1
can appear unquoted or quoted, but names like node-123
needs to be quoted: "node-123"
.
network load_str("
123 -> node_1
node_1 -> \"node-123\"
")
node.NAME
Results:
{
node-123 = "node-123",
node_1 = "node_1",
123 = "123"
}
If you do not quote the name, you’ll get an error:
network load_str("123 -> node-1")
node.NAME
*Error*:
Error in function load_str: Error: Parse Error at Line 1 Column 8
123 -> node-1
^ Incomplete Path; expected node here