diff --git a/activitysim/abm/models/cdap.py b/activitysim/abm/models/cdap.py index 978bd2f728..da3c892371 100644 --- a/activitysim/abm/models/cdap.py +++ b/activitysim/abm/models/cdap.py @@ -15,7 +15,7 @@ from activitysim.core import config from activitysim.core import inject -from .util.cdap import run_cdap +from .util import cdap from .util import expressions logger = logging.getLogger(__name__) @@ -76,16 +76,29 @@ def cdap_simulate(persons_merged, persons, households, constants = config.get_model_constants(model_settings) + cdap_interaction_coefficients = \ + cdap.preprocess_interaction_coefficients(cdap_interaction_coefficients) + + # specs are built just-in-time on demand and cached as injectables + # prebuilding here allows us to write them to the output directory + # (also when multiprocessing locutor might not see all household sizes) + logger.info("Pre-building cdap specs") + for hhsize in range(2, cdap.MAX_HHSIZE + 1): + spec = cdap.build_cdap_spec(cdap_interaction_coefficients, hhsize, cache=True) + if inject.get_injectable('locutor', False): + spec.to_csv(config.output_file_path('cdap_spec_%s.csv' % hhsize), index=True) + logger.info("Running cdap_simulate with %d persons", len(persons_merged.index)) - choices = run_cdap(persons=persons_merged, - cdap_indiv_spec=cdap_indiv_spec, - cdap_interaction_coefficients=cdap_interaction_coefficients, - cdap_fixed_relative_proportions=cdap_fixed_relative_proportions, - locals_d=constants, - chunk_size=chunk_size, - trace_hh_id=trace_hh_id, - trace_label=trace_label) + choices = cdap.run_cdap( + persons=persons_merged, + cdap_indiv_spec=cdap_indiv_spec, + cdap_interaction_coefficients=cdap_interaction_coefficients, + cdap_fixed_relative_proportions=cdap_fixed_relative_proportions, + locals_d=constants, + chunk_size=chunk_size, + trace_hh_id=trace_hh_id, + trace_label=trace_label) # - assign results to persons table and annotate persons = persons.to_frame() diff --git a/activitysim/abm/models/joint_tour_frequency.py b/activitysim/abm/models/joint_tour_frequency.py index 5ef85eaac2..7a7d32ed4a 100644 --- a/activitysim/abm/models/joint_tour_frequency.py +++ b/activitysim/abm/models/joint_tour_frequency.py @@ -39,9 +39,10 @@ def joint_tour_frequency( alternatives = simulate.read_model_alts( config.config_file_path('joint_tour_frequency_alternatives.csv'), set_index='alt') - # - only interested in households with more than one cdap travel_active person + # - only interested in households with more than one cdap travel_active person and + # - at least one non-preschooler households = households.to_frame() - multi_person_households = households[households.num_travel_active > 1].copy() + multi_person_households = households[households.participates_in_jtf_model].copy() # - only interested in persons in multi_person_households # FIXME - gratuitous pathological efficiency move, just let yaml specify persons? diff --git a/activitysim/abm/models/util/cdap.py b/activitysim/abm/models/util/cdap.py index bf8f015e17..6c2d64c601 100644 --- a/activitysim/abm/models/util/cdap.py +++ b/activitysim/abm/models/util/cdap.py @@ -252,11 +252,7 @@ def preprocess_interaction_coefficients(interaction_coefficients): def cached_spec_name(hhsize): - return 'cdap_spec_%s.csv' % hhsize - - -def cached_spec_path(spec_name): - return config.output_file_path(spec_name) + return 'cdap_spec_%s' % hhsize def get_cached_spec(hhsize): @@ -268,18 +264,16 @@ def get_cached_spec(hhsize): logger.info("build_cdap_spec returning cached injectable spec %s", spec_name) return spec - # # try configs dir - # spec_path = config.config_file_path(spec_name, mandatory=False) - # if spec_path: + # this is problematic for multiprocessing and since we delete csv files in output_dir + # at the start of every run, doesn't provide any benefit in single-processing as the + # cached spec will be available as an injectable to subsequent chunks + + # # try data dir + # if os.path.exists(config.output_file_path(spec_name)): + # spec_path = config.output_file_path(spec_name) # logger.info("build_cdap_spec reading cached spec %s from %s", spec_name, spec_path) # return pd.read_csv(spec_path, index_col='Expression') - # try data dir - if os.path.exists(config.output_file_path(spec_name)): - spec_path = config.output_file_path(spec_name) - logger.info("build_cdap_spec reading cached spec %s from %s", spec_name, spec_path) - return pd.read_csv(spec_path, index_col='Expression') - return None @@ -287,8 +281,6 @@ def cache_spec(hhsize, spec): spec_name = cached_spec_name(hhsize) # cache as injectable inject.add_injectable(spec_name, spec) - # cache as csv in output_dir - spec.to_csv(config.output_file_path(spec_name), index=True) def build_cdap_spec(interaction_coefficients, hhsize, @@ -809,7 +801,7 @@ def extra_hh_member_choices(persons, cdap_fixed_relative_proportions, locals_d, def _run_cdap( persons, cdap_indiv_spec, - cdap_interaction_coefficients, + interaction_coefficients, cdap_fixed_relative_proportions, locals_d, trace_hh_id, trace_label): @@ -818,8 +810,6 @@ def _run_cdap( Aside from chunking of persons df, params are passed through from run_cdap unchanged """ - interaction_coefficients = preprocess_interaction_coefficients(cdap_interaction_coefficients) - # assign integer cdap_rank to each household member # persons with cdap_rank 1..MAX_HHSIZE will be have their activities chose by CDAP model # extra household members, will have activities assigned by in fixed proportions diff --git a/activitysim/abm/models/util/expressions.py b/activitysim/abm/models/util/expressions.py index 407928a51b..b7db546fa4 100644 --- a/activitysim/abm/models/util/expressions.py +++ b/activitysim/abm/models/util/expressions.py @@ -219,7 +219,7 @@ def filter_chooser_columns(choosers, chooser_columns): missing_columns = [c for c in chooser_columns if c not in choosers] if missing_columns: - logger.warning("filter_chooser_columns missing_columns %s" % missing_columns) + logger.debug("filter_chooser_columns missing_columns %s" % missing_columns) # ignore any columns not appearing in choosers df chooser_columns = [c for c in chooser_columns if c in choosers] diff --git a/activitysim/abm/models/util/overlap.py b/activitysim/abm/models/util/overlap.py index 001a6b1b7d..bf272ef895 100644 --- a/activitysim/abm/models/util/overlap.py +++ b/activitysim/abm/models/util/overlap.py @@ -166,9 +166,6 @@ def person_pairs(persons): def hh_time_window_overlap(households, persons): - # FIXME only want travel-active persons? - persons = persons[persons.travel_active] - p2p = person_pairs(persons) p2p['max_overlap'] = p2p_time_window_overlap(p2p.person1, p2p.person2) @@ -189,8 +186,7 @@ def hh_time_window_overlap(households, persons): def person_time_window_overlap(persons): - # FIXME only want travel-active persons? (but need to reindex later for nonactives) - p2p = person_pairs(persons[persons.travel_active]) + p2p = person_pairs(persons) p2p['max_overlap'] = p2p_time_window_overlap(p2p.person1, p2p.person2) diff --git a/activitysim/abm/test/configs/annotate_households.csv b/activitysim/abm/test/configs/annotate_households.csv index 70109602cf..b1d913e8bd 100644 --- a/activitysim/abm/test/configs/annotate_households.csv +++ b/activitysim/abm/test/configs/annotate_households.csv @@ -1,34 +1,34 @@ -Description,Target,Expression, -#,, annotate households table after import, -,_PERSON_COUNT,"lambda query, persons, households: persons.query(query).groupby('household_id').size().reindex(households.index).fillna(0).astype(np.int8)", -#,,FIXME households.income can be negative, so we clip? -income_in_thousands,income_in_thousands,(households.income / 1000).clip(lower=0), -income_segment,income_segment,"pd.cut(income_in_thousands, bins=[-np.inf, 30, 60, 100, np.inf], labels=[1, 2, 3, 4]).astype(int)", -#,,, -,_MIN_VOT,setting('min_value_of_time'), -,_MAX_VOT,setting('max_value_of_time'), -,_MU,setting('distributed_vot_mu'), -,_SIGMA,setting('distributed_vot_sigma'), -median_value_of_time,median_value_of_time,"income_segment.map({k: v for k, v in setting('household_median_value_of_time').items()})", -hh_value_of_time,hh_value_of_time,"rng.lognormal_for_df(df, mu=np.log(median_value_of_time * _MU), sigma=_SIGMA).clip(_MIN_VOT, _MAX_VOT)", -#,,, -#num_workers was renamed in import,,, -#,num_workers,households.workers, -number of non_workers,num_non_workers,households.hhsize - households.num_workers, -#,,, -#,,we assume that everyone 16 and older is a potential driver, -number of drivers,num_drivers,"_PERSON_COUNT('16 <= age', persons, households)", -num_adults,num_adults,"_PERSON_COUNT('adult', persons, households)", -num_children,num_children,"_PERSON_COUNT('~adult', persons, households)", -num_young_children,num_young_children,"_PERSON_COUNT('age <= 5', persons, households)", -num_children_5_to_15,num_children_5_to_15,"_PERSON_COUNT('5 <= age <= 15', persons, households)", -num_children_16_to_17,num_children_16_to_17,"_PERSON_COUNT('16 <= age <= 17', persons, households)", -num_college_age,num_college_age,"_PERSON_COUNT('18 <= age <= 24', persons, households)", -num_young_adults,num_young_adults,"_PERSON_COUNT('25 <= age <= 34', persons, households)", -non_family,non_family,households.HHT.isin(constants.HHT_NONFAMILY), -family,family,households.HHT.isin(constants.HHT_FAMILY), -home_is_urban,home_is_urban,"reindex(land_use.area_type, households.TAZ) < setting('urban_threshold')", -home_is_rural,home_is_rural,"reindex(land_use.area_type, households.TAZ) > setting('rural_threshold')", -#,, default for work and school location logsums before auto_ownership model is run, -,auto_ownership,households.VEHICL, -#home_taz,home_taz,households.TAZ, +Description,Target,Expression +#,, annotate households table after import +,_PERSON_COUNT,"lambda query, persons, households: persons.query(query).groupby('household_id').size().reindex(households.index).fillna(0).astype(np.int8)" +#,,FIXME households.income can be negative - so we clip? +income_in_thousands,income_in_thousands,(households.income / 1000).clip(lower=0) +income_segment,income_segment,"pd.cut(income_in_thousands, bins=[-np.inf, 30, 60, 100, np.inf], labels=[1, 2, 3, 4]).astype(int)" +#,, +,_MIN_VOT,setting('min_value_of_time') +,_MAX_VOT,setting('max_value_of_time') +,_MU,setting('distributed_vot_mu') +,_SIGMA,setting('distributed_vot_sigma') +median_value_of_time,median_value_of_time,"income_segment.map({k: v for k, v in setting('household_median_value_of_time').items()})" +hh_value_of_time,hh_value_of_time,"rng.lognormal_for_df(df, mu=np.log(median_value_of_time * _MU), sigma=_SIGMA).clip(_MIN_VOT, _MAX_VOT)" +#,, +#num_workers was renamed in import,, +#,num_workers,households.workers +number of non_workers,num_non_workers,households.hhsize - households.num_workers +#,, +#,,we assume that everyone 16 and older is a potential driver +number of drivers,num_drivers,"_PERSON_COUNT('16 <= age', persons, households)" +num_adults,num_adults,"_PERSON_COUNT('adult', persons, households)" +num_children,num_children,"_PERSON_COUNT('~adult', persons, households)" +num_young_children,num_young_children,"_PERSON_COUNT('age <= 5', persons, households)" +num_children_5_to_15,num_children_5_to_15,"_PERSON_COUNT('5 <= age <= 15', persons, households)" +num_children_16_to_17,num_children_16_to_17,"_PERSON_COUNT('16 <= age <= 17', persons, households)" +num_college_age,num_college_age,"_PERSON_COUNT('18 <= age <= 24', persons, households)" +num_young_adults,num_young_adults,"_PERSON_COUNT('25 <= age <= 34', persons, households)" +non_family,non_family,households.HHT.isin(constants.HHT_NONFAMILY) +family,family,households.HHT.isin(constants.HHT_FAMILY) +home_is_urban,home_is_urban,"reindex(land_use.area_type, households.TAZ) < setting('urban_threshold')" +home_is_rural,home_is_rural,"reindex(land_use.area_type, households.TAZ) > setting('rural_threshold')" +#,, default for work and school location logsums before auto_ownership model is run +,auto_ownership,households.VEHICL +#home_taz,home_taz,households.TAZ diff --git a/activitysim/abm/test/configs/annotate_households_cdap.csv b/activitysim/abm/test/configs/annotate_households_cdap.csv index c3233f8611..93f1db2ec0 100644 --- a/activitysim/abm/test/configs/annotate_households_cdap.csv +++ b/activitysim/abm/test/configs/annotate_households_cdap.csv @@ -1,6 +1,9 @@ Description,Target,Expression #,, annotate households table after cdap model has run -num_under16_not_at_school,num_under16_not_at_school,"persons.under16_not_at_school.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0)" -num_travel_active,num_travel_active,"persons.travel_active.groupby(persons.household_id).sum().reindex(households.index).fillna(0)" -num_travel_active_adults,num_travel_active_adults,"(persons.adult & persons.travel_active).groupby(persons.household_id).sum().reindex(households.index).fillna(0)" -num_travel_active_children,num_travel_active_children,"num_travel_active - num_travel_active_adults" +num_under16_not_at_school,num_under16_not_at_school,persons.under16_not_at_school.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active,num_travel_active,persons.travel_active.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_adults,num_travel_active_adults,(persons.adult & persons.travel_active).astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_preschoolers,num_travel_active_preschoolers,((persons.ptype == constants.PTYPE_PRESCHOOL) & persons.travel_active).astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_children,num_travel_active_children,num_travel_active - num_travel_active_adults +num_travel_active_non_preschoolers,num_travel_active_non_preschoolers,num_travel_active - num_travel_active_preschoolers +participates_in_jtf_model,participates_in_jtf_model,(num_travel_active > 1) & (num_travel_active_non_preschoolers > 0) diff --git a/activitysim/abm/test/configs/annotate_persons.csv b/activitysim/abm/test/configs/annotate_persons.csv index 3690abc8aa..a54b944818 100644 --- a/activitysim/abm/test/configs/annotate_persons.csv +++ b/activitysim/abm/test/configs/annotate_persons.csv @@ -10,8 +10,8 @@ presence of retiree other than self in household,has_retiree,"other_than(persons presence of preschooler other than self in household,has_preschool_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_PRESCHOOL)" presence of driving_kid other than self in household,has_driving_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_DRIVING)" presence of school_kid other than self in household,has_school_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_SCHOOL)" -presence of full_time worker other than self in household,has_full_time,"other_than(persons.household_id, persons.ptype == constants.PTYPE_FULL)" -presence of part_time worker other than self in household,has_part_time,"other_than(persons.household_id, persons.ptype == constants.PTYPE_PART)" +presence of full_time worker other than self in household (independent of person type),has_full_time,"other_than(persons.household_id, persons.pemploy==constants.PEMPLOY_FULL)" +presence of part_time worker other than self in household (independent of person type),has_part_time,"other_than(persons.household_id, persons.pemploy==constants.PEMPLOY_PART)" presence of university student other than self in household,has_university,"other_than(persons.household_id, persons.ptype == constants.PTYPE_UNIVERSITY)" student_is_employed,student_is_employed,"(persons.ptype.isin([constants.PTYPE_UNIVERSITY, constants.PTYPE_DRIVING]) & persons.pemploy.isin([constants.PEMPLOY_FULL, constants.PEMPLOY_PART]))" nonstudent_to_school,nonstudent_to_school,"(persons.ptype.isin([constants.PTYPE_FULL, constants.PTYPE_PART, constants.PTYPE_NONWORK, constants.PTYPE_RETIRED]) & persons.pstudent.isin([constants.PSTUDENT_GRADE_OR_HIGH, constants.PSTUDENT_UNIVERSITY]))" diff --git a/activitysim/abm/test/configs/settings.yaml b/activitysim/abm/test/configs/settings.yaml index f94c61b332..dbb65dface 100644 --- a/activitysim/abm/test/configs/settings.yaml +++ b/activitysim/abm/test/configs/settings.yaml @@ -1,3 +1,5 @@ +inherit_settings: True + #input data store and skims input_store: mtc_asim.h5 skims_file: skims.omx diff --git a/activitysim/abm/test/configs/tour_mode_choice.csv b/activitysim/abm/test/configs/tour_mode_choice.csv index 704e3a59e2..a859ffd097 100644 --- a/activitysim/abm/test/configs/tour_mode_choice.csv +++ b/activitysim/abm/test/configs/tour_mode_choice.csv @@ -98,8 +98,8 @@ WALK_LOC - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Light rail/Ferry,,,,,,,,,,,,,,,,,,, WALK_LRF - Unavailable,walk_lrf_available == False,,,,,,,,,,-999,,,,,,,, WALK_LRF - In-vehicle time,@c_ivt * (odt_skims['WLK_LRF_WLK_TOTIVT']/100 + dot_skims['WLK_LRF_WLK_TOTIVT']/100),,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@c_ivt_lrt * (odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100),,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@c_ivt_ferry * (odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100),,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@(c_ivt_lrt-c_ivt) * (odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100),,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@(c_ivt_ferry-c_ivt_lrt) * (odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100),,,,,,,,,,1,,,,,,,, WALK_LRF - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_LRF_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_LRF_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,1,,,,,,,, WALK_LRF - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,1,,,,,,,, WALK_LRF - transfer wait time,@c_xwait * (odt_skims['WLK_LRF_WLK_XWAIT']/100 + dot_skims['WLK_LRF_WLK_XWAIT']/100),,,,,,,,,,1,,,,,,,, @@ -114,7 +114,7 @@ WALK_LRF - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Express bus,,,,,,,,,,,,,,,,,,, WALK_EXP - Unavailable,walk_express_available == False,,,,,,,,,,,-999,,,,,,, WALK_EXP - In-vehicle time,@c_ivt * (odt_skims['WLK_EXP_WLK_TOTIVT']/100 + dot_skims['WLK_EXP_WLK_TOTIVT']/100),,,,,,,,,,,1,,,,,,, -WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@c_ivt_exp * (odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100),,,,,,,,,,,1,,,,,,, +WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@(c_ivt_exp-c_ivt) * (odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100),,,,,,,,,,,1,,,,,,, WALK_EXP - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_EXP_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_EXP_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,1,,,,,,, WALK_EXP - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,1,,,,,,, WALK_EXP - transfer wait time,@c_xwait * (odt_skims['WLK_EXP_WLK_XWAIT']/100 + dot_skims['WLK_EXP_WLK_XWAIT']/100),,,,,,,,,,,1,,,,,,, @@ -129,7 +129,7 @@ WALK_EXP - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Heavy Rail,,,,,,,,,,,,,,,,,,, WALK_HVY - Unavailable,walk_heavyrail_available == False,,,,,,,,,,,,-999,,,,,, WALK_HVY - In-vehicle time,@c_ivt * (odt_skims['WLK_HVY_WLK_TOTIVT']/100 + dot_skims['WLK_HVY_WLK_TOTIVT']/100),,,,,,,,,,,,1,,,,,, -WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@c_ivt_hvy * (odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100),,,,,,,,,,,,1,,,,,, +WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_hvy-c_ivt) * (odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100),,,,,,,,,,,,1,,,,,, WALK_HVY - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_HVY_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_HVY_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,1,,,,,, WALK_HVY - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,1,,,,,, WALK_HVY - transfer wait time,@c_xwait * (odt_skims['WLK_HVY_WLK_XWAIT']/100 + dot_skims['WLK_HVY_WLK_XWAIT']/100),,,,,,,,,,,,1,,,,,, @@ -144,7 +144,7 @@ WALK_HVY - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Commuter rail,,,,,,,,,,,,,,,,,,, WALK_COM - Unavailable,walk_commuter_available == False,,,,,,,,,,,,,-999,,,,, WALK_COM - In-vehicle time,@c_ivt * (odt_skims['WLK_COM_WLK_TOTIVT']/100 + dot_skims['WLK_COM_WLK_TOTIVT']/100),,,,,,,,,,,,,1,,,,, -WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@c_ivt_com * (odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100),,,,,,,,,,,,,1,,,,, +WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@(c_ivt_com-c_ivt) * (odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100),,,,,,,,,,,,,1,,,,, WALK_COM - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_COM_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_COM_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,,1,,,,, WALK_COM - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,,1,,,,, WALK_COM - transfer wait time,@c_xwait * (odt_skims['WLK_COM_WLK_XWAIT']/100 + dot_skims['WLK_COM_WLK_XWAIT']/100),,,,,,,,,,,,,1,,,,, @@ -218,7 +218,7 @@ DRIVE_HVY - Unavailable,drive_heavyrail_available == False,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - Unavailable for zero auto households,auto_ownership == 0,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - Unavailable for persons less than 16,age < 16,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - In-vehicle time,@c_ivt * (odt_skims['DRV_HVY_WLK_TOTIVT']/100 + dot_skims['WLK_HVY_DRV_TOTIVT']/100),,,,,,,,,,,,,,,,,1, -DRIVE_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_exp-c_ivt) * (odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100),,,,,,,,,,,,,,,,,1, +DRIVE_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_hvy-c_ivt) * (odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100),,,,,,,,,,,,,,,,,1, DRIVE_HVY - Short iwait time,@c_short_i_wait * ((odt_skims['DRV_HVY_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_HVY_DRV_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,,,,,,1, DRIVE_HVY - Long iwait time,@c_long_i_wait * ((odt_skims['DRV_HVY_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_HVY_DRV_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,,,,,,1, DRIVE_HVY - transfer wait time,@c_xwait * (odt_skims['DRV_HVY_WLK_XWAIT']/100 + dot_skims['WLK_HVY_DRV_XWAIT']/100),,,,,,,,,,,,,,,,,1, @@ -253,47 +253,47 @@ DRIVE_COM - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,,,,,1 DRIVE_COM - Person is less than 10 years old,@c_age010_trn * (df.age < 10),,,,,,,,,,,,,,,,,,1 #indiv tour ASCs,,,,,,,,,,,,,,,,,,, Walk ASC - Zero auto,@walk_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,1,,,,,,,,,,, -Walk ASC - Auto deficient,@walk_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,1,,,,,,,,,,, +Walk ASC - Auto deficient,@walk_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,1,,,,,,,,,,, Walk ASC - Auto deficient,@walk_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,1,,,,,,,,,,, Bike ASC - Zero auto,@bike_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,1,,,,,,,,,, -Bike ASC - Auto deficient,@bike_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,1,,,,,,,,,, +Bike ASC - Auto deficient,@bike_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,1,,,,,,,,,, Bike ASC - Auto deficient,@bike_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,1,,,,,,,,,, Shared ride 2 ASC - Zero auto,@sr2_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,1,1,,,,,,,,,,,,,, -Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,1,1,,,,,,,,,,,,,, +Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,1,1,,,,,,,,,,,,,, Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,1,1,,,,,,,,,,,,,, Shared ride 3+ - Zero auto,@sr3p_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,1,1,,,,,,,,,,,, -Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,1,1,,,,,,,,,,,, +Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,1,1,,,,,,,,,,,, Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,1,1,,,,,,,,,,,, Walk to Transit - Zero auto,@walk_transit_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,,1,1,1,1,1,,,,, -Walk to Transit - Auto deficient,@walk_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, +Walk to Transit - Auto deficient,@walk_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,1,1,1,1,1,,,,, Walk to Transit - Auto deficient,@walk_transit_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, Drive to Transit - Zero auto,@drive_transit_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,,,,,,,1,1,1,1,1 -Drive to Transit - Auto deficient,@drive_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 +Drive to Transit - Auto deficient,@drive_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,,,,,,1,1,1,1,1 Drive to Transit - Auto deficient,@drive_transit_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 #joint tour ASCs,,,,,,,,,,,,,,,,,,, Joint - Walk ASC - Zero auto,@joint_walk_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,1,,,,,,,,,,, -Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,1,,,,,,,,,,, +Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,1,,,,,,,,,,, Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,1,,,,,,,,,,, Joint - Bike ASC - Zero auto,@joint_bike_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,1,,,,,,,,,, -Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,1,,,,,,,,,, +Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,1,,,,,,,,,, Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,1,,,,,,,,,, Joint - Shared ride 2 ASC - Zero auto,@joint_sr2_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,1,1,,,,,,,,,,,,,, -Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,1,1,,,,,,,,,,,,,, +Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,1,1,,,,,,,,,,,,,, Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,1,1,,,,,,,,,,,,,, Joint - Shared ride 3+ - Zero auto,@joint_sr3p_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,1,1,,,,,,,,,,,, -Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,1,1,,,,,,,,,,,, +Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,1,1,,,,,,,,,,,, Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,1,1,,,,,,,,,,,, Joint - Walk to Transit - Zero auto,@joint_walk_transit_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,,1,1,1,1,1,,,,, -Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, +Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,1,1,1,1,1,,,,, Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, Joint - Drive to Transit - Zero auto,@joint_drive_transit_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,,,,,,,1,1,1,1,1 -Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 +Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,,,,,,1,1,1,1,1 Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 Local bus ASC,@local_bus_ASC,,,,,,,,,1,,,,,1,,,, -Walk to Light Rail ASC,@walk_light_rail_ASC * (df.walk_ferry_available == False),,,,,,,,,,,1,,,,,,, -Drive to Light Rail ASC,@drive_light_rail_ASC * (df.drive_ferry_available == False),,,,,,,,,,,,,,,,1,, -Walk to Ferry ASC,@walk_ferry_ASC * df.walk_ferry_available,,,,,,,,,,,1,,,,,,, -Drive to Ferry ASC,@drive_ferry_ASC * df.drive_ferry_available,,,,,,,,,,,,,,,,1,, +Walk to Light Rail ASC,@walk_light_rail_ASC * (df.walk_ferry_available == False),,,,,,,,,,1,,,,,,,, +Drive to Light Rail ASC,@drive_light_rail_ASC * (df.drive_ferry_available == False),,,,,,,,,,,,,,,1,,, +Walk to Ferry ASC,@walk_ferry_ASC * df.walk_ferry_available,,,,,,,,,,1,,,,,,,, +Drive to Ferry ASC,@drive_ferry_ASC * df.drive_ferry_available,,,,,,,,,,,,,,,1,,, Express Bus ASC,@express_bus_ASC,,,,,,,,,,,1,,,,,1,, Heavy Rail ASC,@heavy_rail_ASC,,,,,,,,,,,,1,,,,,1, Commuter Rail,@commuter_rail_ASC,,,,,,,,,,,,,1,,,,,1 @@ -303,3 +303,4 @@ Drive to Transit - distance penalty,@(c_drvtrn_distpen_0*(1-od_skims['DIST']/c_d # FIXME - skims aren't symmetrical, so we have to make sure they can get back,,,,,,,,,,,,,,,,,, Walk not available for long distances,@od_skims.max('DISTWALK') > 3,,,,,,,-999,,,,,,,,,,, Bike not available for long distances,@od_skims.max('DISTBIKE') > 8,,,,,,,,-999,,,,,,,,,, +Drive alone not available for escort tours,is_escort,-999,-999,,,,,,,,,,,,,,,, diff --git a/activitysim/abm/test/configs/tour_mode_choice_annotate_choosers_preprocessor.csv b/activitysim/abm/test/configs/tour_mode_choice_annotate_choosers_preprocessor.csv index d0e8f839dc..0c8a1d9f5d 100644 --- a/activitysim/abm/test/configs/tour_mode_choice_annotate_choosers_preprocessor.csv +++ b/activitysim/abm/test/configs/tour_mode_choice_annotate_choosers_preprocessor.csv @@ -10,42 +10,51 @@ local,_DF_IS_TOUR,'tour_type' in df.columns ,work_tour_is_bike,_parent_tour_mode=='BIKE' ,work_tour_is_SOV,"_parent_tour_mode.isin(['DRIVEALONEFREE','DRIVEALONEPAY'])" #,, +,is_mandatory,(df.tour_category=='mandatory') if 'tour_category' in df.columns else False ,is_joint,(df.tour_category=='joint') if 'tour_category' in df.columns else False ,is_indiv,~is_joint ,is_atwork_subtour,(df.tour_category=='atwork') if 'tour_category' in df.columns else False +,is_escort,(df.tour_type == 'escort') if _DF_IS_TOUR else False #,, ,c_cost,(0.60 * c_ivt) / df.value_of_time #,, ,dest_topology,"reindex(land_use.TOPOLOGY, df[dest_col_name])" ,terminal_time,"reindex(land_use.TERMINAL, df[dest_col_name])" ,dest_density_index,"reindex(land_use.density_index, df[dest_col_name])" -FIXME,origin_walk_time,0 -FIXME,destination_walk_time,0 -#,, -,_free_parking_available,"(df.tour_type == 'work') & df.free_parking_at_work if _DF_IS_TOUR else False" +# FIXME no transit subzones so all zones short walk to transit,, +,_walk_transit_origin,True +,_walk_transit_destination,True +,walk_transit_available,_walk_transit_origin & _walk_transit_destination +,drive_transit_available,_walk_transit_destination & (df.auto_ownership > 0) +,origin_walk_time,shortWalk*60/walkSpeed +,destination_walk_time,shortWalk*60/walkSpeed +#,, +,_free_parking_available,(df.tour_type == 'work') & df.free_parking_at_work if _DF_IS_TOUR else False ,_dest_hourly_peak_parking_cost,"reindex(land_use.PRKCST, df[dest_col_name])" -,_hourly_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_peak_parking_cost)" -,daily_parking_cost,_hourly_parking_cost * df.duration -#,, -,drive_commuter_available,(odt_skims['DRV_COM_WLK_TOTIVT']>0) & (dot_skims['WLK_COM_DRV_TOTIVT']>0) & (odt_skims['DRV_COM_WLK_KEYIVT']>0) & (dot_skims['WLK_COM_DRV_KEYIVT']>0) -,drive_express_available,(odt_skims['DRV_EXP_WLK_TOTIVT']>0) & (dot_skims['WLK_EXP_DRV_TOTIVT']>0) & (odt_skims['DRV_EXP_WLK_KEYIVT']>0) & (dot_skims['WLK_EXP_DRV_KEYIVT']>0) -,drive_heavyrail_available,(odt_skims['DRV_HVY_WLK_TOTIVT']>0) & (dot_skims['WLK_HVY_DRV_TOTIVT']>0) & (odt_skims['DRV_HVY_WLK_KEYIVT']>0) & (dot_skims['WLK_HVY_DRV_KEYIVT']>0) -,drive_local_available,(odt_skims['DRV_LOC_WLK_TOTIVT']>0) & (dot_skims['WLK_LOC_DRV_TOTIVT']>0) -,drive_lrf_available,(odt_skims['DRV_LRF_WLK_TOTIVT']>0) & (dot_skims['WLK_LRF_DRV_TOTIVT']>0) & (odt_skims['DRV_LRF_WLK_KEYIVT']>0) & (dot_skims['WLK_LRF_DRV_KEYIVT']>0) +,_dest_hourly_offpeak_parking_cost,"reindex(land_use.OPRKCST, df[dest_col_name])" +,_hourly_peak_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_peak_parking_cost)" +,_hourly_offpeak_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_offpeak_parking_cost)" +,daily_parking_cost,"np.where(is_mandatory, _hourly_peak_parking_cost * df.duration, _hourly_offpeak_parking_cost * df.duration)" +#,, +,distance,od_skims['DIST'] +,sov_available,(odt_skims['SOV_TIME']>0) & (dot_skims['SOV_TIME']>0) +,sovtoll_available,(odt_skims['SOVTOLL_VTOLL']>0) | (dot_skims['SOVTOLL_VTOLL']>0) ,hov2_available,(odt_skims['HOV2_TIME'] + dot_skims['HOV2_TIME'])>0 ,hov2toll_available,(odt_skims['HOV2TOLL_VTOLL'] + dot_skims['HOV2TOLL_VTOLL'])>0 ,hov3_available,(odt_skims['HOV3_TIME']>0) & (dot_skims['HOV3_TIME']>0) ,hov3toll_available,(odt_skims['HOV3TOLL_VTOLL'] + dot_skims['HOV3TOLL_VTOLL'])>0 -,sov_available,(odt_skims['SOV_TIME']>0) & (dot_skims['SOV_TIME']>0) -,sovtoll_available,(odt_skims['SOVTOLL_VTOLL']>0) | (dot_skims['SOVTOLL_VTOLL']>0) -,walk_commuter_available,(odt_skims['WLK_COM_WLK_TOTIVT']>0) & (dot_skims['WLK_COM_WLK_TOTIVT']>0) & (odt_skims['WLK_COM_WLK_KEYIVT']>0) & (dot_skims['WLK_COM_WLK_KEYIVT']>0) -,walk_express_available,(odt_skims['WLK_EXP_WLK_TOTIVT']>0) & (dot_skims['WLK_EXP_WLK_TOTIVT']>0) & (odt_skims['WLK_EXP_WLK_KEYIVT']>0) & (dot_skims['WLK_EXP_WLK_KEYIVT']>0) -,walk_heavyrail_available,(odt_skims['WLK_HVY_WLK_TOTIVT']>0) & (dot_skims['WLK_HVY_WLK_TOTIVT']>0) & (odt_skims['WLK_HVY_WLK_KEYIVT']>0) & (dot_skims['WLK_HVY_WLK_KEYIVT']>0) -,walk_local_available,(odt_skims['WLK_LOC_WLK_TOTIVT']>0) & (dot_skims['WLK_LOC_WLK_TOTIVT']>0) -,walk_lrf_available,(odt_skims['WLK_LRF_WLK_TOTIVT']>0) & (dot_skims['WLK_LRF_WLK_TOTIVT']>0) & (odt_skims['WLK_LRF_WLK_KEYIVT']) & (dot_skims['WLK_LRF_WLK_KEYIVT']>0) -,distance,od_skims['DIST'] -,walk_ferry_available,walk_lrf_available & (odt_skims['WLK_LRF_WLK_FERRYIVT']>0) & (dot_skims['WLK_LRF_WLK_FERRYIVT']>0) -,drive_ferry_available,drive_lrf_available & (odt_skims['DRV_LRF_WLK_FERRYIVT']>0) & (dot_skims['WLK_LRF_WLK_FERRYIVT']>0) +,walk_local_available,walk_transit_available & (odt_skims['WLK_LOC_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LOC_WLK_TOTIVT']/100>0) +,walk_commuter_available,walk_transit_available & (odt_skims['WLK_COM_WLK_TOTIVT']/100>0) & (dot_skims['WLK_COM_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100)>0) +,walk_express_available,walk_transit_available & (odt_skims['WLK_EXP_WLK_TOTIVT']/100>0) & (dot_skims['WLK_EXP_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100)>0) +,walk_heavyrail_available,walk_transit_available & (odt_skims['WLK_HVY_WLK_TOTIVT']/100>0) & (dot_skims['WLK_HVY_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100)>0) +,walk_lrf_available,walk_transit_available & (odt_skims['WLK_LRF_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LRF_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100)>0) +,walk_ferry_available,walk_lrf_available & ((odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100)>0) +,drive_local_available,drive_transit_available & (odt_skims['DRV_LOC_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LOC_DRV_TOTIVT']/100>0) +,drive_commuter_available,drive_transit_available & (odt_skims['DRV_COM_WLK_TOTIVT']/100>0) & (dot_skims['WLK_COM_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_DRV_KEYIVT']/100)>0) +,drive_express_available,drive_transit_available & (odt_skims['DRV_EXP_WLK_TOTIVT']/100>0) & (dot_skims['WLK_EXP_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_DRV_KEYIVT']/100)>0) +,drive_heavyrail_available,drive_transit_available & (odt_skims['DRV_HVY_WLK_TOTIVT']/100>0) & (dot_skims['WLK_HVY_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100)>0) +,drive_lrf_available,drive_transit_available & (odt_skims['DRV_LRF_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LRF_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_DRV_KEYIVT']/100)>0) +,drive_ferry_available,drive_lrf_available & ((odt_skims['DRV_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100)>0) #,, destination in central business district,destination_in_cbd,"(reindex(land_use.area_type, df[dest_col_name]) < setting('cbd_threshold')) * 1" #,,FIXME diagnostic diff --git a/activitysim/abm/test/test_pipeline.py b/activitysim/abm/test/test_pipeline.py index 328c95449b..18f47d5fec 100644 --- a/activitysim/abm/test/test_pipeline.py +++ b/activitysim/abm/test/test_pipeline.py @@ -319,7 +319,7 @@ def get_trace_csv(file_name): return df -EXPECT_TOUR_COUNT = 203 +EXPECT_TOUR_COUNT = 205 def regress_tour_modes(tours_df): @@ -364,7 +364,7 @@ def regress_tour_modes(tours_df): EXPECT_MODES = [ 'SHARED3FREE', 'WALK', - 'SHARED2FREE', + 'DRIVEALONEFREE', 'WALK', 'WALK', 'WALK', diff --git a/activitysim/core/chunk.py b/activitysim/core/chunk.py index 5087affed5..5ba3b3ed54 100644 --- a/activitysim/core/chunk.py +++ b/activitysim/core/chunk.py @@ -179,9 +179,10 @@ def log_write_hwm(): def check_chunk_size(hwm, chunk_size, label, max_leeway): elements = hwm['mark'] if chunk_size and max_leeway and elements > chunk_size * max_leeway: # too high - logger.warning("#chunk_hwm total_elements (%s) > %s (%s) %s : %s " % - (commas(elements), label, commas(chunk_size), - hwm['info'], hwm['trace_label'])) + # FIXME check for #warning in log - there is nothing the user can do about this + logger.debug("#chunk_hwm #warning total_elements (%s) > %s (%s) %s : %s " % + (commas(elements), label, commas(chunk_size), + hwm['info'], hwm['trace_label'])) # if we are in a chunker if len(HWM) > 1 and HWM[1]: diff --git a/activitysim/core/config.py b/activitysim/core/config.py index 07b27f3982..aaa0b91aed 100644 --- a/activitysim/core/config.py +++ b/activitysim/core/config.py @@ -340,14 +340,14 @@ def backfill_settings(settings, backfill): file_path = os.path.join(dir, file_name) if os.path.exists(file_path): if settings: - logger.warn("read settings for %s from %s" % (file_name, file_path)) + logger.debug("read settings for %s from %s" % (file_name, file_path)) with open(file_path) as f: s = yaml.load(f, Loader=yaml.SafeLoader) settings = backfill_settings(settings, s) if s.get('inherit_settings', False): - logger.warn("inherit_settings flag set for %s in %s" % (file_name, file_path)) + logger.debug("inherit_settings flag set for %s in %s" % (file_name, file_path)) continue else: break diff --git a/docs/abmexample.rst b/docs/abmexample.rst index 8d0e901fd9..af75a4aa59 100644 --- a/docs/abmexample.rst +++ b/docs/abmexample.rst @@ -589,7 +589,16 @@ multiprocessing, follow the same steps as above, but use the configuration in th The multiprocessing example also writes outputs to the ``output`` folder. The default multiprocessed example is configured to run with two processors: ``num_processes: 2``. Additional more performant configurations are -included and commented out in the example settings file. See :ref:`multiprocessing` for more information. +included and commented out in the example settings file. For example, the 100 percent sample multiprocessing example was run on a Windows Server +machine with 28 cores @ 2.56GHz and 224GB RAM with the configuration below. See :ref:`multiprocessing` for more information. + +:: + + households_sample_size: 0 + chunk_size: 5000000000 + num_processes: 24 + stagger: 0 + Outputs ------- @@ -611,9 +620,9 @@ restarting the pipeline at any step. +-----------------------------------+------------------------------------+------+------+ | households | workplace_location | 100 | 66 | +-----------------------------------+------------------------------------+------+------+ -| households | cdap_simulate | 100 | 70 | +| households | cdap_simulate | 100 | 73 | +-----------------------------------+------------------------------------+------+------+ -| households | joint_tour_frequency | 100 | 72 | +| households | joint_tour_frequency | 100 | 75 | +-----------------------------------+------------------------------------+------+------+ | joint_tour_participants | joint_tour_participation | 13 | 4 | +-----------------------------------+------------------------------------+------+------+ @@ -635,7 +644,7 @@ restarting the pipeline at any step. +-----------------------------------+------------------------------------+------+------+ | persons | joint_tour_participation | 271 | 65 | +-----------------------------------+------------------------------------+------+------+ -| persons | non_mandatory_tour_frequency | 271 | 73 | +| persons | non_mandatory_tour_frequency | 271 | 74 | +-----------------------------------+------------------------------------+------+------+ | school_destination_size | initialize_households | 1454 | 3 | +-----------------------------------+------------------------------------+------+------+ diff --git a/docs/howitworks.rst b/docs/howitworks.rst index 144ba8e4e4..446b28d80c 100644 --- a/docs/howitworks.rst +++ b/docs/howitworks.rst @@ -916,17 +916,23 @@ uses the information stored in the pipeline file to create the table below for a +----------------------------+-------------------------------+---------+------------------------------+------+------+ | households | hh_work_auto_savings_ratio | float32 | workplace_location | 66 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | num_under16_not_at_school | int8 | cdap_simulate | 70 | 100 | +| households | num_under16_not_at_school | int8 | cdap_simulate | 73 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | num_travel_active | int8 | cdap_simulate | 70 | 100 | +| households | num_travel_active | int8 | cdap_simulate | 73 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | num_travel_active_adults | int8 | cdap_simulate | 70 | 100 | +| households | num_travel_active_adults | int8 | cdap_simulate | 73 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | num_travel_active_children | int8 | cdap_simulate | 70 | 100 | +| households | num_travel_active_preschoolers| int8 | cdap_simulate | 73 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | joint_tour_frequency | object | joint_tour_frequency | 72 | 100 | +| households | num_travel_active_children | int8 | cdap_simulate | 73 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| households | num_hh_joint_tours | int8 | joint_tour_frequency | 72 | 100 | +| households |num_travel_active_non_presch | int8 | cdap_simulate | 73 | 100 | ++----------------------------+-------------------------------+---------+------------------------------+------+------+ +| households | participates_in_jtf_model | int8 | cdap_simulate | 73 | 100 | ++----------------------------+-------------------------------+---------+------------------------------+------+------+ +| households | joint_tour_frequency | object | joint_tour_frequency | 75 | 100 | ++----------------------------+-------------------------------+---------+------------------------------+------+------+ +| households | num_hh_joint_tours | int8 | joint_tour_frequency | 75 | 100 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ | joint_tour_participants | tour_id | int64 | joint_tour_participation | 4 | 13 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ @@ -1196,21 +1202,23 @@ uses the information stored in the pipeline file to create the table below for a +----------------------------+-------------------------------+---------+------------------------------+------+------+ | persons | num_joint_tours | int8 | joint_tour_participation | 65 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | non_mandatory_tour_frequency | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | non_mandatory_tour_frequency | int8 | non_mandatory_tour_frequency | 74 | 271 | ++----------------------------+-------------------------------+---------+------------------------------+------+------+ +| persons | num_non_mand | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_non_mand | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_escort_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_escort_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_eatout_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_eatout_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_shop_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_shop_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_maint_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_maint_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_discr_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_social_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_social_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ -| persons | num_non_escort_tours | int8 | non_mandatory_tour_frequency | 73 | 271 | +| persons | num_non_escort_tours | int8 | non_mandatory_tour_frequency | 74 | 271 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ | school_destination_size | gradeschool | float64 | initialize_households | 3 | 1454 | +----------------------------+-------------------------------+---------+------------------------------+------+------+ diff --git a/example/configs/annotate_households.csv b/example/configs/annotate_households.csv index 70109602cf..b1d913e8bd 100644 --- a/example/configs/annotate_households.csv +++ b/example/configs/annotate_households.csv @@ -1,34 +1,34 @@ -Description,Target,Expression, -#,, annotate households table after import, -,_PERSON_COUNT,"lambda query, persons, households: persons.query(query).groupby('household_id').size().reindex(households.index).fillna(0).astype(np.int8)", -#,,FIXME households.income can be negative, so we clip? -income_in_thousands,income_in_thousands,(households.income / 1000).clip(lower=0), -income_segment,income_segment,"pd.cut(income_in_thousands, bins=[-np.inf, 30, 60, 100, np.inf], labels=[1, 2, 3, 4]).astype(int)", -#,,, -,_MIN_VOT,setting('min_value_of_time'), -,_MAX_VOT,setting('max_value_of_time'), -,_MU,setting('distributed_vot_mu'), -,_SIGMA,setting('distributed_vot_sigma'), -median_value_of_time,median_value_of_time,"income_segment.map({k: v for k, v in setting('household_median_value_of_time').items()})", -hh_value_of_time,hh_value_of_time,"rng.lognormal_for_df(df, mu=np.log(median_value_of_time * _MU), sigma=_SIGMA).clip(_MIN_VOT, _MAX_VOT)", -#,,, -#num_workers was renamed in import,,, -#,num_workers,households.workers, -number of non_workers,num_non_workers,households.hhsize - households.num_workers, -#,,, -#,,we assume that everyone 16 and older is a potential driver, -number of drivers,num_drivers,"_PERSON_COUNT('16 <= age', persons, households)", -num_adults,num_adults,"_PERSON_COUNT('adult', persons, households)", -num_children,num_children,"_PERSON_COUNT('~adult', persons, households)", -num_young_children,num_young_children,"_PERSON_COUNT('age <= 5', persons, households)", -num_children_5_to_15,num_children_5_to_15,"_PERSON_COUNT('5 <= age <= 15', persons, households)", -num_children_16_to_17,num_children_16_to_17,"_PERSON_COUNT('16 <= age <= 17', persons, households)", -num_college_age,num_college_age,"_PERSON_COUNT('18 <= age <= 24', persons, households)", -num_young_adults,num_young_adults,"_PERSON_COUNT('25 <= age <= 34', persons, households)", -non_family,non_family,households.HHT.isin(constants.HHT_NONFAMILY), -family,family,households.HHT.isin(constants.HHT_FAMILY), -home_is_urban,home_is_urban,"reindex(land_use.area_type, households.TAZ) < setting('urban_threshold')", -home_is_rural,home_is_rural,"reindex(land_use.area_type, households.TAZ) > setting('rural_threshold')", -#,, default for work and school location logsums before auto_ownership model is run, -,auto_ownership,households.VEHICL, -#home_taz,home_taz,households.TAZ, +Description,Target,Expression +#,, annotate households table after import +,_PERSON_COUNT,"lambda query, persons, households: persons.query(query).groupby('household_id').size().reindex(households.index).fillna(0).astype(np.int8)" +#,,FIXME households.income can be negative - so we clip? +income_in_thousands,income_in_thousands,(households.income / 1000).clip(lower=0) +income_segment,income_segment,"pd.cut(income_in_thousands, bins=[-np.inf, 30, 60, 100, np.inf], labels=[1, 2, 3, 4]).astype(int)" +#,, +,_MIN_VOT,setting('min_value_of_time') +,_MAX_VOT,setting('max_value_of_time') +,_MU,setting('distributed_vot_mu') +,_SIGMA,setting('distributed_vot_sigma') +median_value_of_time,median_value_of_time,"income_segment.map({k: v for k, v in setting('household_median_value_of_time').items()})" +hh_value_of_time,hh_value_of_time,"rng.lognormal_for_df(df, mu=np.log(median_value_of_time * _MU), sigma=_SIGMA).clip(_MIN_VOT, _MAX_VOT)" +#,, +#num_workers was renamed in import,, +#,num_workers,households.workers +number of non_workers,num_non_workers,households.hhsize - households.num_workers +#,, +#,,we assume that everyone 16 and older is a potential driver +number of drivers,num_drivers,"_PERSON_COUNT('16 <= age', persons, households)" +num_adults,num_adults,"_PERSON_COUNT('adult', persons, households)" +num_children,num_children,"_PERSON_COUNT('~adult', persons, households)" +num_young_children,num_young_children,"_PERSON_COUNT('age <= 5', persons, households)" +num_children_5_to_15,num_children_5_to_15,"_PERSON_COUNT('5 <= age <= 15', persons, households)" +num_children_16_to_17,num_children_16_to_17,"_PERSON_COUNT('16 <= age <= 17', persons, households)" +num_college_age,num_college_age,"_PERSON_COUNT('18 <= age <= 24', persons, households)" +num_young_adults,num_young_adults,"_PERSON_COUNT('25 <= age <= 34', persons, households)" +non_family,non_family,households.HHT.isin(constants.HHT_NONFAMILY) +family,family,households.HHT.isin(constants.HHT_FAMILY) +home_is_urban,home_is_urban,"reindex(land_use.area_type, households.TAZ) < setting('urban_threshold')" +home_is_rural,home_is_rural,"reindex(land_use.area_type, households.TAZ) > setting('rural_threshold')" +#,, default for work and school location logsums before auto_ownership model is run +,auto_ownership,households.VEHICL +#home_taz,home_taz,households.TAZ diff --git a/example/configs/annotate_households_cdap.csv b/example/configs/annotate_households_cdap.csv index a025a60e98..93f1db2ec0 100644 --- a/example/configs/annotate_households_cdap.csv +++ b/example/configs/annotate_households_cdap.csv @@ -1,6 +1,9 @@ Description,Target,Expression #,, annotate households table after cdap model has run -num_under16_not_at_school,num_under16_not_at_school,"persons.under16_not_at_school.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8)" -num_travel_active,num_travel_active,"persons.travel_active.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8)" -num_travel_active_adults,num_travel_active_adults,"(persons.adult & persons.travel_active).astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8)" -num_travel_active_children,num_travel_active_children,"num_travel_active - num_travel_active_adults" +num_under16_not_at_school,num_under16_not_at_school,persons.under16_not_at_school.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active,num_travel_active,persons.travel_active.astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_adults,num_travel_active_adults,(persons.adult & persons.travel_active).astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_preschoolers,num_travel_active_preschoolers,((persons.ptype == constants.PTYPE_PRESCHOOL) & persons.travel_active).astype(int).groupby(persons.household_id).sum().reindex(households.index).fillna(0).astype(np.int8) +num_travel_active_children,num_travel_active_children,num_travel_active - num_travel_active_adults +num_travel_active_non_preschoolers,num_travel_active_non_preschoolers,num_travel_active - num_travel_active_preschoolers +participates_in_jtf_model,participates_in_jtf_model,(num_travel_active > 1) & (num_travel_active_non_preschoolers > 0) diff --git a/example/configs/annotate_persons.csv b/example/configs/annotate_persons.csv index 3690abc8aa..a54b944818 100644 --- a/example/configs/annotate_persons.csv +++ b/example/configs/annotate_persons.csv @@ -10,8 +10,8 @@ presence of retiree other than self in household,has_retiree,"other_than(persons presence of preschooler other than self in household,has_preschool_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_PRESCHOOL)" presence of driving_kid other than self in household,has_driving_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_DRIVING)" presence of school_kid other than self in household,has_school_kid,"other_than(persons.household_id, persons.ptype == constants.PTYPE_SCHOOL)" -presence of full_time worker other than self in household,has_full_time,"other_than(persons.household_id, persons.ptype == constants.PTYPE_FULL)" -presence of part_time worker other than self in household,has_part_time,"other_than(persons.household_id, persons.ptype == constants.PTYPE_PART)" +presence of full_time worker other than self in household (independent of person type),has_full_time,"other_than(persons.household_id, persons.pemploy==constants.PEMPLOY_FULL)" +presence of part_time worker other than self in household (independent of person type),has_part_time,"other_than(persons.household_id, persons.pemploy==constants.PEMPLOY_PART)" presence of university student other than self in household,has_university,"other_than(persons.household_id, persons.ptype == constants.PTYPE_UNIVERSITY)" student_is_employed,student_is_employed,"(persons.ptype.isin([constants.PTYPE_UNIVERSITY, constants.PTYPE_DRIVING]) & persons.pemploy.isin([constants.PEMPLOY_FULL, constants.PEMPLOY_PART]))" nonstudent_to_school,nonstudent_to_school,"(persons.ptype.isin([constants.PTYPE_FULL, constants.PTYPE_PART, constants.PTYPE_NONWORK, constants.PTYPE_RETIRED]) & persons.pstudent.isin([constants.PSTUDENT_GRADE_OR_HIGH, constants.PSTUDENT_UNIVERSITY]))" diff --git a/example/configs/annotate_persons_nmtf.csv b/example/configs/annotate_persons_nmtf.csv index 5a3f8c18d2..07890f2379 100644 --- a/example/configs/annotate_persons_nmtf.csv +++ b/example/configs/annotate_persons_nmtf.csv @@ -1,9 +1,10 @@ Description,Target,Expression #,, annotate persons table after non_mandatory_tour_frequency model has run -num_non_mand,num_non_mand,"tours[tours.tour_category=='non_mandatory'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_escort_tours,num_escort_tours,"tours[tours.tour_type == 'escort'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_eatout_tours,num_eatout_tours,"tours[tours.tour_type == 'eatout'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_shop_tours,num_shop_tours,"tours[tours.tour_type == 'shopping'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_maint_tours,num_maint_tours,"tours[tours.tour_type == 'othmaint'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_social_tours,num_social_tours,"tours[tours.tour_type == 'social'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8)" -num_non_escort_tours,num_non_escort_tours,"num_non_mand-num_escort_tours" +num_non_mand,num_non_mand,tours[tours.tour_category=='non_mandatory'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_escort_tours,num_escort_tours,tours[tours.tour_type == 'escort'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_eatout_tours,num_eatout_tours,tours[tours.tour_type == 'eatout'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_shop_tours,num_shop_tours,tours[tours.tour_type == 'shopping'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_maint_tours,num_maint_tours,tours[tours.tour_type == 'othmaint'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_discr_tours,num_discr_tours,tours[tours.tour_type == 'othdiscr'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_social_tours,num_social_tours,tours[tours.tour_type == 'social'].groupby('person_id').size().reindex(persons.index).fillna(0).astype(np.int8) +num_non_escort_tours,num_non_escort_tours,num_non_mand-num_escort_tours diff --git a/example/configs/atwork_subtour_frequency.csv b/example/configs/atwork_subtour_frequency.csv index 5f65e17f38..d136bd07e8 100644 --- a/example/configs/atwork_subtour_frequency.csv +++ b/example/configs/atwork_subtour_frequency.csv @@ -1,23 +1,23 @@ Description,Expression,no_subtours,eat,business1,maint,business2,eat_business -Dummy for full-time worker,ptype == 1,-0.6000,-7.2800,-7.3750,-8.0930,-14.2800,-14.7900 -Dummy for non full-time worker,ptype != 1,-0.6000,-8.6040,-8.3190,-8.2140,-14.2800,-14.7900 -Dummy for person types 4-7 (non-workers),"ptype in [4, 5, 6, 7]",,0.0000,-5.0000,-5.0000,-5.0000,-5.0000 -Medium HH income dummy,income_segment == 2,,0.6100,0.5555,0.1527,1.1110,1.1655 -High HH income dummy,(income_segment > 2) & (income_segment < 5),,0.8693,1.0660,0.1651,2.1320,1.9353 -Zero cars owned by HH - dummy, auto_ownership == 0,,,-0.3391,0.1762,0.0000,-0.3391 -Individual discretionary tour made by the person who is a full-time worker,@(df.ptype == 1)*df.num_non_mand,,0.2334,0.7045,0.5061,1.4090,0.9379 -Individual discretionary tour made by the person who is a part-time worker,@(df.ptype != 1)*df.num_non_mand,,0.6776,0.7045,0.5061,1.4090,1.3821 -Individual eating-out tour made by the person,num_eatout_tours,,0.5491,0.5434,0.9166,1.0868,1.0925 -Main/shop/escort tour allocated to the person who is a full-time worker,@(df.ptype == 1)*df.num_maint_shop_escort,,0.0520,-0.1903,0.1446,-0.3806,-0.2423 -Main/shop/escort tour allocated to the person who is a part-time worker,@(df.ptype != 1)*df.num_maint_shop_escort,,-0.3099,-0.1903,-0.2723,-0.3806,-0.5002 -Participation in at least one joint shop/main/eat tour,num_joint_maint_shop_eat,,0.2458,0.0830,0.0803,0.1660,0.3288 -Participation in at least one joint discretionary tour,num_joint_discr,,0.3588,-0.2637,0.5822,-0.5274,0.0951 -Log of the work tour duration,@np.log(df.duration+0.5),,1.5500,1.1420,1.6590,2.2840,2.6920 -Dummy for drive-alone mode for the work tour,work_tour_is_SOV,,0.4804,0.9901,1.1530,1.9802,1.4705 +Dummy for full-time worker,pemploy==1,-0.6,-7.28,-7.375,-8.093,-14.28,-14.79 +Dummy for non full-time worker,pemploy!=1,-0.6,-8.604,-8.319,-8.214,-14.28,-14.79 +Dummy for non-workers,"ptype in [4, 5]",,0,-5,-5,-5,-5 +Medium HH income dummy,income_segment == 2,,0.61,0.5555,0.1527,1.111,1.1655 +High HH income dummy,(income_segment > 2) & (income_segment < 5),,0.8693,1.066,0.1651,2.132,1.9353 +Zero cars owned by HH - dummy, auto_ownership == 0,,,-0.3391,0.1762,0,-0.3391 +Individual discretionary tours made by the person who is a full-time worker,@(df.pemploy==1)*df.num_discr_tours,,0.2334,0.7045,0.5061,1.409,0.9379 +Individual discretionary tours made by the person who is a part-time worker,@(df.pemploy==2)*df.num_discr_tours,,0.6776,0.7045,0.5061,1.409,1.3821 +Individual eating-out tours made by the person,num_eatout_tours,,0.5491,0.5434,0.9166,1.0868,1.0925 +Main/shop/escort tours allocated to the person who is a full-time worker,@(df.pemploy==1)*df.num_maint_shop_escort,,0.052,-0.1903,0.1446,-0.3806,-0.2423 +Main/shop/escort tours allocated to the person who is a part-time worker,@(df.pemploy==2)*df.num_maint_shop_escort,,-0.3099,-0.1903,-0.2723,-0.3806,-0.5002 +Participation in joint shop/main/eat tours,num_joint_maint_shop_eat,,0.2458,0.083,0.0803,0.166,0.3288 +Participation in joint discretionary tours,num_joint_discr,,0.3588,-0.2637,0.5822,-0.5274,0.0951 +Log of the work tour duration,@np.log(df.duration+0.5),,1.55,1.142,1.659,2.284,2.692 +Dummy for drive-alone mode for the work tour,work_tour_is_SOV,,0.4804,0.9901,1.153,1.9802,1.4705 Two work tours implemented by the person,num_work_tours==2,,-0.9862,0.3753,-0.2312,0.7506,-0.6109 -"Workplace urban area dummy (cbd=1, urban=2,3, suburban=4,5,6, rural=7)",work_taz_area_type<4,,-0.4182,-0.2235,-0.1479,-0.4470,-0.6417 +"Workplace urban area dummy (cbd=1, urban=2,3, suburban=4,5,6, rural=7)",work_taz_area_type<4,,-0.4182,-0.2235,-0.1479,-0.447,-0.6417 "Workplace suburban area dummy (cbd=1, urban=2,3, suburban=4,5,6, rural=7)",(work_taz_area_type>3) & (work_taz_area_type<6),,-0.2916,-0.1102,,-0.2204,-0.4018 -Auto accessibility to retail for work taz (from zonal file),auOpRetail,,0.0150,0.0534,0.0265,0.1067,0.0683 -Walk accessibility to retail for work taz (from zonal file),nmRetail,,0.0600,,0.0400,0.0000,0.0600 -Dummy for worker or student with non-mandatory tour(s),(is_worker | is_student) * num_non_mand,,,,-0.3573,0.0000,0.0000 +Auto accessibility to retail for work taz (from zonal file),auOpRetail,,0.015,0.0534,0.0265,0.1067,0.0683 +Walk accessibility to retail for work taz (from zonal file),nmRetail,,0.06,,0.04,0,0.06 +Dummy for worker or student with non-mandatory tour(s),(is_worker | is_student) * num_non_mand,,,,-0.3573,0,0 At-work sub-tour alternative specific constant,1,,0.8576,-0.5372,-0.6198,-2.1337,-0.9721 diff --git a/example/configs/joint_tour_frequency.csv b/example/configs/joint_tour_frequency.csv index 978a8e9195..f2bf8013d6 100644 --- a/example/configs/joint_tour_frequency.csv +++ b/example/configs/joint_tour_frequency.csv @@ -27,98 +27,98 @@ logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,0.1086,,,,,0 # incomeGreaterThan100,income_greater_than_100,,0,,,,,0,0,0,0,0,,,,,,,,,, # incomeMissing (dummy always zero),income_missing,,0,,,,,0,0,0,0,0,,,,,,,,,, # zeroAutomobiles,auto_ownership == 0,,0,,,,,0,0,0,0,0,,,,,,,,,, -fewerCarsThanDrivers,auto_ownership < num_drivers,,0.2523,,,,,0.5046,0.2523,0.2523,0.2523,0.2523,,,,,,,,,, +fewerCarsThanDrivers,(auto_ownership > 0) & (auto_ownership < num_drivers),,0.2523,,,,,0.5046,0.2523,0.2523,0.2523,0.2523,,,,,,,,,, moreCarsThanWorkers,auto_ownership > num_workers,,-0.3027,,,,,-0.6054,-0.3027,-0.3027,-0.3027,-0.3027,,,,,,,,,, # walkRetailAccessibility,non_motorized_retail_accessibility,,0,,,,,0,0,0,0,0,,,,,,,,,, # Maintenance,,,,,,,,,,,,,,,,,,,,,, fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,0.3173,,,,,0.3173,,,,0.6346,0.3173,0.3173,0.3173,,,,,, partTimeNonMandMaxThree,cdap_nonmand_part_max3,,,0.2452,,,,,0.2452,,,,0.4904,0.2452,0.2452,0.2452,,,,,, nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,0.4643,,,,,0.4643,,,,0.9286,0.4643,0.4643,0.4643,,,,,, -retireeNonMandMaxThree,cdap_nonmand_retired_max3,,,0.9050,,,,,0.9050,,,,1.8100,0.9050,0.9050,0.9050,,,,,, +retireeNonMandMaxThree,cdap_nonmand_retired_max3,,,0.905,,,,,0.905,,,,1.81,0.905,0.905,0.905,,,,,, universityNonMandMaxThree,cdap_nonmand_univ_driving_max3,,,0.2643,,,,,0.2643,,,,0.5286,0.2643,0.2643,0.2643,,,,,, preDrivingNonMandMaxThree,cdap_nonmand_nondriving_child_max3,,,0.6482,,,,,0.6482,,,,1.2964,0.6482,0.6482,0.6482,,,,,, fullTimeMandMaxThree,cdap_mand_full_max3,,,-0.3009,,,,,-0.3009,,,,-0.6018,-0.3009,-0.3009,-0.3009,,,,,, drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,-0.3237,,,,,-0.3237,,,,-0.6474,-0.3237,-0.3237,-0.3237,,,,,, preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,0.2299,,,,,0.2299,,,,0.4598,0.2299,0.2299,0.2299,,,,,, -# timeWindowOverlapAdult,time_window_overlap_adult,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# timeWindowOverlapChild,time_window_overlap_child,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, +# timeWindowOverlapAdult,time_window_overlap_adult,,,0,,,,,0,,,,0,0,0,0,,,,,, +# timeWindowOverlapChild,time_window_overlap_child,,,0,,,,,0,,,,0,0,0,0,,,,,, +# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,0,,,,,0,,,,0,0,0,0,,,,,, logTimeWindowOverlapAdult,log_time_window_overlap_adult,,,0.3714,,,,,0.3714,,,,0.7428,0.3714,0.3714,0.3714,,,,,, -logTimeWindowOverlapChild,log_time_window_overlap_child,,,0.1760,,,,,0.1760,,,,0.3520,0.1760,0.1760,0.1760,,,,,, +logTimeWindowOverlapChild,log_time_window_overlap_child,,,0.176,,,,,0.176,,,,0.352,0.176,0.176,0.176,,,,,, logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,,0.2443,,,,,0.2443,,,,0.4886,0.2443,0.2443,0.2443,,,,,, -# incomeBetween50And100,income_between_50_and_100,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# incomeGreaterThan100,income_greater_than_100,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# incomeMissing (dummy always zero),income_missing,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# zeroAutomobiles,auto_ownership == 0,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -fewerCarsThanDrivers,auto_ownership < num_drivers,,,0.4611,,,,,0.4611,,,,0.9222,0.4611,0.4611,0.4611,,,,,, -moreCarsThanWorkers,auto_ownership > num_workers,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, -# walkRetailAccessibility,non_motorized_retail_accessibility,,,0.0000,,,,,0.0000,,,,0.0000,0.0000,0.0000,0.0000,,,,,, +# incomeBetween50And100,income_between_50_and_100,,,0,,,,,0,,,,0,0,0,0,,,,,, +# incomeGreaterThan100,income_greater_than_100,,,0,,,,,0,,,,0,0,0,0,,,,,, +# incomeMissing (dummy always zero),income_missing,,,0,,,,,0,,,,0,0,0,0,,,,,, +# zeroAutomobiles,auto_ownership == 0,,,0,,,,,0,,,,0,0,0,0,,,,,, +fewerCarsThanDrivers,(auto_ownership > 0) & (auto_ownership < num_drivers),,,0.4611,,,,,0.4611,,,,0.9222,0.4611,0.4611,0.4611,,,,,, +# moreCarsThanWorkers,auto_ownership > num_workers,,,0,,,,,0,,,,0,0,0,0,,,,,, +# walkRetailAccessibility,non_motorized_retail_accessibility,,,0,,,,,0,,,,0,0,0,0,,,,,, # eating out,,,,,,,,,,,,,,,,,,,,,, -fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,0.2275,,,,,0.2275,,,,0.2275,,,0.4550,0.2275,0.2275,,, -partTimeNonMandMaxThree,cdap_nonmand_part_max3,,,,0.3765,,,,,0.3765,,,,0.3765,,,0.7530,0.3765,0.3765,,, -nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,,0.1820,,,,,0.1820,,,,0.1820,,,0.3640,0.1820,0.1820,,, +fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,0.2275,,,,,0.2275,,,,0.2275,,,0.455,0.2275,0.2275,,, +partTimeNonMandMaxThree,cdap_nonmand_part_max3,,,,0.3765,,,,,0.3765,,,,0.3765,,,0.753,0.3765,0.3765,,, +nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,,0.182,,,,,0.182,,,,0.182,,,0.364,0.182,0.182,,, retireeNonMandMaxThree,cdap_nonmand_retired_max3,,,,0.4264,,,,,0.4264,,,,0.4264,,,0.8528,0.4264,0.4264,,, universityNonMandMaxThree,cdap_nonmand_univ_driving_max3,,,,0.4097,,,,,0.4097,,,,0.4097,,,0.8194,0.4097,0.4097,,, preDrivingNonMandMaxThree,cdap_nonmand_nondriving_child_max3,,,,0.3851,,,,,0.3851,,,,0.3851,,,0.7702,0.3851,0.3851,,, -fullTimeMandMaxThree,cdap_mand_full_max3,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -# drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -# preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -# timeWindowOverlapAdult,time_window_overlap_adult,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -# timeWindowOverlapChild,time_window_overlap_child,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, +# fullTimeMandMaxThree,cdap_mand_full_max3,,,,0,,,,,0,,,,0,,,0,0,0,,, +# drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,0,,,,,0,,,,0,,,0,0,0,,, +# preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,0,,,,,0,,,,0,,,0,0,0,,, +# timeWindowOverlapAdult,time_window_overlap_adult,,,,0,,,,,0,,,,0,,,0,0,0,,, +# timeWindowOverlapChild,time_window_overlap_child,,,,0,,,,,0,,,,0,,,0,0,0,,, +# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,,0,,,,,0,,,,0,,,0,0,0,,, logTimeWindowOverlapAdult,log_time_window_overlap_adult,,,,0.4856,,,,,0.4856,,,,0.4856,,,0.9712,0.4856,0.4856,,, -# logTimeWindowOverlapChild,log_time_window_overlap_child,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, +# logTimeWindowOverlapChild,log_time_window_overlap_child,,,,0,,,,,0,,,,0,,,0,0,0,,, logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,,,0.0921,,,,,0.0921,,,,0.0921,,,0.1842,0.0921,0.0921,,, incomeBetween50And100,income_between_50_and_100,,,,0.2977,,,,,0.2977,,,,0.2977,,,0.5954,0.2977,0.2977,,, incomeGreaterThan100,income_greater_than_100,,,,0.4492,,,,,0.4492,,,,0.4492,,,0.8984,0.4492,0.4492,,, -incomeMissing (dummy always zero),income_missing,,,,0.2780,,,,,0.2780,,,,0.2780,,,0.5560,0.2780,0.2780,,, -# zeroAutomobiles,auto_ownership == 0,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -fewerCarsThanDrivers,auto_ownership < num_drivers,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,0.0000,0.0000,,, -moreCarsThanWorkers,auto_ownership > num_workers,,,,0.3825,,,,,0.3825,,,,0.3825,,,0.7650,0.3825,0.3825,,, +incomeMissing (dummy always zero),income_missing,,,,0.278,,,,,0.278,,,,0.278,,,0.556,0.278,0.278,,, +# zeroAutomobiles,auto_ownership == 0,,,,0,,,,,0,,,,0,,,0,0,0,,, +# fewerCarsThanDrivers,(auto_ownership > 0) & (auto_ownership < num_drivers),,,,0,,,,,0,,,,0,,,0,0,0,,, +moreCarsThanWorkers,auto_ownership > num_workers,,,,0.3825,,,,,0.3825,,,,0.3825,,,0.765,0.3825,0.3825,,, walkRetailAccessibility,non_motorized_retail_accessibility,,,,0.0623,,,,,0.0623,,,,0.0623,,,0.1246,0.0623,0.0623,,, # visiting,,,,,,,,,,,,,,,,,,,,,, -fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,,0.6445,,,,,0.6445,,,,0.6445,,,0.6445,,1.2890,0.6445, +fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,,0.6445,,,,,0.6445,,,,0.6445,,,0.6445,,1.289,0.6445, partTimeNonMandMaxThree,cdap_nonmand_part_max3,,,,,0.1332,,,,,0.1332,,,,0.1332,,,0.1332,,0.2664,0.1332, -nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,,,0.5475,,,,,0.5475,,,,0.5475,,,0.5475,,1.0950,0.5475, +nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,,,0.5475,,,,,0.5475,,,,0.5475,,,0.5475,,1.095,0.5475, retireeNonMandMaxThree,cdap_nonmand_retired_max3,,,,,0.5579,,,,,0.5579,,,,0.5579,,,0.5579,,1.1158,0.5579, universityNonMandMaxThree,cdap_nonmand_univ_driving_max3,,,,,0.2809,,,,,0.2809,,,,0.2809,,,0.2809,,0.5618,0.2809, preDrivingNonMandMaxThree,cdap_nonmand_nondriving_child_max3,,,,,0.6008,,,,,0.6008,,,,0.6008,,,0.6008,,1.2016,0.6008, -fullTimeMandMaxThree,cdap_mand_full_max3,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, +# fullTimeMandMaxThree,cdap_mand_full_max3,,,,,0,,,,,0,,,,0,,,0,,0,0, +# drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,,0,,,,,0,,,,0,,,0,,0,0, +# preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,,0,,,,,0,,,,0,,,0,,0,0, timeWindowOverlapAdult,time_window_overlap_adult,,,,,0.0596,,,,,0.0596,,,,0.0596,,,0.0596,,0.1192,0.0596, timeWindowOverlapChild,time_window_overlap_child,,,,,0.0092,,,,,0.0092,,,,0.0092,,,0.0092,,0.0184,0.0092, timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,,,0.0256,,,,,0.0256,,,,0.0256,,,0.0256,,0.0513,0.0256, -#logTimeWindowOverlapAdult,log_time_window_overlap_adult,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -#logTimeWindowOverlapChild,log_time_window_overlap_child,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -#logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# incomeBetween50And100,income_between_50_and_100,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# incomeGreaterThan100,income_greater_than_100,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# incomeMissing (dummy always zero),income_missing,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# zeroAutomobiles,auto_ownership == 0,,,,,-0.9802,,,,,-0.9802,,,,-0.9802,,,-0.9802,,-1.9604,-0.9802, -fewerCarsThanDrivers,auto_ownership < num_drivers,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -moreCarsThanWorkers,auto_ownership > num_workers,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, -# walkRetailAccessibility,non_motorized_retail_accessibility,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000, +#logTimeWindowOverlapAdult,log_time_window_overlap_adult,,,,,0,,,,,0,,,,0,,,0,,0,0, +#logTimeWindowOverlapChild,log_time_window_overlap_child,,,,,0,,,,,0,,,,0,,,0,,0,0, +#logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,,,,0,,,,,0,,,,0,,,0,,0,0, +# incomeBetween50And100,income_between_50_and_100,,,,,0,,,,,0,,,,0,,,0,,0,0, +# incomeGreaterThan100,income_greater_than_100,,,,,0,,,,,0,,,,0,,,0,,0,0, +# incomeMissing (dummy always zero),income_missing,,,,,0,,,,,0,,,,0,,,0,,0,0, +zeroAutomobiles,auto_ownership == 0,,,,,-0.9802,,,,,-0.9802,,,,-0.9802,,,-0.9802,,-1.9604,-0.9802, +# fewerCarsThanDrivers,(auto_ownership > 0) & (auto_ownership < num_drivers),,,,,0,,,,,0,,,,0,,,0,,0,0, +# moreCarsThanWorkers,auto_ownership > num_workers,,,,,0,,,,,0,,,,0,,,0,,0,0, +# walkRetailAccessibility,non_motorized_retail_accessibility,,,,,0,,,,,0,,,,0,,,0,,0,0, # discretionary,,,,,,,,,,,,,,,,,,,,,, -fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,,,0.1275,,,,,0.1275,,,,0.1275,,,0.1275,,0.1275,0.2550 +fullTimeNonMandMaxThree,cdap_nonmand_full_max3,,,,,,0.1275,,,,,0.1275,,,,0.1275,,,0.1275,,0.1275,0.255 partTimeNonMandMaxThree,cdap_nonmand_part_max3,,,,,,0.4979,,,,,0.4979,,,,0.4979,,,0.4979,,0.4979,0.9958 nonWorkerNonMandMaxThree,cdap_nonmand_nonwork_max3,,,,,,0.2871,,,,,0.2871,,,,0.2871,,,0.2871,,0.2871,0.5742 retireeNonMandMaxThree,cdap_nonmand_retired_max3,,,,,,0.6136,,,,,0.6136,,,,0.6136,,,0.6136,,0.6136,1.2272 universityNonMandMaxThree,cdap_nonmand_univ_driving_max3,,,,,,0.7546,,,,,0.7546,,,,0.7546,,,0.7546,,0.7546,1.5092 preDrivingNonMandMaxThree,cdap_nonmand_nondriving_child_max3,,,,,,0.5331,,,,,0.5331,,,,0.5331,,,0.5331,,0.5331,1.0662 -fullTimeMandMaxThree,cdap_mand_full_max3,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 -# drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,,,0.1932,,,,,0.1932,,,,0.1932,,,0.1932,,0.1932,0.3864 -# preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,,,0.3862,,,,,0.3862,,,,0.3862,,,0.3862,,0.3862,0.7724 -# timeWindowOverlapAdult,time_window_overlap_adult,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 -# timeWindowOverlapChild,time_window_overlap_child,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 -# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 +# fullTimeMandMaxThree,cdap_mand_full_max3,,,,,,0,,,,,0,,,,0,,,0,,0,0 +drivingAgeStuMandMaxThree,cdap_mand_univ_driving_max3,,,,,,0.1932,,,,,0.1932,,,,0.1932,,,0.1932,,0.1932,0.3864 +preDrivingAgeMandMaxThree,cdap_mand_nondriving_child_max3,,,,,,0.3862,,,,,0.3862,,,,0.3862,,,0.3862,,0.3862,0.7724 +# timeWindowOverlapAdult,time_window_overlap_adult,,,,,,0,,,,,0,,,,0,,,0,,0,0 +# timeWindowOverlapChild,time_window_overlap_child,,,,,,0,,,,,0,,,,0,,,0,,0,0 +# timeWindowOverlapAdultChild,time_window_overlap_adult_child,,,,,,0,,,,,0,,,,0,,,0,,0,0 logTimeWindowOverlapAdult,log_time_window_overlap_adult,,,,,,0.3428,,,,,0.3428,,,,0.3428,,,0.3428,,0.3428,0.6856 logTimeWindowOverlapChild,log_time_window_overlap_child,,,,,,0.1162,,,,,0.1162,,,,0.1162,,,0.1162,,0.1162,0.2324 logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,,,,,,0.2212,,,,,0.2212,,,,0.2212,,,0.2212,,0.2212,0.4424 incomeBetween50And100,income_between_50_and_100,,,,,,0.3167,,,,,0.3167,,,,0.3167,,,0.3167,,0.3167,0.6334 -incomeGreaterThan100,income_greater_than_100,,,,,,0.4860,,,,,0.4860,,,,0.4860,,,0.4860,,0.4860,0.9720 +incomeGreaterThan100,income_greater_than_100,,,,,,0.486,,,,,0.486,,,,0.486,,,0.486,,0.486,0.972 incomeMissing (dummy always zero),income_missing,,,,,,0.3723,,,,,0.3723,,,,0.3723,,,0.3723,,0.3723,0.7446 zeroAutomobiles,auto_ownership == 0,,,,,,-0.9094,,,,,-0.9094,,,,-0.9094,,,-0.9094,,-0.9094,-1.8188 -fewerCarsThanDrivers,auto_ownership < num_drivers,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 -moreCarsThanWorkers,auto_ownership > num_workers,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 -# walkRetailAccessibility,non_motorized_retail_accessibility,,,,,,0.0000,,,,,0.0000,,,,0.0000,,,0.0000,,0.0000,0.0000 +# fewerCarsThanDrivers,(auto_ownership > 0) & (auto_ownership < num_drivers),,,,,,0,,,,,0,,,,0,,,0,,0,0 +# moreCarsThanWorkers,auto_ownership > num_workers,,,,,,0,,,,,0,,,,0,,,0,,0,0 +# walkRetailAccessibility,non_motorized_retail_accessibility,,,,,,0,,,,,0,,,,0,,,0,,0,0 diff --git a/example/configs/joint_tour_frequency_annotate_households_preprocessor.csv b/example/configs/joint_tour_frequency_annotate_households_preprocessor.csv index 736d5b3d4e..68a1de8c44 100644 --- a/example/configs/joint_tour_frequency_annotate_households_preprocessor.csv +++ b/example/configs/joint_tour_frequency_annotate_households_preprocessor.csv @@ -1,25 +1,26 @@ Description,Target,Expression ,_PTYPE_CDAP_PATTERN_COUNT,"lambda ptype, activity, households, persons: persons.query('ptype == %s and cdap_activity==\'%s\'' % (ptype, activity)).groupby('household_id').size().reindex(households.index).fillna(0)" -,_2_PTYPE_CDAP_PATTERN_COUNT,"lambda ptype1, ptype2, activity, households, persons: persons.query('(ptype == %s or ptype == %s) and cdap_activity==\'%s\'' % (ptype1, ptype1, activity)).groupby('household_id').size().reindex(households.index).fillna(0)" +,_PEMPLOY_CDAP_PATTERN_COUNT,"lambda pemploy, activity, households, persons: persons.query('pemploy == %s and cdap_activity==\'%s\'' % (pemploy, activity)).groupby('household_id').size().reindex(households.index).fillna(0)" +,_2_PTYPE_CDAP_PATTERN_COUNT,"lambda ptype1, ptype2, activity, households, persons: persons.query('(ptype == %s or ptype == %s) and cdap_activity==\'%s\'' % (ptype1, ptype2, activity)).groupby('household_id').size().reindex(households.index).fillna(0)" #,, ,_HH_OVERLAPS,"hh_time_window_overlap(households, persons)" ,time_window_overlap_adult,_HH_OVERLAPS['aa'] ,time_window_overlap_child,_HH_OVERLAPS['cc'] ,time_window_overlap_adult_child,_HH_OVERLAPS['ac'] #,, -,cdap_home_full_max3,"_PTYPE_CDAP_PATTERN_COUNT(constants.PTYPE_FULL, 'H', households, persons).clip(0,3)" -,cdap_home_part_max3,"_PTYPE_CDAP_PATTERN_COUNT(2, 'H', households, persons).clip(0,3)" +,cdap_home_full_max3,"_PEMPLOY_CDAP_PATTERN_COUNT(constants.PEMPLOY_FULL, 'H', households, persons).clip(0,3)" +,cdap_home_part_max3,"_PEMPLOY_CDAP_PATTERN_COUNT(constants.PEMPLOY_PART, 'H', households, persons).clip(0,3)" ,cdap_home_nonwork_max3,"_PTYPE_CDAP_PATTERN_COUNT(4, 'H', households, persons).clip(0,3)" ,cdap_home_retired_max3,"_PTYPE_CDAP_PATTERN_COUNT(5, 'H', households, persons).clip(0,3)" ,cdap_home_univ_driving_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(3, 6, 'H', households, persons).clip(0,3)" ,cdap_home_nondriving_child_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(7, 8, 'H', households, persons).clip(0,3)" -,cdap_nonmand_full_max3,"_PTYPE_CDAP_PATTERN_COUNT(1, 'N', households, persons).clip(0,3)" -,cdap_nonmand_part_max3,"_PTYPE_CDAP_PATTERN_COUNT(2, 'N', households, persons).clip(0,3)" +,cdap_nonmand_full_max3,"_PEMPLOY_CDAP_PATTERN_COUNT(constants.PEMPLOY_FULL, 'N', households, persons).clip(0,3)" +,cdap_nonmand_part_max3,"_PEMPLOY_CDAP_PATTERN_COUNT(constants.PEMPLOY_PART, 'N', households, persons).clip(0,3)" ,cdap_nonmand_nonwork_max3,"_PTYPE_CDAP_PATTERN_COUNT(4, 'N', households, persons).clip(0,3)" ,cdap_nonmand_retired_max3,"_PTYPE_CDAP_PATTERN_COUNT(5, 'N', households, persons).clip(0,3)" ,cdap_nonmand_univ_driving_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(3, 6, 'N', households, persons).clip(0,3)" ,cdap_nonmand_nondriving_child_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(7, 8, 'N', households, persons).clip(0,3)" -,cdap_mand_full_max3,"_PTYPE_CDAP_PATTERN_COUNT(1, 'M', households, persons).clip(0,3)" +,cdap_mand_full_max3,"_PEMPLOY_CDAP_PATTERN_COUNT(constants.PEMPLOY_FULL, 'M', households, persons).clip(0,3)" ,cdap_mand_univ_driving_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(3, 6, 'M', households, persons).clip(0,3)" ,cdap_mand_nondriving_child_max3,"_2_PTYPE_CDAP_PATTERN_COUNT(7, 8, 'M', households, persons).clip(0,3)" ,income_between_50_and_100,(households.income > 50000) & (households.income <= 100000) diff --git a/example/configs/joint_tour_participation_annotate_participants_preprocessor.csv b/example/configs/joint_tour_participation_annotate_participants_preprocessor.csv index 58b36bcfaa..9fe268b447 100644 --- a/example/configs/joint_tour_participation_annotate_participants_preprocessor.csv +++ b/example/configs/joint_tour_participation_annotate_participants_preprocessor.csv @@ -1,5 +1,5 @@ Description,Target,Expression -,_P_OVERLAPS,"person_time_window_overlap(persons)" +,_P_OVERLAPS,person_time_window_overlap(persons) ,time_window_overlap_adult,"reindex(_P_OVERLAPS.aa, participants.person_id)" ,time_window_overlap_child,"reindex(_P_OVERLAPS.cc, participants.person_id)" ,time_window_overlap_adult_child,"reindex(_P_OVERLAPS.ac, participants.person_id)" @@ -21,6 +21,4 @@ logTimeWindowOverlapAdultChild,log_time_window_overlap_adult_child,np.log1p(time ,tour_composition_is_mixed,participants.composition=='mixed' ,home_is_suburban,~(participants.home_is_urban | participants.home_is_rural) ,high_income,participants.income_in_thousands > 60 -#,person_stays_home,participants.cdap_activity == constants.CDAP_ACTIVITY_HOME -#,, ,more_cars_than_workers,participants.auto_ownership > participants.num_workers diff --git a/example/configs/non_mandatory_tour_frequency.csv b/example/configs/non_mandatory_tour_frequency.csv index e95575ab04..0dfd60d8aa 100644 --- a/example/configs/non_mandatory_tour_frequency.csv +++ b/example/configs/non_mandatory_tour_frequency.csv @@ -1,205 +1,211 @@ Description,Expression,PTYPE_FULL,PTYPE_PART,PTYPE_UNIVERSITY,PTYPE_NONWORK,PTYPE_RETIRED,PTYPE_DRIVING,PTYPE_SCHOOL,PTYPE_PRESCHOOL +Escorting Tour,escort,0,0,0,0,0,0,0,2.491 +Discretionary Tour,othdiscr,0,0,0,0,0,0,0,0.903 +Shopping Tour,shopping,0,0,0,0,0,0,0,0.000 +Maintenance Tour,othmaint,0,0,0,0,0,0,0,1.022 +Visiting/Social Tour,social,0,0,0,0,0,0,0,0.769 +Eating Out Tour,eatout,0,0,0,0,0,0,0,0.000 Total Number of Tours = 0 (No Prior Tours),(tot_tours == 0) & (num_mand == 0) & (num_hh_joint_tours == 0),-999,-999,-999,-999,-999,-999,-999,-999 -Total Number of Tours = 0 (1 or more Prior Tours),(tot_tours == 0) & ((num_mand > 0) | (num_hh_joint_tours > 0)),0,0,0,0,0,0,0,0 -Total Number of Tours = 1,tot_tours == 1,-7.3572,-7.6391,-6.2138,-8.9791,-8.5684,-7.1506,-7.1506,-5.759 -Total Number of Tours = 2,tot_tours == 2,-10.647,-10.4557,-8.908,-12.0248,-12.7416,-11.1214,-11.1214,-11.517 -Total Number of Tours = 3,tot_tours == 3,-13.5005,-14.0176,-12.3261,-14.8516,-15.0978,-13.175,-13.175,-17.276 +Total Number of Tours = 0 (1 or more Prior Tours),(tot_tours == 0) & ((num_mand > 0) | (num_hh_joint_tours > 0)),0,0,0,0,0,0,0.000,0.000 +Total Number of Tours = 1,tot_tours == 1,-7.3572,-7.6391,-6.2138,-8.9791,-8.5684,-7.1506,-7.4863,-5.759 +Total Number of Tours = 2,tot_tours == 2,-10.647,-10.4557,-8.908,-12.0248,-12.7416,-11.1214,-10.7180,-11.517 +Total Number of Tours = 3,tot_tours == 3,-13.5005,-14.0176,-12.3261,-14.8516,-15.0978,-13.175,-13.7884,-17.276 Total Number of Tours = 4,tot_tours == 4,-16.3965,-16.9717,-15.8114,-17.7037,-19.5439,-999,-999,-23.035 -Total Number of Tours = 5,tot_tours == 5,-19.6843,-999,-999,-999,-20.7897,-999,-999,-999 +Total Number of Tours = 5,tot_tours == 5,-19.6843,-999,-999,-999,-20.7897,-999,-999,-999.000 Total Number of Tours = 6+,tot_tours > 5,-999,-999,-999,-999,-999,-999,-999,-999 -Number of Mandatory tours & tour frequency =0,num_mand*(tot_tours == 0),0,0,0,0,0,0,0,2.491 -Number of Mandatory tours & tour frequency =1,num_mand*(tot_tours == 1),0,-0.239,-0.1852,-0.6766,0,-0.234,-0.234,0.903 -Number of Mandatory tours & tour frequency =2,num_mand*(tot_tours == 2),-0.8887,-1.8208,-0.8753,-1.0518,-5.0196,-0.9231,-0.9231,0 -Number of Mandatory tours & tour frequency =3,num_mand*(tot_tours == 3),-2.3343,-2.5923,-1.6158,-1.0518,-5.0196,-6.5835,-6.5835,1.022 -Number of Mandatory tours & tour frequency =4,num_mand*(tot_tours == 4),-2.3343,-2.5923,-999,-999,-999,-999,-999,0.769 +Number of Mandatory tours & tour frequency =0,num_mand*(tot_tours == 0),0,0,0,0,0,0,0.0000,0 +Number of Mandatory tours & tour frequency =1,num_mand*(tot_tours == 1),0,-0.239,-0.1852,-0.6766,0,-0.234,-1.0331,0 +Number of Mandatory tours & tour frequency =2,num_mand*(tot_tours == 2),-0.8887,-1.8208,-0.8753,-1.0518,-5.0196,-0.9231,-2.7445,0 +Number of Mandatory tours & tour frequency =3,num_mand*(tot_tours == 3),-2.3343,-2.5923,-1.6158,-1.0518,-5.0196,-6.5835,-2.7445,0 +Number of Mandatory tours & tour frequency =4,num_mand*(tot_tours == 4),-2.3343,-2.5923,-999,-999,-999,-999,-999,0 Number of Mandatory tours & tour frequency = 5+,num_mand*(tot_tours > 4),-2.3343,-2.5923,-999,-999,-999,-999,-999,0 -Number of Joint tours & tour frequency =0,num_hh_joint_tours*(tot_tours == 0),0,0,0,0,0,0,0,0 -Number of Joint tours & tour frequency =1,num_hh_joint_tours*(tot_tours == 1),0,0,0,-0.1699,0,-0.2162,-0.2162,0 -Number of Joint tours & tour frequency =2,num_hh_joint_tours*(tot_tours == 2),0,-1.1986,-0.3153,-0.4285,-0.95,-0.3587,-0.3587,0 -Number of Joint tours & tour frequency =3,num_hh_joint_tours*(tot_tours == 3),0,-1.1986,-0.7351,-0.6551,-7.143,-4.2701,-4.2701,0 -Number of Joint tours & tour frequency =4,num_hh_joint_tours*(tot_tours == 4),0,-1.1986,-999,-1.0411,-999,-999,-999,0 -Number of Joint tours & tour frequency = 5+,num_hh_joint_tours*(tot_tours > 4),0,-999,-999,-1.0411,-999,-999,-999,0 -Number of Joint Shopping tours,num_hh_joint_shop_tours,0,0,-0.713,-0.2391,-0.8072,0,0,0 -Number of Joint Maintenance tours,num_hh_joint_maint_tours,0,0,0,0,0,0,0,0 -Number of Joint Eating Out tours,num_hh_joint_eatout_tours,-0.5866,0,0,-0.7727,0,0,0,0 -Number of Joint Visit tours,num_hh_joint_social_tours,0,0,0,0,0,0,0,0 -Number of Joint Discretionary tours,num_hh_joint_othdiscr_tours,0,0,0.6713,0,0,0,0,0 -"Logged Maximum Residual Window, tour frequency =0",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 0),0,0,1.1858,0,0,0,0,0 -"Logged Maximum Residual Window, tour frequency =1",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 1),1.2562,1.5748,1.4842,1.7637,1.8357,1.3298,1.3298,0 -"Logged Maximum Residual Window, tour frequency =2",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 2),1.2868,2.0026,1.4842,1.7928,2.2707,1.3759,1.3759,0 -"Logged Maximum Residual Window, tour frequency =3",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 3),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,3.2808,0 -"Logged Maximum Residual Window, tour frequency =4",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 4),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,3.2808,0 -"Logged Maximum Residual Window, tour frequency =5+",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours > 4),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,3.2808,0 -Dummy for Mediumlow Income group (20K-50K) & tour frequency=1,medium_low_income & (tot_tours == 1),0.4981,0.5981,0,0.5709,0,0,0,0 -Dummy for Mediumlow Income group (20K-50K) & tour frequency=2,medium_low_income & (tot_tours == 2),0.8345,0.9178,0,0.8315,0,0,0,0 -Dummy for Mediumlow Income group (20K-50K) & tour frequency=3,medium_low_income & (tot_tours == 3),1.0213,1.7539,0,0.8315,0,0,0,0 -Dummy for Mediumlow Income group (20K-50K) & tour frequency=4,medium_low_income & (tot_tours == 4),1.0213,1.7539,0,0.8315,0,0,0,0 -Dummy for Mediumlow Income group (20K-50K) & tour frequency=5+,medium_low_income & (tot_tours > 4),1.0213,1.7539,0,0.8315,0,0,0,0 -Dummy for MediumHigh Income group (50K-100K) & tour frequency=1,medium_high_income & (tot_tours == 1),0.4981,0.8682,0.1109,0.7426,0,0,0,0 -Dummy for MediumHigh Income group (50K-100K) & tour frequency=2,medium_high_income & (tot_tours == 2),0.8345,1.5362,0.3914,0.8546,0,0,0,0 -Dummy for MediumHigh Income group (50K-100K) & tour frequency=3,medium_high_income & (tot_tours == 3),1.0213,1.9331,0.6137,1.0792,0,0,0,0 -Dummy for MediumHigh Income group (50K-100K) & tour frequency=4,medium_high_income & (tot_tours == 4),1.0213,1.9331,0.6137,1.0792,0,0,0,0 -Dummy for MediumHigh Income group (50K-100K) & tour frequency=5+,medium_high_income & (tot_tours > 4),1.0213,1.9331,0.6137,1.0792,0,0,0,0 -Dummy for High Income group (>100K) & tour frequency=1,high_income & (tot_tours == 1),0.5189,0.8682,0.3986,1.0633,0,0,0,0 -Dummy for High Income group (>100K) & tour frequency=2,high_income & (tot_tours == 2),1.1336,1.5362,0.8009,1.0633,0,0,0,0 -Dummy for High Income group (>100K) & tour frequency=3,high_income & (tot_tours == 3),1.3899,1.9331,0.8254,1.7742,0,0,0,0 -Dummy for High Income group (>100K) & tour frequency=4,high_income & (tot_tours == 4),1.3899,1.9331,0.8254,2.3941,0,0,0,0 -Dummy for High Income group (>100K) & tour frequency=5+,high_income & (tot_tours > 4),1.3899,1.9331,0.8254,2.3941,0,0,0,0 -Dummy for Mediumlow Income group (20K-50K) & shopping tour,medium_low_income * shopping,0,0.4421,0.5693,0.7734,1.0949,0,0,0 -Dummy for Mediumhigh Income group (50K-100K) & shopping tour,medium_high_income * shopping,0,0.4421,0.5693,0.8906,1.0949,0.2443,0.2443,0 -Dummy for High Income group (>100K) & shopping tour,high_income * shopping,0,0.7066,0.5693,0.9776,1.0949,0.2443,0.2443,0 -Dummy for Mediumlow Income group (20K-50K) & maintenance tour,medium_low_income * othmaint,0,0.6763,0,0,0.7648,0,0,0 -Dummy for Mediumhigh Income group (50K-100K) & maintenance tour,medium_high_income * othmaint,0,0.6763,0,0,0.7648,0.3982,0.3982,0 -Dummy for High Income group (>100K) & maintenance tour,high_income * othmaint,0,0.6763,0,0,1.3795,0.3982,0.3982,0 -Dummy for Mediumlow Income group (20K-50K) & Eating out tour,medium_low_income * eatout,0,0,0,0.2766,0.9769,0,0,0 -Dummy for Mediumhigh Income group (50K-100K) & Eating out tour,medium_high_income * eatout,0.5581,0,-0.7207,0.4631,1.181,0.4916,0.4916,0 -Dummy for High Income group (>100K) & Eating out tour,high_income * eatout,0.5581,0,-0.7207,0.7086,1.4842,0.4916,0.4916,0 -Dummy for Mediumlow Income group (20K-50K) & Discretionary tour,medium_low_income * othdiscr,0,0.296,0,0.1707,1.0095,0.9169,0.9169,0 -Dummy for Mediumhigh Income group (50K-100K) & Discretionary tour,medium_high_income * othdiscr,0.2565,0.296,0,0.5009,1.0095,1.405,1.405,0 -Dummy for High Income group (>100K) & Discretionary tour,high_income * othdiscr,0.2565,0.296,0,0.8846,1.0095,2.327,2.327,0 -Dummy for Mediumlow Income group (20K-50K) & Visiting tour,medium_low_income * social,0,-0.6868,0,-0.267,0,0,0,0 -Dummy for Mediumhigh Income group (50K-100K) & Visiting tour,medium_high_income * social,-0.2423,-0.6868,-0.3694,-0.267,-0.4368,0.2858,0.2858,0 -Dummy for High Income group (>100K) & Visiting tour,high_income * social,-0.2423,-0.6868,-0.3694,-0.9449,-0.5137,0.2858,0.2858,0 -Dummy for Female & tour frequency =1,female & (tot_tours == 1),-0.0766,0,0.0973,0.3902,-0.9348,0,0,0 -Dummy for Female & tour frequency =2,female & (tot_tours == 2),-0.1062,0,0.2361,0.5323,-1.3028,0,0,0 -Dummy for Female & tour frequency =3,female & (tot_tours == 3),-0.3274,0,1.9002,0.7452,-2.266,0,0,0 -Dummy for Female & tour frequency =4,female & (tot_tours == 4),-0.3274,0,1.9002,1.1294,-2.266,0,0,0 -Dummy for Female & tour frequency =5,female & (tot_tours == 5),-0.3274,0,1.9002,1.1294,-2.266,0,0,0 -Dummy for Female & Escorting Tour,female * escort,0.1824,0,0,0,0,0,0,0 -Dummy for Female & Shopping Tour,female * shopping,0,0.4524,0,0,0.9688,0,0,0 -Dummy for Female & Maintenance Tour,female * othmaint,0,0,0,-0.2464,0.7424,0,0,0 -Dummy for Female & EatingOut Tour,female * eatout,0,0,-0.6568,0,0,0,0,0 -Dummy for Female & Discretionary Tour,female * othdiscr,0,0.3072,-0.3266,0,0.4954,0,0,0 -Dummy for zero car ownership & tour frequency =1,no_cars & (tot_tours == 1),-0.3486,-0.5498,-0.581,-0.3623,0,-0.6369,-0.6369,0 -Dummy for zero car ownership & tour frequency =2,no_cars & (tot_tours == 2),-0.3486,-0.5498,-0.581,-1.272,0,-0.6369,-0.6369,0 -Dummy for zero car ownership & tour frequency =3,no_cars & (tot_tours == 3),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for zero car ownership & tour frequency =4,no_cars & (tot_tours == 4),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for zero car ownership & tour frequency =5+,no_cars & (tot_tours > 4),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for Car Shortage vs Workers & tour frequency =1,~no_cars & (car_sufficiency < 0) & (tot_tours == 1),0,-0.5498,-0.581,-0.3623,0,-0.6369,-0.6369,0 -Dummy for Car Shortage vs Workers & tour frequency =2,~no_cars & (car_sufficiency < 0) & (tot_tours == 2),0,-0.5498,-0.581,-1.272,0,-0.6369,-0.6369,0 -Dummy for Car Shortage vs Workers & tour frequency =3,~no_cars & (car_sufficiency < 0) & (tot_tours == 3),0,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for Car Shortage vs Workers & tour frequency =4,~no_cars & (car_sufficiency < 0) & (tot_tours == 4),0,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for Car Shortage vs Workers & tour frequency =5+,~no_cars & (car_sufficiency < 0) & (tot_tours > 4),0,-0.5498,-0.581,-1.9307,0,-0.6369,-0.6369,0 -Dummy for Car Surplus vs Workers & tour frequency =1,~no_cars & (car_sufficiency > 0) & (tot_tours == 1),0.1304,0,0,0.7738,0.7965,0.2902,0.2902,0 -Dummy for Car Surplus vs Workers & tour frequency =2,~no_cars & (car_sufficiency > 0) & (tot_tours == 2),0.1304,0,0,0.7738,2.1302,2.0352,2.0352,0 -Dummy for Car Surplus vs Workers & tour frequency =3,~no_cars & (car_sufficiency > 0) & (tot_tours == 3),0.1304,0,0,0.7738,2.1302,2.0352,2.0352,0 -Dummy for Car Surplus vs Workers & tour frequency =4,~no_cars & (car_sufficiency > 0) & (tot_tours == 4),0.1304,0,0,0.7738,2.1302,2.0352,2.0352,0 -Dummy for Car Surplus vs Workers & tour frequency =5+,~no_cars & (car_sufficiency > 0) & (tot_tours > 4),0.1304,0,0,0.7738,2.1302,2.0352,2.0352,0 -Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =1,has_non_worker & (tot_tours == 1),0,0,-0.8506,-0.3763,0.224,0,0,0 -Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =2,has_non_worker & (tot_tours == 2),0,0,-1.1804,-0.719,0.2436,-0.6571,-0.6571,0 -Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =3,has_non_worker & (tot_tours == 3),0,0,-1.1804,-1.0229,0.62,-1.4044,-1.4044,0 -Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =4,has_non_worker & (tot_tours == 4),0,0,-1.1804,-1.0229,3.3742,-1.4044,-1.4044,0 -Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =5,has_non_worker & (tot_tours == 5),0,0,-1.1804,-1.0229,3.3742,-1.4044,-1.4044,0 -Dummy for Presence of Retiree(other than modeled person) & tour frequency =1,has_retiree & (tot_tours == 1),0,0,0,-0.464,-0.4458,0,0,0 -Dummy for Presence of Retiree(other than modeled person) & tour frequency =2,has_retiree & (tot_tours == 2),0,0,0,-0.4795,-0.5315,0,0,0 -Dummy for Presence of Retiree(other than modeled person) & tour frequency =3,has_retiree & (tot_tours == 3),0,0,0,-0.4795,-0.5315,0,0,0 -Dummy for Presence of Retiree(other than modeled person) & tour frequency =4,has_retiree & (tot_tours == 4),0,0,0,-0.4795,-0.5315,0,0,0 -Dummy for Presence of Retiree(other than modeled person) & tour frequency =5,has_retiree & (tot_tours == 5),0,0,0,-0.4795,-0.5315,0,0,0 -Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =1,has_preschool_kid & (tot_tours == 1),0,-0.1559,-0.9961,-0.7161,0,0,0,0 -Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =2,has_preschool_kid & (tot_tours == 2),0,-0.5681,-1.9096,-0.7161,0,0,0,0 -Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =3,has_preschool_kid & (tot_tours == 3),0,-0.5681,-2.8469,-0.7161,0,0,0,0 -Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =4,has_preschool_kid & (tot_tours == 4),0,-0.5681,-2.8469,-0.7161,0,0,0,0 -Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =5,has_preschool_kid & (tot_tours == 5),0,-0.5681,-2.8469,-0.7161,0,0,0,0 -Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =1,has_school_kid & (tot_tours == 1),0,0,0,0.1486,0,-0.3219,-0.3219,0 -Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =2,has_school_kid & (tot_tours == 2),0,0,0,0.484,0,-1.0874,-1.0874,0 -Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =3,has_school_kid & (tot_tours == 3),0,0,0,0.484,0,-1.0874,-1.0874,0 -Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =4,has_school_kid & (tot_tours == 4),0,0,0,0.484,0,-1.0874,-1.0874,0 -Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =5,has_school_kid & (tot_tours == 5),0,0,0,0.484,0,-1.0874,-1.0874,0 -Dummy for Presence of Full time Worker (other than modeled person) & Escorting tour ,has_full_time * escort,0,0,0,0.3947,0,0,0,-0.893 -Dummy for Presence of Part time Worker (other than modeled person) & Escorting tour ,has_part_time * escort,0,0,-1.8213,-0.5861,0,0,0,0 -Dummy for Presence of Non-Worker (other than modeled person) & Escorting tour ,has_non_worker * escort,-0.4815,-0.5263,0,0,0,0,0,0.89 -Dummy for Presence of Retiree (other than modeled person) & Escorting tour ,has_retiree * escort,-0.808,-0.7516,0,0,0,0,0,0 -Dummy for Presence of University Student (other than modeled person) & Escorting tour ,has_university * escort,0,0,0,0,0,0,0,0 -Dummy for Presence of Driving School Kid (other than modeled person) & Escorting tour ,has_driving_kid * escort,0.3601,0.4164,0,0,0,0,0,0 -Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Escorting tour ,has_school_kid * escort,1.3974,1.5795,0.9489,1.3773,1.4903,0,0,0 -Dummy for Presence of Pre-School Kid (other than modeled person) & Escorting tour ,has_preschool_kid * escort,0.6842,0.5414,2.1465,0.7194,0.5027,0,0,0 -Dummy for At home Pre-Driving School Kid & Escorting tour ,has_school_kid_at_home * escort,-0.2746,0,0,-1.148,0,0,0,0 -Dummy for At homef Pre-School Kid & Escorting tour ,has_preschool_kid_at_home * escort,-1.5675,0,0,-0.1373,0,0,0,0 -Dummy for Presence of Full time Worker (other than modeled person) & Shopping tour ,has_full_time * shopping,-0.3059,0,-0.7728,0,-0.3609,0,0,0 -Dummy for Presence of Part time Worker (other than modeled person) & Shopping tour ,has_part_time * shopping,-0.1541,0,-0.5199,0,0,0,0,1.155 -Dummy for Presence of Non-Worker (other than modeled person) & Shopping tour ,has_non_worker * shopping,-0.416,0,0,0,0,0,0,0.808 -Dummy for Presence of Retiree (other than modeled person) & Shopping tour ,has_retiree * shopping,0,0,0,0,0,0,0,0 -Dummy for Presence of University Student (other than modeled person) & Shopping tour ,has_university * shopping,0,0,0,0,0,0,0,0 -Dummy for Presence of Driving School Kid (other than modeled person) & Shopping tour ,has_driving_kid * shopping,0,0,0,0,0,0,0,0 -Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Shopping tour ,has_school_kid * shopping,0,0,0,0,0,0,0,0 -Dummy for Presence of Pre-School Kid (other than modeled person) & Shopping tour ,has_preschool_kid * shopping,-0.208,0,1.3135,0,0,0,0,0 -Dummy for At home Pre-Driving School Kid & Shopping tour ,has_school_kid_at_home * shopping,0,0,0,0,0,0,0,0 -Dummy for At homef Pre-School Kid & Shopping tour ,has_preschool_kid_at_home * shopping,0,0,0,0,0,0,0,0 -Dummy for Presence of Full time Worker (other than modeled person) & Maintenance tour ,has_full_time * othmaint,-0.1685,-0.3131,0,0,0,0,0,0 -Dummy for Presence of Part time Worker (other than modeled person) & Maintenance tour ,has_part_time * othmaint,-0.1584,-0.5621,0,0,0,0,0,0 -Dummy for Presence of Non-Worker(other than modeled person) & Maintenance tour ,has_non_worker * othmaint,-0.3237,0,0,0,0,0,0,0 -Dummy for Presence of Retiree (other than modeled person) & Maintenance tour ,has_retiree * othmaint,0,0,0,0,0,0,0,0 -Dummy for Presence of University Student (other than modeled person) & Maintenance tour ,has_university * othmaint,0,0,0,0,0,0,0,0 -Dummy for Presence of Driving School Kid (other than modeled person) & Maintenance tour ,has_driving_kid * othmaint,0,0,0,0,0,0,0,0 -Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Maintenance tour ,has_school_kid * othmaint,0,0,0.3863,0,0,0,0,0 -Dummy for Presence of Pre-School Kid (other than modeled person) & Maintenance tour ,has_preschool_kid * othmaint,0,0,0.9694,0,0,0,0,0 -Dummy for At home Pre-Driving School Kid & Maintenance tour ,has_school_kid_at_home * othmaint,0,0,0,0,0,0,0,0 -Dummy for At homef Pre-School Kid & Maintenance tour ,has_preschool_kid_at_home * othmaint,0,0,0,0,0,0,0,0 -Dummy for Presence of Full time Worker (other than modeled person) & Eating Out tour ,has_full_time * eatout,-0.3571,0,-0.5251,-0.4667,-0.788,0,0,0 -Dummy for Presence of Part time Worker (other than modeled person) & Eating Out tour ,has_part_time * eatout,0,0,-1.9795,0,-0.788,0,0,1.037 -Dummy for Presence of Non-Worker (other than modeled person) & Eating Out tour ,has_non_worker * eatout,-0.2014,-0.6545,0,-0.4976,-0.788,0,0,1.157 -Dummy for Presence of Retiree (other than modeled person) & Eating Out tour ,has_retiree * eatout,-0.5708,-1.389,0,-0.6911,-0.9282,0,0,0 -Dummy for Presence of University Student (other than modeled person) & Eating Out tour ,has_university * eatout,0,-1.4318,-0.6529,0,0,0,0,0 -Dummy for Presence of Driving School Kid (other than modeled person) & Eating Out tour ,has_driving_kid * eatout,0,0,0,0,0,-0.6377,-0.6377,0 -Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Eating Out tour ,has_school_kid * eatout,0,0,0,0,0,-1.5698,-1.5698,0 -Dummy for Presence of Pre-School Kid (other than modeled person) & Eating Out tour ,has_preschool_kid * eatout,-0.4225,0,0,0,0,-0.2987,-0.2987,0 -Dummy for At home Pre-Driving School Kid & Eating Out tour ,has_school_kid_at_home * eatout,0,0,0,-0.3926,0,0,0,0 -Dummy for At homef Pre-School Kid & Eating Out tour ,has_preschool_kid_at_home * eatout,0,0,0,-0.3926,0,0,0,0 -Dummy for Presence of Full time Worker (other than modeled person) & Discretionary tour ,has_full_time * othdiscr,-0.667,0,-0.4833,-0.3545,-0.4835,0,0,0 -Dummy for Presence of Part time Worker (other than modeled person) & Discretionary tour ,has_part_time * othdiscr,-0.2102,0,0,-0.3545,0,0,0,0 -Dummy for Presence of Non-Worker (other than modeled person) & Discretionary tour ,has_non_worker * othdiscr,-0.4281,-1.0371,0.9781,0,-0.5603,0,0,0.791 -Dummy for Presence of Retiree (other than modeled person) & Discretionary tour ,has_retiree * othdiscr,-0.9104,0,0,0,0,0,0,0 -Dummy for Presence of University Student (other than modeled person) & Discretionary tour ,has_university * othdiscr,-0.8551,0,-0.6542,0,0,-1.2834,-1.2834,0 -Dummy for Presence of Driving School Kid (other than modeled person) & Discretionary tour ,has_driving_kid * othdiscr,-0.3963,0,0,0,0,-0.9202,-0.9202,0 -Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Discretionary tour ,has_school_kid * othdiscr,-0.3959,0,0,0,0,0,0,0 -Dummy for Presence of Pre-School Kid (other than modeled person) & Discretionary tour ,has_preschool_kid * othdiscr,-0.5081,0,0,0,0,0,0,0 -Dummy for At home Pre-Driving School Kid & Discretionary tour ,has_school_kid_at_home * othdiscr,-0.4703,0,0,0,0,0,0,0 -Dummy for At homef Pre-School Kid & Discretionary tour ,has_preschool_kid_at_home * othdiscr,-0.4703,0,0,0,0,0,0,0 -Walk Access to Retail & Tour Frequency =1,nmRetail * (tot_tours == 1),0,0.0899,0,0.0713,0.0616,0,0,0 -Walk Access to Retail & Tour Frequency =2,nmRetail * (tot_tours == 2),0,0.1447,0,0.1256,0.0616,0,0,0 -Walk Access to Retail & Tour Frequency =3,nmRetail * (tot_tours == 3),0,0.3479,0,0.1508,0.0616,0,0,0 -Walk Access to Retail & Tour Frequency =4,nmRetail * (tot_tours == 4),0,0.3479,0,0.1508,0.0616,0,0,0 -Walk Access to Retail & Tour Frequency =5+,nmRetail * (tot_tours > 4),0,0.3479,0,0.1508,0.0616,0,0,0 -Transit Access to Retail & Tour Frequency =1,trOpRetail * (tot_tours == 1),0.0226,0,0.0664,0,0,0,0,0 -Transit Access to Retail & Tour Frequency =2,trOpRetail * (tot_tours == 2),0.0226,0,0.0664,0,0,0,0,0 -Transit Access to Retail & Tour Frequency =3,trOpRetail * (tot_tours == 3),0.0226,0,0.0664,0,0,0,0,0 -Transit Access to Retail & Tour Frequency =4,trOpRetail * (tot_tours == 4),0.0226,0,0.0664,0,0,0,0,0 -Transit Access to Retail & Tour Frequency =5+,trOpRetail * (tot_tours > 4),0.0226,0,0.0664,0,0,0,0,0 -Auto Access to Retail & Tour Frequency =1,auOpRetail * (tot_tours == 1),0,0,0,0,0,0.1004,0.1004,0 -Auto Access to Retail & Tour Frequency =2,auOpRetail * (tot_tours == 2),0,0,0,0,0,0.1004,0.1004,0 -Auto Access to Retail & Tour Frequency =3,auOpRetail * (tot_tours == 3),0,0,0,0,0,0.1004,0.1004,0 -Auto Access to Retail & Tour Frequency =4,auOpRetail * (tot_tours == 4),0,0,0,0,0,0.1004,0.1004,0 -Auto Access to Retail & Tour Frequency =5+,auOpRetail * (tot_tours > 4),0,0,0,0,0,0.1004,0.1004,0 -Walk Access to Retail & Escorting ,nmRetail * escort,0.0451,0,0,0,0,0,0,0 -Transit Access to Retail & Escorting ,trOpRetail * escort,0,0,0,0,0,0,0,0 -Auto Access to Retail & Escorting ,auOpRetail * escort,0,0,0,0,0,0,0,0 -Walk Access to Retail & Shopping ,nmRetail * shopping,0.033,0,0.0972,0.0598,0,0,0,0 -Transit Access to Retail & Shopping ,trOpRetail * shopping,0,0,0,0,0,0,0,0 -Auto Access to Retail & Shopping ,auOpRetail * shopping,0.1067,0,0,0,0,0,0,0 -Walk Access to Retail & Maintenance ,nmRetail * othmaint,0,0,0,0,0,0,0,0 -Transit Access to Retail & Maintenance ,trOpRetail * othmaint,0,0,0.0314,0,0,0,0,0 -Auto Access to Retail & Maintenance ,auOpRetail * othmaint,0.0749,0,0,0.0956,0,0,0,0 -Walk Access to Retail & Eating Out ,nmRetail * eatout,0.145,0,0,0,0,0,0,0 -Transit Access to Retail & Eating Out ,trOpRetail * eatout,0,0,0,0,0,0,0,0 -Auto Access to Retail & Eating Out ,auOpRetail * eatout,0,0,0.1018,0,0,0,0,0 -Walk Access to Retail & Discretionary ,nmRetail * othdiscr,0.0567,0,0,0.0772,0,0,0,0 -Transit Access to Retail & Discretionary ,trOpRetail * othdiscr,0,0,0,0,0,0,0,0 -Auto Access to Retail & Discretionary ,auOpRetail * othdiscr,0.0844,0,0.094,0,0,0,0,0 -Urban Areatype & Tour Frequency =1,home_is_urban & (tot_tours == 1),0,0,-1.1648,0,0,0,0,0 -Urban Areatype & Tour Frequency =2,home_is_urban & (tot_tours == 2),0,0,-2.3177,0,0,0,0,0 -Urban Areatype & Tour Frequency =3,home_is_urban & (tot_tours == 3),0,0,-2.5027,0,0,0,0,0 -Urban Areatype & Tour Frequency =4,home_is_urban & (tot_tours == 4),0,0,-2.5027,0,0,0,0,0 -Urban Areatype & Tour Frequency =5+,home_is_urban & (tot_tours > 4),0,0,-2.5027,0,0,0,0,0 -Urban Areatype & Escorting tour,home_is_urban * escort,-0.4316,-0.3929,0.8516,0,0,0,0,0 -Urban Areatype &Shopping tour,home_is_urban * shopping,0,0,0.533,0,0,0,0,0 -Urban Areatype & Maintenance tour,home_is_urban * othmaint,0,0,1.0316,0,0,1.0394,1.0394,0 -Urban Areatype & EatingOut tour,home_is_urban * eatout,0,0,0.68,0,0,0,0,0 -Urban Areatype & Discretionary tour,home_is_urban * othdiscr,0,0,0.9563,0,0,0,0,0 -1 Escort Tour Constant,escort == 1,0.0298,0.5272,1.7028,-0.0629,-0.3992,-0.4934,-0.4934,0.3622 -2+ Escort Tours Constant,escort >= 2,0.7402,1.5987,2.8379,0.9273,0.5175,1.4155,1.4155,2.2219 -1+ Shopping Tours Constant,shopping >= 1,0.4774,0.7569,1.8403,0.4683,0.5947,0.532,0.532,1.6919 -1+ Maintenance Tours Constant,othmaint >= 1,0.1202,0.5533,0.3348,-0.0653,0.1046,-0.4344,-0.4344,0.6788 -1+ Eating Out Tours Constant,eatout >= 1,0.0097,0.6914,2.0723,-0.1429,0.0245,-0.0242,-0.0242,0.9612 -1+ Visting Tours Constant,social >= 1,0.0522,0.1405,1.2172,-0.1272,0.2789,0.2367,0.2367,0.4424 -1+ Other Discretionary Tours Constant,othdiscr >= 1,0.7412,0.7989,1.3389,0.3334,0.4282,-0.2602,-0.2602,1.4935 -Dummy for 0-auto household & Escorting Tour,escort * no_cars,-2,-2,-2,-2,-2,-2,-2,-2 +Number of Joint tours & tour frequency =0,num_hh_joint_tours*(tot_tours == 0),0,0,0,0,0,0,0.0000,0.000 +Number of Joint tours & tour frequency =1,num_hh_joint_tours*(tot_tours == 1),0,0,0,-0.1699,0,-0.2162,-0.6149,0.000 +Number of Joint tours & tour frequency =2,num_hh_joint_tours*(tot_tours == 2),0,-1.1986,-0.3153,-0.4285,-0.95,-0.3587,-0.6149,0.000 +Number of Joint tours & tour frequency =3,num_hh_joint_tours*(tot_tours == 3),0,-1.1986,-0.7351,-0.6551,-7.143,-4.2701,-999,0.000 +Number of Joint tours & tour frequency =4,num_hh_joint_tours*(tot_tours == 4),0,-1.1986,-999,-1.0411,-999,-999,-999,0.000 +Number of Joint tours & tour frequency = 5+,num_hh_joint_tours*(tot_tours > 4),0,-999,-999,-1.0411,-999,-999,-999,0.000 +Number of Joint Shopping tours,shopping * num_hh_joint_shop_tours,0,0,-0.713,-0.2391,-0.8072,0,0,0.000 +Number of Joint Maintenance tours,othmaint * num_hh_joint_maint_tours,0,0,0,0,0,0,-1.3476,0.000 +Number of Joint Eating Out tours,eatout * num_hh_joint_eatout_tours,-0.5866,0,0,-0.7727,0,0,0,0.000 +Number of Joint Visit tours,social * num_hh_joint_social_tours,0,0,0,0,0,0,0,0.000 +Number of Joint Discretionary tours,othdiscr * num_hh_joint_othdiscr_tours,0,0,0.6713,0,0,0,0,0.000 +"Logged Maximum Residual Window, tour frequency =0",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 0),0,0,1.1858,0,0,0,0.0000,0.000 +"Logged Maximum Residual Window, tour frequency =1",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 1),1.2562,1.5748,1.4842,1.7637,1.8357,1.3298,1.5603,0.000 +"Logged Maximum Residual Window, tour frequency =2",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 2),1.2868,2.0026,1.4842,1.7928,2.2707,1.3759,1.5603,0.000 +"Logged Maximum Residual Window, tour frequency =3",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 3),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,1.5603,0.000 +"Logged Maximum Residual Window, tour frequency =4",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours == 4),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,1.5603,0.000 +"Logged Maximum Residual Window, tour frequency =5+",((num_mand > 0) | (num_hh_joint_tours > 0)) * log_max_window*(tot_tours > 4),1.3993,2.0026,1.4842,1.7928,4.4023,3.2808,1.5603,0.000 +Dummy for Mediumlow Income group (20K-50K) & tour frequency=1,medium_low_income & (tot_tours == 1),0.4981,0.5981,0,0.5709,0,0,1.0873,0.000 +Dummy for Mediumlow Income group (20K-50K) & tour frequency=2,medium_low_income & (tot_tours == 2),0.8345,0.9178,0,0.8315,0,0,1.0873,0.000 +Dummy for Mediumlow Income group (20K-50K) & tour frequency=3,medium_low_income & (tot_tours == 3),1.0213,1.7539,0,0.8315,0,0,1.0873,0.000 +Dummy for Mediumlow Income group (20K-50K) & tour frequency=4,medium_low_income & (tot_tours == 4),1.0213,1.7539,0,0.8315,0,0,1.0873,0.000 +Dummy for Mediumlow Income group (20K-50K) & tour frequency=5+,medium_low_income & (tot_tours > 4),1.0213,1.7539,0,0.8315,0,0,1.0873,0.000 +Dummy for MediumHigh Income group (50K-100K) & tour frequency=1,medium_high_income & (tot_tours == 1),0.4981,0.8682,0.1109,0.7426,0,0,1.5197,0.000 +Dummy for MediumHigh Income group (50K-100K) & tour frequency=2,medium_high_income & (tot_tours == 2),0.8345,1.5362,0.3914,0.8546,0,0,1.5197,0.000 +Dummy for MediumHigh Income group (50K-100K) & tour frequency=3,medium_high_income & (tot_tours == 3),1.0213,1.9331,0.6137,1.0792,0,0,1.5197,0.000 +Dummy for MediumHigh Income group (50K-100K) & tour frequency=4,medium_high_income & (tot_tours == 4),1.0213,1.9331,0.6137,1.0792,0,0,1.5197,0.000 +Dummy for MediumHigh Income group (50K-100K) & tour frequency=5+,medium_high_income & (tot_tours > 4),1.0213,1.9331,0.6137,1.0792,0,0,1.5197,0.000 +Dummy for High Income group (>100K) & tour frequency=1,high_income & (tot_tours == 1),0.5189,0.8682,0.3986,1.0633,0,0,2.0175,0.000 +Dummy for High Income group (>100K) & tour frequency=2,high_income & (tot_tours == 2),1.1336,1.5362,0.8009,1.0633,0,0,2.0175,0.000 +Dummy for High Income group (>100K) & tour frequency=3,high_income & (tot_tours == 3),1.3899,1.9331,0.8254,1.7742,0,0,2.0175,0.000 +Dummy for High Income group (>100K) & tour frequency=4,high_income & (tot_tours == 4),1.3899,1.9331,0.8254,2.3941,0,0,2.0175,0.000 +Dummy for High Income group (>100K) & tour frequency=5+,high_income & (tot_tours > 4),1.3899,1.9331,0.8254,2.3941,0,0,2.0175,0.000 +Dummy for Mediumlow Income group (20K-50K) & shopping tour,medium_low_income * shopping,0,0.4421,0.5693,0.7734,1.0949,0,-0.6506,0.000 +Dummy for Mediumhigh Income group (50K-100K) & shopping tour,medium_high_income * shopping,0,0.4421,0.5693,0.8906,1.0949,0.2443,-0.6506,0.000 +Dummy for High Income group (>100K) & shopping tour,high_income * shopping,0,0.7066,0.5693,0.9776,1.0949,0.2443,-0.6506,0.000 +Dummy for Mediumlow Income group (20K-50K) & maintenance tour,medium_low_income * othmaint,0,0.6763,0,0,0.7648,0,0.0000,0.000 +Dummy for Mediumhigh Income group (50K-100K) & maintenance tour,medium_high_income * othmaint,0,0.6763,0,0,0.7648,0.3982,0.0000,0.000 +Dummy for High Income group (>100K) & maintenance tour,high_income * othmaint,0,0.6763,0,0,1.3795,0.3982,0.0000,0.000 +Dummy for Mediumlow Income group (20K-50K) & Eating out tour,medium_low_income * eatout,0,0,0,0.2766,0.9769,0,-0.7010,0.000 +Dummy for Mediumhigh Income group (50K-100K) & Eating out tour,medium_high_income * eatout,0.5581,0,-0.7207,0.4631,1.181,0.4916,-0.7010,0.000 +Dummy for High Income group (>100K) & Eating out tour,high_income * eatout,0.5581,0,-0.7207,0.7086,1.4842,0.4916,-0.7010,0.000 +Dummy for Mediumlow Income group (20K-50K) & Discretionary tour,medium_low_income * othdiscr,0,0.296,0,0.1707,1.0095,0.9169,0.0000,0.000 +Dummy for Mediumhigh Income group (50K-100K) & Discretionary tour,medium_high_income * othdiscr,0.2565,0.296,0,0.5009,1.0095,1.405,0.0000,0.000 +Dummy for High Income group (>100K) & Discretionary tour,high_income * othdiscr,0.2565,0.296,0,0.8846,1.0095,2.327,0.0000,0.000 +Dummy for Mediumlow Income group (20K-50K) & Visiting tour,medium_low_income * social,0,-0.6868,0,-0.267,0,0,0.0000,0.000 +Dummy for Mediumhigh Income group (50K-100K) & Visiting tour,medium_high_income * social,-0.2423,-0.6868,-0.3694,-0.267,-0.4368,0.2858,0.0000,0.000 +Dummy for High Income group (>100K) & Visiting tour,high_income * social,-0.2423,-0.6868,-0.3694,-0.9449,-0.5137,0.2858,0.0000,0.000 +Dummy for Female & tour frequency =1,female & (tot_tours == 1),-0.0766,0,0.0973,0.3902,-0.9348,0,0.0000,0.000 +Dummy for Female & tour frequency =2,female & (tot_tours == 2),-0.1062,0,0.2361,0.5323,-1.3028,0,0.0000,0.000 +Dummy for Female & tour frequency =3,female & (tot_tours == 3),-0.3274,0,1.9002,0.7452,-2.266,0,0.0000,0.000 +Dummy for Female & tour frequency =4,female & (tot_tours == 4),-0.3274,0,1.9002,1.1294,-2.266,0,0.0000,0.000 +Dummy for Female & tour frequency =5,female & (tot_tours == 5),-0.3274,0,1.9002,1.1294,-2.266,0,0.0000,0.000 +Dummy for Female & Escorting Tour,female * escort,0.1824,0,0,0,0,0,0.0000,0.000 +Dummy for Female & Shopping Tour,female * shopping,0,0.4524,0,0,0.9688,0,0.0000,0.000 +Dummy for Female & Maintenance Tour,female * othmaint,0,0,0,-0.2464,0.7424,0,0.0000,0.000 +Dummy for Female & EatingOut Tour,female * eatout,0,0,-0.6568,0,0,0,0.0000,0.000 +Dummy for Female & Discretionary Tour,female * othdiscr,0,0.3072,-0.3266,0,0.4954,0,0.0000,0.000 +Dummy for zero car ownership & tour frequency =1,no_cars & (tot_tours == 1),-0.3486,-0.5498,-0.581,-0.3623,0,-0.6369,0.0000,0.000 +Dummy for zero car ownership & tour frequency =2,no_cars & (tot_tours == 2),-0.3486,-0.5498,-0.581,-1.272,0,-0.6369,0.0000,0.000 +Dummy for zero car ownership & tour frequency =3,no_cars & (tot_tours == 3),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for zero car ownership & tour frequency =4,no_cars & (tot_tours == 4),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for zero car ownership & tour frequency =5+,no_cars & (tot_tours > 4),-0.3486,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for Car Shortage vs Workers & tour frequency =1,~no_cars & (car_sufficiency < 0) & (tot_tours == 1),0,-0.5498,-0.581,-0.3623,0,-0.6369,0.0000,0.000 +Dummy for Car Shortage vs Workers & tour frequency =2,~no_cars & (car_sufficiency < 0) & (tot_tours == 2),0,-0.5498,-0.581,-1.272,0,-0.6369,0.0000,0.000 +Dummy for Car Shortage vs Workers & tour frequency =3,~no_cars & (car_sufficiency < 0) & (tot_tours == 3),0,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for Car Shortage vs Workers & tour frequency =4,~no_cars & (car_sufficiency < 0) & (tot_tours == 4),0,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for Car Shortage vs Workers & tour frequency =5+,~no_cars & (car_sufficiency < 0) & (tot_tours > 4),0,-0.5498,-0.581,-1.9307,0,-0.6369,0.0000,0.000 +Dummy for Car Surplus vs Workers & tour frequency =1,~no_cars & (car_sufficiency > 0) & (tot_tours == 1),0.1304,0,0,0.7738,0.7965,0.2902,0.0000,0.000 +Dummy for Car Surplus vs Workers & tour frequency =2,~no_cars & (car_sufficiency > 0) & (tot_tours == 2),0.1304,0,0,0.7738,2.1302,2.0352,0.0000,0.000 +Dummy for Car Surplus vs Workers & tour frequency =3,~no_cars & (car_sufficiency > 0) & (tot_tours == 3),0.1304,0,0,0.7738,2.1302,2.0352,0.0000,0.000 +Dummy for Car Surplus vs Workers & tour frequency =4,~no_cars & (car_sufficiency > 0) & (tot_tours == 4),0.1304,0,0,0.7738,2.1302,2.0352,0.0000,0.000 +Dummy for Car Surplus vs Workers & tour frequency =5+,~no_cars & (car_sufficiency > 0) & (tot_tours > 4),0.1304,0,0,0.7738,2.1302,2.0352,0.0000,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =1,has_non_worker & (tot_tours == 1),0,0,-0.8506,-0.3763,0.224,0,0.2177,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =2,has_non_worker & (tot_tours == 2),0,0,-1.1804,-0.719,0.2436,-0.6571,0.2177,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =3,has_non_worker & (tot_tours == 3),0,0,-1.1804,-1.0229,0.62,-1.4044,0.2177,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =4,has_non_worker & (tot_tours == 4),0,0,-1.1804,-1.0229,3.3742,-1.4044,0.2177,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & tour frequency =5,has_non_worker & (tot_tours == 5),0,0,-1.1804,-1.0229,3.3742,-1.4044,0.2177,0.000 +Dummy for Presence of Retiree(other than modeled person) & tour frequency =1,has_retiree & (tot_tours == 1),0,0,0,-0.464,-0.4458,0,0.0000,0.000 +Dummy for Presence of Retiree(other than modeled person) & tour frequency =2,has_retiree & (tot_tours == 2),0,0,0,-0.4795,-0.5315,0,0.0000,0.000 +Dummy for Presence of Retiree(other than modeled person) & tour frequency =3,has_retiree & (tot_tours == 3),0,0,0,-0.4795,-0.5315,0,0.0000,0.000 +Dummy for Presence of Retiree(other than modeled person) & tour frequency =4,has_retiree & (tot_tours == 4),0,0,0,-0.4795,-0.5315,0,0.0000,0.000 +Dummy for Presence of Retiree(other than modeled person) & tour frequency =5,has_retiree & (tot_tours == 5),0,0,0,-0.4795,-0.5315,0,0.0000,0.000 +Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =1,has_preschool_kid & (tot_tours == 1),0,-0.1559,-0.9961,-0.7161,0,0,-0.4439,0.000 +Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =2,has_preschool_kid & (tot_tours == 2),0,-0.5681,-1.9096,-0.7161,0,0,-0.4439,0.000 +Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =3,has_preschool_kid & (tot_tours == 3),0,-0.5681,-2.8469,-0.7161,0,0,-0.4439,0.000 +Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =4,has_preschool_kid & (tot_tours == 4),0,-0.5681,-2.8469,-0.7161,0,0,-0.4439,0.000 +Dummy for Presence of PreSchool Kid (other than modeled person) in Household & tour frequency =5,has_preschool_kid & (tot_tours == 5),0,-0.5681,-2.8469,-0.7161,0,0,-0.4439,0.000 +Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =1,has_school_kid & (tot_tours == 1),0,0,0,0.1486,0,-0.3219,-0.2264,0.000 +Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =2,has_school_kid & (tot_tours == 2),0,0,0,0.484,0,-1.0874,-0.2264,0.000 +Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =3,has_school_kid & (tot_tours == 3),0,0,0,0.484,0,-1.0874,-0.2264,0.000 +Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =4,has_school_kid & (tot_tours == 4),0,0,0,0.484,0,-1.0874,-0.2264,0.000 +Dummy for Presence of Predriving School Kid (other than modeled person) in Household & tour frequency =5,has_school_kid & (tot_tours == 5),0,0,0,0.484,0,-1.0874,-0.2264,0.000 +Dummy for Presence of Full time Worker (other than modeled person) & Escorting tour ,has_full_time * escort,0,0,0,0.3947,0,0,0.0000,-0.893 +Dummy for Presence of Part time Worker (other than modeled person) & Escorting tour ,has_part_time * escort,0,0,-1.8213,-0.5861,0,0,0.0000,0.000 +Dummy for Presence of Non-Worker (other than modeled person) & Escorting tour ,has_non_worker * escort,-0.4815,-0.5263,0,0,0,0,0.0000,0.890 +Dummy for Presence of Retiree (other than modeled person) & Escorting tour ,has_retiree * escort,-0.808,-0.7516,0,0,0,0,0.0000,0.000 +Dummy for Presence of University Student (other than modeled person) & Escorting tour ,has_university * escort,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Driving School Kid (other than modeled person) & Escorting tour ,has_driving_kid * escort,0.3601,0.4164,0,0,0,0,0.0000,0.000 +Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Escorting tour ,has_school_kid * escort,1.3974,1.5795,0.9489,1.3773,1.4903,0,0.0000,0.000 +Dummy for Presence of Pre-School Kid (other than modeled person) & Escorting tour ,has_preschool_kid * escort,0.6842,0.5414,2.1465,0.7194,0.5027,0,0.0000,0.000 +Dummy for At home Pre-Driving School Kid & Escorting tour ,has_school_kid_at_home * escort,-0.2746,0,0,-1.148,0,0,0.0000,0.000 +Dummy for At homef Pre-School Kid & Escorting tour ,has_preschool_kid_at_home * escort,-1.5675,0,0,-0.1373,0,0,0.0000,0.000 +Dummy for Presence of Full time Worker (other than modeled person) & Shopping tour ,has_full_time * shopping,-0.3059,0,-0.7728,0,-0.3609,0,0.0000,0.000 +Dummy for Presence of Part time Worker (other than modeled person) & Shopping tour ,has_part_time * shopping,-0.1541,0,-0.5199,0,0,0,0.0000,1.155 +Dummy for Presence of Non-Worker (other than modeled person) & Shopping tour ,has_non_worker * shopping,-0.416,0,0,0,0,0,-0.6450,0.808 +Dummy for Presence of Retiree (other than modeled person) & Shopping tour ,has_retiree * shopping,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of University Student (other than modeled person) & Shopping tour ,has_university * shopping,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Driving School Kid (other than modeled person) & Shopping tour ,has_driving_kid * shopping,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Shopping tour ,has_school_kid * shopping,0,0,0,0,0,0,0.9365,0.000 +Dummy for Presence of Pre-School Kid (other than modeled person) & Shopping tour ,has_preschool_kid * shopping,-0.208,0,1.3135,0,0,0,0.0000,0.000 +Dummy for At home Pre-Driving School Kid & Shopping tour ,has_school_kid_at_home * shopping,0,0,0,0,0,0,0.0000,0.000 +Dummy for At homef Pre-School Kid & Shopping tour ,has_preschool_kid_at_home * shopping,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Full time Worker (other than modeled person) & Maintenance tour ,has_full_time * othmaint,-0.1685,-0.3131,0,0,0,0,0.0000,0.000 +Dummy for Presence of Part time Worker (other than modeled person) & Maintenance tour ,has_part_time * othmaint,-0.1584,-0.5621,0,0,0,0,0.0000,0.000 +Dummy for Presence of Non-Worker(other than modeled person) & Maintenance tour ,has_non_worker * othmaint,-0.3237,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Retiree (other than modeled person) & Maintenance tour ,has_retiree * othmaint,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of University Student (other than modeled person) & Maintenance tour ,has_university * othmaint,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Driving School Kid (other than modeled person) & Maintenance tour ,has_driving_kid * othmaint,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Maintenance tour ,has_school_kid * othmaint,0,0,0.3863,0,0,0,0.0000,0.000 +Dummy for Presence of Pre-School Kid (other than modeled person) & Maintenance tour ,has_preschool_kid * othmaint,0,0,0.9694,0,0,0,0.0000,0.000 +Dummy for At home Pre-Driving School Kid & Maintenance tour ,has_school_kid_at_home * othmaint,0,0,0,0,0,0,0.0000,0.000 +Dummy for At homef Pre-School Kid & Maintenance tour ,has_preschool_kid_at_home * othmaint,0,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Full time Worker (other than modeled person) & Eating Out tour ,has_full_time * eatout,-0.3571,0,-0.5251,-0.4667,-0.788,0,0.0000,0.000 +Dummy for Presence of Part time Worker (other than modeled person) & Eating Out tour ,has_part_time * eatout,0,0,-1.9795,0,-0.788,0,0.0000,1.037 +Dummy for Presence of Non-Worker (other than modeled person) & Eating Out tour ,has_non_worker * eatout,-0.2014,-0.6545,0,-0.4976,-0.788,0,-1.3074,1.157 +Dummy for Presence of Retiree (other than modeled person) & Eating Out tour ,has_retiree * eatout,-0.5708,-1.389,0,-0.6911,-0.9282,0,0.0000,0.000 +Dummy for Presence of University Student (other than modeled person) & Eating Out tour ,has_university * eatout,0,-1.4318,-0.6529,0,0,0,0.0000,0.000 +Dummy for Presence of Driving School Kid (other than modeled person) & Eating Out tour ,has_driving_kid * eatout,0,0,0,0,0,-0.6377,0.0000,0.000 +Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Eating Out tour ,has_school_kid * eatout,0,0,0,0,0,-1.5698,0.0000,0.000 +Dummy for Presence of Pre-School Kid (other than modeled person) & Eating Out tour ,has_preschool_kid * eatout,-0.4225,0,0,0,0,-0.2987,0.0000,0.000 +Dummy for At home Pre-Driving School Kid & Eating Out tour ,has_school_kid_at_home * eatout,0,0,0,-0.3926,0,0,0.0000,0.000 +Dummy for At homef Pre-School Kid & Eating Out tour ,has_preschool_kid_at_home * eatout,0,0,0,-0.3926,0,0,0.0000,0.000 +Dummy for Presence of Full time Worker (other than modeled person) & Discretionary tour ,has_full_time * othdiscr,-0.667,0,-0.4833,-0.3545,-0.4835,0,0.7526,0.000 +Dummy for Presence of Part time Worker (other than modeled person) & Discretionary tour ,has_part_time * othdiscr,-0.2102,0,0,-0.3545,0,0,0.3721,0.000 +Dummy for Presence of Non-Worker (other than modeled person) & Discretionary tour ,has_non_worker * othdiscr,-0.4281,-1.0371,0.9781,0,-0.5603,0,0.0000,0.791 +Dummy for Presence of Retiree (other than modeled person) & Discretionary tour ,has_retiree * othdiscr,-0.9104,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of University Student (other than modeled person) & Discretionary tour ,has_university * othdiscr,-0.8551,0,-0.6542,0,0,-1.2834,0.0000,0.000 +Dummy for Presence of Driving School Kid (other than modeled person) & Discretionary tour ,has_driving_kid * othdiscr,-0.3963,0,0,0,0,-0.9202,0.0000,0.000 +Dummy for Presence of Pre-Driving School Kid (other than modeled person) & Discretionary tour ,has_school_kid * othdiscr,-0.3959,0,0,0,0,0,0.0000,0.000 +Dummy for Presence of Pre-School Kid (other than modeled person) & Discretionary tour ,has_preschool_kid * othdiscr,-0.5081,0,0,0,0,0,0.0000,0.000 +Dummy for At home Pre-Driving School Kid & Discretionary tour ,has_school_kid_at_home * othdiscr,-0.4703,0,0,0,0,0,0.0000,0.000 +Dummy for At homef Pre-School Kid & Discretionary tour ,has_preschool_kid_at_home * othdiscr,-0.4703,0,0,0,0,0,0.0000,0.000 +Walk Access to Retail & Tour Frequency =1,nmRetail * (tot_tours == 1),0,0.0899,0,0.0713,0.0616,0,0.0000,0.000 +Walk Access to Retail & Tour Frequency =2,nmRetail * (tot_tours == 2),0,0.1447,0,0.1256,0.0616,0,0.0000,0.000 +Walk Access to Retail & Tour Frequency =3,nmRetail * (tot_tours == 3),0,0.3479,0,0.1508,0.0616,0,0.0000,0.000 +Walk Access to Retail & Tour Frequency =4,nmRetail * (tot_tours == 4),0,0.3479,0,0.1508,0.0616,0,0.0000,0.000 +Walk Access to Retail & Tour Frequency =5+,nmRetail * (tot_tours > 4),0,0.3479,0,0.1508,0.0616,0,0.0000,0.000 +Transit Access to Retail & Tour Frequency =1,trOpRetail * (tot_tours == 1),0.0226,0,0.0664,0,0,0,0.0000,0.000 +Transit Access to Retail & Tour Frequency =2,trOpRetail * (tot_tours == 2),0.0226,0,0.0664,0,0,0,0.0000,0.000 +Transit Access to Retail & Tour Frequency =3,trOpRetail * (tot_tours == 3),0.0226,0,0.0664,0,0,0,0.0000,0.000 +Transit Access to Retail & Tour Frequency =4,trOpRetail * (tot_tours == 4),0.0226,0,0.0664,0,0,0,0.0000,0.000 +Transit Access to Retail & Tour Frequency =5+,trOpRetail * (tot_tours > 4),0.0226,0,0.0664,0,0,0,0.0000,0.000 +Auto Access to Retail & Tour Frequency =1,auOpRetail * (tot_tours == 1),0,0,0,0,0,0.1004,0.0000,0.000 +Auto Access to Retail & Tour Frequency =2,auOpRetail * (tot_tours == 2),0,0,0,0,0,0.1004,0.0000,0.000 +Auto Access to Retail & Tour Frequency =3,auOpRetail * (tot_tours == 3),0,0,0,0,0,0.1004,0.0000,0.000 +Auto Access to Retail & Tour Frequency =4,auOpRetail * (tot_tours == 4),0,0,0,0,0,0.1004,0.0000,0.000 +Auto Access to Retail & Tour Frequency =5+,auOpRetail * (tot_tours > 4),0,0,0,0,0,0.1004,0.0000,0.000 +Walk Access to Retail & Escorting ,nmRetail * escort,0.0451,0,0,0,0,0,0.0000,0.000 +Transit Access to Retail & Escorting ,trOpRetail * escort,0,0,0,0,0,0,0.0000,0.000 +Auto Access to Retail & Escorting ,auOpRetail * escort,0,0,0,0,0,0,0.0629,0.000 +Walk Access to Retail & Shopping ,nmRetail * shopping,0.033,0,0.0972,0.0598,0,0,0.0000,0.000 +Transit Access to Retail & Shopping ,trOpRetail * shopping,0,0,0,0,0,0,0.0000,0.000 +Auto Access to Retail & Shopping ,auOpRetail * shopping,0.1067,0,0,0,0,0,0.0000,0.000 +Walk Access to Retail & Maintenance ,nmRetail * othmaint,0,0,0,0,0,0,0.0000,0.000 +Transit Access to Retail & Maintenance ,trOpRetail * othmaint,0,0,0.0314,0,0,0,0.0000,0.000 +Auto Access to Retail & Maintenance ,auOpRetail * othmaint,0.0749,0,0,0.0956,0,0,0.0000,0.000 +Walk Access to Retail & Eating Out ,nmRetail * eatout,0.145,0,0,0,0,0,0.0738,0.000 +Transit Access to Retail & Eating Out ,trOpRetail * eatout,0,0,0,0,0,0,0.0000,0.000 +Auto Access to Retail & Eating Out ,auOpRetail * eatout,0,0,0.1018,0,0,0,0.0000,0.000 +Walk Access to Retail & Discretionary ,nmRetail * othdiscr,0.0567,0,0,0.0772,0,0,0.0000,0.000 +Transit Access to Retail & Discretionary ,trOpRetail * othdiscr,0,0,0,0,0,0,0.0000,0.000 +Auto Access to Retail & Discretionary ,auOpRetail * othdiscr,0.0844,0,0.094,0,0,0,0.0000,0.000 +Urban Areatype & Tour Frequency =1,home_is_urban & (tot_tours == 1),0,0,-1.1648,0,0,0,0.0000,0.000 +Urban Areatype & Tour Frequency =2,home_is_urban & (tot_tours == 2),0,0,-2.3177,0,0,0,0.0000,0.000 +Urban Areatype & Tour Frequency =3,home_is_urban & (tot_tours == 3),0,0,-2.5027,0,0,0,0.0000,0.000 +Urban Areatype & Tour Frequency =4,home_is_urban & (tot_tours == 4),0,0,-2.5027,0,0,0,0.0000,0.000 +Urban Areatype & Tour Frequency =5+,home_is_urban & (tot_tours > 4),0,0,-2.5027,0,0,0,0.0000,0.000 +Urban Areatype & Escorting tour,home_is_urban * escort,-0.4316,-0.3929,0.8516,0,0,0,0.4352,0.000 +Urban Areatype &Shopping tour,home_is_urban * shopping,0,0,0.533,0,0,0,0.0000,0.000 +Urban Areatype & Maintenance tour,home_is_urban * othmaint,0,0,1.0316,0,0,1.0394,0.0000,0.000 +Urban Areatype & EatingOut tour,home_is_urban * eatout,0,0,0.68,0,0,0,0.0000,0.000 +Urban Areatype & Discretionary tour,home_is_urban * othdiscr,0,0,0.9563,0,0,0,0.0000,0.000 +1 Escort Tour Constant,escort == 1,0.0298,0.5272,1.7028,-0.0629,-0.3992,-0.4934,-0.7551,0.3622 +2+ Escort Tours Constant,escort >= 2,0.7402,1.5987,2.8379,0.9273,0.5175,1.4155,-0.0086,2.2219 +1+ Shopping Tours Constant,shopping >= 1,0.4774,0.7569,1.8403,0.4683,0.5947,0.532,0.4783,1.6919 +1+ Maintenance Tours Constant,othmaint >= 1,0.1202,0.5533,0.3348,-0.0653,0.1046,-0.4344,-0.5060,0.6788 +1+ Eating Out Tours Constant,eatout >= 1,0.0097,0.6914,2.0723,-0.1429,0.0245,-0.0242,1.1145,0.9612 +1+ Visting Tours Constant,social >= 1,0.0522,0.1405,1.2172,-0.1272,0.2789,0.2367,-0.4006,0.4424 +1+ Other Discretionary Tours Constant,othdiscr >= 1,0.7412,0.7989,1.3389,0.3334,0.4282,-0.2602,0.4634,1.4935 +Dummy for 0-auto household & Escorting Tour,escort * no_cars,-2,-2,-2,-2,-2,-2,-2.0000,-2.0000 diff --git a/example/configs/non_mandatory_tour_frequency_annotate_persons_preprocessor.csv b/example/configs/non_mandatory_tour_frequency_annotate_persons_preprocessor.csv index 621c319500..3b4cfe7326 100644 --- a/example/configs/non_mandatory_tour_frequency_annotate_persons_preprocessor.csv +++ b/example/configs/non_mandatory_tour_frequency_annotate_persons_preprocessor.csv @@ -13,8 +13,8 @@ Description,Target,Expression ,num_hh_joint_tours,"reindex_i(_JOINT_TOURS.groupby('household_id').size(), persons.household_id)" ,num_hh_joint_shop_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='shopping'].groupby('household_id').size(), persons.household_id)" ,num_hh_joint_eatout_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='eatout'].groupby('household_id').size(), persons.household_id)" -# not used,,num_hh_joint_maint_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='maint'].groupby('household_id').size(), persons.household_id)" -# not used,num_hh_joint_social_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='social'].groupby('household_id').size(), persons.household_id)" +,num_hh_joint_maint_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='maint'].groupby('household_id').size(), persons.household_id)" +,num_hh_joint_social_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='social'].groupby('household_id').size(), persons.household_id)" ,num_hh_joint_othdiscr_tours,"reindex_i(_JOINT_TOURS[_JOINT_TOURS.tour_type=='othdiscr'].groupby('household_id').size(), persons.household_id)" # non_mandatory tour frequency extension,, ,has_mandatory_tour,(persons.num_mand > 0) * 1 diff --git a/example/configs/settings.yaml b/example/configs/settings.yaml index f94c61b332..31860d3323 100644 --- a/example/configs/settings.yaml +++ b/example/configs/settings.yaml @@ -16,6 +16,7 @@ check_for_variability: False # turn shadow_pricing on and off for all models (e.g. school and work) # shadow pricing is deprecated for less than full samples +# see shadow_pricing.yaml for additional settings use_shadow_pricing: False diff --git a/example/configs/stop_frequency_annotate_tours_preprocessor.csv b/example/configs/stop_frequency_annotate_tours_preprocessor.csv index 0cf45ea671..e11704c918 100644 --- a/example/configs/stop_frequency_annotate_tours_preprocessor.csv +++ b/example/configs/stop_frequency_annotate_tours_preprocessor.csv @@ -8,34 +8,34 @@ Description,Target,Expression #,, ,distance_in_miles,od_skims['DIST'] #,, -,is_joint,"df.tour_category=='joint'" +,is_joint,df.tour_category=='joint' ,_HH_PERSON_COUNT,"lambda exp, persons: persons.query(exp).groupby('household_id').size()" -,num_full,"reindex_i(_HH_PERSON_COUNT('ptype == %s' % constants.PTYPE_FULL, persons), df.household_id)" +,num_full,"reindex_i(_HH_PERSON_COUNT('ptype == %s' % constants.PEMPLOY_FULL, persons), df.household_id)" ,num_part,"reindex_i(_HH_PERSON_COUNT('ptype == %s' % constants.PEMPLOY_PART, persons), df.household_id)" ,num_student,"reindex_i(_HH_PERSON_COUNT('pstudent != %s' % constants.PSTUDENT_NOT, persons), df.household_id)" Num Kids between 0 and 4 (including) years old,num_age_0_4,"reindex_i(_HH_PERSON_COUNT('age < 5', persons), df.household_id)" Num kids between 4 and 15 (including) years old,num_age_5_15,"reindex_i(_HH_PERSON_COUNT('(age >= 5) & (age <16)', persons), df.household_id)" Number of Adults (>= 16 years old),num_adult,"reindex_i(_HH_PERSON_COUNT('age >= 16', persons), df.household_id)" -,more_cars_than_workers,df.auto_ownership > df.num_workers -,tour_mode_is_transit,"df.tour_mode.isin(TRANSIT_MODES)" -,tour_mode_is_drive_transit,"df.tour_mode.isin(DRIVE_TO_TRANSIT_MODES)" -,tour_mode_is_non_motorized,"df.tour_mode.isin(NONMOTORIZED_MODES)" +,more_cars_than_workers,df.auto_ownership >= (num_full + num_part) +,tour_mode_is_transit,df.tour_mode.isin(TRANSIT_MODES) +,tour_mode_is_drive_transit,df.tour_mode.isin(DRIVE_TO_TRANSIT_MODES) +,tour_mode_is_non_motorized,df.tour_mode.isin(NONMOTORIZED_MODES) #,, #num_work_tours already defined,, -,num_school_tours,"reindex_i(df[df.tour_type==SCHOOL_TOUR].groupby('person_id').size(), df.person_id)" +school but not university,num_school_tours,"reindex_i(df[primary_purpose==SCHOOL_TOUR].groupby('person_id').size(), df.person_id)" ,num_univ_tours,(df.is_university) * num_school_tours #num_escort_tours already defined,, # indiv tour counts should not include joint tours by point_person,, -#,num_shop_tours,"reindex_i(df[~is_joint & (df.tour_type==SHOP_TOUR)].groupby('person_id').size(), df.person_id)" -#,num_maint_tours,"reindex_i(df[~is_joint & (df.tour_type==MAINT_TOUR)].groupby('person_id').size(), df.person_id)" -#,num_eatout_tours,"reindex_i(df[~is_joint & (df.tour_type==EATOUT_TOUR)].groupby('person_id').size(), df.person_id)" -#,num_social_tours,"reindex_i(df[~is_joint & (df.tour_type==SOCIAL_TOUR)].groupby('person_id').size(), df.person_id)" +,num_shop_tours,"reindex_i(df[~is_joint & (df.tour_type==SHOP_TOUR)].groupby('person_id').size(), df.person_id)" +,num_maint_tours,"reindex_i(df[~is_joint & (df.tour_type==MAINT_TOUR)].groupby('person_id').size(), df.person_id)" +,num_eatout_tours,"reindex_i(df[~is_joint & (df.tour_type==EATOUT_TOUR)].groupby('person_id').size(), df.person_id)" +,num_social_tours,"reindex_i(df[~is_joint & (df.tour_type==SOCIAL_TOUR)].groupby('person_id').size(), df.person_id)" #,, Number of subtours in the tour,num_atwork_subtours,"df.atwork_subtour_frequency.map(num_atwork_subtours_map, na_action='ignore').fillna(0).astype(np.int8)" #,, Number of hh shop tours including joint,num_hh_shop_tours,"reindex_i(df[df.tour_type==SHOP_TOUR].groupby('household_id').size(), df.person_id)" Number of hh maint tours including joint,num_hh_maint_tours,"reindex_i(df[df.tour_type==MAINT_TOUR].groupby('household_id').size(), df.person_id)" -tourStartsInPeakPeriod,_tour_starts_in_peak,skim_time_period_label(df.start) == 'AM' +tourStartsInPeakPeriod,_tour_starts_in_peak,(skim_time_period_label(df.start) == 'AM') | (skim_time_period_label(df.start) == 'PM') AccesibilityAtOrigin fallback,hhacc,0 AccesibilityAtOrigin if transit,hhacc,"hhacc.where(~tour_mode_is_transit, df.trPkRetail.where(_tour_starts_in_peak, df.trOpRetail))" AccesibilityAtOrigin if non_motorized,hhacc,"hhacc.where(~tour_mode_is_non_motorized, df.nmRetail)" diff --git a/example/configs/stop_frequency_atwork.csv b/example/configs/stop_frequency_atwork.csv index da2b4534a7..d72e35ab2c 100644 --- a/example/configs/stop_frequency_atwork.csv +++ b/example/configs/stop_frequency_atwork.csv @@ -1,12 +1,12 @@ Description,Expression,0out_0in,0out_1in,0out_2in,0out_3in,1out_0in,1out_1in,1out_2in,1out_3in,2out_0in,2out_1in,2out_2in,2out_3in,3out_0in,3out_1in,3out_2in,3out_3in -Middle to Low Income HH ,(income_in_thousands>19999) & (income_in_thousands<50000),,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500,0.4500 -Number of eating tours tours undertaken by the person,num_eatout_tours,,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800 -Subtour departure less than or equal to 11AM,start<12,,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100,0.3100 -Subtour return time greater or equal to 2PM,end>16,,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400,0.3400 -Subtour duration in hours (integer),end-start,,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600,0.5600 -dummy for subtour origin (tour destination) at Exurban or Rual (AreaTypes = 6 or 7),destination_area_type >5,,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700,0.2700 -Primary Destination Accessibility (LOG of it),pracc,,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800,0.1800 -subtour distance in miles (from tour destination to subtour primary destination one way),distance_in_miles,,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200,0.0200 +Middle to Low Income HH ,income_in_thousands<50000,,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45,0.45 +Number of eating tours tours undertaken by the person,num_eatout_tours,,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28 +Subtour departure less than or equal to 11AM,start<12,,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31 +Subtour return time greater or equal to 2PM,end>16,,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34,0.34 +Subtour duration in hours (integer),end-start,,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56 +dummy for subtour origin (tour destination) at Exurban or Rual (AreaTypes = 6 or 7),destination_area_type >5,,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27,0.27 +Primary Destination Accessibility (LOG of it),pracc,,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18,0.18 +subtour distance in miles (from tour destination to subtour primary destination one way),distance_in_miles,,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02,0.02 Alternative specific constant for outbound stops,1,,,,,-3.896,-3.896,-3.896,-3.896,-5.709,-5.709,-5.709,-5.709,-7.361,-7.361,-7.361,-7.361 -Alternative specific constant for return stops,1,,-3.671,-5.388,-6.210,,-3.671,-5.388,-6.210,,-3.671,-5.388,-6.210,,-3.671,-5.388,-6.210 +Alternative specific constant for return stops,1,,-3.671,-5.388,-6.21,,-3.671,-5.388,-6.21,,-3.671,-5.388,-6.21,,-3.671,-5.388,-6.21 Alternative specific constant for the total number of stops,1,,,0,0,,0,0,2.127,0,0,2.127,2.127,0,2.127,2.127,2.127 diff --git a/example/configs/stop_frequency_eatout.csv b/example/configs/stop_frequency_eatout.csv index cdfb57bd2f..563b1f3322 100644 --- a/example/configs/stop_frequency_eatout.csv +++ b/example/configs/stop_frequency_eatout.csv @@ -12,39 +12,42 @@ Presence of kids between 5 and 15 (including) years old,(num_age_5_15 > 0),,,,,, Number of Adults (>= 16 years old),num_adult,,,,,,,,,,,,,,,, Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 > 0),,,,,,,,,,,,,,,, Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, -Number of Vehicles,auto_ownership,,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900 -Dummy for female,female,,,,,,,,,,,,,,,, -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 -Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300 -Number of work tours undertaken by the person,num_work_tours,,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800 -Number of university tours tours undertaken by the person,num_univ_tours,,,,,,,,,,,,,,,, -Number of shool tours tours undertaken by the person,num_school_tours,,,,,,,,,,,,,,,, -Number of escort tours tours undertaken by the person,num_escort_tours,,,,,,,,,,,,,,,, -Number of shop tours undertaken by the person,num_shop_tours,,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400 -Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, -Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, -Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, +Number of Vehicles,auto_ownership,,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19 +Dummy for female,~is_joint & female,,,,,,,,,,,,,,,, +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 +Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73 +Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28 +Number of university tours tours undertaken by the person,~is_joint * num_univ_tours,,,,,,,,,,,,,,,, +Number of shool tours tours undertaken by the person,~is_joint * num_school_tours,,,,,,,,,,,,,,,, +Number of escort tours tours undertaken by the person,~is_joint * num_escort_tours,,,,,,,,,,,,,,,, +Number of shop tours undertaken by the person,~is_joint * num_shop_tours,,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24 +Number of maintenace tours tours undertaken by the person,~is_joint * num_maint_tours,,,,,,,,,,,,,,,, +Number of eating tours tours undertaken by the person,~is_joint * num_eatout_tours,,,,,,,,,,,,,,,, +Number of visit tours tours undertaken by the person,~is_joint * num_social_tours,,,,,,,,,,,,,,,, Number of shop tours undertaken by the houshold,num_hh_shop_tours,,,,,,,,,,,,,,,, -Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600 +Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46 Number of persons participating in the tour.Return stops interaction,is_joint * number_of_participants,,,,,,,,,,,,,,,, -At least one kid and one adult participate in the tour,composition=='mixed',,0.3700,0.3700,0.3700,,0.3700,0.3700,0.3700,,0.3700,0.3700,0.3700,,0.3700,0.3700,0.3700 +At least one kid and one adult participate in the tour,composition=='mixed',,0.37,0.37,0.37,,0.37,0.37,0.37,,0.37,0.37,0.37,,0.37,0.37,0.37 AM Peak departure between 6AM and 7 AM (including) Interacted with outbound tours,(start>5) & (start<8),,,,,,,,,,,,,,,, -Arrival later than 17:00.,(end > 16),,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500 +Arrival later than 17:00.,(end > 16),,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45 Evening Arrival (>=19:00) Interacted with return tours,(end > 18),,,,,,,,,,,,,,,, Dummy for the duration of the tour being equal or greater than or equal to 11 hours,(duration > 10),,,,,,,,,,,,,,,, Dummy for the duration of the tour being equal or greater than or equal to 9 hours ,(duration > 8),,,,,,,,,,,,,,,, -Dummy for the duration of the tour being equal or greater than or equal to 3 hours ,(duration > 2),,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100 +Dummy for the duration of the tour being equal or greater than or equal to 3 hours ,(duration > 2),,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31 HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, dummy for distance less than 20 Miles ,(distance_in_miles < 20),,,,,,,,,,,,,,,, -dummy for distance in miles,distance_in_miles,,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100 +dummy for distance in miles,distance_in_miles,,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 -Alternative specific constant for outbound stops,~is_joint,,,,,-2.190,-2.190,-2.190,-2.190,-4.516,-4.516,-4.516,-4.516,-5.255,-5.255,-5.255,-5.255 +Alternative specific constant for outbound stops,~is_joint,,,,,-2.19,-2.19,-2.19,-2.19,-4.516,-4.516,-4.516,-4.516,-5.255,-5.255,-5.255,-5.255 Alternative specific constant for return stops,~is_joint,,-1.761,-3.697,-4.717,,-1.761,-3.697,-4.717,,-1.761,-3.697,-4.717,,-1.761,-3.697,-4.717 -Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.940,0,0,0.940,2.026,0,0.940,2.026,2.026 +Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.94,0,0,0.94,2.026,0,0.94,2.026,2.026 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 Alternative specific constant for return stops on joint tours,is_joint,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379 Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 +Dummy for an outbound visiting tour,primary_purpose == 'social',,,,,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69 +Dummy for a return visiting tour,primary_purpose == 'social',,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64 +Dummy for a visiting tour with both outbound and return leg,primary_purpose == 'social',,,,,,0.44,0.44,0.44,,0.44,0.44,0.44,,0.44,0.44,0.44 diff --git a/example/configs/stop_frequency_escort.csv b/example/configs/stop_frequency_escort.csv index 52f77a151b..9e0032641b 100644 --- a/example/configs/stop_frequency_escort.csv +++ b/example/configs/stop_frequency_escort.csv @@ -2,9 +2,9 @@ Description,Expression,0out_0in,0out_1in,0out_2in,0out_3in,1out_0in,1out_1in,1ou Middle to Low Income HH,(income_in_thousands>19999) & (income_in_thousands<50000),,,,,,,,,,,,,,,, Mid to High Income HH,(income_in_thousands>=50000) & (income_in_thousands<100000),,,,,,,,,,,,,,,, High Income HH,(income_in_thousands>=100000),,,,,,,,,,,,,,,, -Number of HH Persons,hhsize,,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400 +Number of HH Persons,hhsize,,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24 Number of full time workers in HH,num_full,,,,,,,,,,,,,,,, -Number of Students in HH,num_student,,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900,0.1900 +Number of Students in HH,num_student,,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19 Num Kids between 0 and 4 (including) years old,num_age_0_4,,,,,,,,,,,,,,,, Presence of Kids between 0 and 4 (including) years old,(num_age_0_4 > 0),,,,,,,,,,,,,,,, Num kids between 5 and 15 (including) years old,num_age_5_15,,,,,,,,,,,,,,,, @@ -14,12 +14,12 @@ Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, Number of Vehicles,auto_ownership,,,,,,,,,,,,,,,, Dummy for female,female,,,,,,,,,,,,,,,, -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 -Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100,-1.9100 -Number of work tours undertaken by the person,num_work_tours,,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900,-0.2900 +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 +Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91,-1.91 +Number of work tours undertaken by the person,num_work_tours,,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29,-0.29 Number of university tours tours undertaken by the person,num_univ_tours,,,,,,,,,,,,,,,, Number of school tours tours undertaken by the person,num_school_tours,,,,,,,,,,,,,,,, -Number of escort tours tours undertaken by the person,num_escort_tours,,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500,-0.1500 +Number of escort tours tours undertaken by the person,num_escort_tours,,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15,-0.15 Number of shop tours undertaken by the person,num_shop_tours,,,,,,,,,,,,,,,, Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, @@ -29,19 +29,19 @@ AM Peak departure between 6AM and 7 AM (including) Interacted with outbound tour Arrival later than 17:00.,(end > 16),,,,,,,,,,,,,,,, Evening Arrival (>=19:00) Interacted with return tours,(end > 18),,,,,,,,,,,,,,,, Dummy for the duration of the tour being equal or greater than or equal to 11 hours,(duration > 10),,,,,,,,,,,,,,,, -Dummy for the duration of the tour being equal or greater than or equal to 9 hours ,(duration > 8),,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900,0.5900 +Dummy for the duration of the tour being equal or greater than or equal to 9 hours ,(duration > 8),,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59,0.59 Dummy for the duration of the tour being equal or greater than or equal to 3 hours ,(duration > 2),,,,,,,,,,,,,,,, HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, -dummy for distance less than 20 Miles,(distance_in_miles < 20),,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200,0.3200 -dummy for distance in miles,distance_in_miles,,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100,0.0100 +dummy for distance less than 5 Miles,(distance_in_miles < 5),,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32,0.32 +dummy for distance in miles,distance_in_miles,,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 Alternative specific constant for outbound stops,~is_joint,,,,,-2.173,-2.173,-2.173,-2.173,-4.294,-4.294,-4.294,-4.294,-4.758,-4.758,-4.758,-4.758 -Alternative specific constant for return stops,~is_joint,,-0.968,-2.410,-3.024,,-0.968,-2.410,-3.024,,-0.968,-2.410,-3.024,,-0.968,-2.410,-3.024 +Alternative specific constant for return stops,~is_joint,,-0.968,-2.41,-3.024,,-0.968,-2.41,-3.024,,-0.968,-2.41,-3.024,,-0.968,-2.41,-3.024 Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0,0,0,0,-1.807,0,0,-1.807,-1.807 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 Alternative specific constant for return stops on joint tours,is_joint,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379 -Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 \ No newline at end of file +Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 diff --git a/example/configs/stop_frequency_othdiscr.csv b/example/configs/stop_frequency_othdiscr.csv index fe2e62aa27..39b6f25bc3 100644 --- a/example/configs/stop_frequency_othdiscr.csv +++ b/example/configs/stop_frequency_othdiscr.csv @@ -13,17 +13,17 @@ Number of Adults (>= 16 years old),num_adult,,,,,,,,,,,,,,,, Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 > 0),,,,,,,,,,,,,,,, Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, Number of Vehicles,auto_ownership,,,,,,,,,,,,,,,, -Dummy for female,female,,,,,,,,,,,,,,,, -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 +Dummy for female,~is_joint & female,,,,,,,,,,,,,,,, +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 Dummy for walking to all stops,tour_mode_is_non_motorized,,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578,-2.4578 -Number of work tours undertaken by the person,num_work_tours,,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153 -Number of university tours tours undertaken by the person,num_univ_tours,,,,,,,,,,,,,,,, -Number of shool tours tours undertaken by the person,num_school_tours,,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176 -Number of escort tours tours undertaken by the person,num_escort_tours,,,,,,,,,,,,,,,, -Number of shop tours undertaken by the person,num_shop_tours,,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290,-0.6290 -Number of maintenace tours tours undertaken by the person,num_maint_tours,,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715 -Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, -Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, +Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153,-0.6153 +Number of university tours tours undertaken by the person,~is_joint * num_univ_tours,,,,,,,,,,,,,,,, +Number of shool tours tours undertaken by the person,~is_joint * num_school_tours,,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176,-0.8176 +Number of escort tours tours undertaken by the person,~is_joint * num_escort_tours,,,,,,,,,,,,,,,, +Number of shop tours undertaken by the person,~is_joint * num_shop_tours,,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629,-0.629 +Number of maintenace tours tours undertaken by the person,~is_joint * num_maint_tours,,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715,-0.3715 +Number of eating tours tours undertaken by the person,~is_joint * num_eatout_tours,,,,,,,,,,,,,,,, +Number of visit tours tours undertaken by the person,~is_joint * num_social_tours,,,,,,,,,,,,,,,, Number of shop tours undertaken by the houshold,num_hh_shop_tours,,,,,,,,,,,,,,,, Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,,,,,,,,,,,, Number of persons participating in the tour.Return stops interaction,is_joint * number_of_participants,,,,,,,,,,,,,,,, @@ -37,7 +37,7 @@ HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, -dummy for distance less than 20 Miles ,(distance_in_miles < 20),,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756 +dummy for distance less than 10 Miles ,(distance_in_miles < 10),,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756,0.3756 dummy for distance in miles,distance_in_miles,,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225,-0.0225 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 @@ -46,4 +46,4 @@ Alternative specific constant for return stops,~is_joint,,-0.921,-2.336,-2.927, Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.863,0,0,0.863,0.939,0,0.863,0.939,0.939 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 Alternative specific constant for return stops on joint tours,is_joint,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379 -Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 \ No newline at end of file +Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 diff --git a/example/configs/stop_frequency_othmaint.csv b/example/configs/stop_frequency_othmaint.csv index 91edbe3fe0..2a05c4f73b 100644 --- a/example/configs/stop_frequency_othmaint.csv +++ b/example/configs/stop_frequency_othmaint.csv @@ -1,29 +1,29 @@ Description,Expression,0out_0in,0out_1in,0out_2in,0out_3in,1out_0in,1out_1in,1out_2in,1out_3in,2out_0in,2out_1in,2out_2in,2out_3in,3out_0in,3out_1in,3out_2in,3out_3in -Middle to Low Income HH ,(income_in_thousands>19999) & (income_in_thousands<50000),,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700,0.1700 -Mid to High Income HH,(income_in_thousands>=50000) & (income_in_thousands<100000),,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300,0.2300 -High Income HH,(income_in_thousands>=100000),,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400,0.2400 -Number of HH Persons,hhsize,,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100,-0.3100 +Middle to Low Income HH ,(income_in_thousands>19999) & (income_in_thousands<50000),,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17,0.17 +Mid to High Income HH,(income_in_thousands>=50000) & (income_in_thousands<100000),,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23,0.23 +High Income HH,(income_in_thousands>=100000),,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24,0.24 +Number of HH Persons,hhsize,,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31,-0.31 Number of full time workes in HH,num_full,,,,,,,,,,,,,,,, -Number of Students in HH,num_student,,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100,0.2100 +Number of Students in HH,num_student,,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21,0.21 Num Kids between 0 and 4 (including) years old,num_age_0_4,,,,,,,,,,,,,,,, -Presence of Kids between 0 and 4 (including) years old,(num_age_0_4 > 0),,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400,0.7400 +Presence of Kids between 0 and 4 (including) years old,(num_age_0_4 > 0),,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74,0.74 Num kids between 4 and 15 (including) years old,num_age_5_15,,,,,,,,,,,,,,,, Presence of kids between 5 and 15 (including) years old,(num_age_5_15 > 0),,,,,,,,,,,,,,,, Number of Adults (>= 16 years old),num_adult,,,,,,,,,,,,,,,, Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 > 0),,,,,,,,,,,,,,,, Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, Number of Vehicles,auto_ownership,,,,,,,,,,,,,,,, -Dummy for female,female,,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012 -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 +Dummy for female,~is_joint & female,,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012,0.3012 +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329,-1.4329 -Number of work tours undertaken by the person,num_work_tours,,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640,-0.3640 -Number of university tours tours undertaken by the person,num_univ_tours,,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252 -Number of shool tours tours undertaken by the person,num_school_tours,,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135 -Number of escort tours tours undertaken by the person,num_escort_tours,,,,,,,,,,,,,,,, -Number of shop tours undertaken by the person,num_shop_tours,,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428 -Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, -Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, -Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, +Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364,-0.364 +Number of university tours tours undertaken by the person,~is_joint * num_univ_tours,,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252,-0.6252 +Number of shool tours tours undertaken by the person,~is_joint * num_school_tours,,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135,-1.4135 +Number of escort tours tours undertaken by the person,~is_joint * num_escort_tours,,,,,,,,,,,,,,,, +Number of shop tours undertaken by the person,~is_joint * num_shop_tours,,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428,-0.1428 +Number of maintenace tours tours undertaken by the person,~is_joint * num_maint_tours,,,,,,,,,,,,,,,, +Number of eating tours tours undertaken by the person,~is_joint * num_eatout_tours,,,,,,,,,,,,,,,, +Number of visit tours tours undertaken by the person,~is_joint * num_social_tours,,,,,,,,,,,,,,,, Number of shop tours undertaken by the houshold,num_hh_shop_tours,,,,,,,,,,,,,,,, Number of maintenace tours undertaken by the houshold,num_hh_maint_tours,,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468,-0.0468 Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,,,,,,,,,,,, @@ -38,13 +38,13 @@ HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, -dummy for distance less than 20 Miles ,(distance_in_miles < 20),,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080,-0.4080 +dummy for distance less than 20 Miles ,(distance_in_miles < 20),,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408,-0.408 dummy for distance in miles,distance_in_miles,,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273,0.0273 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 Alternative specific constant for outbound stops,~is_joint,,,,,-1.761,-1.761,-1.761,-1.761,-3.661,-3.661,-3.661,-3.661,-5.426,-5.426,-5.426,-5.426 -Alternative specific constant for return stops,~is_joint,,-0.585,-1.480,-2.462,,-0.585,-1.480,-2.462,,-0.585,-1.480,-2.462,,-0.585,-1.480,-2.462 +Alternative specific constant for return stops,~is_joint,,-0.585,-1.48,-2.462,,-0.585,-1.48,-2.462,,-0.585,-1.48,-2.462,,-0.585,-1.48,-2.462 Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.414,0,0,0.414,0.488,0,0.414,0.488,0.488 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 Alternative specific constant for return stops on joint tours,is_joint,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379 -Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 \ No newline at end of file +Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 diff --git a/example/configs/stop_frequency_school.csv b/example/configs/stop_frequency_school.csv index 240e1eec5f..dd2ac39ec6 100644 --- a/example/configs/stop_frequency_school.csv +++ b/example/configs/stop_frequency_school.csv @@ -2,7 +2,7 @@ Description,Expression,0out_0in,0out_1in,0out_2in,0out_3in,1out_0in,1out_1in,1ou Middle to Low Income HH,(income_in_thousands>19999) & (income_in_thousands<50000),,,,,,,,,,,,,,,, Mid to High Income HH,(income_in_thousands>=50000) & (income_in_thousands<100000),,,,,,,,,,,,,,,, High Income HH,(income_in_thousands>=100000),,,,,,,,,,,,,,,, -Number of HH Persons,hhsize,,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060,-0.5060 +Number of HH Persons,hhsize,,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506,-0.506 Number of full time workers in HH,num_full,,,,,,,,,,,,,,,, Number of Students in HH,num_student,,,,,,,,,,,,,,,, Num Kids between 0 and 4 (including) years old,num_age_0_4,,,,,,,,,,,,,,,, @@ -14,7 +14,7 @@ Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 Number of Cars > Number of Workers,more_cars_than_workers,,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331,0.5331 Number of Vehicles,auto_ownership,,,,,,,,,,,,,,,, Dummy for female,female,,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099,0.4099 -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163,-1.8163 Number of work tours undertaken by the person,num_work_tours,,,,,,,,,,,,,,,, Number of university tours tours undertaken by the person,num_univ_tours,,,,,,,,,,,,,,,, @@ -35,12 +35,10 @@ HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, -dummy for distance less than 20 Miles,(distance_in_miles < 20),,,,,,,,,,,,,,,, +dummy for distance less than 15 Miles,(distance_in_miles < 15),,,,,,,,,,,,,,,, dummy for distance in miles,distance_in_miles,,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438,0.0438 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 -Alternative specific constant for outbound stops,1,,,,,-2.123,-2.123,-2.123,-2.123,-3.798,-3.798,-3.798,-3.798,-5.850,-5.850,-5.850,-5.850 +Alternative specific constant for outbound stops,1,,,,,-2.123,-2.123,-2.123,-2.123,-3.798,-3.798,-3.798,-3.798,-5.85,-5.85,-5.85,-5.85 Alternative specific constant for return stops,1,,-1.206,-2.672,-3.364,,-1.206,-2.672,-3.364,,-1.206,-2.672,-3.364,,-1.206,-2.672,-3.364 Alternative specific constant for the total number of stops,1,,,0,0,,0,0,0.701,0,0,0.701,1.135,0,0.701,1.135,1.135 -#work has one row not found in other tour types,,,,,,,,,,,,,,,,, -#Number of subtours in the tour,num_atwork_subtours,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/example/configs/stop_frequency_shopping.csv b/example/configs/stop_frequency_shopping.csv index db39914a17..3208702fad 100644 --- a/example/configs/stop_frequency_shopping.csv +++ b/example/configs/stop_frequency_shopping.csv @@ -14,9 +14,9 @@ Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, Number of Vehicles,auto_ownership,,,,,,,,,,,,,,,, Dummy for female,~is_joint & female,,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721,0.1721 -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908,-1.4908 -Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480,-0.5480 +Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548,-0.548 Number of university tours tours undertaken by the person,~is_joint * num_univ_tours,,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709,-0.6709 Number of school tours tours undertaken by the person,~is_joint * num_school_tours,,,,,,,,,,,,,,,, Number of escort tours tours undertaken by the person,~is_joint * num_escort_tours,,,,,,,,,,,,,,,, @@ -38,11 +38,11 @@ HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, -dummy for distance less than 20 Miles,(distance_in_miles < 20),,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768 +dummy for distance less than 5 Miles,(distance_in_miles < 5),,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768,0.3768 dummy for distance in miles,distance_in_miles,,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289,0.0289 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 -Alternative specific constant for outbound stops,~is_joint,,,,,-1.339,-1.339,-1.339,-1.339,-3.110,-3.110,-3.110,-3.110,-4.487,-4.487,-4.487,-4.487 +Alternative specific constant for outbound stops,~is_joint,,,,,-1.339,-1.339,-1.339,-1.339,-3.11,-3.11,-3.11,-3.11,-4.487,-4.487,-4.487,-4.487 Alternative specific constant for return stops,~is_joint,,-1.179,-2.305,-3.024,,-1.179,-2.305,-3.024,,-1.179,-2.305,-3.024,,-1.179,-2.305,-3.024 Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.252,0,0,0.252,0.514,0,0.252,0.514,0.514 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 diff --git a/example/configs/stop_frequency_social.csv b/example/configs/stop_frequency_social.csv index 469050b757..f04aa4fc64 100644 --- a/example/configs/stop_frequency_social.csv +++ b/example/configs/stop_frequency_social.csv @@ -12,42 +12,42 @@ Presence of kids between 5 and 15 (including) years old,(num_age_5_15 > 0),,,,,, Number of Adults (>= 16 years old),num_adult,,,,,,,,,,,,,,,, Dummy for single parent household,(num_adult == 1) & (num_age_0_4 + num_age_5_15 > 0),,,,,,,,,,,,,,,, Number of Cars > Number of Workers,more_cars_than_workers,,,,,,,,,,,,,,,, -Number of Vehicles,auto_ownership,,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900,-0.1900 -Dummy for female,female,,,,,,,,,,,,,,,, -Dummy for all stops made by transit,tour_mode_is_transit,,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700,-0.700 -Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300,-1.7300 -Number of work tours undertaken by the person,num_work_tours,,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800,-0.2800 -Number of university tours tours undertaken by the person,num_univ_tours,,,,,,,,,,,,,,,, -Number of shool tours tours undertaken by the person,num_school_tours,,,,,,,,,,,,,,,, -Number of escort tours tours undertaken by the person,num_escort_tours,,,,,,,,,,,,,,,, -Number of shop tours undertaken by the person,num_shop_tours,,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400,-0.2400 -Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, -Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, -Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, -Dummy for an outbound visiting tour,1,,,,,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900,-0.6900 -Dummy for a return visiting tour,1,,-0.6400,-0.6400,-0.6400,,-0.6400,-0.6400,-0.6400,,-0.6400,-0.6400,-0.6400,,-0.6400,-0.6400,-0.6400 -Dummy for a visiting tour with both outbound and return leg,1,,,,,,0.4400,0.4400,0.4400,,0.4400,0.4400,0.4400,,0.4400,0.4400,0.4400 +Number of Vehicles,auto_ownership,,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19 +Dummy for female,~is_joint & female,,,,,,,,,,,,,,,, +Dummy for all stops made by transit,tour_mode_is_transit,,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7,-0.7 +Dummy for walking to all stops,tour_mode_is_non_motorized,,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73,-1.73 +Number of work tours undertaken by the person,~is_joint * num_work_tours,,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28,-0.28 +Number of university tours tours undertaken by the person,~is_joint * num_univ_tours,,,,,,,,,,,,,,,, +Number of shool tours tours undertaken by the person,~is_joint * num_school_tours,,,,,,,,,,,,,,,, +Number of escort tours tours undertaken by the person,~is_joint * num_escort_tours,,,,,,,,,,,,,,,, +Number of shop tours undertaken by the person,~is_joint * num_shop_tours,,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24,-0.24 +Number of maintenace tours tours undertaken by the person,~is_joint * num_maint_tours,,,,,,,,,,,,,,,, +Number of eating tours tours undertaken by the person,~is_joint * num_eatout_tours,,,,,,,,,,,,,,,, +Number of visit tours tours undertaken by the person,~is_joint * num_social_tours,,,,,,,,,,,,,,,, Number of shop tours undertaken by the houshold,num_hh_shop_tours,,,,,,,,,,,,,,,, -Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600,-0.4600 +Number of persons participating in the tour.Outgoing stops interaction,is_joint * number_of_participants,,,,,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46,-0.46 Number of persons participating in the tour.Return stops interaction,is_joint * number_of_participants,,,,,,,,,,,,,,,, -At least one kid and one adult participate in the tour,composition=='mixed',,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700,0.3700 +At least one kid and one adult participate in the tour,composition=='mixed',,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37,0.37 AM Peak departure between 6AM and 7 AM (including) Interacted with outbound tours,(start>5) & (start<8),,,,,,,,,,,,,,,, -Arrival later than 17:00.,(end > 16),,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500,-0.4500 +Arrival later than 17:00.,(end > 16),,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45,-0.45 Evening Arrival (>=19:00) Interacted with return tours,(end > 18),,,,,,,,,,,,,,,, Dummy for the duration of the tour being equal or greater than or equal to 11 hours,(duration > 10),,,,,,,,,,,,,,,, Dummy for the duration of the tour being equal or greater than or equal to 9 hours ,(duration > 8),,,,,,,,,,,,,,,, -Dummy for the duration of the tour being equal or greater than or equal to 3 hours ,(duration > 2),,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100,1.3100 +Dummy for the duration of the tour being equal or greater than or equal to 3 hours ,(duration > 2),,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31 HH accesibility for outbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, HH accesibility for inbound tours. Interaction,hhacc,,,,,,,,,,,,,,,, Primary Destination Accessibility for outbound tours. Interaction,pracc,,,,,,,,,,,,,,,, Primary Destination Accessibility for return tours. Interaction,pracc,,,,,,,,,,,,,,,, dummy for distance less than 20 Miles ,(distance_in_miles < 20),,,,,,,,,,,,,,,, -dummy for distance in miles,distance_in_miles,,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100,-0.0100 +dummy for distance in miles,distance_in_miles,,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01,-0.01 #distance in miles * Number of stops,distance_in_miles * @@numStopsAlt,,,,,,,,,,,,,,,, No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 Alternative specific constant for outbound stops,~is_joint,,,,,-1.081,-1.081,-1.081,-1.081,-2.874,-2.874,-2.874,-2.874,-4.552,-4.552,-4.552,-4.552 -Alternative specific constant for return stops,~is_joint,,-1.120,-2.764,-3.451,,-1.120,-2.764,-3.451,,-1.120,-2.764,-3.451,,-1.120,-2.764,-3.451 +Alternative specific constant for return stops,~is_joint,,-1.12,-2.764,-3.451,,-1.12,-2.764,-3.451,,-1.12,-2.764,-3.451,,-1.12,-2.764,-3.451 Alternative specific constant for the total number of stops,~is_joint,,,0,0,,0,0,0.496,0,0,0.496,0.882,0,0.496,0.882,0.882 Alternative specific constant for outbound stops on joint tours,is_joint,,,,,-1.783,-1.783,-1.783,-1.783,-4.067,-4.067,-4.067,-4.067,-4.998,-4.998,-4.998,-4.998 Alternative specific constant for return stops on joint tours,is_joint,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379,,-1.329,-2.796,-3.379 -Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 \ No newline at end of file +Alternative specific constant for the total number of stops on joint tours,is_joint,,,0,0,,0,0,0.518,0,0,0.518,1.497,0,0.518,1.497,1.497 +Dummy for an outbound visiting tour,primary_purpose == 'social',,,,,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69 +Dummy for a return visiting tour,primary_purpose == 'social',,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64,,-0.64,-0.64,-0.64 +Dummy for a visiting tour with both outbound and return leg,primary_purpose == 'social',,,,,,0.44,0.44,0.44,,0.44,0.44,0.44,,0.44,0.44,0.44 diff --git a/example/configs/stop_frequency_work.csv b/example/configs/stop_frequency_work.csv index 72139ac629..94f196124e 100644 --- a/example/configs/stop_frequency_work.csv +++ b/example/configs/stop_frequency_work.csv @@ -20,10 +20,10 @@ Number of work tours undertaken by the person,num_work_tours,,-0.15,-0.15,-0.15, Number of university tours tours undertaken by the person,num_univ_tours,,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48,-0.48 Number of school tours tours undertaken by the person,num_school_tours,,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55,-1.55 Number of escort tours tours undertaken by the person,num_escort_tours,,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2 -#Number of shop tours undertaken by the person,num_shop_tours,,,,,,,,,,,,,,,, -#Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, -#Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, -#Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, +Number of shop tours undertaken by the person,num_shop_tours,,,,,,,,,,,,,,,, +Number of maintenace tours tours undertaken by the person,num_maint_tours,,,,,,,,,,,,,,,, +Number of eating tours tours undertaken by the person,num_eatout_tours,,,,,,,,,,,,,,,, +Number of visit tours tours undertaken by the person,num_social_tours,,,,,,,,,,,,,,,, Number of shop tours undertaken by the houshold,num_hh_shop_tours,,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05 AM Peak departure between 6AM and 7 AM (including) Interacted with outbound tours,(start>5) & (start<8),,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93,-1.93 Arrival later than 17:00.,(end > 16),,,,,,,,,,,,,,,, @@ -42,5 +42,4 @@ No stops if tour mode is driveTransit,tour_mode_is_drive_transit,,-999,-999,-999 Alternative specific constant for outbound stops,1,,,,,-0.833,-0.833,-0.833,-0.833,-2.613,-2.613,-2.613,-2.613,-3.934,-3.934,-3.934,-3.934 Alternative specific constant for return stops,1,,-0.445,-1.775,-2.139,,-0.445,-1.775,-2.139,,-0.445,-1.775,-2.139,,-0.445,-1.775,-2.139 Alternative specific constant for the total number of stops,1,,,0,0,,0,0,0,0,0,0,0.695,0,0,0.695,0.695 -#work has one row not found in other tour types,,,,,,,,,,,,,,,,, Number of subtours in the tour,num_atwork_subtours,,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19,0.19 diff --git a/example/configs/tour_mode_choice.csv b/example/configs/tour_mode_choice.csv index 704e3a59e2..5389e2c919 100644 --- a/example/configs/tour_mode_choice.csv +++ b/example/configs/tour_mode_choice.csv @@ -98,8 +98,8 @@ WALK_LOC - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Light rail/Ferry,,,,,,,,,,,,,,,,,,, WALK_LRF - Unavailable,walk_lrf_available == False,,,,,,,,,,-999,,,,,,,, WALK_LRF - In-vehicle time,@c_ivt * (odt_skims['WLK_LRF_WLK_TOTIVT']/100 + dot_skims['WLK_LRF_WLK_TOTIVT']/100),,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@c_ivt_lrt * (odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100),,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@c_ivt_ferry * (odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100),,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@(c_ivt_lrt-c_ivt) * (odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100),,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@(c_ivt_ferry-c_ivt_lrt) * (odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100),,,,,,,,,,1,,,,,,,, WALK_LRF - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_LRF_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_LRF_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,1,,,,,,,, WALK_LRF - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,1,,,,,,,, WALK_LRF - transfer wait time,@c_xwait * (odt_skims['WLK_LRF_WLK_XWAIT']/100 + dot_skims['WLK_LRF_WLK_XWAIT']/100),,,,,,,,,,1,,,,,,,, @@ -114,7 +114,7 @@ WALK_LRF - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Express bus,,,,,,,,,,,,,,,,,,, WALK_EXP - Unavailable,walk_express_available == False,,,,,,,,,,,-999,,,,,,, WALK_EXP - In-vehicle time,@c_ivt * (odt_skims['WLK_EXP_WLK_TOTIVT']/100 + dot_skims['WLK_EXP_WLK_TOTIVT']/100),,,,,,,,,,,1,,,,,,, -WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@c_ivt_exp * (odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100),,,,,,,,,,,1,,,,,,, +WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@(c_ivt_exp-c_ivt) * (odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100),,,,,,,,,,,1,,,,,,, WALK_EXP - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_EXP_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_EXP_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,1,,,,,,, WALK_EXP - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,1,,,,,,, WALK_EXP - transfer wait time,@c_xwait * (odt_skims['WLK_EXP_WLK_XWAIT']/100 + dot_skims['WLK_EXP_WLK_XWAIT']/100),,,,,,,,,,,1,,,,,,, @@ -129,7 +129,7 @@ WALK_EXP - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Heavy Rail,,,,,,,,,,,,,,,,,,, WALK_HVY - Unavailable,walk_heavyrail_available == False,,,,,,,,,,,,-999,,,,,, WALK_HVY - In-vehicle time,@c_ivt * (odt_skims['WLK_HVY_WLK_TOTIVT']/100 + dot_skims['WLK_HVY_WLK_TOTIVT']/100),,,,,,,,,,,,1,,,,,, -WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@c_ivt_hvy * (odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100),,,,,,,,,,,,1,,,,,, +WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_hvy-c_ivt) * (odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100),,,,,,,,,,,,1,,,,,, WALK_HVY - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_HVY_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_HVY_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,1,,,,,, WALK_HVY - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,1,,,,,, WALK_HVY - transfer wait time,@c_xwait * (odt_skims['WLK_HVY_WLK_XWAIT']/100 + dot_skims['WLK_HVY_WLK_XWAIT']/100),,,,,,,,,,,,1,,,,,, @@ -144,7 +144,7 @@ WALK_HVY - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Commuter rail,,,,,,,,,,,,,,,,,,, WALK_COM - Unavailable,walk_commuter_available == False,,,,,,,,,,,,,-999,,,,, WALK_COM - In-vehicle time,@c_ivt * (odt_skims['WLK_COM_WLK_TOTIVT']/100 + dot_skims['WLK_COM_WLK_TOTIVT']/100),,,,,,,,,,,,,1,,,,, -WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@c_ivt_com * (odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100),,,,,,,,,,,,,1,,,,, +WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@(c_ivt_com-c_ivt) * (odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100),,,,,,,,,,,,,1,,,,, WALK_COM - Short iwait time,@c_short_i_wait * ((odt_skims['WLK_COM_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_COM_WLK_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,,1,,,,, WALK_COM - Long iwait time,@c_long_i_wait * ((odt_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,,1,,,,, WALK_COM - transfer wait time,@c_xwait * (odt_skims['WLK_COM_WLK_XWAIT']/100 + dot_skims['WLK_COM_WLK_XWAIT']/100),,,,,,,,,,,,,1,,,,, @@ -169,7 +169,7 @@ DRIVE_LOC - Drive time,@c_dtim * (odt_skims['DRV_LOC_WLK_DTIM']/100 + dot_skims[ DRIVE_LOC - Walk access time,@c_wacc * df.destination_walk_time,,,,,,,,,,,,,,1,,,, DRIVE_LOC - Walk egress time (at attraction end),@c_wegr * df.destination_walk_time,,,,,,,,,,,,,,1,,,, DRIVE_LOC - Walk other time,@c_waux * (odt_skims['DRV_LOC_WLK_WAUX']/100 + dot_skims['WLK_LOC_DRV_WAUX']/100),,,,,,,,,,,,,,1,,,, -DRIVE_LOC - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_LOC_WLK_FAR'] + dot_skims['WLK_LOC_DRV_FAR']) + ((odt_skims['DRV_LOC_WLK_FAR']/100+dot_skims['WLK_LOC_DRV_FAR']/100) * costPerMile)),,,,,,,,,,,,,,1,,,, +DRIVE_LOC - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_LOC_WLK_FAR'] + dot_skims['WLK_LOC_DRV_FAR']) + ((odt_skims['DRV_LOC_WLK_DDIST']/100+dot_skims['WLK_LOC_DRV_DDIST']/100) * costPerMile)),,,,,,,,,,,,,,1,,,, DRIVE_LOC - Ratio of drive access distance to OD distance,@c_dacc_ratio * ((odt_skims['DRV_LOC_WLK_DDIST']/100+ dot_skims['WLK_LOC_DRV_DDIST']/100)/ (od_skims['DIST']*2)),,,,,,,,,,,,,,1,,,, DRIVE_LOC - Destination zone densityIndex,@c_density_index * df.dest_density_index,,,,,,,,,,,,,,1,,,, DRIVE_LOC - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,1,,,, @@ -189,7 +189,7 @@ DRIVE_LRF - Drive time,@c_dtim * (odt_skims['DRV_LRF_WLK_DTIM']/100 + dot_skims[ DRIVE_LRF - Walk access time (at attraction end),@c_wacc * df.destination_walk_time,,,,,,,,,,,,,,,1,,, DRIVE_LRF - Walk egress time (at attraction end),@c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,1,,, DRIVE_LRF - Walk other time,@c_waux * (odt_skims['DRV_LRF_WLK_WAUX']/100 + dot_skims['WLK_LRF_DRV_WAUX']/100),,,,,,,,,,,,,,,1,,, -DRIVE_LRF - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_LRF_WLK_FAR']+dot_skims['WLK_LRF_DRV_FAR']) + ((odt_skims['DRV_LRF_WLK_FAR']/100+dot_skims['WLK_LRF_DRV_FAR']/100) *costPerMile)),,,,,,,,,,,,,,,1,,, +DRIVE_LRF - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_LRF_WLK_FAR']+dot_skims['WLK_LRF_DRV_FAR']) + ((odt_skims['DRV_LRF_WLK_DDIST']/100+dot_skims['WLK_LRF_DRV_DDIST']/100) *costPerMile)),,,,,,,,,,,,,,,1,,, DRIVE_LRF - Ratio of drive access distance to OD distance,@c_dacc_ratio * ((odt_skims['DRV_LRF_WLK_DDIST']/100+ dot_skims['WLK_LRF_DRV_DDIST']/100)/ (od_skims['DIST']*2)),,,,,,,,,,,,,,,1,,, DRIVE_LRF - Destination zone densityIndex,@c_density_index * df.dest_density_index,,,,,,,,,,,,,,,1,,, DRIVE_LRF - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,,1,,, @@ -208,7 +208,7 @@ DRIVE_EXP - Drive time,@c_dtim * (odt_skims['DRV_EXP_WLK_DTIM']/100 + dot_skims[ DRIVE_EXP - Walk access time (at attraction end),@c_wacc * df.destination_walk_time,,,,,,,,,,,,,,,,1,, DRIVE_EXP - Walk egress ime (at attraction end),@c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,1,, DRIVE_EXP - Walk other time,@c_waux * (odt_skims['DRV_EXP_WLK_WAUX']/100 + dot_skims['WLK_EXP_DRV_WAUX']/100),,,,,,,,,,,,,,,,1,, -DRIVE_EXP - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_EXP_WLK_FAR']+dot_skims['WLK_EXP_DRV_FAR']) + ((odt_skims['DRV_EXP_WLK_FAR']/100+dot_skims['WLK_EXP_DRV_FAR']/100) *costPerMile)),,,,,,,,,,,,,,,,1,, +DRIVE_EXP - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_EXP_WLK_FAR']+dot_skims['WLK_EXP_DRV_FAR']) + ((odt_skims['DRV_EXP_WLK_DDIST']/100+dot_skims['WLK_EXP_DRV_DDIST']/100) *costPerMile)),,,,,,,,,,,,,,,,1,, DRIVE_EXP - Ratio of drive access distance to OD distance,@c_dacc_ratio * ((odt_skims['DRV_EXP_WLK_DDIST']/100+ dot_skims['WLK_EXP_DRV_DDIST']/100)/ (od_skims['DIST']*2)),,,,,,,,,,,,,,,,1,, DRIVE_EXP - Destination zone densityIndex,@c_density_index * df.dest_density_index,,,,,,,,,,,,,,,,1,, DRIVE_EXP - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,,,1,, @@ -218,7 +218,7 @@ DRIVE_HVY - Unavailable,drive_heavyrail_available == False,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - Unavailable for zero auto households,auto_ownership == 0,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - Unavailable for persons less than 16,age < 16,,,,,,,,,,,,,,,,,-999, DRIVE_HVY - In-vehicle time,@c_ivt * (odt_skims['DRV_HVY_WLK_TOTIVT']/100 + dot_skims['WLK_HVY_DRV_TOTIVT']/100),,,,,,,,,,,,,,,,,1, -DRIVE_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_exp-c_ivt) * (odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100),,,,,,,,,,,,,,,,,1, +DRIVE_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_hvy-c_ivt) * (odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100),,,,,,,,,,,,,,,,,1, DRIVE_HVY - Short iwait time,@c_short_i_wait * ((odt_skims['DRV_HVY_WLK_IWAIT']/100).clip(upper=waitThresh) + (dot_skims['WLK_HVY_DRV_IWAIT']/100).clip(upper=waitThresh)),,,,,,,,,,,,,,,,,1, DRIVE_HVY - Long iwait time,@c_long_i_wait * ((odt_skims['DRV_HVY_WLK_IWAIT']/100-waitThresh).clip(0) + (dot_skims['WLK_HVY_DRV_IWAIT']/100-waitThresh).clip(0)),,,,,,,,,,,,,,,,,1, DRIVE_HVY - transfer wait time,@c_xwait * (odt_skims['DRV_HVY_WLK_XWAIT']/100 + dot_skims['WLK_HVY_DRV_XWAIT']/100),,,,,,,,,,,,,,,,,1, @@ -227,7 +227,7 @@ DRIVE_HVY - Drive time,@c_dtim * (odt_skims['DRV_HVY_WLK_DTIM']/100 + dot_skims[ DRIVE_HVY - Walk access time (at attraction end),@c_wacc * df.destination_walk_time,,,,,,,,,,,,,,,,,1, DRIVE_HVY - Walk egress time (at attraction end),@c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,,1, DRIVE_HVY - Walk other time,@c_waux * (odt_skims['DRV_HVY_WLK_WAUX']/100 + dot_skims['WLK_HVY_DRV_WAUX']/100),,,,,,,,,,,,,,,,,1, -DRIVE_HVY - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_HVY_WLK_FAR']+dot_skims['WLK_HVY_DRV_FAR']) + ((odt_skims['DRV_HVY_WLK_FAR']/100+dot_skims['WLK_HVY_DRV_FAR']/100) *costPerMile)),,,,,,,,,,,,,,,,,1, +DRIVE_HVY - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_HVY_WLK_FAR']+dot_skims['WLK_HVY_DRV_FAR']) + ((odt_skims['DRV_HVY_WLK_DDIST']/100+dot_skims['WLK_HVY_DRV_DDIST']/100) *costPerMile)),,,,,,,,,,,,,,,,,1, DRIVE_HVY - Ratio of drive access distance to OD distance,@c_dacc_ratio * (odt_skims['DRV_HVY_WLK_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,,1, DRIVE_HVY - Destination zone densityIndex,@c_density_index * df.dest_density_index,,,,,,,,,,,,,,,,,1, DRIVE_HVY - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,,,,1, @@ -246,54 +246,54 @@ DRIVE_COM - Drive time,@c_dtim * (odt_skims['DRV_COM_WLK_DTIM']/100 + dot_skims[ DRIVE_COM - Walk access time (at attraction end),@c_wacc * df.destination_walk_time,,,,,,,,,,,,,,,,,,1 DRIVE_COM - Walk egress time (at attraction end),@c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,,,1 DRIVE_COM - Walk other time,@c_waux * (odt_skims['DRV_COM_WLK_WAUX']/100 + dot_skims['WLK_COM_DRV_WAUX']/100),,,,,,,,,,,,,,,,,,1 -DRIVE_COM - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_COM_WLK_FAR']+dot_skims['WLK_COM_DRV_FAR']) + ((odt_skims['DRV_COM_WLK_FAR']/100+dot_skims['WLK_COM_DRV_FAR']/100) *costPerMile)),,,,,,,,,,,,,,,,,,1 +DRIVE_COM - Fare and operating cost,@df.c_cost * ((odt_skims['DRV_COM_WLK_FAR']+dot_skims['WLK_COM_DRV_FAR']) + ((odt_skims['DRV_COM_WLK_DDIST']/100+dot_skims['WLK_COM_DRV_DDIST']/100) *costPerMile)),,,,,,,,,,,,,,,,,,1 DRIVE_COM - Ratio of drive access distance to OD distance,@c_dacc_ratio * ((odt_skims['DRV_COM_WLK_DDIST']/100 + dot_skims['WLK_COM_DRV_DDIST']/100)/ (od_skims['DIST']*2)),,,,,,,,,,,,,,,,,,1 DRIVE_COM - Destination zone densityIndex,@c_density_index * df.dest_density_index,,,,,,,,,,,,,,,,,,1 DRIVE_COM - Topology,@c_topology_trn * df.dest_topology,,,,,,,,,,,,,,,,,,1 DRIVE_COM - Person is less than 10 years old,@c_age010_trn * (df.age < 10),,,,,,,,,,,,,,,,,,1 #indiv tour ASCs,,,,,,,,,,,,,,,,,,, Walk ASC - Zero auto,@walk_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,1,,,,,,,,,,, -Walk ASC - Auto deficient,@walk_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,1,,,,,,,,,,, +Walk ASC - Auto deficient,@walk_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,1,,,,,,,,,,, Walk ASC - Auto deficient,@walk_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,1,,,,,,,,,,, Bike ASC - Zero auto,@bike_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,1,,,,,,,,,, -Bike ASC - Auto deficient,@bike_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,1,,,,,,,,,, +Bike ASC - Auto deficient,@bike_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,1,,,,,,,,,, Bike ASC - Auto deficient,@bike_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,1,,,,,,,,,, Shared ride 2 ASC - Zero auto,@sr2_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,1,1,,,,,,,,,,,,,, -Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,1,1,,,,,,,,,,,,,, +Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,1,1,,,,,,,,,,,,,, Shared ride 2 ASC - Auto deficient,@sr2_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,1,1,,,,,,,,,,,,,, Shared ride 3+ - Zero auto,@sr3p_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,1,1,,,,,,,,,,,, -Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,1,1,,,,,,,,,,,, +Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,1,1,,,,,,,,,,,, Shared ride 3+ - Auto deficient,@sr3p_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,1,1,,,,,,,,,,,, Walk to Transit - Zero auto,@walk_transit_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,,1,1,1,1,1,,,,, -Walk to Transit - Auto deficient,@walk_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, +Walk to Transit - Auto deficient,@walk_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,1,1,1,1,1,,,,, Walk to Transit - Auto deficient,@walk_transit_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, Drive to Transit - Zero auto,@drive_transit_ASC_no_auto * (df.is_indiv & (df.auto_ownership == 0)),,,,,,,,,,,,,,1,1,1,1,1 -Drive to Transit - Auto deficient,@drive_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 +Drive to Transit - Auto deficient,@drive_transit_ASC_auto_decicient * (df.is_indiv & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,,,,,,1,1,1,1,1 Drive to Transit - Auto deficient,@drive_transit_ASC_auto_sufficient * (df.is_indiv & (df.auto_ownership >= df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 #joint tour ASCs,,,,,,,,,,,,,,,,,,, Joint - Walk ASC - Zero auto,@joint_walk_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,1,,,,,,,,,,, -Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,1,,,,,,,,,,, +Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,1,,,,,,,,,,, Joint - Walk ASC - Auto deficient,@joint_walk_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,1,,,,,,,,,,, Joint - Bike ASC - Zero auto,@joint_bike_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,1,,,,,,,,,, -Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,1,,,,,,,,,, +Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,1,,,,,,,,,, Joint - Bike ASC - Auto deficient,@joint_bike_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,1,,,,,,,,,, Joint - Shared ride 2 ASC - Zero auto,@joint_sr2_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,1,1,,,,,,,,,,,,,, -Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,1,1,,,,,,,,,,,,,, +Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,1,1,,,,,,,,,,,,,, Joint - Shared ride 2 ASC - Auto deficient,@joint_sr2_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,1,1,,,,,,,,,,,,,, Joint - Shared ride 3+ - Zero auto,@joint_sr3p_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,1,1,,,,,,,,,,,, -Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,1,1,,,,,,,,,,,, +Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,1,1,,,,,,,,,,,, Joint - Shared ride 3+ - Auto deficient,@joint_sr3p_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,1,1,,,,,,,,,,,, Joint - Walk to Transit - Zero auto,@joint_walk_transit_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,,1,1,1,1,1,,,,, -Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, +Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,1,1,1,1,1,,,,, Joint - Walk to Transit - Auto deficient,@joint_walk_transit_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,,1,1,1,1,1,,,,, Joint - Drive to Transit - Zero auto,@joint_drive_transit_ASC_no_auto * (df.is_joint & (df.auto_ownership == 0)),,,,,,,,,,,,,,1,1,1,1,1 -Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 +Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_decicient * (df.is_joint & (df.auto_ownership < df.num_workers) & (df.auto_ownership > 0)),,,,,,,,,,,,,,1,1,1,1,1 Joint - Drive to Transit - Auto deficient,@joint_drive_transit_ASC_auto_sufficient * (df.is_joint & (df.auto_ownership >= df.num_workers)),,,,,,,,,,,,,,1,1,1,1,1 Local bus ASC,@local_bus_ASC,,,,,,,,,1,,,,,1,,,, -Walk to Light Rail ASC,@walk_light_rail_ASC * (df.walk_ferry_available == False),,,,,,,,,,,1,,,,,,, -Drive to Light Rail ASC,@drive_light_rail_ASC * (df.drive_ferry_available == False),,,,,,,,,,,,,,,,1,, -Walk to Ferry ASC,@walk_ferry_ASC * df.walk_ferry_available,,,,,,,,,,,1,,,,,,, -Drive to Ferry ASC,@drive_ferry_ASC * df.drive_ferry_available,,,,,,,,,,,,,,,,1,, +Walk to Light Rail ASC,@walk_light_rail_ASC * (df.walk_ferry_available == False),,,,,,,,,,1,,,,,,,, +Drive to Light Rail ASC,@drive_light_rail_ASC * (df.drive_ferry_available == False),,,,,,,,,,,,,,,1,,, +Walk to Ferry ASC,@walk_ferry_ASC * df.walk_ferry_available,,,,,,,,,,1,,,,,,,, +Drive to Ferry ASC,@drive_ferry_ASC * df.drive_ferry_available,,,,,,,,,,,,,,,1,,, Express Bus ASC,@express_bus_ASC,,,,,,,,,,,1,,,,,1,, Heavy Rail ASC,@heavy_rail_ASC,,,,,,,,,,,,1,,,,,1, Commuter Rail,@commuter_rail_ASC,,,,,,,,,,,,,1,,,,,1 @@ -303,3 +303,4 @@ Drive to Transit - distance penalty,@(c_drvtrn_distpen_0*(1-od_skims['DIST']/c_d # FIXME - skims aren't symmetrical, so we have to make sure they can get back,,,,,,,,,,,,,,,,,, Walk not available for long distances,@od_skims.max('DISTWALK') > 3,,,,,,,-999,,,,,,,,,,, Bike not available for long distances,@od_skims.max('DISTBIKE') > 8,,,,,,,,-999,,,,,,,,,, +Drive alone not available for escort tours,is_escort,-999,-999,,,,,,,,,,,,,,,, diff --git a/example/configs/tour_mode_choice_annotate_choosers_preprocessor.csv b/example/configs/tour_mode_choice_annotate_choosers_preprocessor.csv index d0e8f839dc..0c8a1d9f5d 100644 --- a/example/configs/tour_mode_choice_annotate_choosers_preprocessor.csv +++ b/example/configs/tour_mode_choice_annotate_choosers_preprocessor.csv @@ -10,42 +10,51 @@ local,_DF_IS_TOUR,'tour_type' in df.columns ,work_tour_is_bike,_parent_tour_mode=='BIKE' ,work_tour_is_SOV,"_parent_tour_mode.isin(['DRIVEALONEFREE','DRIVEALONEPAY'])" #,, +,is_mandatory,(df.tour_category=='mandatory') if 'tour_category' in df.columns else False ,is_joint,(df.tour_category=='joint') if 'tour_category' in df.columns else False ,is_indiv,~is_joint ,is_atwork_subtour,(df.tour_category=='atwork') if 'tour_category' in df.columns else False +,is_escort,(df.tour_type == 'escort') if _DF_IS_TOUR else False #,, ,c_cost,(0.60 * c_ivt) / df.value_of_time #,, ,dest_topology,"reindex(land_use.TOPOLOGY, df[dest_col_name])" ,terminal_time,"reindex(land_use.TERMINAL, df[dest_col_name])" ,dest_density_index,"reindex(land_use.density_index, df[dest_col_name])" -FIXME,origin_walk_time,0 -FIXME,destination_walk_time,0 -#,, -,_free_parking_available,"(df.tour_type == 'work') & df.free_parking_at_work if _DF_IS_TOUR else False" +# FIXME no transit subzones so all zones short walk to transit,, +,_walk_transit_origin,True +,_walk_transit_destination,True +,walk_transit_available,_walk_transit_origin & _walk_transit_destination +,drive_transit_available,_walk_transit_destination & (df.auto_ownership > 0) +,origin_walk_time,shortWalk*60/walkSpeed +,destination_walk_time,shortWalk*60/walkSpeed +#,, +,_free_parking_available,(df.tour_type == 'work') & df.free_parking_at_work if _DF_IS_TOUR else False ,_dest_hourly_peak_parking_cost,"reindex(land_use.PRKCST, df[dest_col_name])" -,_hourly_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_peak_parking_cost)" -,daily_parking_cost,_hourly_parking_cost * df.duration -#,, -,drive_commuter_available,(odt_skims['DRV_COM_WLK_TOTIVT']>0) & (dot_skims['WLK_COM_DRV_TOTIVT']>0) & (odt_skims['DRV_COM_WLK_KEYIVT']>0) & (dot_skims['WLK_COM_DRV_KEYIVT']>0) -,drive_express_available,(odt_skims['DRV_EXP_WLK_TOTIVT']>0) & (dot_skims['WLK_EXP_DRV_TOTIVT']>0) & (odt_skims['DRV_EXP_WLK_KEYIVT']>0) & (dot_skims['WLK_EXP_DRV_KEYIVT']>0) -,drive_heavyrail_available,(odt_skims['DRV_HVY_WLK_TOTIVT']>0) & (dot_skims['WLK_HVY_DRV_TOTIVT']>0) & (odt_skims['DRV_HVY_WLK_KEYIVT']>0) & (dot_skims['WLK_HVY_DRV_KEYIVT']>0) -,drive_local_available,(odt_skims['DRV_LOC_WLK_TOTIVT']>0) & (dot_skims['WLK_LOC_DRV_TOTIVT']>0) -,drive_lrf_available,(odt_skims['DRV_LRF_WLK_TOTIVT']>0) & (dot_skims['WLK_LRF_DRV_TOTIVT']>0) & (odt_skims['DRV_LRF_WLK_KEYIVT']>0) & (dot_skims['WLK_LRF_DRV_KEYIVT']>0) +,_dest_hourly_offpeak_parking_cost,"reindex(land_use.OPRKCST, df[dest_col_name])" +,_hourly_peak_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_peak_parking_cost)" +,_hourly_offpeak_parking_cost,"np.where(_free_parking_available, 0, _dest_hourly_offpeak_parking_cost)" +,daily_parking_cost,"np.where(is_mandatory, _hourly_peak_parking_cost * df.duration, _hourly_offpeak_parking_cost * df.duration)" +#,, +,distance,od_skims['DIST'] +,sov_available,(odt_skims['SOV_TIME']>0) & (dot_skims['SOV_TIME']>0) +,sovtoll_available,(odt_skims['SOVTOLL_VTOLL']>0) | (dot_skims['SOVTOLL_VTOLL']>0) ,hov2_available,(odt_skims['HOV2_TIME'] + dot_skims['HOV2_TIME'])>0 ,hov2toll_available,(odt_skims['HOV2TOLL_VTOLL'] + dot_skims['HOV2TOLL_VTOLL'])>0 ,hov3_available,(odt_skims['HOV3_TIME']>0) & (dot_skims['HOV3_TIME']>0) ,hov3toll_available,(odt_skims['HOV3TOLL_VTOLL'] + dot_skims['HOV3TOLL_VTOLL'])>0 -,sov_available,(odt_skims['SOV_TIME']>0) & (dot_skims['SOV_TIME']>0) -,sovtoll_available,(odt_skims['SOVTOLL_VTOLL']>0) | (dot_skims['SOVTOLL_VTOLL']>0) -,walk_commuter_available,(odt_skims['WLK_COM_WLK_TOTIVT']>0) & (dot_skims['WLK_COM_WLK_TOTIVT']>0) & (odt_skims['WLK_COM_WLK_KEYIVT']>0) & (dot_skims['WLK_COM_WLK_KEYIVT']>0) -,walk_express_available,(odt_skims['WLK_EXP_WLK_TOTIVT']>0) & (dot_skims['WLK_EXP_WLK_TOTIVT']>0) & (odt_skims['WLK_EXP_WLK_KEYIVT']>0) & (dot_skims['WLK_EXP_WLK_KEYIVT']>0) -,walk_heavyrail_available,(odt_skims['WLK_HVY_WLK_TOTIVT']>0) & (dot_skims['WLK_HVY_WLK_TOTIVT']>0) & (odt_skims['WLK_HVY_WLK_KEYIVT']>0) & (dot_skims['WLK_HVY_WLK_KEYIVT']>0) -,walk_local_available,(odt_skims['WLK_LOC_WLK_TOTIVT']>0) & (dot_skims['WLK_LOC_WLK_TOTIVT']>0) -,walk_lrf_available,(odt_skims['WLK_LRF_WLK_TOTIVT']>0) & (dot_skims['WLK_LRF_WLK_TOTIVT']>0) & (odt_skims['WLK_LRF_WLK_KEYIVT']) & (dot_skims['WLK_LRF_WLK_KEYIVT']>0) -,distance,od_skims['DIST'] -,walk_ferry_available,walk_lrf_available & (odt_skims['WLK_LRF_WLK_FERRYIVT']>0) & (dot_skims['WLK_LRF_WLK_FERRYIVT']>0) -,drive_ferry_available,drive_lrf_available & (odt_skims['DRV_LRF_WLK_FERRYIVT']>0) & (dot_skims['WLK_LRF_WLK_FERRYIVT']>0) +,walk_local_available,walk_transit_available & (odt_skims['WLK_LOC_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LOC_WLK_TOTIVT']/100>0) +,walk_commuter_available,walk_transit_available & (odt_skims['WLK_COM_WLK_TOTIVT']/100>0) & (dot_skims['WLK_COM_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_WLK_KEYIVT']/100)>0) +,walk_express_available,walk_transit_available & (odt_skims['WLK_EXP_WLK_TOTIVT']/100>0) & (dot_skims['WLK_EXP_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_WLK_KEYIVT']/100)>0) +,walk_heavyrail_available,walk_transit_available & (odt_skims['WLK_HVY_WLK_TOTIVT']/100>0) & (dot_skims['WLK_HVY_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_WLK_KEYIVT']/100)>0) +,walk_lrf_available,walk_transit_available & (odt_skims['WLK_LRF_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LRF_WLK_TOTIVT']/100>0) & ((odt_skims['WLK_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_WLK_KEYIVT']/100)>0) +,walk_ferry_available,walk_lrf_available & ((odt_skims['WLK_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100)>0) +,drive_local_available,drive_transit_available & (odt_skims['DRV_LOC_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LOC_DRV_TOTIVT']/100>0) +,drive_commuter_available,drive_transit_available & (odt_skims['DRV_COM_WLK_TOTIVT']/100>0) & (dot_skims['WLK_COM_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_COM_WLK_KEYIVT']/100 + dot_skims['WLK_COM_DRV_KEYIVT']/100)>0) +,drive_express_available,drive_transit_available & (odt_skims['DRV_EXP_WLK_TOTIVT']/100>0) & (dot_skims['WLK_EXP_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_EXP_WLK_KEYIVT']/100 + dot_skims['WLK_EXP_DRV_KEYIVT']/100)>0) +,drive_heavyrail_available,drive_transit_available & (odt_skims['DRV_HVY_WLK_TOTIVT']/100>0) & (dot_skims['WLK_HVY_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_HVY_WLK_KEYIVT']/100 + dot_skims['WLK_HVY_DRV_KEYIVT']/100)>0) +,drive_lrf_available,drive_transit_available & (odt_skims['DRV_LRF_WLK_TOTIVT']/100>0) & (dot_skims['WLK_LRF_DRV_TOTIVT']/100>0) & ((odt_skims['DRV_LRF_WLK_KEYIVT']/100 + dot_skims['WLK_LRF_DRV_KEYIVT']/100)>0) +,drive_ferry_available,drive_lrf_available & ((odt_skims['DRV_LRF_WLK_FERRYIVT']/100 + dot_skims['WLK_LRF_WLK_FERRYIVT']/100)>0) #,, destination in central business district,destination_in_cbd,"(reindex(land_use.area_type, df[dest_col_name]) < setting('cbd_threshold')) * 1" #,,FIXME diagnostic diff --git a/example/configs/trip_mode_choice.csv b/example/configs/trip_mode_choice.csv index b3ee0b984a..20462489a7 100644 --- a/example/configs/trip_mode_choice.csv +++ b/example/configs/trip_mode_choice.csv @@ -96,8 +96,8 @@ WALK_LOC - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Light rail/Ferry,,,,,,,,,,,,,,,,,,, WALK_LRF - Unavailable,walk_lrf_available == False,,,,,,,,,,-999,,,,,,,, WALK_LRF - In-vehicle time,@c_ivt * odt_skims['WLK_LRF_WLK_TOTIVT']/100,,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@c_ivt_lrt * odt_skims['WLK_LRF_WLK_KEYIVT']/100,,,,,,,,,,1,,,,,,,, -WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@c_ivt_ferry * odt_skims['WLK_LRF_WLK_FERRYIVT']/100,,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Light Rail (incremental w/ ivt),@(c_ivt_lrt-c_ivt) * odt_skims['WLK_LRF_WLK_KEYIVT']/100,,,,,,,,,,1,,,,,,,, +WALK_LRF - In-vehicle time on Ferry (incremental w/keyivt),@(c_ivt_ferry-c_ivt_lrt) * odt_skims['WLK_LRF_WLK_FERRYIVT']/100,,,,,,,,,,1,,,,,,,, WALK_LRF - Short iwait time,@c_short_i_wait * (odt_skims['WLK_LRF_WLK_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,1,,,,,,,, WALK_LRF - Long iwait time,@c_long_i_wait * (odt_skims['WLK_LRF_WLK_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,1,,,,,,,, WALK_LRF - transfer wait time,@c_xwait * odt_skims['WLK_LRF_WLK_XWAIT']/100,,,,,,,,,,1,,,,,,,, @@ -112,7 +112,7 @@ WALK_LRF - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Express bus,,,,,,,,,,,,,,,,,,, WALK_EXP - Unavailable,walk_express_available == False,,,,,,,,,,,-999,,,,,,, WALK_EXP - In-vehicle time,@c_ivt * odt_skims['WLK_EXP_WLK_TOTIVT']/100,,,,,,,,,,,1,,,,,,, -WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@c_ivt_exp * odt_skims['WLK_EXP_WLK_KEYIVT']/100,,,,,,,,,,,1,,,,,,, +WALK_EXP - In-vehicle time on Express bus (incremental w/ ivt),@(c_ivt_exp-c_ivt) * odt_skims['WLK_EXP_WLK_KEYIVT']/100,,,,,,,,,,,1,,,,,,, WALK_EXP - Short iwait time,@c_short_i_wait * (odt_skims['WLK_EXP_WLK_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,,1,,,,,,, WALK_EXP - Long iwait time,@c_long_i_wait * (odt_skims['WLK_EXP_WLK_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,,1,,,,,,, WALK_EXP - transfer wait time,@c_xwait * odt_skims['WLK_EXP_WLK_XWAIT']/100,,,,,,,,,,,1,,,,,,, @@ -127,7 +127,7 @@ WALK_EXP - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Heavy Rail,,,,,,,,,,,,,,,,,,, WALK_HVY - Unavailable,walk_heavyrail_available == False,,,,,,,,,,,,-999,,,,,, WALK_HVY - In-vehicle time,@c_ivt * odt_skims['WLK_HVY_WLK_TOTIVT']/100,,,,,,,,,,,,1,,,,,, -WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@c_ivt_hvy * odt_skims['WLK_HVY_WLK_KEYIVT']/100,,,,,,,,,,,,1,,,,,, +WALK_HVY - In-vehicle time on heavy rail (incremental w/ ivt),@(c_ivt_hvy-c_ivt) * odt_skims['WLK_HVY_WLK_KEYIVT']/100,,,,,,,,,,,,1,,,,,, WALK_HVY - Short iwait time,@c_short_i_wait * (odt_skims['WLK_HVY_WLK_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,,,1,,,,,, WALK_HVY - Long iwait time,@c_long_i_wait * (odt_skims['WLK_HVY_WLK_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,,,1,,,,,, WALK_HVY - transfer wait time,@c_xwait * odt_skims['WLK_HVY_WLK_XWAIT']/100,,,,,,,,,,,,1,,,,,, @@ -142,7 +142,7 @@ WALK_HVY - Person is less than 10 years old,@c_age010_trn * (df.age <= 10),,,,,, #Walk to Commuter rail,,,,,,,,,,,,,,,,,,, WALK_COM - Unavailable,walk_commuter_available == False,,,,,,,,,,,,,-999,,,,, WALK_COM - In-vehicle time,@c_ivt * odt_skims['WLK_COM_WLK_TOTIVT']/100,,,,,,,,,,,,,1,,,,, -WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@c_ivt_com * odt_skims['WLK_COM_WLK_KEYIVT']/100,,,,,,,,,,,,,1,,,,, +WALK_COM - In-vehicle time on commuter rail (incremental w/ ivt),@(c_ivt_com-c_ivt) * odt_skims['WLK_COM_WLK_KEYIVT']/100,,,,,,,,,,,,,1,,,,, WALK_COM - Short iwait time,@c_short_i_wait * (odt_skims['WLK_COM_WLK_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,,,,1,,,,, WALK_COM - Long iwait time,@c_long_i_wait * (odt_skims['WLK_COM_WLK_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,,,,1,,,,, WALK_COM - transfer wait time,@c_xwait * odt_skims['WLK_COM_WLK_XWAIT']/100,,,,,,,,,,,,,1,,,,, @@ -199,7 +199,7 @@ DRIVE_LRF outbound - number of transfers,@df.outbound * c_xfers_drv * (odt_skims DRIVE_LRF outbound - Drive time,@df.outbound * c_dtim * odt_skims['DRV_LRF_WLK_DTIM']/100,,,,,,,,,,,,,,,1,,, DRIVE_LRF outbound - Walk egress time,@df.outbound * c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,1,,, DRIVE_LRF outbound - Walk other time,@df.outbound * c_waux * odt_skims['DRV_LRF_WLK_WAUX']/100,,,,,,,,,,,,,,,1,,, -DRIVE_LRF outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_LRF_WLK_FAR'] + costPerMile * odt_skims['DRV_LRF_WLK_FAR']/100),,,,,,,,,,,,,,,1,,, +DRIVE_LRF outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_LRF_WLK_FAR'] + costPerMile * odt_skims['DRV_LRF_WLK_DDIST']/100),,,,,,,,,,,,,,,1,,, DRIVE_LRF outbound - Ratio of drive access distance to OD distance,@df.outbound * c_dacc_ratio * (odt_skims['DRV_LRF_WLK_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,1,,, DRIVE_LRF inbound - Unavailable,inbound & ~drive_lrf_available_inbound,,,,,,,,,,,,,,,-999,,, DRIVE_LRF inbound - In-vehicle time,@df.inbound * c_ivt * odt_skims['WLK_LRF_DRV_TOTIVT']/100,,,,,,,,,,,,,,,1,,, @@ -212,7 +212,7 @@ DRIVE_LRF inbound - number of transfers,@df.inbound * c_xfers_drv * (odt_skims[' DRIVE_LRF inbound - Drive time,@df.inbound * c_dtim * odt_skims['WLK_LRF_DRV_DTIM']/100,,,,,,,,,,,,,,,1,,, DRIVE_LRF inbound - Walk access time,@df.inbound * c_wacc * df.origin_walk_time,,,,,,,,,,,,,,,1,,, DRIVE_LRF inbound - Walk other time,@df.inbound * c_waux * odt_skims['WLK_LRF_DRV_WAUX']/100,,,,,,,,,,,,,,,1,,, -DRIVE_LRF inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_LRF_DRV_FAR'] + costPerMile * odt_skims['WLK_LRF_DRV_FAR']/100),,,,,,,,,,,,,,,1,,, +DRIVE_LRF inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_LRF_DRV_FAR'] + costPerMile * odt_skims['WLK_LRF_DRV_DDIST']/100),,,,,,,,,,,,,,,1,,, DRIVE_LRF inbound - Ratio of drive access distance to OD distance,@df.inbound * c_dacc_ratio * (odt_skims['WLK_LRF_DRV_DDIST']/100)/ od_skims['DIST'],,,,,,,,,,,,,,,1,,, #Drive to Express bus,,,,,,,,,,,,,,,,,,, DRIVE_EXP - Unavailable for zero auto households,auto_ownership == 0,,,,,,,,,,,,,,,,-999,, @@ -230,7 +230,7 @@ DRIVE_EXP outbound - number of transfers,@df.outbound * c_xfers_drv * (odt_skims DRIVE_EXP outbound - Drive time,@df.outbound * c_dtim * odt_skims['DRV_EXP_WLK_DTIM']/100,,,,,,,,,,,,,,,,1,, DRIVE_EXP outbound - Walk egress ime,@df.outbound * c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,1,, DRIVE_EXP outbound - Walk other time,@df.outbound * c_waux * odt_skims['DRV_EXP_WLK_WAUX']/100,,,,,,,,,,,,,,,,1,, -DRIVE_EXP outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_EXP_WLK_FAR'] + costPerMile * odt_skims['DRV_EXP_WLK_FAR']/100),,,,,,,,,,,,,,,,1,, +DRIVE_EXP outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_EXP_WLK_FAR'] + costPerMile * odt_skims['DRV_EXP_WLK_DDIST']/100),,,,,,,,,,,,,,,,1,, DRIVE_EXP outbound - Ratio of drive access distance to OD distance,@df.outbound * c_dacc_ratio * (odt_skims['DRV_EXP_WLK_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,1,, DRIVE_EXP inbound - Unavailable,inbound & ~drive_express_available_inbound,,,,,,,,,,,,,,,,-999,, DRIVE_EXP inbound - In-vehicle time,@df.inbound * c_ivt * odt_skims['WLK_EXP_DRV_TOTIVT']/100,,,,,,,,,,,,,,,,1,, @@ -242,7 +242,7 @@ DRIVE_EXP inbound - number of transfers,@df.inbound * c_xfers_drv * (odt_skims[' DRIVE_EXP inbound - Drive time,@df.inbound * c_dtim * odt_skims['WLK_EXP_DRV_DTIM']/100,,,,,,,,,,,,,,,,1,, DRIVE_EXP inbound - Walk access time,@df.inbound * c_wacc * df.origin_walk_time,,,,,,,,,,,,,,,,1,, DRIVE_EXP inbound - Walk other time,@df.inbound * c_waux * odt_skims['WLK_EXP_DRV_WAUX']/100,,,,,,,,,,,,,,,,1,, -DRIVE_EXP inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_EXP_DRV_FAR'] + costPerMile * odt_skims['WLK_EXP_DRV_FAR']/100),,,,,,,,,,,,,,,,1,, +DRIVE_EXP inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_EXP_DRV_FAR'] + costPerMile * odt_skims['WLK_EXP_DRV_DDIST']/100),,,,,,,,,,,,,,,,1,, DRIVE_EXP inbound - Ratio of drive access distance to OD distance,@df.inbound * c_dacc_ratio * (odt_skims['WLK_EXP_DRV_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,1,, #Drive to Heavy Rail,,,,,,,,,,,,,,,,,,, DRIVE_HVY - Unavailable for zero auto households,auto_ownership == 0,,,,,,,,,,,,,,,,,-999, @@ -252,7 +252,7 @@ DRIVE_HVY - Topology,@c_topology_trn * df.trip_topology,,,,,,,,,,,,,,,,,1, DRIVE_HVY - Person is less than 10 years old,@c_age010_trn * (df.age < 10),,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Unavailable,outbound & ~drive_heavyrail_available_outbound,,,,,,,,,,,,,,,,,-999, DRIVE_HVY outbound - In-vehicle time,@df.outbound * c_ivt * odt_skims['DRV_HVY_WLK_TOTIVT']/100,,,,,,,,,,,,,,,,,1, -DRIVE_HVY outbound - In-vehicle time on heavy rail (incremental w/ ivt),@df.outbound * (c_ivt_exp-c_ivt) * odt_skims['DRV_HVY_WLK_KEYIVT']/100,,,,,,,,,,,,,,,,,1, +DRIVE_HVY outbound - In-vehicle time on heavy rail (incremental w/ ivt),@df.outbound * (c_ivt_hvy-c_ivt) * odt_skims['DRV_HVY_WLK_KEYIVT']/100,,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Short iwait time,@df.outbound * c_short_i_wait * (odt_skims['DRV_HVY_WLK_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Long iwait time,@df.outbound * c_long_i_wait * (odt_skims['DRV_HVY_WLK_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - transfer wait time,@df.outbound * c_xwait * odt_skims['DRV_HVY_WLK_XWAIT']/100,,,,,,,,,,,,,,,,,1, @@ -260,11 +260,11 @@ DRIVE_HVY outbound - number of transfers,@df.outbound * c_xfers_drv * (odt_skims DRIVE_HVY outbound - Drive time,@df.outbound * c_dtim * odt_skims['DRV_HVY_WLK_DTIM']/100,,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Walk egress time,@df.outbound * c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Walk other time,@df.outbound * c_waux * odt_skims['DRV_HVY_WLK_WAUX']/100,,,,,,,,,,,,,,,,,1, -DRIVE_HVY outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_HVY_WLK_FAR'] + costPerMile * odt_skims['DRV_HVY_WLK_FAR']/100),,,,,,,,,,,,,,,,,1, +DRIVE_HVY outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_HVY_WLK_FAR'] + costPerMile * odt_skims['DRV_HVY_WLK_DDIST']/100),,,,,,,,,,,,,,,,,1, DRIVE_HVY outbound - Ratio of drive access distance to OD distance,@df.outbound * c_dacc_ratio * (odt_skims['DRV_HVY_WLK_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Unavailable,inbound & ~drive_heavyrail_available_inbound,,,,,,,,,,,,,,,,,-999, DRIVE_HVY inbound - In-vehicle time,@df.inbound * c_ivt * odt_skims['WLK_HVY_DRV_TOTIVT']/100,,,,,,,,,,,,,,,,,1, -DRIVE_HVY inbound - In-vehicle time on heavy rail (incremental w/ ivt),@df.inbound * (c_ivt_exp-c_ivt) * odt_skims['WLK_HVY_DRV_KEYIVT']/100,,,,,,,,,,,,,,,,,1, +DRIVE_HVY inbound - In-vehicle time on heavy rail (incremental w/ ivt),@df.inbound * (c_ivt_hvy-c_ivt) * odt_skims['WLK_HVY_DRV_KEYIVT']/100,,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Short iwait time,@df.inbound * c_short_i_wait * (odt_skims['WLK_HVY_DRV_IWAIT']/100).clip(upper=waitThresh),,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Long iwait time,@df.inbound * c_long_i_wait * (odt_skims['WLK_HVY_DRV_IWAIT']/100-waitThresh).clip(0),,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - transfer wait time,@df.inbound * c_xwait * odt_skims['WLK_HVY_DRV_XWAIT']/100,,,,,,,,,,,,,,,,,1, @@ -272,7 +272,7 @@ DRIVE_HVY inbound - number of transfers,@df.inbound * c_xfers_drv * (odt_skims[' DRIVE_HVY inbound - Drive time,@df.outbound * c_dtim * odt_skims['DRV_HVY_WLK_DTIM']/100,,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Walk access time,@df.inbound * c_wacc * df.origin_walk_time,,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Walk other time,@c_waux * odt_skims['WLK_HVY_DRV_WAUX']/100,,,,,,,,,,,,,,,,,1, -DRIVE_HVY inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_HVY_DRV_FAR'] + costPerMile * odt_skims['WLK_HVY_DRV_FAR']/100),,,,,,,,,,,,,,,,,1, +DRIVE_HVY inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_HVY_DRV_FAR'] + costPerMile * odt_skims['WLK_HVY_DRV_DDIST']/100),,,,,,,,,,,,,,,,,1, DRIVE_HVY inbound - Ratio of drive access distance to OD distance,@df.inbound * c_dacc_ratio * (odt_skims['WLK_HVY_DRV_DDIST']/100)/ od_skims['DIST'],,,,,,,,,,,,,,,,,1, #Drive to Commuter Rail,,,,,,,,,,,,,,,,,,, DRIVE_COM - Unavailable for zero auto households,auto_ownership == 0,,,,,,,,,,,,,,,,,,-999 @@ -290,7 +290,7 @@ DRIVE_COM outbound - number of transfers,@df.outbound * c_xfers_drv * (odt_skims DRIVE_COM outbound - Drive time,@df.outbound * c_dtim * odt_skims['DRV_COM_WLK_DTIM']/100,,,,,,,,,,,,,,,,,,1 DRIVE_COM outbound - Walk egress time,@df.outbound * c_wegr * df.destination_walk_time,,,,,,,,,,,,,,,,,,1 DRIVE_COM outbound - Walk other time,@df.outbound * c_waux * odt_skims['DRV_COM_WLK_WAUX']/100,,,,,,,,,,,,,,,,,,1 -DRIVE_COM outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_COM_WLK_FAR'] + costPerMile * odt_skims['DRV_COM_WLK_FAR']/100),,,,,,,,,,,,,,,,,,1 +DRIVE_COM outbound - Fare and operating cost,@df.outbound * df.c_cost * (odt_skims['DRV_COM_WLK_FAR'] + costPerMile * odt_skims['DRV_COM_WLK_DDIST']/100),,,,,,,,,,,,,,,,,,1 DRIVE_COM outbound - Ratio of drive access distance to OD distance,@df.outbound * c_dacc_ratio * (odt_skims['DRV_COM_WLK_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,,,1 DRIVE_COM inbound - Unavailable,inbound & ~drive_commuter_available_inbound,,,,,,,,,,,,,,,,,,-999 DRIVE_COM inbound - In-vehicle time,@df.inbound * c_ivt * odt_skims['WLK_COM_DRV_TOTIVT']/100,,,,,,,,,,,,,,,,,,1 @@ -302,7 +302,7 @@ DRIVE_COM inbound - number of transfers,@df.inbound * c_xfers_drv * (odt_skims[' DRIVE_COM inbound - Drive time,@df.inbound * c_dtim * odt_skims['WLK_COM_DRV_DTIM']/100,,,,,,,,,,,,,,,,,,1 DRIVE_COM inbound - Walk access time,@df.inbound * c_wacc * df.origin_walk_time,,,,,,,,,,,,,,,,,,1 DRIVE_COM inbound - Walk other time,@df.inbound * c_waux * odt_skims['WLK_COM_DRV_WAUX']/100,,,,,,,,,,,,,,,,,,1 -DRIVE_COM inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_COM_DRV_FAR'] + costPerMile * odt_skims['WLK_COM_DRV_FAR']/100),,,,,,,,,,,,,,,,,,1 +DRIVE_COM inbound - Fare and operating cost,@df.inbound * df.c_cost * (odt_skims['WLK_COM_DRV_FAR'] + costPerMile * odt_skims['WLK_COM_DRV_DDIST']/100),,,,,,,,,,,,,,,,,,1 DRIVE_COM inbound - Ratio of drive access distance to OD distance,@df.inbound * c_dacc_ratio * (odt_skims['WLK_COM_DRV_DDIST']/100) / od_skims['DIST'],,,,,,,,,,,,,,,,,,1 #,,,,,,,,,,,,,,,,,,, Auto tour mode availability,tour_mode_is_auto,,,,,,,,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999 diff --git a/example/configs/trip_mode_choice.yaml b/example/configs/trip_mode_choice.yaml index b92f9834b6..437fb206e8 100644 --- a/example/configs/trip_mode_choice.yaml +++ b/example/configs/trip_mode_choice.yaml @@ -58,7 +58,7 @@ CONSTANTS: costShareSr2: 1.75 costShareSr3: 2.50 waitThresh: 10.00 - walkThresh: 1.50 + walkThresh: 1.00 shortWalk: 0.333 longWalk: 0.667 walkSpeed: 3.00 diff --git a/example/configs/trip_mode_choice_annotate_trips_preprocessor.csv b/example/configs/trip_mode_choice_annotate_trips_preprocessor.csv index aaf54a1d83..9dd796a232 100644 --- a/example/configs/trip_mode_choice_annotate_trips_preprocessor.csv +++ b/example/configs/trip_mode_choice_annotate_trips_preprocessor.csv @@ -25,7 +25,7 @@ origin terminal time not counted at home,_origin_terminal_time,"np.where(df.outb dest terminal time not counted at home,_dest_terminal_time,"np.where(inbound & last_trip, 0, reindex(land_use.TERMINAL, df[DESTINATION]))" ,total_terminal_time,_origin_terminal_time + _dest_terminal_time #,, -,free_parking_available,"(df.tour_type == 'work') & df.free_parking_at_work" +,free_parking_available,(df.tour_type == 'work') & df.free_parking_at_work ,dest_hourly_peak_parking_cost,"reindex(land_use.PRKCST, df[DESTINATION])" ,origin_hourly_peak_parking_cost,"reindex(land_use.PRKCST, df[ORIGIN])" ,origin_duration,"np.where(first_trip, np.where(inbound,df.duration * ~free_parking_available,0), 1)" @@ -36,17 +36,13 @@ dest terminal time not counted at home,_dest_terminal_time,"np.where(inbound & l ,trip_topology,"np.where(df.outbound, reindex(land_use.TOPOLOGY, df[DESTINATION]), reindex(land_use.TOPOLOGY, df[ORIGIN]))" ,density_index,"np.where(df.outbound, reindex(land_use.density_index, df[DESTINATION]), reindex(land_use.density_index, df[ORIGIN]))" ,origin_density_index,"np.where(df.outbound, reindex(land_use.density_index, df[ORIGIN]), reindex(land_use.density_index, df[DESTINATION]))" -#,, -FIXME,_walk_transit_origin,True -FIXME,_walk_transit_destination,True +# FIXME no transit subzones so all zones short walk to transit,, +,_walk_transit_origin,True +,_walk_transit_destination,True ,walk_transit_available,_walk_transit_origin & _walk_transit_destination -#FIXME should you be able to drive to transit if you drove to transit on a previous trip?,, ,drive_transit_available,"np.where(df.outbound, _walk_transit_destination, _walk_transit_origin) & (df.auto_ownership > 0)" -FIXME,_short_walk_origin,True -FIXME,_short_walk_destination,True -#walk_times were off by 2 in UEC because cut and pasted from tour mode choice,, -,origin_walk_time,"np.where(_short_walk_origin,0.5*shortWalk*60/walkSpeed, (shortWalk + 0.5*(longWalk-shortWalk))*60/walkSpeed)" -,destination_walk_time,"np.where(_short_walk_destination,0.5*shortWalk*60/walkSpeed, (shortWalk + 0.5*(longWalk-shortWalk))*60/walkSpeed)" +,origin_walk_time,shortWalk*60/walkSpeed +,destination_walk_time,shortWalk*60/walkSpeed #,, ,sov_available,odt_skims['SOV_TIME']>0 ,hov2_available,odt_skims['HOV2_TIME']>0 @@ -54,24 +50,24 @@ FIXME,_short_walk_destination,True ,sovtoll_available,odt_skims['SOVTOLL_VTOLL']>0 ,hov2toll_available,odt_skims['HOV2TOLL_VTOLL']>0 ,hov3toll_available,odt_skims['HOV3TOLL_VTOLL']>0 -,walk_local_available,walk_transit_available & (odt_skims['WLK_LOC_WLK_TOTIVT']>0) -,walk_lrf_available,walk_transit_available & (i_tour_mode >= 10) & (odt_skims['WLK_LRF_WLK_KEYIVT']>0) -,walk_express_available,walk_transit_available & (i_tour_mode >= 11) & (odt_skims['WLK_EXP_WLK_KEYIVT']>0) -,walk_heavyrail_available,walk_transit_available & (i_tour_mode >= 12) & (odt_skims['WLK_HVY_WLK_KEYIVT']>0) -,walk_commuter_available,walk_transit_available & (i_tour_mode >= 13) & (odt_skims['WLK_COM_WLK_KEYIVT']>0) -,drive_local_available_outbound,drive_transit_available & (odt_skims['DRV_LOC_WLK_TOTIVT']>0) -,drive_local_available_inbound,drive_transit_available & (odt_skims['WLK_LOC_DRV_TOTIVT']>0) -,drive_lrf_available_outbound,drive_transit_available & (i_tour_mode >= 15) & (odt_skims['DRV_LRF_WLK_KEYIVT']>0) -,drive_lrf_available_inbound,drive_transit_available & (i_tour_mode >= 15) & (odt_skims['WLK_LRF_DRV_KEYIVT']>0) -,drive_express_available_outbound,drive_transit_available & (i_tour_mode >= 16) & (odt_skims['DRV_EXP_WLK_KEYIVT']>0) -,drive_express_available_inbound,drive_transit_available & (i_tour_mode >= 16) & (odt_skims['WLK_EXP_DRV_KEYIVT']>0) -,drive_heavyrail_available_outbound,drive_transit_available & (i_tour_mode >= 17) & (odt_skims['DRV_HVY_WLK_KEYIVT']>0) -,drive_heavyrail_available_inbound,drive_transit_available & (i_tour_mode >= 17) & (odt_skims['WLK_HVY_DRV_KEYIVT']>0) -,drive_commuter_available_outbound,drive_transit_available & (i_tour_mode >= 18) & (odt_skims['DRV_COM_WLK_KEYIVT']>0) -,drive_commuter_available_inbound,drive_transit_available & (i_tour_mode >= 18) & (odt_skims['WLK_COM_DRV_KEYIVT']>0) -,walk_ferry_available,walk_lrf_available & (odt_skims['WLK_LRF_WLK_FERRYIVT']>0) -,_drive_ferry_available_outbound,drive_lrf_available_outbound & (odt_skims['DRV_LRF_WLK_FERRYIVT']>0) -,_drive_ferry_available_inbound,drive_lrf_available_inbound & (odt_skims['WLK_LRF_DRV_FERRYIVT']>0) +,walk_local_available,walk_transit_available & (odt_skims['WLK_LOC_WLK_TOTIVT']/100>0) +,walk_lrf_available,walk_transit_available & (i_tour_mode >= 10) & (odt_skims['WLK_LRF_WLK_KEYIVT']/100>0) +,walk_express_available,walk_transit_available & (i_tour_mode >= 11) & (odt_skims['WLK_EXP_WLK_KEYIVT']/100>0) +,walk_heavyrail_available,walk_transit_available & (i_tour_mode >= 12) & (odt_skims['WLK_HVY_WLK_KEYIVT']/100>0) +,walk_commuter_available,walk_transit_available & (i_tour_mode >= 13) & (odt_skims['WLK_COM_WLK_KEYIVT']/100>0) +,drive_local_available_outbound,drive_transit_available & df.outbound & (odt_skims['DRV_LOC_WLK_TOTIVT']/100>0) +,drive_local_available_inbound,drive_transit_available & ~df.outbound & (odt_skims['WLK_LOC_DRV_TOTIVT']/100>0) +,drive_lrf_available_outbound,drive_transit_available & df.outbound & (i_tour_mode >= 15) & (odt_skims['DRV_LRF_WLK_KEYIVT']/100>0) +,drive_lrf_available_inbound,drive_transit_available & ~df.outbound & (i_tour_mode >= 15) & (odt_skims['WLK_LRF_DRV_KEYIVT']/100>0) +,drive_express_available_outbound,drive_transit_available & df.outbound & (i_tour_mode >= 16) & (odt_skims['DRV_EXP_WLK_KEYIVT']/100>0) +,drive_express_available_inbound,drive_transit_available & ~df.outbound & (i_tour_mode >= 16) & (odt_skims['WLK_EXP_DRV_KEYIVT']/100>0) +,drive_heavyrail_available_outbound,drive_transit_available & df.outbound & (i_tour_mode >= 17) & (odt_skims['DRV_HVY_WLK_KEYIVT']/100>0) +,drive_heavyrail_available_inbound,drive_transit_available & ~df.outbound & (i_tour_mode >= 17) & (odt_skims['WLK_HVY_DRV_KEYIVT']/100>0) +,drive_commuter_available_outbound,drive_transit_available & df.outbound & (i_tour_mode >= 18) & (odt_skims['DRV_COM_WLK_KEYIVT']/100>0) +,drive_commuter_available_inbound,drive_transit_available & ~df.outbound & (i_tour_mode >= 18) & (odt_skims['WLK_COM_DRV_KEYIVT']/100>0) +,walk_ferry_available,walk_lrf_available & (odt_skims['WLK_LRF_WLK_FERRYIVT']/100>0) +,_drive_ferry_available_outbound,drive_lrf_available_outbound & (odt_skims['DRV_LRF_WLK_FERRYIVT']/100>0) +,_drive_ferry_available_inbound,drive_lrf_available_inbound & (odt_skims['WLK_LRF_DRV_FERRYIVT']/100>0) ,drive_ferry_available,"np.where(df.outbound, _drive_ferry_available_outbound, _drive_ferry_available_inbound)" #,od_dist_walk,od_skims['DISTWALK'] #,do_dist_walk,od_skims.reverse('DISTWALK') diff --git a/example_azure/example_mp/settings.yaml b/example_azure/example_mp/settings.yaml index 41ca9ecb6f..dacd741231 100644 --- a/example_azure/example_mp/settings.yaml +++ b/example_azure/example_mp/settings.yaml @@ -10,7 +10,6 @@ strict: False mem_tick: 0 use_shadow_pricing: True - # - full sample - 2875192 households on 64 processor 432 GiB RAM #households_sample_size: 0 #chunk_size: 80000000000 @@ -23,29 +22,34 @@ use_shadow_pricing: True #num_processes: 124 #stagger: 0 -# - 20% sample - 2875192 households on 64 processor 432 GiB RAM -#households_sample_size: 546544 -#chunk_size: 10000000000 -#num_processes: 15 -#stagger: 0 +# - full sample - 2875192 households on Standard_M128s +households_sample_size: 0 +chunk_size: 0 +num_processes: 120 +stagger: 0 + -## - ------------------------- dev config +# - ------------------------- dev config #multiprocess: True #strict: False #mem_tick: 30 -#use_shadow_pricing: True -# +#use_shadow_pricing: False + + ## - small sample #households_sample_size: 5000 #chunk_size: 500000000 #num_processes: 2 #stagger: 5 -# -# - stride sample -#households_sample_size: 0 -#chunk_size: 1000000000 -#num_processes: 1 + + +## - example sample +#households_sample_size: 100 +#chunk_size: 0 +#num_processes: 2 +#stagger: 0 + # - tracing trace_hh_id: @@ -72,18 +76,14 @@ models: - joint_tour_frequency - joint_tour_composition - joint_tour_participation - - _joint_tour_destination_sample - - _joint_tour_destination_logsums - - joint_tour_destination_simulate + - joint_tour_destination - joint_tour_scheduling - non_mandatory_tour_frequency - non_mandatory_tour_destination - non_mandatory_tour_scheduling - tour_mode_choice_simulate - atwork_subtour_frequency - - _atwork_subtour_destination_sample - - _atwork_subtour_destination_logsums - - atwork_subtour_destination_simulate + - atwork_subtour_destination - atwork_subtour_scheduling - atwork_subtour_mode_choice - stop_frequency @@ -121,8 +121,7 @@ output_tables: # - land_use # - households # - persons -# - trips # - tours +# - trips - school_shadow_prices - workplace_shadow_prices - diff --git a/example_azure/windows/step3_run.txt b/example_azure/windows/step3_run.txt index b3f34a5fbd..3be05ff029 100644 --- a/example_azure/windows/step3_run.txt +++ b/example_azure/windows/step3_run.txt @@ -1,30 +1,55 @@ -# 64 processor, 432 GiB RAM, 864 GiB SSD Temp, $4.011/hour +az vm list-sizes -l $AZ_LOCATION --output table + +# prices are pay as you go, list (US West 2) + +# 4 processor, 32 GiB RAM, 64 GiB SSD Temp, $0.436/hour +#AZ_VM_SIZE=Standard_E4s_v3 + +# 8 processor, 64 GiB RAM, 128 GiB SSD Temp, $0.872/hour +#AZ_VM_SIZE=Standard_E8s_v3 + +# 16 processor, 128 GiB RAM, 256 GiB SSD Temp, $1.744/hour +#AZ_VM_SIZE=Standard_E16s_v3 + +# 32 processor, 256 GiB RAM, 512 GiB SSD Temp, $3.488/hour +#AZ_VM_SIZE=Standard_E32s_v3 + +# 64 processor, 432 GiB RAM, 864 GiB SSD Temp, $6.573/hour #AZ_VM_SIZE=Standard_E64s_v3 -# 128 cpu 2TB ram $13.34/hour +# 128 processor, 2TB GiB RAM, $19.226/hour AZ_VM_SIZE=Standard_M128s ############### resize az vm deallocate --resource-group $AZ_RESOURCE_GROUP --name $AZ_VM_NAME + +#AZ_VM_SIZE=Standard_E64s_v3 +AZ_VM_SIZE=Standard_M128s az vm resize --resource-group $AZ_RESOURCE_GROUP --name $AZ_VM_NAME --size $AZ_VM_SIZE az vm start --resource-group $AZ_RESOURCE_GROUP --name $AZ_VM_NAME - az vm stop --resource-group $AZ_RESOURCE_GROUP --name $AZ_VM_NAME ################################################ anaconda prompt -cd example_mp +# show public IP address +az vm list-ip-addresses -n $AZ_VM_NAME --query [0].virtualMachine.network.publicIpAddresses[0].ipAddress -o tsv + + +E: +cd activitysim/example_mp git status -activate asim +#conda activate asim +conda activate asim3 +# this makes things worse on Standard_M128s set OPENBLAS_NUM_THREADS=1 set MKL_NUM_THREADS=1 set NUMEXPR_NUM_THREADS=1 @@ -35,5 +60,3 @@ python simulation.py -d E:\data\full -m python simulation.py -d E:\data\sf_county -m - -# diff --git a/example_mp/configs/benchmarks.txt b/example_mp/configs/benchmarks.txt new file mode 100644 index 0000000000..c02d928587 --- /dev/null +++ b/example_mp/configs/benchmarks.txt @@ -0,0 +1,72 @@ +###################### Standard_E64s_v3 + +Standard_E64s_v3 +chunk_size: 14000000000 +num_processes: 56 + +use_shadow_pricing: True +MAX_ITERATIONS: 10 + +INFO - activitysim.core.mem - high water mark rss: 497.37 timestamp: 23/05/2019 06:23:36 label: mp_households_7.non_mandatory_tour_destination.completed +INFO - activitysim.core.mem - high water mark used: 142.65 timestamp: 23/05/2019 06:23:36 label: mp_households_7.non_mandatory_tour_destination.completed +INFO - activitysim.core.tracing - Time to execute everything : 23180.545 seconds (386.3 minutes) + +6:06 hours (not counting 19.8 minutes to write output tables) + +###################### Standard_E64s_v3 + +Standard_E64s_v3 +chunk_size: 14000000000 +num_processes: 56 + +use_shadow_pricing: False + +INFO - activitysim.core.mem - high water mark rss: 499.41 timestamp: 23/05/2019 14:12:07 label: mp_households_22.non_mandatory_tour_destination.completed +INFO - activitysim.core.mem - high water mark used: 146.01 timestamp: 23/05/2019 14:12:07 label: mp_households_22.non_mandatory_tour_destination.completed +INFO - activitysim.core.tracing - Time to execute everything : 12920.559 seconds (215.3 minutes) + +3:15 hours (not counting 19.8 minutes to write output tables) + +###################### Standard_E64s_v3 + +Standard_E64s_v3 +chunk_size: 14000000000 +num_processes: 56 + +use_shadow_pricing: True +LOAD_SAVED_SHADOW_PRICES: True +MAX_ITERATIONS_SAVED: 1 + +INFO - activitysim.core.mem - high water mark rss: 499.31 timestamp: 23/05/2019 17:37:43 label: mp_households_23.non_mandatory_tour_destination.completed +INFO - activitysim.core.mem - high water mark used: 146.10 timestamp: 23/05/2019 17:37:43 label: mp_households_23.non_mandatory_tour_destination.completed +INFO - activitysim.core.tracing - Time to execute everything : 10298.675 seconds (171.6 minutes) + +2:51 hours (with minimal output tables) + +###################### Standard_M128s + +Standard_M128s + +# - full sample - 2875192 households on Standard_M128s +households_sample_size: 0 +chunk_size: 0 +num_processes: 120 +stagger: 0 + +use_shadow_pricing: True +LOAD_SAVED_SHADOW_PRICES: True +MAX_ITERATIONS_SAVED: 1 + +set OPENBLAS_NUM_THREADS=1 +set MKL_NUM_THREADS=1 +set NUMEXPR_NUM_THREADS=1 +set OMP_NUM_THREADS=1 + +INFO - activitysim.core.mem - high water mark rss: 1041.31 timestamp: 23/05/2019 21:48:07 label: mp_households_89.mandatory_tour_frequency.completed +INFO - activitysim.core.mem - high water mark used: 293.30 timestamp: 23/05/2019 21:48:07 label: mp_households_89.mandatory_tour_frequency.completed +INFO - activitysim.core.tracing - Time to execute everything : 9218.675 seconds (153.6 minutes) +(not counting 19.8 minutes to write output tables) + + +###################### Standard_M128s + diff --git a/scripts/verify_results.py b/scripts/verify_results.py index 09fdd22cb8..63eb3f7bac 100644 --- a/scripts/verify_results.py +++ b/scripts/verify_results.py @@ -13,10 +13,15 @@ ############################################################# pipeline_filename = 'asim/pipeline.h5' +distance_matrix_filename = "asim/skims.omx" +asim_nmtf_alts_filename = "asim/non_mandatory_tour_frequency_alternatives.csv" -distance_matrix_filename = "nonmotskm.omx" -asim_nmtf_alts_filename = "non_mandatory_tour_frequency_alternatives.csv" -tm1_taz_data_filename = "tazData.csv" +process_sp = True # False skip work/sch shadow pricing comparisons, True do them +process_tm1 = True # False only processes asim, True processes tm1 as well + +asim_sp_work_filename = "asim/shadow_price_workplace_modeled_size_10.csv" +asim_sp_school_filename = "asim/shadow_price_school_modeled_size_10.csv" +asim_sp_school_no_sp_filename = "asim/shadow_price_school_modeled_size_1.csv" tm1_access_filename = "tm1/accessibility.csv" tm1_sp_filename = "tm1/ShadowPricing_9.csv" @@ -30,14 +35,11 @@ tm1_trips_filename = "tm1/indivTripData_1.csv" tm1_jtrips_filename = "tm1/jointTripData_1.csv" -asim_sp_work_filename = "asim/trace.shadow_price_workplace_modeled_size_10.csv" -asim_sp_school_filename = "asim/trace.shadow_price_school_modeled_size_10.csv" -asim_sp_school_no_sp_filename = "asim/trace.shadow_price_school_modeled_size_1.csv" - ############################################################# # OUTPUT FILES FOR DEBUGGING ############################################################# +asim_zones_filename = "asim/asim_zones.csv" asim_access_filename = "asim/asim_access.csv" asim_per_filename = "asim/asim_per.csv" asim_hh_filename = "asim/asim_hh.csv" @@ -60,7 +62,7 @@ # DISTANCE SKIM ############################################################# -# read distance matrix and convert to 1D array +# read distance matrix (DIST) distmat = omx.open_file(distance_matrix_filename)["DIST"][:] ############################################################# @@ -68,6 +70,10 @@ ############################################################# # write tables for verification +tazs = pd.read_hdf(pipeline_filename, "land_use/initialize_landuse") +tazs["zone"] = tazs.index +tazs.to_csv(asim_zones_filename, index=False) + access = pd.read_hdf(pipeline_filename, "accessibility/compute_accessibility") access.to_csv(asim_access_filename, index=False) @@ -93,11 +99,12 @@ # accessibilities -tm1_access = pd.read_csv(tm1_access_filename) -asim_access = pd.read_csv(asim_access_filename) +if process_tm1: + tm1_access = pd.read_csv(tm1_access_filename) + tm1_access.to_csv("outputs/tm1_access.csv", na_rep=0) -access = pd.concat([tm1_access, asim_access], axis=1) -access.to_csv("outputs/access.csv", na_rep=0) +asim_access = pd.read_csv(asim_access_filename) +asim_access.to_csv("outputs/asim_access.csv", na_rep=0) ############################################################# # HOUSEHOLD AND PERSON @@ -105,148 +112,124 @@ # work and school location -tm1_markets = ["work_low", "work_med", "work_high", "work_high", "work_very high", "university", - "school_high", "school_grade"] -asim_markets = ["work_low", "work_med", "work_high", "work_high", "work_veryhigh", "university", - "highschool", "gradeschool"] - -tm1 = pd.read_csv(tm1_sp_filename) - -tm1 = tm1.groupby(tm1["zone"]).sum() -tm1["zone"] = tm1.index -tm1 = tm1.loc[tm1["zone"] > 0] - -asim = pd.read_csv(asim_sp_work_filename) -asim_sch = pd.read_csv(asim_sp_school_filename) -asim_sch_no_sp = pd.read_csv(asim_sp_school_no_sp_filename) - -# grade school not shadow priced -asim_sch["gradeschool"] = asim_sch_no_sp["gradeschool"] - -asim = asim.set_index("TAZ", drop=False) -asim_sch = asim_sch.set_index("TAZ", drop=False) - -asim["gradeschool"] = asim_sch["gradeschool"].loc[asim["TAZ"]].tolist() -asim["highschool"] = asim_sch["highschool"].loc[asim["TAZ"]].tolist() -asim["university"] = asim_sch["university"].loc[asim["TAZ"]].tolist() - -ws_size = tm1[["zone"]] -for i in range(len(tm1_markets)): - ws_size[tm1_markets[i] + "_modeledDests"] = tm1[tm1_markets[i] + "_modeledDests"] - ws_size[asim_markets[i] + "_asim"] = asim[asim_markets[i]] - -ws_size.to_csv("outputs/work-school-location.csv", na_rep=0) - -# work county to county flows - -tm1_work = pd.read_csv(tm1_work_filename) -tazs = pd.read_csv(tm1_taz_data_filename) - -counties = ["", "SF", "SM", "SC", "ALA", "CC", "SOL", "NAP", "SON", "MAR"] -tazs["COUNTYNAME"] = pd.Series(counties)[tazs["COUNTY"].tolist()].tolist() - -tazs = tazs.set_index("ZONE", drop=False) - -tm1_work["HomeCounty"] = tazs["COUNTYNAME"].loc[tm1_work["HomeTAZ"]].tolist() -tm1_work["WorkCounty"] = tazs["COUNTYNAME"].loc[tm1_work["WorkLocation"]].tolist() - -tm1_work_counties = tm1_work.groupby(["HomeCounty", "WorkCounty"]).count()["HHID"] -tm1_work_counties = tm1_work_counties.reset_index() -tm1_work_counties = tm1_work_counties.pivot(index="HomeCounty", columns="WorkCounty") - -asim_cdap = pd.read_csv(asim_per_filename) - -asim_cdap["HomeCounty"] = tazs["COUNTYNAME"].loc[asim_cdap["home_taz"]].tolist() -asim_cdap["WorkCounty"] = tazs["COUNTYNAME"].loc[asim_cdap["workplace_taz"]].tolist() - -asim_work_counties = asim_cdap.groupby(["HomeCounty", "WorkCounty"]).count()["household_id"] -asim_work_counties = asim_work_counties.reset_index() -asim_work_counties = asim_work_counties.pivot(index="HomeCounty", columns="WorkCounty") - -tm1_work_counties.to_csv("outputs/tm1_work_counties.csv", na_rep=0) - -asim_work_counties.to_csv("outputs/asim_work_counties.csv", na_rep=0) +if process_sp: + + if process_tm1: + tm1_markets = ["work_low", "work_med", "work_high", "work_high", "work_very high", "university", + "school_high", "school_grade"] + tm1 = pd.read_csv(tm1_sp_filename) + tm1 = tm1.groupby(tm1["zone"]).sum() + tm1["zone"] = tm1.index + tm1 = tm1.loc[tm1["zone"] > 0] + ws_size = tm1[["zone"]] + for i in range(len(tm1_markets)): + ws_size[tm1_markets[i] + "_modeledDests"] = tm1[tm1_markets[i] + "_modeledDests"] + ws_size.to_csv("outputs/tm1_work_school_location.csv", na_rep=0) + + asim_markets = ["work_low", "work_med", "work_high", "work_high", "work_veryhigh", "university", + "highschool", "gradeschool"] + asim = pd.read_csv(asim_sp_work_filename) + asim_sch = pd.read_csv(asim_sp_school_filename) + asim_sch_no_sp = pd.read_csv(asim_sp_school_no_sp_filename) + asim_sch["gradeschool"] = asim_sch_no_sp["gradeschool"] # grade school not shadow priced + asim = asim.set_index("TAZ", drop=False) + asim_sch = asim_sch.set_index("TAZ", drop=False) + + asim["gradeschool"] = asim_sch["gradeschool"].loc[asim["TAZ"]].tolist() + asim["highschool"] = asim_sch["highschool"].loc[asim["TAZ"]].tolist() + asim["university"] = asim_sch["university"].loc[asim["TAZ"]].tolist() + + ws_size = asim[["TAZ"]] + for i in range(len(asim_markets)): + ws_size[asim_markets[i] + "_asim"] = asim[asim_markets[i]] + ws_size.to_csv("outputs/asim_work_school_location.csv", na_rep=0) + + # work county to county flows + tazs = pd.read_csv(asim_zones_filename) + counties = ["", "SF", "SM", "SC", "ALA", "CC", "SOL", "NAP", "SON", "MAR"] + tazs["COUNTYNAME"] = pd.Series(counties)[tazs["county_id"].tolist()].tolist() + tazs = tazs.set_index("zone", drop=False) + + if process_tm1: + tm1_work = pd.read_csv(tm1_work_filename) + tm1_work["HomeCounty"] = tazs["COUNTYNAME"].loc[tm1_work["HomeTAZ"]].tolist() + tm1_work["WorkCounty"] = tazs["COUNTYNAME"].loc[tm1_work["WorkLocation"]].tolist() + tm1_work_counties = tm1_work.groupby(["HomeCounty", "WorkCounty"]).count()["HHID"] + tm1_work_counties = tm1_work_counties.reset_index() + tm1_work_counties = tm1_work_counties.pivot(index="HomeCounty", columns="WorkCounty") + tm1_work_counties.to_csv("outputs/tm1_work_counties.csv", na_rep=0) + + asim_cdap = pd.read_csv(asim_per_filename) + asim_cdap["HomeCounty"] = tazs["COUNTYNAME"].loc[asim_cdap["home_taz"]].tolist() + asim_cdap["WorkCounty"] = tazs["COUNTYNAME"].loc[asim_cdap["workplace_taz"]].tolist() + asim_work_counties = asim_cdap.groupby(["HomeCounty", "WorkCounty"]).count()["household_id"] + asim_work_counties = asim_work_counties.reset_index() + asim_work_counties = asim_work_counties.pivot(index="HomeCounty", columns="WorkCounty") + asim_work_counties.to_csv("outputs/asim_work_counties.csv", na_rep=0) # auto ownership - count of hhs by num autos by taz -tm1_ao = pd.read_csv(tm1_ao_filename) -tm1_hh = pd.read_csv(tm1_hh_filename) - -tm1_ao = tm1_ao.set_index("HHID", drop=False) - -tm1_hh["ao"] = tm1_ao["AO"].loc[tm1_hh["hh_id"]].tolist() - -tm1_autos = tm1_hh.groupby(["taz", "ao"]).count()["hh_id"] -tm1_autos = tm1_autos.reset_index() -tm1_autos = tm1_autos.pivot(index="taz", columns="ao") - -tm1_autos.to_csv("outputs/tm1_autos.csv", na_rep=0) +if process_tm1: + tm1_ao = pd.read_csv(tm1_ao_filename) + tm1_hh = pd.read_csv(tm1_hh_filename) + tm1_ao = tm1_ao.set_index("HHID", drop=False) + tm1_hh["ao"] = tm1_ao["AO"].loc[tm1_hh["hh_id"]].tolist() + tm1_autos = tm1_hh.groupby(["taz", "ao"]).count()["hh_id"] + tm1_autos = tm1_autos.reset_index() + tm1_autos = tm1_autos.pivot(index="taz", columns="ao") + tm1_autos.to_csv("outputs/tm1_autos.csv", na_rep=0) asim_ao = pd.read_csv(asim_hh_filename) - asim_autos = asim_ao.groupby(["TAZ", "auto_ownership"]).count()["SERIALNO"] asim_autos = asim_autos.reset_index() asim_autos = asim_autos.pivot(index="TAZ", columns="auto_ownership") - asim_autos.to_csv("outputs/asim_autos.csv", na_rep=0) # cdap - ptype count and ptype by M,N,H -tm1_cdap = pd.read_csv(tm1_cdap_filename) - -tm1_cdap_sum = tm1_cdap.groupby(["PersonType", "ActivityString"]).count()["HHID"] -tm1_cdap_sum = tm1_cdap_sum.reset_index() -tm1_cdap_sum = tm1_cdap_sum.pivot(index="PersonType", columns="ActivityString") - -tm1_cdap_sum.to_csv("outputs/tm1_cdap.csv", na_rep=0) +if process_tm1: + tm1_cdap = pd.read_csv(tm1_cdap_filename) + tm1_cdap_sum = tm1_cdap.groupby(["PersonType", "ActivityString"]).count()["HHID"] + tm1_cdap_sum = tm1_cdap_sum.reset_index() + tm1_cdap_sum = tm1_cdap_sum.pivot(index="PersonType", columns="ActivityString") + tm1_cdap_sum.to_csv("outputs/tm1_cdap.csv", na_rep=0) asim_cdap = pd.read_csv(asim_per_filename) - asim_cdap_sum = asim_cdap.groupby(["ptype", "cdap_activity"]).count()["household_id"] asim_cdap_sum = asim_cdap_sum.reset_index() asim_cdap_sum = asim_cdap_sum.pivot(index="ptype", columns="cdap_activity") - asim_cdap_sum.to_csv("outputs/asim_cdap.csv", na_rep=0) # free parking by ptype -tm1_per = pd.read_csv(tm1_per_filename) -tm1_per["fp_choice"] = (tm1_per["fp_choice"] == 1) # 1=free, 2==pay - -tm1_work = pd.read_csv(tm1_work_filename) -tm1_work = tm1_work.set_index("PersonID", drop=False) -tm1_per["WorkLocation"] = tm1_work["WorkLocation"].loc[tm1_per["person_id"]].tolist() -tm1_fp = tm1_per[tm1_per["WorkLocation"] > 0] - -tm1_fp = tm1_fp.groupby(["type", "fp_choice"]).count()["hh_id"] -tm1_fp = tm1_fp.reset_index() -tm1_fp = tm1_fp.pivot(index="type", columns="fp_choice") +if process_tm1: + tm1_per = pd.read_csv(tm1_per_filename) + tm1_per["fp_choice"] = (tm1_per["fp_choice"] == 1) # 1=free, 2==pay + tm1_work = pd.read_csv(tm1_work_filename) + tm1_work = tm1_work.set_index("PersonID", drop=False) + tm1_per["WorkLocation"] = tm1_work["WorkLocation"].loc[tm1_per["person_id"]].tolist() + tm1_fp = tm1_per[tm1_per["WorkLocation"] > 0] + tm1_fp = tm1_fp.groupby(["type", "fp_choice"]).count()["hh_id"] + tm1_fp = tm1_fp.reset_index() + tm1_fp = tm1_fp.pivot(index="type", columns="fp_choice") + tm1_fp.to_csv("outputs/tm1_fp.csv", na_rep=0) asim_cdap["ptypename"] = pd.Series(ptypes)[asim_cdap["ptype"].tolist()].tolist() - asim_fp = asim_cdap.groupby(["ptypename", "free_parking_at_work"]).count()["household_id"] asim_fp = asim_fp.reset_index() asim_fp = asim_fp.pivot(index="ptypename", columns="free_parking_at_work") - -fp = pd.concat([tm1_fp, asim_fp], axis=1) - -fp.to_csv("outputs/fp.csv", na_rep=0) +asim_fp.to_csv("outputs/asim_fp.csv", na_rep=0) # value of time -tm1_per = pd.read_csv(tm1_per_filename) - -tm1_per["vot_bin"] = pd.cut(tm1_per["value_of_time"], range(51)) +if process_tm1: + tm1_per = pd.read_csv(tm1_per_filename) + tm1_per["vot_bin"] = pd.cut(tm1_per["value_of_time"], range(51)) + tm1_per.groupby(["vot_bin"]).count()["hh_id"].to_csv("outputs/tm1_vot.csv", na_rep=0) asim_per = pd.read_csv(asim_per_filename) - asim_per["vot_bin"] = pd.cut(asim_per["value_of_time"], range(51)) - -vot = pd.concat( - [tm1_per.groupby(["vot_bin"]).count()["hh_id"], - asim_per.groupby(["vot_bin"]).count()["household_id"]], axis=1) - -vot.to_csv("outputs/vot.csv", na_rep=0) +asim_per.groupby(["vot_bin"]).count()["household_id"].to_csv("outputs/asim_vot.csv", na_rep=0) ############################################################# # TOUR @@ -254,63 +237,53 @@ # indiv mandatory tour freq -tm1_per = pd.read_csv(tm1_per_filename) -tm1_hh = pd.read_csv(tm1_hh_filename) - -tm1_hh = tm1_hh.set_index("hh_id", drop=False) -tm1_per["hhsize"] = tm1_hh["size"].loc[tm1_per["hh_id"]].tolist() - tm1_imf_codes = ["", "0", "work1", "work2", "school1", "school2", "work_and_school"] -# indexing starts at 1 -tm1_per["imf_choice_name"] = pd.Series(tm1_imf_codes)[(tm1_per["imf_choice"]+1).tolist()].tolist() +if process_tm1: + tm1_per = pd.read_csv(tm1_per_filename) + tm1_hh = pd.read_csv(tm1_hh_filename) + tm1_hh = tm1_hh.set_index("hh_id", drop=False) + tm1_per["hhsize"] = tm1_hh["size"].loc[tm1_per["hh_id"]].tolist() + # indexing starts at 1 + tm1_per["imf_choice_name"] = pd.Series(tm1_imf_codes)[(tm1_per["imf_choice"]+1).tolist()].tolist() + tm1_imf = tm1_per.groupby(["type", "imf_choice_name"]).count()["hh_id"] + tm1_imf = tm1_imf.reset_index() + tm1_imf = tm1_imf.pivot(index="type", columns="imf_choice_name") -tm1_imf = tm1_per.groupby(["type", "imf_choice_name"]).count()["hh_id"] -tm1_imf = tm1_imf.reset_index() -tm1_imf = tm1_imf.pivot(index="type", columns="imf_choice_name") - -tm1_imf.to_csv("outputs/tm1_imtf.csv", na_rep=0) + tm1_imf.to_csv("outputs/tm1_imtf.csv", na_rep=0) asim_ao = asim_ao.set_index("household_id", drop=False) - asim_cdap["hhsize"] = asim_ao["hhsize"].loc[asim_cdap["household_id"]].tolist() asim_cdap["ptypename"] = pd.Series(ptypes)[asim_cdap["ptype"].tolist()].tolist() - asim_imf = pd.read_csv(asim_per_filename) - asim_imf["ptypename"] = pd.Series(ptypes)[asim_imf["ptype"].tolist()].tolist() asim_imf["mandatory_tour_frequency"] = pd.Categorical(asim_imf["mandatory_tour_frequency"], categories=tm1_imf_codes) asim_imf["mandatory_tour_frequency"][asim_imf["mandatory_tour_frequency"].isnull()] = "0" - asim_imf = asim_imf.groupby(["ptypename", "mandatory_tour_frequency"]).count()["household_id"] asim_imf = asim_imf.reset_index() asim_imf = asim_imf.pivot(index="ptypename", columns="mandatory_tour_frequency") - asim_imf.to_csv("outputs/asim_imtf.csv", na_rep=0) # indiv mand tour departure and duration -tm1_tours = pd.read_csv(tm1_tour_filename) - -tm1_tours = tm1_tours[tm1_tours["tour_category"] == "MANDATORY"] - -tm1_tours["tour_purpose"][tm1_tours["tour_purpose"].str.contains("work")] = "work" -tm1_tours["tour_purpose"][tm1_tours["tour_purpose"].str.contains("s")] = "school" - -tm1_mtdd = tm1_tours.groupby(["start_hour", "end_hour", "tour_purpose"]).count()["hh_id"] -tm1_mtdd = tm1_mtdd.reset_index() - -tm1_mtdd_sch = tm1_mtdd[tm1_mtdd["tour_purpose"] == "school"][[ - "start_hour", "end_hour", "hh_id"]].pivot(index="start_hour", columns="end_hour") -tm1_mtdd_work = tm1_mtdd[tm1_mtdd["tour_purpose"] == "work"][[ - "start_hour", "end_hour", "hh_id"]].pivot(index="start_hour", columns="end_hour") - +if process_tm1: + tm1_tours = pd.read_csv(tm1_tour_filename) + tm1_tours = tm1_tours[tm1_tours["tour_category"] == "MANDATORY"] + tm1_tours["tour_purpose"][tm1_tours["tour_purpose"].str.contains("work")] = "work" + tm1_tours["tour_purpose"][tm1_tours["tour_purpose"].str.contains("s")] = "school" + tm1_mtdd = tm1_tours.groupby(["start_hour", "end_hour", "tour_purpose"]).count()["hh_id"] + tm1_mtdd = tm1_mtdd.reset_index() + + tm1_mtdd_sch = tm1_mtdd[tm1_mtdd["tour_purpose"] == "school"][[ + "start_hour", "end_hour", "hh_id"]].pivot(index="start_hour", columns="end_hour") + tm1_mtdd_work = tm1_mtdd[tm1_mtdd["tour_purpose"] == "work"][[ + "start_hour", "end_hour", "hh_id"]].pivot(index="start_hour", columns="end_hour") + tm1_mtdd_sch.to_csv("outputs/tm1_mtdd_school.csv", na_rep=0) + tm1_mtdd_work.to_csv("outputs/tm1_mtdd_work.csv", na_rep=0) asim_tours = pd.read_csv(asim_tour_filename) - asim_tours_man = asim_tours[asim_tours["tour_category"] == "mandatory"] - asim_mtdd = asim_tours_man.groupby(["start", "end", "tour_type"]).count()["household_id"] asim_mtdd = asim_mtdd.reset_index() @@ -319,9 +292,6 @@ asim_mtdd_work = asim_mtdd[asim_mtdd["tour_type"] == "work"][[ "start", "end", "household_id"]].pivot(index="start", columns="end") -tm1_mtdd_sch.to_csv("outputs/tm1_mtdd_school.csv", na_rep=0) -tm1_mtdd_work.to_csv("outputs/tm1_mtdd_work.csv", na_rep=0) - asim_mtdd_sch.to_csv("outputs/asim_mtdd_school.csv", na_rep=0) asim_mtdd_work.to_csv("outputs/asim_mtdd_work.csv", na_rep=0) @@ -331,280 +301,231 @@ "2_SS", "2_SM", "2_SE", "2_SV", "2_SD", "2_MM", "2_ME", "2_MV", "2_MD", "2_EE", "2_EV", "2_ED", "2_VV", "2_VD", "2_DD"] -tm1_jtf = tm1_hh -tm1_jtf = tm1_jtf[tm1_jtf["jtf_choice"] > 0] -tm1_jtf["jtf_choice_label"] = pd.Series(jtf_labels)[tm1_jtf["jtf_choice"].tolist()].tolist() +if process_tm1: + tm1_jtf = tm1_hh + tm1_jtf = tm1_jtf[tm1_jtf["jtf_choice"] > 0] + tm1_jtf["jtf_choice_label"] = pd.Series(jtf_labels)[tm1_jtf["jtf_choice"].tolist()].tolist() + tm1_jtf.groupby("jtf_choice_label").count()["hh_id"].to_csv("outputs/tm1_jtf.csv", na_rep=0) asim_jtf = pd.read_csv(asim_hh_filename) - asim_jtf = asim_jtf[asim_jtf["joint_tour_frequency"] != ""] - -jtf = pd.concat([tm1_jtf.groupby("jtf_choice_label").count()["hh_id"], - asim_jtf.groupby("joint_tour_frequency").count()["household_id"]], axis=1) - -jtf.to_csv("outputs/jtf.csv", na_rep=0) +asim_jtf.groupby("joint_tour_frequency").count()["household_id"].to_csv("outputs/asim_jtf.csv", na_rep=0) # joint tour comp -tm1_jtours = pd.read_csv(tm1_jtour_filename) - -comp_labels = ["", "adult", "children", "mixed"] - -tm1_jtours["tour_composition_labels"] = pd.Series(comp_labels)[ - tm1_jtours["tour_composition"].tolist()].tolist() - -tm1_jtour_comp = tm1_jtours.groupby(["tour_purpose", "tour_composition_labels"]).count()["hh_id"] -tm1_jtour_comp = tm1_jtour_comp.reset_index() -tm1_jtour_comp = tm1_jtour_comp.pivot(index="tour_purpose", columns="tour_composition_labels") - +if process_tm1: + tm1_jtours = pd.read_csv(tm1_jtour_filename) + comp_labels = ["", "adult", "children", "mixed"] + tm1_jtours["tour_composition_labels"] = pd.Series(comp_labels)[ + tm1_jtours["tour_composition"].tolist()].tolist() + tm1_jtour_comp = tm1_jtours.groupby(["tour_purpose", "tour_composition_labels"]).count()["hh_id"] + tm1_jtour_comp = tm1_jtour_comp.reset_index() + tm1_jtour_comp = tm1_jtour_comp.pivot(index="tour_purpose", columns="tour_composition_labels") + tm1_jtour_comp.to_csv("outputs/tm1_jtour_comp.csv", na_rep=0) asim_jtours = pd.read_csv(asim_tour_filename) - asim_jtours = asim_jtours[asim_jtours["tour_category"] == "joint"] - asim_jtour_comp = asim_jtours.groupby(["tour_type", "composition"]).count()["household_id"] asim_jtour_comp = asim_jtour_comp.reset_index() asim_jtour_comp = asim_jtour_comp.pivot(index="tour_type", columns="composition") - -tm1_jtour_comp.to_csv("outputs/tm1_jtour_comp.csv", na_rep=0) asim_jtour_comp.to_csv("outputs/asim_jtour_comp.csv", na_rep=0) # joint tour destination -tm1_jtours["distance"] = distmat[tm1_jtours["orig_taz"]-1, tm1_jtours["dest_taz"]-1] -tm1_jtours["dist_bin"] = pd.cut(tm1_jtours["distance"], range(51)) +if process_tm1: + tm1_jtours["distance"] = distmat[tm1_jtours["orig_taz"]-1, tm1_jtours["dest_taz"]-1] + tm1_jtours["dist_bin"] = pd.cut(tm1_jtours["distance"], range(51)) + tm1_jtours.groupby(["dist_bin"]).count()["hh_id"].to_csv("outputs/tm1_jtour_dist.csv", na_rep=0) asim_jtours["distance"] = distmat[asim_jtours["origin"].astype(int)-1, asim_jtours["destination"].astype(int)-1] asim_jtours["dist_bin"] = pd.cut(asim_jtours["distance"], range(51)) - -jtour_dist = pd.concat([tm1_jtours.groupby(["dist_bin"]).count()["hh_id"], - asim_jtours.groupby(["dist_bin"]).count()["household_id"]], axis=1) - -jtour_dist.to_csv("outputs/jtour_dist.csv", na_rep=0) +asim_jtours.groupby(["dist_bin"]).count()["household_id"].to_csv("outputs/asim_jtour_dist.csv", na_rep=0) # joint tour tdd -tm1_jtours_tdd = tm1_jtours.groupby(["start_hour", "end_hour"]).count()["hh_id"] -tm1_jtours_tdd = tm1_jtours_tdd.reset_index() -tm1_jtours_tdd = tm1_jtours_tdd.pivot(index="start_hour", columns="end_hour") - -tm1_jtours_tdd.to_csv("outputs/tm1_jtours_tdd.csv", na_rep=0) +if process_tm1: + tm1_jtours_tdd = tm1_jtours.groupby(["start_hour", "end_hour"]).count()["hh_id"] + tm1_jtours_tdd = tm1_jtours_tdd.reset_index() + tm1_jtours_tdd = tm1_jtours_tdd.pivot(index="start_hour", columns="end_hour") + tm1_jtours_tdd.to_csv("outputs/tm1_jtours_tdd.csv", na_rep=0) asim_jtours_tdd = asim_jtours.groupby(["start", "end"]).count()["household_id"] asim_jtours_tdd = asim_jtours_tdd.reset_index() asim_jtours_tdd = asim_jtours_tdd.pivot(index="start", columns="end") - asim_jtours_tdd.to_csv("outputs/asim_jtours_tdd.csv", na_rep=0) - # non-mand tour freq -tm1_per = pd.read_csv(tm1_per_filename) - -# 0 doesn't participate in choice model therefore 0 tours, and -1 to align with asim -tm1_per["inmf_choice"][tm1_per["inmf_choice"] == 0] = 1 -tm1_per["inmf_choice"] = tm1_per["inmf_choice"] - 1 - -tm1_nmtf_sum = tm1_per.groupby(["inmf_choice"]).count()["hh_id"] - alts = pd.read_csv(asim_nmtf_alts_filename) alts["ID"] = range(len(alts)) +if process_tm1: + tm1_per = pd.read_csv(tm1_per_filename) + # 0 doesn't participate in choice model therefore 0 tours, and -1 to align with asim + tm1_per["inmf_choice"][tm1_per["inmf_choice"] == 0] = 1 + tm1_per["inmf_choice"] = tm1_per["inmf_choice"] - 1 + tm1_nmtf_sum = tm1_per.groupby(["inmf_choice"]).count()["hh_id"] + tm1_alts = pd.concat([alts, tm1_nmtf_sum], axis=1) + tm1_alts.to_csv("outputs/tm1_nmtf.csv", na_rep=0) + asim_per_nmtf = pd.read_csv(asim_per_filename) asim_per_nmtf["ptypename"] = pd.Series(ptypes)[asim_per_nmtf["ptype"].tolist()].tolist() - asim_nmtf_sum = asim_per_nmtf.groupby(["non_mandatory_tour_frequency"]).count()["household_id"] - -alts = pd.concat([alts, tm1_nmtf_sum, asim_nmtf_sum], axis=1) - -alts.to_csv("outputs/nmtf.csv", na_rep=0) - +asim_alts = pd.concat([alts, asim_nmtf_sum], axis=1) +asim_alts.to_csv("outputs/asim_nmtf.csv", na_rep=0) # non_mandatory_tour_destination -tm1_tours = pd.read_csv(tm1_tour_filename) - -tm1_tours["distance"] = distmat[tm1_tours["orig_taz"]-1, tm1_tours["dest_taz"]-1] -tm1_tours["dist_bin"] = pd.cut(tm1_tours["distance"], range(51)) - -tm1_tours_nm = tm1_tours[tm1_tours["tour_category"] == "INDIVIDUAL_NON_MANDATORY"] - +if process_tm1: + tm1_tours = pd.read_csv(tm1_tour_filename) + tm1_tours["distance"] = distmat[tm1_tours["orig_taz"]-1, tm1_tours["dest_taz"]-1] + tm1_tours["dist_bin"] = pd.cut(tm1_tours["distance"], range(51)) + tm1_tours_nm = tm1_tours[tm1_tours["tour_category"] == "INDIVIDUAL_NON_MANDATORY"] + tm1_tours_nm.groupby(["dist_bin"]).count()["hh_id"].to_csv("outputs/tm1_nmtd_dist.csv", na_rep=0) asim_nm_tours = pd.read_csv(asim_tour_filename) asim_nm_tours = asim_nm_tours[asim_nm_tours["tour_category"] == "non_mandatory"] - asim_nm_tours["distance"] = distmat[asim_nm_tours["origin"].astype(int)-1, asim_nm_tours["destination"].astype(int)-1] asim_nm_tours["dist_bin"] = pd.cut(asim_nm_tours["distance"], range(51)) - -nmtd_dist = pd.concat([tm1_tours_nm.groupby(["dist_bin"]).count()["hh_id"], - asim_nm_tours.groupby(["dist_bin"]).count()["household_id"]], axis=1) - -nmtd_dist.to_csv("outputs/nmtd_dist.csv", na_rep=0) +asim_nm_tours.groupby(["dist_bin"]).count()["household_id"].to_csv("outputs/asim_nmtd_dist.csv", na_rep=0) # non_mandatory_tour_scheduling -tm1_nmtours_tdd = tm1_tours_nm.groupby(["start_hour", "end_hour"]).count()["hh_id"] -tm1_nmtours_tdd = tm1_nmtours_tdd.reset_index() -tm1_nmtours_tdd = tm1_nmtours_tdd.pivot(index="start_hour", columns="end_hour") - -tm1_nmtours_tdd.to_csv("outputs/tm1_nmtours_tdd.csv", na_rep=0) +if process_tm1: + tm1_nmtours_tdd = tm1_tours_nm.groupby(["start_hour", "end_hour"]).count()["hh_id"] + tm1_nmtours_tdd = tm1_nmtours_tdd.reset_index() + tm1_nmtours_tdd = tm1_nmtours_tdd.pivot(index="start_hour", columns="end_hour") + tm1_nmtours_tdd.to_csv("outputs/tm1_nmtours_tdd.csv", na_rep=0) asim_nmtours_tdd = asim_nm_tours.groupby(["start", "end"]).count()["household_id"] asim_nmtours_tdd = asim_nmtours_tdd.reset_index() asim_nmtours_tdd = asim_nmtours_tdd.pivot(index="start", columns="end") - asim_nmtours_tdd.to_csv("outputs/asim_nmtours_tdd.csv", na_rep=0) # tour mode choice -tm1_tours = pd.read_csv(tm1_tour_filename) -tm1_jtours = pd.read_csv(tm1_jtour_filename) - -tm1_tours["tour_mode_labels"] = pd.Series(mode_labels)[tm1_tours["tour_mode"].tolist()].tolist() -tm1_tours["tour_mode_labels"] = pd.Categorical(tm1_tours["tour_mode_labels"], - categories=mode_labels) - -tm1_jtours["tour_mode_labels"] = pd.Series(mode_labels)[tm1_jtours["tour_mode"].tolist()].tolist() -tm1_jtours["tour_mode_labels"] = pd.Categorical(tm1_jtours["tour_mode_labels"], - categories=mode_labels) - -tm1_nmn_tour_mode = tm1_tours.groupby(["tour_mode_labels", "tour_category"]).count()["hh_id"] -tm1_nmn_tour_mode = tm1_nmn_tour_mode.reset_index() -tm1_nmn_tour_mode = tm1_nmn_tour_mode.pivot(index="tour_mode_labels", columns="tour_category") - -tm1_jtour_mode = tm1_jtours.groupby(["tour_mode_labels", "tour_category"]).count()["hh_id"] -tm1_jtour_mode = tm1_jtour_mode.reset_index() -tm1_jtour_mode = tm1_jtour_mode.pivot(index="tour_mode_labels", columns="tour_category") - -tm1_tour_mode = pd.concat([tm1_nmn_tour_mode, tm1_jtour_mode], axis=1) - -tm1_tour_mode.columns = ["atwork", "non_mandatory", "mandatory", "joint"] -tm1_tour_mode = tm1_tour_mode[["atwork", "joint", "mandatory", "non_mandatory"]] - +if process_tm1: + tm1_tours = pd.read_csv(tm1_tour_filename) + tm1_jtours = pd.read_csv(tm1_jtour_filename) + tm1_tours["tour_mode_labels"] = pd.Series(mode_labels)[tm1_tours["tour_mode"].tolist()].tolist() + tm1_tours["tour_mode_labels"] = pd.Categorical(tm1_tours["tour_mode_labels"], + categories=mode_labels) + tm1_jtours["tour_mode_labels"] = pd.Series(mode_labels)[tm1_jtours["tour_mode"].tolist()].tolist() + tm1_jtours["tour_mode_labels"] = pd.Categorical(tm1_jtours["tour_mode_labels"], + categories=mode_labels) + tm1_nmn_tour_mode = tm1_tours.groupby(["tour_mode_labels", "tour_category"]).count()["hh_id"] + tm1_nmn_tour_mode = tm1_nmn_tour_mode.reset_index() + tm1_nmn_tour_mode = tm1_nmn_tour_mode.pivot(index="tour_mode_labels", columns="tour_category") + + tm1_jtour_mode = tm1_jtours.groupby(["tour_mode_labels", "tour_category"]).count()["hh_id"] + tm1_jtour_mode = tm1_jtour_mode.reset_index() + tm1_jtour_mode = tm1_jtour_mode.pivot(index="tour_mode_labels", columns="tour_category") + + tm1_tour_mode = pd.concat([tm1_nmn_tour_mode, tm1_jtour_mode], axis=1) + tm1_tour_mode.columns = ["atwork", "non_mandatory", "mandatory", "joint"] + tm1_tour_mode = tm1_tour_mode[["atwork", "joint", "mandatory", "non_mandatory"]] + tm1_tour_mode.to_csv("outputs/tm1_tour_mode.csv", na_rep=0) asim_tours = pd.read_csv(asim_tour_filename) asim_tours["tour_mode"] = pd.Categorical(asim_tours["tour_mode"], categories=mode_labels) - asim_tour_mode = asim_tours.groupby(["tour_mode", "tour_category"]).count()["household_id"] asim_tour_mode = asim_tour_mode.reset_index() asim_tour_mode = asim_tour_mode.pivot(index="tour_mode", columns="tour_category") - -tm1_tour_mode.to_csv("outputs/tm1_tour_mode.csv", na_rep=0) - asim_tour_mode.to_csv("outputs/asim_tour_mode.csv", na_rep=0) # atwork_subtour_frequency -tm1_work_tours = tm1_tours[tm1_tours["tour_purpose"].str.startswith("work")] +if process_tm1: + tm1_work_tours = tm1_tours[tm1_tours["tour_purpose"].str.startswith("work")] + tm1_atwork_freq_strs = ["", "no_subtours", "eat", "business1", + "maint", "business2", "eat_business"] + tm1_work_tours["atWork_freq_str"] = pd.Series(tm1_atwork_freq_strs)[ + tm1_work_tours["atWork_freq"].tolist()].tolist() + tm1_work_tours.groupby(["atWork_freq_str"]).count()["hh_id"].to_csv("outputs/tm1_atwork_tf.csv", na_rep=0) asim_work_tours = asim_tours[asim_tours["primary_purpose"] == "work"] - -tm1_atwork_freq_strs = ["", "no_subtours", "eat", "business1", - "maint", "business2", "eat_business"] - -tm1_work_tours["atWork_freq_str"] = pd.Series(tm1_atwork_freq_strs)[ - tm1_work_tours["atWork_freq"].tolist()].tolist() - -atwork_tour_freq = pd.concat([ - tm1_work_tours.groupby(["atWork_freq_str"]).count()["hh_id"], - asim_work_tours.groupby(["atwork_subtour_frequency"]).count()["household_id"]], axis=1) - -atwork_tour_freq.to_csv("outputs/atwork_tour_freq.csv", na_rep=0) +asim_work_tours.groupby(["atwork_subtour_frequency"]).count()["household_id"].to_csv("outputs/asim_atwork_tf.csv", na_rep=0) # atwork_subtour_destination -tm1_tours = pd.read_csv(tm1_tour_filename) - -tm1_tours["distance"] = distmat[tm1_tours["orig_taz"]-1, tm1_tours["dest_taz"]-1] - -tm1_tours_atw = tm1_tours[tm1_tours["tour_category"] == "AT_WORK"] +if process_tm1: + tm1_tours = pd.read_csv(tm1_tour_filename) + tm1_tours["distance"] = distmat[tm1_tours["orig_taz"]-1, tm1_tours["dest_taz"]-1] + tm1_tours_atw = tm1_tours[tm1_tours["tour_category"] == "AT_WORK"] + tm1_tours_atw["dist_bin"] = pd.cut(tm1_tours_atw["distance"], range(51)) + tm1_tours_atw.groupby(["dist_bin"]).count()["hh_id"].to_csv("outputs/tm1_atwork_dist.csv", na_rep=0) asim_atw_tours = pd.read_csv(asim_tour_filename) asim_atw_tours = asim_atw_tours[asim_atw_tours["tour_category"] == "atwork"] - asim_atw_tours["distance"] = distmat[asim_atw_tours["origin"].astype(int)-1, asim_atw_tours["destination"].astype(int)-1] - -tm1_tours_atw["dist_bin"] = pd.cut(tm1_tours_atw["distance"], range(51)) asim_atw_tours["dist_bin"] = pd.cut(asim_atw_tours["distance"], range(51)) - -atw_dist = pd.concat([tm1_tours_atw.groupby(["dist_bin"]).count()["hh_id"], - asim_atw_tours.groupby(["dist_bin"]).count()["household_id"]], axis=1) - -atw_dist.to_csv("outputs/atwork_dist.csv", na_rep=0) +asim_atw_tours.groupby(["dist_bin"]).count()["household_id"].to_csv("outputs/asim_atwork_dist.csv", na_rep=0) # atwork_subtour_scheduling -tm1_tours_atw_tdd = tm1_tours_atw.groupby(["start_hour", "end_hour"]).count()["hh_id"] -tm1_tours_atw_tdd = tm1_tours_atw_tdd.reset_index() -tm1_tours_atw_tdd = tm1_tours_atw_tdd.pivot(index="start_hour", columns="end_hour") - -tm1_tours_atw_tdd.to_csv("outputs/tm1_atwork_tours_tdd.csv", na_rep=0) +if process_tm1: + tm1_tours_atw_tdd = tm1_tours_atw.groupby(["start_hour", "end_hour"]).count()["hh_id"] + tm1_tours_atw_tdd = tm1_tours_atw_tdd.reset_index() + tm1_tours_atw_tdd = tm1_tours_atw_tdd.pivot(index="start_hour", columns="end_hour") + tm1_tours_atw_tdd.to_csv("outputs/tm1_atwork_tours_tdd.csv", na_rep=0) asim_atw_tours_tdd = asim_atw_tours.groupby(["start", "end"]).count()["household_id"] asim_atw_tours_tdd = asim_atw_tours_tdd.reset_index() asim_atw_tours_tdd = asim_atw_tours_tdd.pivot(index="start", columns="end") - asim_atw_tours_tdd.to_csv("outputs/asim_atwork_tours_tdd.csv", na_rep=0) # atwork_subtour_mode_choice - see tour mode above # tour stop frequency -tm1_tours = pd.read_csv(tm1_tour_filename) -tm1_jtours = pd.read_csv(tm1_jtour_filename) - -tm1_tours["tour_purpose_simple"] = tm1_tours["tour_purpose"] -tm1_tours["tour_purpose_simple"] = tm1_tours["tour_purpose_simple"].str.replace("atwork_", "") -tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. - str.contains("work_")] = "work" -tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. - str.contains("school_")] = "school" -tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. - str.contains("university")] = "school" -tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. - str.contains("escort_")] = "escort" - -tm1_tours_atw = tm1_tours[tm1_tours["tour_category"] == "AT_WORK"] -tm1_tours_nmn = tm1_tours[tm1_tours["tour_category"] != "AT_WORK"] - -tm1_tours_nmn["tsf"] = tm1_tours_nmn[ - "num_ob_stops"].astype(str) + "-" + tm1_tours_nmn["num_ib_stops"].astype(str) - -tm1_stop_freq = tm1_tours_nmn.groupby(["tsf", "tour_purpose_simple"]).count()["hh_id"] -tm1_stop_freq = tm1_stop_freq.reset_index() -tm1_stop_freq = tm1_stop_freq.pivot(index="tsf", columns="tour_purpose_simple") - -tm1_jtours["tsf"] = tm1_jtours[ - "num_ob_stops"].astype(str) + "-" + tm1_jtours["num_ib_stops"].astype(str) -tm1_tours_atw["tsf"] = tm1_tours_atw[ - "num_ob_stops"].astype(str) + "-" + tm1_tours_atw["num_ib_stops"].astype(str) - -tm1_stop_freq_joint = tm1_jtours.groupby(["tsf"]).count()["hh_id"] -tm1_stop_freq_atwork = tm1_tours_atw.groupby(["tsf"]).count()["hh_id"] - -tm1_stop_freq = pd.concat([tm1_stop_freq, tm1_stop_freq_joint, tm1_stop_freq_atwork], axis=1) +if process_tm1: + tm1_tours = pd.read_csv(tm1_tour_filename) + tm1_jtours = pd.read_csv(tm1_jtour_filename) + + tm1_tours["tour_purpose_simple"] = tm1_tours["tour_purpose"] + tm1_tours["tour_purpose_simple"] = tm1_tours["tour_purpose_simple"].str.replace("atwork_", "") + tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. + str.contains("work_")] = "work" + tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. + str.contains("school_")] = "school" + tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. + str.contains("university")] = "school" + tm1_tours["tour_purpose_simple"][tm1_tours["tour_purpose_simple"]. + str.contains("escort_")] = "escort" + tm1_tours_atw = tm1_tours[tm1_tours["tour_category"] == "AT_WORK"] + tm1_tours_nmn = tm1_tours[tm1_tours["tour_category"] != "AT_WORK"] + + tm1_tours_nmn["tsf"] = tm1_tours_nmn[ + "num_ob_stops"].astype(str) + "-" + tm1_tours_nmn["num_ib_stops"].astype(str) + tm1_stop_freq = tm1_tours_nmn.groupby(["tsf", "tour_purpose_simple"]).count()["hh_id"] + tm1_stop_freq = tm1_stop_freq.reset_index() + tm1_stop_freq = tm1_stop_freq.pivot(index="tsf", columns="tour_purpose_simple") + + tm1_jtours["tsf"] = tm1_jtours[ + "num_ob_stops"].astype(str) + "-" + tm1_jtours["num_ib_stops"].astype(str) + tm1_tours_atw["tsf"] = tm1_tours_atw[ + "num_ob_stops"].astype(str) + "-" + tm1_tours_atw["num_ib_stops"].astype(str) + + tm1_stop_freq_joint = tm1_jtours.groupby(["tsf"]).count()["hh_id"] + tm1_stop_freq_atwork = tm1_tours_atw.groupby(["tsf"]).count()["hh_id"] + tm1_stop_freq = pd.concat([tm1_stop_freq, tm1_stop_freq_joint, tm1_stop_freq_atwork], axis=1) + tm1_stop_freq.to_csv("outputs/tm1_stop_freq.csv", na_rep=0) asim_tours = pd.read_csv(asim_tour_filename) - asim_nmn_tours = asim_tours[(asim_tours["tour_category"] == "mandatory") | (asim_tours["tour_category"] == "non_mandatory")] asim_joint_tours = asim_tours[asim_tours["tour_category"] == "joint"] asim_atw_tours = asim_tours[asim_tours["tour_category"] == "atwork"] - asim_stop_freq = asim_nmn_tours.groupby(["stop_frequency", "tour_type"]).count()["household_id"] asim_stop_freq = asim_stop_freq.reset_index() asim_stop_freq = asim_stop_freq.pivot(index="stop_frequency", columns="tour_type") asim_stop_freq_joint = asim_joint_tours.groupby(["stop_frequency"]).count()["household_id"] asim_stop_freq_atwork = asim_atw_tours.groupby(["stop_frequency"]).count()["household_id"] - asim_stop_freq = pd.concat([asim_stop_freq, asim_stop_freq_joint, asim_stop_freq_atwork], axis=1) - -tm1_stop_freq.to_csv("outputs/tm1_stop_freq.csv", na_rep=0) - asim_stop_freq.to_csv("outputs/asim_stop_freq.csv", na_rep=0) ############################################################# @@ -613,94 +534,76 @@ # trip purpose -tm1_trips = pd.read_csv(tm1_trips_filename) -tm1_jtrips = pd.read_csv(tm1_jtrips_filename) - -tm1_trips["orig_purpose"][tm1_trips["orig_purpose"] == "university"] = "univ" -tm1_trips["orig_purpose"] = pd.Categorical(tm1_trips["orig_purpose"]) - -tm1_jtrips["orig_purpose"] = pd.Categorical(tm1_jtrips["orig_purpose"], - categories=tm1_trips["orig_purpose"].cat.categories) - -tm1_trip_purp = tm1_trips.groupby(["orig_purpose", "tour_category"]).count()["hh_id"] -tm1_trip_purp = tm1_trip_purp.reset_index() -tm1_trip_purp = tm1_trip_purp.pivot(index="orig_purpose", columns="tour_category") - -tm1_jtrip_purp = tm1_jtrips.groupby(["orig_purpose"]).count()["hh_id"] - -tm1_trip_purp = pd.concat([tm1_trip_purp, tm1_jtrip_purp], axis=1) - -tm1_trip_purp.columns = ["atwork", "non_mandatory", "mandatory", "joint"] -tm1_trip_purp = tm1_trip_purp[["atwork", "joint", "mandatory", "non_mandatory"]] - +if process_tm1: + tm1_trips = pd.read_csv(tm1_trips_filename) + tm1_jtrips = pd.read_csv(tm1_jtrips_filename) + tm1_trips["orig_purpose"][tm1_trips["orig_purpose"] == "university"] = "univ" + tm1_trips["orig_purpose"] = pd.Categorical(tm1_trips["orig_purpose"]) + tm1_jtrips["orig_purpose"] = pd.Categorical(tm1_jtrips["orig_purpose"], + categories=tm1_trips["orig_purpose"].cat.categories) + tm1_trip_purp = tm1_trips.groupby(["orig_purpose", "tour_category"]).count()["hh_id"] + tm1_trip_purp = tm1_trip_purp.reset_index() + tm1_trip_purp = tm1_trip_purp.pivot(index="orig_purpose", columns="tour_category") + tm1_jtrip_purp = tm1_jtrips.groupby(["orig_purpose"]).count()["hh_id"] + tm1_trip_purp = pd.concat([tm1_trip_purp, tm1_jtrip_purp], axis=1) + tm1_trip_purp.columns = ["atwork", "non_mandatory", "mandatory", "joint"] + tm1_trip_purp = tm1_trip_purp[["atwork", "joint", "mandatory", "non_mandatory"]] + tm1_trip_purp.to_csv("outputs/tm1_trip_purp.csv", na_rep=0) asim_trips = pd.read_csv(asim_trips_filename) asim_tours = pd.read_csv(asim_tour_filename) - asim_tours = asim_tours.set_index("tour_id", drop=False) - asim_trips["tour_category"] = asim_tours["tour_category"].loc[asim_trips["tour_id"]].tolist() - asim_trip_purp = asim_trips.groupby(["purpose", "tour_category"]).count()["household_id"] asim_trip_purp = asim_trip_purp.reset_index() asim_trip_purp = asim_trip_purp.pivot(index="purpose", columns="tour_category") - -tm1_trip_purp.to_csv("outputs/tm1_trip_purp.csv", na_rep=0) - asim_trip_purp.to_csv("outputs/asim_trip_purp.csv", na_rep=0) # trip destination -tm1_trips["distance"] = distmat[tm1_trips["orig_taz"]-1, tm1_trips["dest_taz"]-1] -tm1_jtrips["distance"] = distmat[tm1_jtrips["orig_taz"]-1, tm1_jtrips["dest_taz"]-1] -asim_trips["distance"] = distmat[asim_trips["origin"]-1, asim_trips["destination"]-1] +if process_tm1: + tm1_trips["distance"] = distmat[tm1_trips["orig_taz"]-1, tm1_trips["dest_taz"]-1] + tm1_jtrips["distance"] = distmat[tm1_jtrips["orig_taz"]-1, tm1_jtrips["dest_taz"]-1] + tm1_trips["dist_bin"] = pd.cut(tm1_trips["distance"], range(51)) + tm1_jtrips["dist_bin"] = pd.cut(tm1_jtrips["distance"], range(51)) + tm1_trips_dist = pd.concat([tm1_trips.groupby(["dist_bin"]).count()["hh_id"] + + tm1_jtrips.groupby(["dist_bin"]).count()["hh_id"]], axis=1) + tm1_trips_dist.to_csv("outputs/tm1_trips_dist.csv", na_rep=0) -tm1_trips["dist_bin"] = pd.cut(tm1_trips["distance"], range(51)) -tm1_jtrips["dist_bin"] = pd.cut(tm1_jtrips["distance"], range(51)) +asim_trips["distance"] = distmat[asim_trips["origin"]-1, asim_trips["destination"]-1] asim_trips["dist_bin"] = pd.cut(asim_trips["distance"], range(51)) - -trips_dist = pd.concat([tm1_trips.groupby(["dist_bin"]).count()["hh_id"] + - tm1_jtrips.groupby(["dist_bin"]).count()["hh_id"], - asim_trips.groupby(["dist_bin"]).count()["household_id"]], axis=1) - -trips_dist.to_csv("outputs/trips_dist.csv", na_rep=0) +asim_trips.groupby(["dist_bin"]).count()["household_id"].to_csv("outputs/asim_trips_dist.csv", na_rep=0) # trip scheduling -tm1_trips_tdd = tm1_trips.groupby([ - "depart_hour"]).count()["hh_id"] + tm1_jtrips.groupby(["depart_hour"]).count()["hh_id"] +if process_tm1: + tm1_trips_tdd = tm1_trips.groupby([ + "depart_hour"]).count()["hh_id"] + tm1_jtrips.groupby(["depart_hour"]).count()["hh_id"] + tm1_trips_tdd.to_csv("outputs/tm1_trips_depart.csv", na_rep=0) asim_trips_tdd = asim_trips.groupby(["depart"]).count()["household_id"] - -trips_depart = pd.concat([tm1_trips_tdd, asim_trips_tdd], axis=1) - -trips_depart.to_csv("outputs/trips_depart.csv", na_rep=0) +asim_trips_tdd.to_csv("outputs/asim_trips_depart.csv", na_rep=0) # trip mode share by tour purpose -tm1_trips["trip_mode_str"] = pd.Series(mode_labels)[tm1_trips["trip_mode"].tolist()].tolist() -tm1_trips["trip_mode_str"] = pd.Categorical(tm1_trips["trip_mode_str"], categories=mode_labels) - -tm1_jtrips["trip_mode_str"] = pd.Series(mode_labels)[tm1_jtrips["trip_mode"].tolist()].tolist() -tm1_jtrips["trip_mode_str"] = pd.Categorical(tm1_jtrips["trip_mode_str"], categories=mode_labels) - -tm1_trip_mode = tm1_trips.groupby(["trip_mode_str", "tour_category"]).count()["hh_id"] -tm1_trip_mode = tm1_trip_mode.reset_index() -tm1_trip_mode = tm1_trip_mode.pivot(index="trip_mode_str", columns="tour_category") +if process_tm1: + tm1_trips["trip_mode_str"] = pd.Series(mode_labels)[tm1_trips["trip_mode"].tolist()].tolist() + tm1_trips["trip_mode_str"] = pd.Categorical(tm1_trips["trip_mode_str"], categories=mode_labels) + tm1_jtrips["trip_mode_str"] = pd.Series(mode_labels)[tm1_jtrips["trip_mode"].tolist()].tolist() + tm1_jtrips["trip_mode_str"] = pd.Categorical(tm1_jtrips["trip_mode_str"], categories=mode_labels) -tm1_jtrip_mode = tm1_jtrips.groupby(["trip_mode_str"]).count()["hh_id"] + tm1_trip_mode = tm1_trips.groupby(["trip_mode_str", "tour_category"]).count()["hh_id"] + tm1_trip_mode = tm1_trip_mode.reset_index() + tm1_trip_mode = tm1_trip_mode.pivot(index="trip_mode_str", columns="tour_category") -tm1_trip_mode = pd.concat([tm1_trip_mode, tm1_jtrip_mode], axis=1) - -tm1_trip_mode.columns = ["atwork", "non_mandatory", "mandatory", "joint"] -tm1_trip_mode = tm1_trip_mode[["atwork", "joint", "mandatory", "non_mandatory"]] + tm1_jtrip_mode = tm1_jtrips.groupby(["trip_mode_str"]).count()["hh_id"] + tm1_trip_mode = pd.concat([tm1_trip_mode, tm1_jtrip_mode], axis=1) + tm1_trip_mode.columns = ["atwork", "non_mandatory", "mandatory", "joint"] + tm1_trip_mode = tm1_trip_mode[["atwork", "joint", "mandatory", "non_mandatory"]] + tm1_trip_mode.to_csv("outputs/tm1_trip_mode.csv", na_rep=0) asim_trips["trip_mode"] = pd.Categorical(asim_trips["trip_mode"], categories=mode_labels) - asim_trip_mode = asim_trips.groupby(["trip_mode", "tour_category"]).count()["household_id"] asim_trip_mode = asim_trip_mode.reset_index() asim_trip_mode = asim_trip_mode.pivot(index="trip_mode", columns="tour_category") - -tm1_trip_mode.to_csv("outputs/tm1_trip_mode.csv", na_rep=0) - asim_trip_mode.to_csv("outputs/asim_trip_mode.csv", na_rep=0) diff --git a/setup.py b/setup.py index 940142f3a4..2e96d4ee05 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='activitysim', - version='0.8', + version='0.9', description='Activity-Based Travel Modeling', author='contributing authors', author_email='ben.stabler@rsginc.com', diff --git a/verification/configs/settings.yaml b/verification/configs/settings.yaml index b2ddd95eed..0a208e5e48 100644 --- a/verification/configs/settings.yaml +++ b/verification/configs/settings.yaml @@ -48,7 +48,7 @@ trace_hh_id: 324105 #trace_od: [5, 11] # to resume after last successful checkpoint, specify resume_after: _ -#resume_after: compute_accessibility +# resume_after: atwork_subtour_mode_choice models: ### mp_initialize step @@ -106,18 +106,18 @@ output_tables: action: include prefix: final_ tables: -# - checkpoints -# - accessibility + - checkpoints + - accessibility - land_use -# - households + - households - persons -# - trips -# - tours -# - school_shadow_prices + - tours + - trips + - school_shadow_prices - raw_school_destination_size - school_destination_size - school_modeled_size -# - workplace_shadow_prices + - workplace_shadow_prices - raw_workplace_destination_size - workplace_destination_size - workplace_modeled_size