-
Notifications
You must be signed in to change notification settings - Fork 179
faq 295665665
Billy Charlton edited this page Sep 5, 2018
·
2 revisions
by Davi Bicudo on 2018-06-27 07:04:07
Hi,
I was loading a network with the method:
Scenario scenario = ScenarioUtils.loadScenario(ConfigUtils.loadConfig(path));
Network network = scenario.getNetwork();
But then when attempting network.getLinks().get(linkId), it would return null even though I knew the link was present (checked in the xml file).
Then I tried the MatsimNetworkReader approach:
Network network = NetworkUtils.createNetwork();
new MatsimNetworkReader(network).readFile(config.network().getInputFile());
And this time the network.getLinks.get(linkId) worked as expected.
Does anyone know why this might happen?
Thanks!
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq