@@ -161,6 +161,7 @@ def _location_sample(
161161 "reindex" : reindex ,
162162 "land_use" : state .get_dataframe ("land_use" ),
163163 }
164+ locals_d .update (state .get_global_constants ())
164165 locals_d .update (model_settings .CONSTANTS or {})
165166
166167 # preprocess choosers table
@@ -232,9 +233,7 @@ def location_sample(
232233 chunk_tag ,
233234 trace_label ,
234235):
235- # FIXME - MEMORY HACK - only include columns actually used in spec
236- chooser_columns = model_settings .SIMULATE_CHOOSER_COLUMNS
237- choosers = persons_merged [chooser_columns ]
236+ choosers = persons_merged
238237
239238 # create wrapper with keys for this lookup - in this case there is a home_zone_id in the choosers
240239 # and a zone_id in the alternatives which get merged during interaction
@@ -385,12 +384,7 @@ def location_presample(
385384 HOME_TAZ in persons_merged
386385 ) # 'TAZ' should already be in persons_merged from land_use
387386
388- # FIXME - MEMORY HACK - only include columns actually used in spec
389- # FIXME we don't actually require that land_use provide a TAZ crosswalk
390- # FIXME maybe we should add it for multi-zone (from maz_taz) if missing?
391- chooser_columns = model_settings .SIMULATE_CHOOSER_COLUMNS
392- chooser_columns = [HOME_TAZ if c == HOME_MAZ else c for c in chooser_columns ]
393- choosers = persons_merged [chooser_columns ]
387+ choosers = persons_merged
394388
395389 # create wrapper with keys for this lookup - in this case there is a HOME_TAZ in the choosers
396390 # and a DEST_TAZ in the alternatives which get merged during interaction
@@ -555,11 +549,6 @@ def run_location_logsums(
555549 mandatory = False ,
556550 )
557551
558- # FIXME - MEMORY HACK - only include columns actually used in spec
559- persons_merged_df = logsum .filter_chooser_columns (
560- persons_merged_df , logsum_settings , model_settings
561- )
562-
563552 logger .info (f"Running { trace_label } with { len (location_sample_df .index )} rows" )
564553
565554 choosers = location_sample_df .join (persons_merged_df , how = "left" )
@@ -618,9 +607,7 @@ def run_location_simulate(
618607 """
619608 assert not persons_merged .empty
620609
621- # FIXME - MEMORY HACK - only include columns actually used in spec
622- chooser_columns = model_settings .SIMULATE_CHOOSER_COLUMNS
623- choosers = persons_merged [chooser_columns ]
610+ choosers = persons_merged
624611
625612 alt_dest_col_name = model_settings .ALT_DEST_COL_NAME
626613
@@ -651,6 +638,7 @@ def run_location_simulate(
651638 "reindex" : reindex ,
652639 "land_use" : state .get_dataframe ("land_use" ),
653640 }
641+ locals_d .update (state .get_global_constants ())
654642 locals_d .update (model_settings .CONSTANTS or {})
655643
656644 # preprocess choosers table
0 commit comments