Skip to content

faq 259194881

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Subpopulation scoring within a public transit network

by Yannis Hemrich on 2018-04-05 16:20:23


Dear all,

Within a public transit network, I am trying to implement different scoring parameters for two different subpopulations "B" and "L".

In my config file, I enter the following for the PlansCalcScore module:

However, I consistently get an error message of the form:

"Error injecting constructor, java.lang.NullPointerException"

If I try to run the exact same simulation with subpopulations "B" and "L" but using cars instead of public transit, then it works and I am able to get a proper output, with different scores for "B" and "L".

My question therefore is: how can I make the above simulation work within a public transit network? What changes/adjustments do I need to make in order for it to properly work?

Thank you and kind regards,

Yannis


Comments: 4


Re: Subpopulation scoring within a public transit network

by Joschka Bischoff on 2018-04-05 20:09:55

Hi,

which MATSim version are you using?

Subpopulations in the plancalcscore module are only partly supported. Most notably, the transit router does not take care of them (it works for teleported transit, though), but always takes the "default" subpopulation.

For this, in the current 0.10 release, you need to specify a subpopulation named "default", rather than "null".

I'm not sure when and how we will fix this, it's a somewhat messy issue.

For more information, see also:

https://matsim.atlassian.net/browse/MATSIM-778

Joschka


Re: Subpopulation scoring within a public transit network

by Yannis Hemrich on 2018-04-06 08:50:11

Hi,

Thank you for your reply. I'm currently using Matsim version 0.9.0, would using version 0.10.0 change anything in terms of the transit router being compatible with subpopulations in planscalcscore?

Also, would you happen to have any suggestions on ways of overcoming this issue?

Thanks again,

Yannis


Re: Subpopulation scoring within a public transit network

by Joschka Bischoff on 2018-04-06 08:55:20

If you switch to 0.10. and add a subpopulation named "default", then your code should run. Please keep in mind, that all agents need to be part of a subpopulation!

From what I can see in your config, the scoring parameters for the transit router are the same for all subpopulations, so the transit router will work as expected.

Joschka


Re: Subpopulation scoring within a public transit network

by Yannis Hemrich on 2018-04-06 09:13:56

Ok great, thank you! How can I best get it to run on the 0.10 version? I tried looking for it but it's not fully clear to me where to find the latest version; I dowloaded the source code for 0.10, together with the "MATSim-972b5eb.jar" file from the "Nightly build" link. Is this the correct version?

In addition, in the config file I uploaded, the scoring parameters are the same for all subpopulations, but ideally I want to be able to modify them and have different parameters for different subpopulations. Would the transit router still work if I did this?

Regards,

Yannis

Clone this wiki locally