Skip to content

Mandatory Tour Scheduling runtime error #911

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

Open
SchemeSonic opened this issue Nov 11, 2024 · 2 comments
Open

Mandatory Tour Scheduling runtime error #911

SchemeSonic opened this issue Nov 11, 2024 · 2 comments
Labels
Bug Something isn't working/bug f

Comments

@SchemeSonic
Copy link

SchemeSonic commented Nov 11, 2024

Hello all,

I am trying to run activitysim in estimation mode using my own seed data. I've successfully run previous models untill the mandatory_tour_scheduling model.
Now I'm stuck at the mandatory_tour_scheduling model and cannot proceed further.

Describe the bug
As shown below I got RuntimeError: couldn't get_survey_values for tdd in tours
Screenshot 2024-11-11 at 11 31 44

Additional context
I’ve used a tracing feature to log values in get_survey_values method. I add logs to lines 591-593, 660-666, 674-677. Below is the screenshot from get_survey_values method that I add logs:
Screenshot 2024-11-11 at 11 41 10
Screenshot 2024-11-11 at 11 41 23

The problem looks related to line 668, “survey_values = reindex(survey_values, dest_index)”
After reindexing, model value tour ids and survey tour ids are not matching and tdd values are getting empty in survey_values variable. However model_values which is the input of get_survey_values has tour_id and tdd values. Moreover, survey_values has tour_id and tdd values before reindexing method called.

I'm also attaching the output logs here: https://drive.google.com/drive/folders/1S8s7fD9Vh51G8XkMwF_jdGrEVe4kWUtQ

Extra info: While creating the seed data, I use my own tour_ids, trip_ids etc. for the survey_tours.csv, survey_trips.csv, survey_joint_tour_participants.csv files and run activitysim infer.py to generate override_.csv.

Thank you for your support, if you have any further clarification let me know.

@SchemeSonic SchemeSonic added the Bug Something isn't working/bug f label Nov 11, 2024
@jpn--
Copy link
Member

jpn-- commented Dec 10, 2024

@SchemeSonic are you able to share a (ideally, minimal) reproducible example, which includes not just output logs but all the input configs/data/code to replicate this error?

@i-am-sijia
Copy link
Contributor

i-am-sijia commented Dec 31, 2024

Hi @SchemeSonic, have you solved this issue or do you still need assistance?

Looking at the error message and the logs you shared, it seems that the mandatory tour scheduling model is running on a set of mandatory tours different from the ones in the processed survey ("override_tours.csv"). The number of tours are different, the tour IDs are different... Something must have gone wrong. It's hard to tell what exactly caused this without seeing the full picture (like the inputs you are using), but I can think of some possible causes:

  1. Check your input households.csv and persons.csv, are they different from your processed survey records (i.e., the "override_" ones)? For example, are there more person records than the "override_" ones and why? The input households and persons should have the same households and persons as the "override_" ones. It could be that you are using different inputs than the survey and that's why the mandatory tours to schedule are different from the survey.

  2. Say you are using the same input households and persons as the survey, the way estimation mode works is that before running mandatory tour scheduling, it would overwrite every person's modeled mandatory_tour_frequency with the value of the mandatory_tour_frequency from the "override_persons.csv", and then the mandatory tours go into the scheduling model would be the same as the ones in the survey "override_tours.csv". However, if the mandatory_tour_frequency in the "override_persons.csv" is not consistent with the "override_tours.csv", it will cause the error you have. I would also check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working/bug f
Projects
None yet
Development

No branches or pull requests

3 participants