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

New nested choice function added #1

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

joshchea
Copy link

Salut...
I added a new function to compute generic nested choice probs on a flat array instead of a square matrix, this may be useful for implementation in activity based models. Please pull from my repo if you feel it might be useful in your activitysim project.
Thanks,
Chetan

BaseUtils is not really needed if Utils is provided as the diff in Utils, which should be easy. So script is updated accordingly. Seems like an older half incorrect version of the function was sitting here.
updated description for flat nested mode choice calculation
Script for OD-matrix estimation with least squares formulation, solution method is via Gradient descent applied with sparse matrices. Distance measure - difference in counts and assigned model flows and OD cells from seed and current adjusted matrix.  
Requires - numpy and scipy | flow matrix obtained from Visum -> user should construct their own if not using other tool for assignment.
added a TO DO to use executemany instead of calling execute n times...
added matrix estimation (ODME) script description
added two variants -

a. commit one line at a time - relatively safe method for cell by cell handling of bad data

b. commit the entire db at once from an accululated tuple

b. runs in half the time as a
added scripts for logit choice park n ride with capacities and gravity model calibration
All files are text files...

> Seed OD matrix
> Link counts
> Flow matrix
Added trip distribution with shadow pricing to balance trip attractions
remove production side calculations in multi-distribute
Added a more vectorized version of doubly constrained gravity with factor multiplied across friction matrix.
cleaned up a couple of things to use numpy instead of built-ins
some cleaning and update to more Python 3+ compatible usage of loops - replace xrange by range etc.
some cleaning and minor updates for Python 3+ compatibility.
some more updates for Pytnon 3+
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.

1 participant