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

Vehicle Type Optimization #66

Merged
merged 6 commits into from
Mar 29, 2024

Conversation

JoeJimFlood
Copy link

Applying a couple of the code changes from Pull Request #806 in the main repo to BayDAG_estimation to help with MemoryErrors occuring in the vehicle type choice model.

@JoeJimFlood JoeJimFlood requested a review from dhensle March 28, 2024 16:54
@@ -347,6 +347,17 @@ def iterate_vehicle_type_choice(
model_settings, alts_cats_dict, vehicle_type_data
)

# alts preprocessor
alts_preprocessor_settings = model_settings.alts_preprocessor
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be model_settings.get("alts_preprocessor", None)

alts_preprocessor_settings = model_settings.alts_preprocessor
if alts_preprocessor_settings:
expressions.assign_columns(
state,
Copy link
Collaborator

Choose a reason for hiding this comment

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

No state variable in this code base. This argument should be removed.

@@ -380,6 +391,12 @@ def iterate_vehicle_type_choice(
len(choosers),
)

# filter columns of alts and choosers
if len(model_settings.get("COLS_TO_INCLUDE_IN_CHOOSER_TABLE")) > 0:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to set default for get function to be array. i.e. model_settings.get("COLS_TO_INCLUDE_IN_CHOOSER_TABLE", []). Here and below.

@JoeJimFlood JoeJimFlood merged commit 2c11873 into BayDAG_estimation Mar 29, 2024
11 of 13 checks passed
@JoeJimFlood JoeJimFlood deleted the BayDAG_estimation_vehtypefix branch March 29, 2024 15:57
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.

2 participants