Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net2Plan-CLI throws "Element n0 is not attached to this NetPlan object" while reading traffic-file #208

Open
mahdi7 opened this issue May 23, 2018 · 2 comments

Comments

@mahdi7
Copy link

mahdi7 commented May 23, 2018

When the input-file only contains the network topology and Net2Plan-CLI is asked to load the traffic demands from the traffic-file, it results in this error:
"Element n0 (id 2) is not attached to this NetPlan object."

Even when trying the example on page 48 of the user's guide:

java -jar Net2Plan-cli.jar --mode net-design
--input-file workspace\data\networkTopologies\NSFNet_N14_E42.n2p
--traffic-file workspace\data\trafficMatrices\NSFNet.n2p
--output-file workspace\data\NSFNet.n2p
--class-file myFolder\mJar.jar
--class-name MyAlgorithm
--alg-param myParam=3

the above error message appears!

@mvbuenodelgado
Copy link

mvbuenodelgado commented May 30, 2018

If you open Net2Plan in offline Network Design & ... tool, and load NSFNet_N14_E42.n2p and NSFNet.n2p you can see in the Design table and control view how node 0 (id 2) is loaded, (Node San Diego), there are some demands where node id 2 is the ingreess and/or egreess node, etc. If you call in your algorithm the NetPlan object, where all data from traffic and topologies are stored, you should not have problem.
You should provide us a screenshot of your mJar.jar algorithm (source code) to have an idea about how to solve the error.

@mahdi7
Copy link
Author

mahdi7 commented Jun 1, 2018

As mentioned in the title, I am using the CLI, not the GUI.
The error message would come up regardless of what algorithm is called; the exception occurs while reading the traffic file and adding it to the NetPlan object of the topology.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants