-
Notifications
You must be signed in to change notification settings - Fork 3
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
Agent simulation development #244
Conversation
Simplified departure time model for agents
* Split primary and secondary destination choice * Calc cumulative probs in advance to save calculation time in agent simulation * Do sec dest calculations more efficiently * Refactor position variable * Calc cumulative probs in advance for sec dests * Simplify zone index lookup * Change mode into implicit property * Use defaultdict for sec_dest_tours * Make car passenger separate property * Calc cumulative probs in advance for tour combinations
mode shares and attractions
Simplify sum initialization using defaultdict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested few agent model runs with MockAssignment and results seems to quite stable (mode share varies 0.0-0.3 %). Results seem to be reasonable compared to main as well. However, in some zones there are significant changes in mode specific trip sums. Not yet sure if these are due to printing or other issues, so would fix result printing before merging. I think I could also try agent model with Emme and check network volume differences.
Some issues:
- Zone specific mode sums printed only for transit and car. See comment below.
- Result
impedance_ratio
is printed only for time, becausecar_cost
array is zeros. Didn't find out where this is different from to main. - Results
aggregated_demand.txt
andtrips_lengths.txt
are printed only for surrounding municipalities. Could we move printing of these files topurpose.print_data
?
Also some minor comments listed below.
Yes, need to dig into this.
The problem is that these results are aggregated from the demand matrix, and in agent simulation we have no purpose-specific demand matrix, only set of |
This seems to be another inconsistency in
Solved. |
* First draft of income model * Add parameters * Refactoring of income model and simplification of `LinearModel` * Delete obsole import * Add random term to income model * Avoid division by zero when no trips generated for zone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run with full model system and results seem to be ok. Some minor things listed below.
There might still be some minor issues, but I think I could fix them when adding output scripts.
Restructure naming of output files Move tour generation printing to purpose, so that agent model performs it
Agent simulation option added to
dev-config.json
. Requires at least 12 GB of RAM to run with full population.Major improvements of agent simulation
For 2018 scenario, the agent model is as fast as the aggregate model