Hello,
I have 2 networks, let's call them network A and network B.
At runtime I need to connect n instances of network A to a node in network B. The connection would be 1 to 1 (one node in network A to a single node of
network B).
I would like to build network A only once, preferably by reading it from the file and then add arcs between connection nodes in network A instances to the node in network B. Is it possible with current JSmile implementation
to write something like
Network a1 = new Network();
Network a2 = new Network();
a1.readFile("aNet.xdsl");
a2.readFile("aNet.xdsl");
Network b = new Network();
b.readFile("bNet.xdsl");
b.getNode("bConnId").addArc(a1.getNode("aConnId));
b.getNode("bConnId").addArc(a2.getNode("aConnId));
Thanks,
Adrian
Dynamically added network
-
- Site Admin
- Posts: 1417
- Joined: Mon Nov 26, 2007 5:51 pm
Re: Dynamically added network
There's no way to connect nodes in two different networks.
I'm not sure what you're trying to achieve, but I guess you should add nodes from B to A (by creating new nodes of the same type and containing the same parameters in network A), then create appropriate arcs.
I'm not sure what you're trying to achieve, but I guess you should add nodes from B to A (by creating new nodes of the same type and containing the same parameters in network A), then create appropriate arcs.