-
Notifications
You must be signed in to change notification settings - Fork 180
faq 108804647
by Benjamin Moehring on 2017-04-06 09:10:26
Hello MATSim,
we are trying to simulate a shift in peoples mobility attitudes for different scenarios. To achieve this, we categorized the population by using the personAttribute subPopulation. We then added specific scoringParameterSets for each of these subPopulations.
In our tests MatSim always required to have a null-subPopulation besides the specified subPopulations. When running the scenario with specific scoringParameters only parameters of the null-subPopulation were used, since
org.matsim.core.config.groups.getScoringParameters(String subpopulation)
is always called using null.
Are there any similar attempts? Is it worth trying to use the subPopulation attribute when calling getScoringParameters?
Thank you.
Best, Benjamin
by Thibaut Dubernet on 2017-04-06 12:32:20
Dear Benjamin,
I dived in the code a bit, and here is what I realized:
- the scoring should work fine (although you have to make sure that your "subpopulation" attribute is written exactly the same way as the "subpopulationAttributeName" parameter in config group "plans", that is "subpopulation" instead of "subPopulation" by default)
- however, and this is where it gets a bit messy, there are lots of parts of the code that still assume there is only one "subpopulation". They thus query the ones of the "default" subpopulation, that is, null. They are used, for instance, at the initialization of the ModeStats listener to know which modes to monitor, or to initialize the TravelDisutility used for routing.
Unfortunately, I cannot look at it more at the moment. I would suggest you do the following:
- create default subpopulation scoring parameters. They should not have influence on the results as long as you do not use road pricing nor schedule-based public transport (if you do, please say it, and we will look at this further). They should at least include all modes you simulate, in order for the mode stats to be meaningful. I would make them identical to the parameters of the largest subpopulation, if any.
- Do a first test run with hugely different parameters for different subpopulations, and check the scores at the end to make sure they are considered (as said, things as simple as writting "subPopulation" instead of "subpopulation" might silently make the subpopulations ignored)
On my side, I will open an issue on Jira, and look at this at the latest during the developer meeting (September).
Very sorry for the inconvenience. This is a feature we used (at least in Zurich) intensively only to specify replanning modules per subpopulations, which might explain why the scoring side of it still has quirks...
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq