From 48be6f4f567e27117379766fa33ce8ace8b334f6 Mon Sep 17 00:00:00 2001 From: David Hensle Date: Thu, 7 Mar 2024 13:56:38 -0800 Subject: [PATCH] replace orca inject with state object --- activitysim/abm/models/location_choice.py | 4 ++-- activitysim/abm/models/trip_destination.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/activitysim/abm/models/location_choice.py b/activitysim/abm/models/location_choice.py index 8ef502d32..a7e4f0342 100644 --- a/activitysim/abm/models/location_choice.py +++ b/activitysim/abm/models/location_choice.py @@ -159,7 +159,7 @@ def _location_sample( "dest_col_name": skims.dest_key, # added for sharrow flows "timeframe": "timeless", "reindex": reindex, - "land_use": inject.get_table("land_use").to_frame(), + "land_use": state.get_dataframe("land_use"), } locals_d.update(model_settings.CONSTANTS or {}) @@ -624,7 +624,7 @@ def run_location_simulate( "dest_col_name": skims.dest_key, # added for sharrow flows "timeframe": "timeless", "reindex": reindex, - "land_use": inject.get_table("land_use").to_frame(), + "land_use": state.get_dataframe("land_use"), } locals_d.update(model_settings.CONSTANTS or {}) diff --git a/activitysim/abm/models/trip_destination.py b/activitysim/abm/models/trip_destination.py index 750355b11..6dea50980 100644 --- a/activitysim/abm/models/trip_destination.py +++ b/activitysim/abm/models/trip_destination.py @@ -193,7 +193,7 @@ def _destination_sample( "size_terms": size_term_matrix, "size_terms_array": size_term_matrix.df.to_numpy(), "timeframe": "trip", - "land_use": inject.get_table("land_use").to_frame(), + "land_use": state.get_dataframe("land_use"), } ) locals_dict.update(skims) @@ -926,7 +926,7 @@ def trip_destination_simulate( "size_terms": size_term_matrix, "size_terms_array": size_term_matrix.df.to_numpy(), "timeframe": "trip", - "land_use": inject.get_table("land_use").to_frame(), + "land_use": state.get_dataframe("land_use"), } ) locals_dict.update(skims)