diff --git a/activitysim/abm/models/non_mandatory_tour_frequency.py b/activitysim/abm/models/non_mandatory_tour_frequency.py index f54d5b120..53b1bbaed 100644 --- a/activitysim/abm/models/non_mandatory_tour_frequency.py +++ b/activitysim/abm/models/non_mandatory_tour_frequency.py @@ -3,6 +3,7 @@ from __future__ import annotations import logging +import warnings from pathlib import Path from typing import Any @@ -200,12 +201,24 @@ def non_mandatory_tour_frequency( model_settings_file_name, ) - # FIXME kind of tacky both that we know to add this here and del it below - # 'tot_tours' is used in model_spec expressions alternatives = simulate.read_model_alts( state, "non_mandatory_tour_frequency_alternatives.csv", set_index=None ) - alternatives["tot_tours"] = alternatives.sum(axis=1) + if "tot_tours" not in alternatives.columns: + # add a column for total tours + alternatives["tot_tours"] = alternatives.sum(axis=1) + warnings.warn( + "The 'tot_tours' column may not be automatically added in the future.", + FutureWarning, + ) + else: + # tot_tours already exists, check if it is consistent with legacy behavior + if not (alternatives["tot_tours"] == alternatives.sum(axis=1)).all(): + warnings.warn( + "The 'tot_tours' column in non_mandatory_tour_frequency_alternatives.csv " + "does not match the sum of the other columns.", + RuntimeWarning, + ) # filter based on results of CDAP choosers = persons_merged diff --git a/activitysim/abm/models/util/canonical_ids.py b/activitysim/abm/models/util/canonical_ids.py index 0ca1a1d3b..782828ca6 100644 --- a/activitysim/abm/models/util/canonical_ids.py +++ b/activitysim/abm/models/util/canonical_ids.py @@ -182,7 +182,7 @@ def determine_flavors_from_alts_file( flavors = { c: int(alts[c].max() + max_extension) for c in alts.columns - if all(alts[c].astype(str).str.isnumeric()) + if all(alts[c].astype(str).str.isnumeric()) and (c != "tot_tours") } valid_flavors = all( [(isinstance(flavor, str) & (num >= 0)) for flavor, num in flavors.items()] diff --git a/activitysim/examples/placeholder_psrc/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/placeholder_psrc/configs/non_mandatory_tour_frequency_alternatives.csv index b9765aa75..09e89fae3 100755 --- a/activitysim/examples/placeholder_psrc/configs/non_mandatory_tour_frequency_al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0,1,1,1,0,4 +1,0,1,0,1,1,4 +1,0,1,1,1,1,5 +1,1,0,0,0,0,2 +1,1,0,1,0,0,3 +1,1,0,0,0,1,3 +1,1,0,1,0,1,4 +1,1,0,0,1,0,3 +1,1,0,1,1,0,4 +1,1,0,0,1,1,4 +1,1,0,1,1,1,5 +1,1,1,0,0,0,3 +1,1,1,1,0,0,4 +1,1,1,0,0,1,4 +1,1,1,1,0,1,5 +1,1,1,0,1,0,4 +1,1,1,1,1,0,5 +1,1,1,0,1,1,5 +1,1,1,1,1,1,6 +2,0,0,0,0,0,2 +2,0,0,1,0,0,3 +2,0,0,0,0,1,3 +2,0,0,1,0,1,4 +2,0,0,0,1,0,3 +2,0,0,1,1,0,4 +2,0,0,0,1,1,4 +2,0,0,1,1,1,5 +2,0,1,0,0,0,3 +2,0,1,1,0,0,4 +2,0,1,0,0,1,4 +2,0,1,1,0,1,5 +2,0,1,0,1,0,4 +2,0,1,1,1,0,5 +2,0,1,0,1,1,5 +2,0,1,1,1,1,6 +2,1,0,0,0,0,3 +2,1,0,1,0,0,4 +2,1,0,0,0,1,4 +2,1,0,1,0,1,5 +2,1,0,0,1,0,4 +2,1,0,1,1,0,5 +2,1,0,0,1,1,5 +2,1,0,1,1,1,6 +2,1,1,0,0,0,4 +2,1,1,1,0,0,5 +2,1,1,0,0,1,5 +2,1,1,1,0,1,6 +2,1,1,0,1,0,5 +2,1,1,1,1,0,6 +2,1,1,0,1,1,6 +2,1,1,1,1,1,7 diff --git a/activitysim/examples/production_semcog/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/production_semcog/configs/non_mandatory_tour_frequency_alternatives.csv index b9765aa75..09e89fae3 100644 --- a/activitysim/examples/production_semcog/configs/non_mandatory_tour_frequency_alternatives.csv +++ b/activitysim/examples/production_semcog/configs/non_mandatory_tour_frequency_alternatives.csv @@ -1,97 +1,97 @@ -escort,shopping,othmaint,othdiscr,eatout,social -0,0,0,0,0,0 -0,0,0,1,0,0 -0,0,0,0,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,0,4 +1,1,0,0,1,1,4 +1,1,0,1,1,1,5 +1,1,1,0,0,0,3 +1,1,1,1,0,0,4 +1,1,1,0,0,1,4 +1,1,1,1,0,1,5 +1,1,1,0,1,0,4 +1,1,1,1,1,0,5 +1,1,1,0,1,1,5 +1,1,1,1,1,1,6 +2,0,0,0,0,0,2 +2,0,0,1,0,0,3 +2,0,0,0,0,1,3 +2,0,0,1,0,1,4 +2,0,0,0,1,0,3 +2,0,0,1,1,0,4 +2,0,0,0,1,1,4 +2,0,0,1,1,1,5 +2,0,1,0,0,0,3 +2,0,1,1,0,0,4 +2,0,1,0,0,1,4 +2,0,1,1,0,1,5 +2,0,1,0,1,0,4 +2,0,1,1,1,0,5 +2,0,1,0,1,1,5 +2,0,1,1,1,1,6 +2,1,0,0,0,0,3 +2,1,0,1,0,0,4 +2,1,0,0,0,1,4 +2,1,0,1,0,1,5 +2,1,0,0,1,0,4 +2,1,0,1,1,0,5 +2,1,0,0,1,1,5 +2,1,0,1,1,1,6 +2,1,1,0,0,0,4 +2,1,1,1,0,0,5 +2,1,1,0,0,1,5 +2,1,1,1,0,1,6 +2,1,1,0,1,0,5 +2,1,1,1,1,0,6 +2,1,1,0,1,1,6 +2,1,1,1,1,1,7 diff --git a/activitysim/examples/prototype_arc/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/prototype_arc/configs/non_mandatory_tour_frequency_alternatives.csv index b9765aa75..09e89fae3 100644 --- a/activitysim/examples/prototype_arc/configs/non_mandatory_tour_frequency_alternatives.csv +++ b/activitysim/examples/prototype_arc/configs/non_mandatory_tour_frequency_alternatives.csv @@ -1,97 +1,97 @@ -escort,shopping,othmaint,othdiscr,eatout,social -0,0,0,0,0,0 -0,0,0,1,0,0 -0,0,0,0,0,1 -0,0,0,1,0,1 -0,0,0,0,1,0 -0,0,0,1,1,0 -0,0,0,0,1,1 -0,0,0,1,1,1 -0,0,1,0,0,0 -0,0,1,1,0,0 -0,0,1,0,0,1 -0,0,1,1,0,1 -0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5 +1,1,1,0,1,1,5 +1,1,1,1,1,1,6 +2,0,0,0,0,0,2 +2,0,0,1,0,0,3 +2,0,0,0,0,1,3 +2,0,0,1,0,1,4 +2,0,0,0,1,0,3 +2,0,0,1,1,0,4 +2,0,0,0,1,1,4 +2,0,0,1,1,1,5 +2,0,1,0,0,0,3 +2,0,1,1,0,0,4 +2,0,1,0,0,1,4 +2,0,1,1,0,1,5 +2,0,1,0,1,0,4 +2,0,1,1,1,0,5 +2,0,1,0,1,1,5 +2,0,1,1,1,1,6 +2,1,0,0,0,0,3 +2,1,0,1,0,0,4 +2,1,0,0,0,1,4 +2,1,0,1,0,1,5 +2,1,0,0,1,0,4 +2,1,0,1,1,0,5 +2,1,0,0,1,1,5 +2,1,0,1,1,1,6 +2,1,1,0,0,0,4 +2,1,1,1,0,0,5 +2,1,1,0,0,1,5 +2,1,1,1,0,1,6 +2,1,1,0,1,0,5 +2,1,1,1,1,0,6 +2,1,1,0,1,1,6 +2,1,1,1,1,1,7 diff --git a/activitysim/examples/prototype_mtc/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/prototype_mtc/configs/non_mandatory_tour_frequency_alternatives.csv index b9765aa75..09e89fae3 100644 --- a/activitysim/examples/prototype_mtc/configs/non_mandatory_tour_frequency_alternatives.csv +++ b/activitysim/examples/prototype_mtc/configs/non_mandatory_tour_frequency_alternatives.csv @@ -1,97 +1,97 @@ -escort,shopping,othmaint,othdiscr,eatout,social -0,0,0,0,0,0 -0,0,0,1,0,0 -0,0,0,0,0,1 -0,0,0,1,0,1 -0,0,0,0,1,0 -0,0,0,1,1,0 -0,0,0,0,1,1 -0,0,0,1,1,1 -0,0,1,0,0,0 -0,0,1,1,0,0 -0,0,1,0,0,1 -0,0,1,1,0,1 -0,0,1,0,1,0 -0,0,1,1,1,0 -0,0,1,0,1,1 -0,0,1,1,1,1 -0,1,0,0,0,0 -0,1,0,1,0,0 -0,1,0,0,0,1 -0,1,0,1,0,1 -0,1,0,0,1,0 -0,1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,4 +2,0,0,0,1,1,4 +2,0,0,1,1,1,5 +2,0,1,0,0,0,3 +2,0,1,1,0,0,4 +2,0,1,0,0,1,4 +2,0,1,1,0,1,5 +2,0,1,0,1,0,4 +2,0,1,1,1,0,5 +2,0,1,0,1,1,5 +2,0,1,1,1,1,6 +2,1,0,0,0,0,3 +2,1,0,1,0,0,4 +2,1,0,0,0,1,4 +2,1,0,1,0,1,5 +2,1,0,0,1,0,4 +2,1,0,1,1,0,5 +2,1,0,0,1,1,5 +2,1,0,1,1,1,6 +2,1,1,0,0,0,4 +2,1,1,1,0,0,5 +2,1,1,0,0,1,5 +2,1,1,1,0,1,6 +2,1,1,0,1,0,5 +2,1,1,1,1,0,6 +2,1,1,0,1,1,6 +2,1,1,1,1,1,7 diff --git a/activitysim/examples/prototype_mtc_extended/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/prototype_mtc_extended/configs/non_mandatory_tour_frequency_alternatives.csv index 0bea47c6f..be633e649 100644 --- a/activitysim/examples/prototype_mtc_extended/configs/non_mandatory_tour_frequency_alternatives.csv +++ b/activitysim/examples/prototype_mtc_extended/configs/non_mandatory_tour_frequency_alternatives.csv @@ -1,100 +1,100 @@ -escort,shopping,othmaint,othdiscr,eatout,social -0,0,0,0,0,0 -0,0,0,1,0,0 -0,0,0,0,0,1 -0,0,0,1,0,1 -0,0,0,0,1,0 -0,0,0,1,1,0 -0,0,0,0,1,1 -0,0,0,1,1,1 -0,0,1,0,0,0 -0,0,1,1,0,0 -0,0,1,0,0,1 -0,0,1,1,0,1 -0,0,1,0,1,0 -0,0,1,1,1,0 -0,0,1,0,1,1 -0,0,1,1,1,1 -0,1,0,0,0,0 -0,1,0,1,0,0 -0,1,0,0,0,1 -0,1,0,1,0,1 -0,1,0,0,1,0 -0,1,0,1,1,0 -0,1,0,0,1,1 -0,1,0,1,1,1 -0,1,1,0,0,0 -0,1,1,1,0,0 -0,1,1,0,0,1 -0,1,1,1,0,1 -0,1,1,0,1,0 -0,1,1,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0,4 +2,0,1,0,0,1,4 +2,0,1,1,0,1,5 +2,0,1,0,1,0,4 +2,0,1,1,1,0,5 +2,0,1,0,1,1,5 +2,0,1,1,1,1,6 +2,1,0,0,0,0,3 +2,1,0,1,0,0,4 +2,1,0,0,0,1,4 +2,1,0,1,0,1,5 +2,1,0,0,1,0,4 +2,1,0,1,1,0,5 +2,1,0,0,1,1,5 +2,1,0,1,1,1,6 +2,1,1,0,0,0,4 +2,1,1,1,0,0,5 +2,1,1,0,0,1,5 +2,1,1,1,0,1,6 +2,1,1,0,1,0,5 +2,1,1,1,1,0,6 +2,1,1,0,1,1,6 +2,1,1,1,1,1,7 +# extension for flexible ids demonstration,,,,,,0 +# should be removed for actual model run,,,,,,0 +0,0,0,2,0,0,2 diff --git a/activitysim/examples/prototype_mwcog/configs/non_mandatory_tour_frequency_alternatives.csv b/activitysim/examples/prototype_mwcog/configs/non_mandatory_tour_frequency_alternatives.csv index b9765aa75..09e89fae3 100644 --- a/activitysim/examples/prototype_mwcog/configs/non_mandatory_tour_frequency_alternatives.csv +++ b/activitysim/examples/prototype_mwcog/configs/non_mandatory_tour_frequency_alternatives.csv @@ -1,97 +1,97 @@ -escort,shopping,othmaint,othdiscr,eatout,social -0,0,0,0,0,0 -0,0,0,1,0,0 -0,0,0,0,0,1 -0,0,0,1,0,1 -0,0,0,0,1,0 -0,0,0,1,1,0 -0,0,0,0,1,1 -0,0,0,1,1,1 -0,0,1,0,0,0 -0,0,1,1,0,0 -0,0,1,0,0,1 -0,0,1,1,0,1 -0,0,1,0,1,0 -0,0,1,1,1,0 -0,0,1,0,1,1 -0,0,1,1,1,1 -0,1,0,0,0,0 -0,1,0,1,0,0 -0,1,0,0,0,1 -0,1,0,1,0,1 -0,1,0,0,1,0 -0,1,0,1,1,0 -0,1,0,0,1,1 -0,1,0,1,1,1 -0,1,1,0,0,0 -0,1,1,1,0,0 -0,1,1,0,0,1 -0,1,1,1,0,1 -0,1,1,0,1,0 -0,1,1,1,1,0 -0,1,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