activitysim
activitysim copied to clipboard
Additional Coeffiecients don't work
Describe the bug Hi Dev Team, I added more parameters to the work location module. However, when I change a parameter the distribution of people's work distance doesn't change. For example: I keep the other params the same and I shift the param of distance from 0.5 to 1 mile but the number of people traveling 0,5 to 1 mile doesn't change while people traveling 0 to 0.5 mile change. It means the 0,5 to 1 mile parameter doesn't affect the 0.5 to 1 mile distribution but it affects the 0 to 0.5 mile distribution.
Expected behavior The parameters for each distance range should affect that range distribution
Screenshots
Thanks for your question. However, you have not provided quite enough information to diagnose anything.
First: the distribution of work locations, or how that distribution changes in response to changes in parameters, cannot be inferred from the utility function and parameters alone, it also depends on the attributes of the choices. You can change the marginal effect of distance at different ranges, but it may or may not have an effect on choice making, depending on the presence or absence of choices that exist at those distances for the choosers you are studying.
Second: the distribution of work locations is just that: a distribution. If you are seeing more choices in the 0-0.5 mile range, then they have to be coming from somewhere else in the distribution, as changing the utility function here cannot create or destroy workers. It seems possible you are shifting workers around, but in the 0.5-1.0 mile bucket the flows in and out are balancing.
Can you provide a little more context? What was the utility function and coefficients before and after your treatment? And what is the complete distribution of distances? Ideally, you can provide a minimal reproducible example including data and configs so we can see your problem more clearly.
Hi, Thank for your response. I got your idea, changing a parameter can't change the selection of people if the other choices's probabilities are still higher. Besides, it's possible that some workers choose other choices and the number of people from other choices turn into this selection are equal, then makes it the same. My case here is that I use the default example_estimation project. I saw that in work/school location modules there are parameters which defined utilities for each distance range. I want to add more parameters to split the distance ranges into smaller ranges to calibrate the distribution. I adjusted these 2 modules, the other modules are the same as default settings. I saw that the distribution of 0.5 - 1 mile is lower than the target distribution. Then I only changed the 0,5-1mil parameter, the others are the same, only one parameter at one time. I tried to increase the 0,5-1mil parameter but when I increased 0,5-1mil the distribution of this range remained the same, and the 0-0,5mil increased. The key thing here is that the utility of 0,5-1mil range increased but people now choose 0-0,5mil range more while the 0-0,5mil parameter is still the same. Below are the data and config of the project. I generated this from Melbourne data.: https://drive.google.com/file/d/1xZ_OE41oBE76BaCQUITKT2mJRvpVTocA/view?usp=sharing
This is an example distribution when I tried to increase 0,5-1mil range distribution, the 0-0,5mil range distribution increased much more.