Skip to content
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

Refactor logit models #539

Merged
merged 8 commits into from
Aug 6, 2024
Merged

Refactor logit models #539

merged 8 commits into from
Aug 6, 2024

Conversation

zptro
Copy link
Collaborator

@zptro zptro commented Aug 7, 2023

This PR changes the the way the mode choices are done in agent simulations. Instead of Monte Carlo choices, the choices are based on direct utility maximization including an individual error term. The logic behind this is described in EXT-MAL 2023/Vaikutusten arviointi/Menetelmäkehitys/agenttimallinnus. Destination choices are still done with Monte Carlo simulation, because direct utility maximization is slow with so many alternatives to compare.

The pros of this change:

  • Mode choice will become consistent on the agent level: If the accessibility of a mode increases, agents will switch from other modes to that mode, and no other mode switches will occur.
  • Individual dummies will be easy to add to mode choice with minor implications for run time.

@zptro zptro requested review from attesn and johpiip August 8, 2023 13:03
@zptro zptro marked this pull request as ready for review August 8, 2023 13:03
Copy link
Contributor

@johpiip johpiip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this change affect results in both agent modelling and normal modelling? I ran the small test network with olusanya branch and this branch using normal model run and the results were different. Is it on purpose or by accident?

@zptro
Copy link
Collaborator Author

zptro commented Aug 17, 2023

Should this change affect results in both agent modelling and normal modelling? I ran the small test network with olusanya branch and this branch using normal model run and the results were different. Is it on purpose or by accident?

That is strange. Yes, the calculation of the log variables is changed, but it gives the same results according to the integration tests. 😮

@johpiip
Copy link
Contributor

johpiip commented Aug 17, 2023

Yes, it is! in result_summary.txt, assigned demand and mode share is the same in both runs but vehicle kilometres change as well as some accessibility measures. The network is the same. The changes are strangely large:
kuva

@johpiip
Copy link
Contributor

johpiip commented Aug 17, 2023

Could this branch be slightly out-of-date compared to olusanya? So that the differences actually come from other commits than these ones? I tested earlier today that v4.1.3 and olusanya give different results and started an issue #540 if someone could identify which PRs create those changes.

@zptro zptro requested a review from johpiip February 2, 2024 07:35
Copy link
Contributor

@hsl-petrhaj hsl-petrhaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay.

@zptro zptro merged commit 1c7784d into olusanya Aug 6, 2024
2 checks passed
@zptro zptro deleted the reafactor/models branch August 6, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants