Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/asim/configs/common/network_los.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,3 @@ skim_time_periods:
period_minutes: 30
periods: [0, 6, 12, 25, 32, 48] # time periods to match documentation
labels: &skim_time_period_labels ['EA', 'AM', 'MD', 'PM', 'EV']

demographic_segments: &demographic_segments
- &low_income_segment_id 0
- &high_income_segment_id 1


1 change: 0 additions & 1 deletion src/asim/configs/common/outputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,6 @@ persons:
- num_shop_maint_tours
- num_shop_maint_escort_tours
- num_soc_discr_tours
- demographic_segment
- time_distrib_mean_work
- time_distrib_stddev_nonwork
- time_distrib_mean_nonwork
Expand Down
4 changes: 2 additions & 2 deletions src/asim/configs/resident/accessibility.csv
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ auto off-peak total,auOpTotal,df.emp_total * _decay
#,, transit peak
#,, assume peak outbound transit occurs in AM
o-d peak transit time,_inVehicletime_od,"skim_od[('WALK_MIX_TOTALIVTT', 'AM')]"
o-d out of vehicle transit time,_outOfVehicleTime_od,"skim_od[('WALK_MIX_FIRSTWAIT', 'AM')] + skim_od[('WALK_MIX_XFERWAIT', 'AM')] + reindex(df.walk_dist_local_bus, df.orig) + skim_od[('WALK_MIX_XFERWALK', 'AM')] + reindex(df.walk_dist_local_bus, df.dest)"
o-d out of vehicle transit time,_outOfVehicleTime_od,"skim_od[('WALK_MIX_FIRSTWAIT', 'AM')] + skim_od[('WALK_MIX_XFERWAIT', 'AM')] + df.landuse_orig_walk_dist_local_bus + skim_od[('WALK_MIX_XFERWALK', 'AM')] + df.walk_dist_local_bus"
total o-d peak transit time,_trPkTime_od,(_inVehicletime_od + out_of_vehicle_time_weight * _outOfVehicleTime_od)
#,, assume peak inbound transit occurs in PM
o-d peak transit time,_inVehicletime_do,"skim_do[('WALK_MIX_TOTALIVTT', 'PM')]"
o-d out of vehicle transit time,_outOfVehicleTime_do,"skim_do[('WALK_MIX_FIRSTWAIT', 'PM')] + skim_do[('WALK_MIX_XFERWAIT', 'PM')] + reindex(df.walk_dist_local_bus, df.orig) + skim_do[('WALK_MIX_XFERWALK', 'PM')] + reindex(df.walk_dist_local_bus, df.dest)"
o-d out of vehicle transit time,_outOfVehicleTime_do,"skim_do[('WALK_MIX_FIRSTWAIT', 'PM')] + skim_do[('WALK_MIX_XFERWAIT', 'PM')] + df.landuse_orig_walk_dist_local_bus + skim_do[('WALK_MIX_XFERWALK', 'PM')] + df.walk_dist_local_bus"
total o-d peak transit time,_trPkTime_do,(_inVehicletime_do + out_of_vehicle_time_weight * _outOfVehicleTime_do)
#,,
#o-d peak transit time,_trPkTime_do,"skim_do[('WALK_MIX_TOTALIVTT', 'PM')]"
Expand Down
5 changes: 4 additions & 1 deletion src/asim/configs/resident/accessibility.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

# columns from land_use table to add to df
# columns from land_use table to add to df for destinations
land_use_columns: ['emp_ret', 'emp_total', 'hh', 'walk_dist_local_bus']

# columns from land_use table to add to df for origins
land_use_columns_orig: ['walk_dist_local_bus']

CONSTANTS:
# dispersion parameters
dispersion_parameter_automobile: {mode-auto-dispersionParameter:}
Expand Down
6 changes: 3 additions & 3 deletions src/asim/configs/resident/atwork_subtour_destination.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Label,Description,Expression,atwork
,,"_DIST@np.minimum(skims['DIST'], 20)",1
,,_DIST_SQUARED@_DIST**2,1
,,_DIST_CUBED@_DIST**3,1
,,_DIST_LOGGED@np.log(_DIST + 0.001),1
ATWORK_DIST_SQUARED,,_DIST_SQUARED@_DIST**2,1
ATWORK_DIST_CUBED,,_DIST_CUBED@_DIST**3,1
ATWORK_DIST_LOGGED,,_DIST_LOGGED@np.log(_DIST + 0.001),1
util_Distance,Distance,@_DIST,coef_dist_atwork
util_Distance_squared,Distance_squared,@_DIST_SQUARED,coef_distsqrd_atwork
util_Distance_fulltime_worker,Distance_fulltime_worker,@_DIST * (df.ptype==1),coef_dist_ftworker_atwork
Expand Down
2 changes: 1 addition & 1 deletion src/asim/configs/resident/atwork_subtour_frequency.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ util_dummy_for_non_full_time_worker,pemploy!=1,coefficient_dummy_for_non_full_ti
util_dummy_for_non_workers,"ptype in [4, 5]",coefficient_dummy_for_non_workers_no_subtours,coefficient_dummy_for_non_workers_eat,coefficient_dummy_for_non_workers_business1,coefficient_dummy_for_non_workers_maint,coefficient_dummy_for_non_workers_business2,coefficient_dummy_for_non_workers_eat_business
util_medium_hh_income_dummy,income_segment == 2,coefficient_medium_hh_income_dummy_no_subtours,coefficient_medium_hh_income_dummy_eat,coefficient_medium_hh_income_dummy_business1,coefficient_medium_hh_income_dummy_maint,coefficient_medium_hh_income_dummy_business2,coefficient_medium_hh_income_dummy_eat_business
util_high_hh_income_dummy,(income_segment > 2) & (income_segment < 5),coefficient_high_hh_income_dummy_no_subtours,coefficient_high_hh_income_dummy_eat,coefficient_high_hh_income_dummy_business1,coefficient_high_hh_income_dummy_maint,coefficient_high_hh_income_dummy_business2,coefficient_high_hh_income_dummy_eat_business
util_zero_cars_owned_by_hh_dummy, auto_ownership == 0,coefficient_zero_cars_owned_by_hh_dummy_no_subtours,coefficient_zero_cars_owned_by_hh_dummy_eat,coefficient_zero_cars_owned_by_hh_dummy_business1,coefficient_zero_cars_owned_by_hh_dummy_maint,coefficient_zero_cars_owned_by_hh_dummy_business2,coefficient_zero_cars_owned_by_hh_dummy_eat_business
util_zero_cars_owned_by_hh_dummy,auto_ownership==0,coefficient_zero_cars_owned_by_hh_dummy_no_subtours,coefficient_zero_cars_owned_by_hh_dummy_eat,coefficient_zero_cars_owned_by_hh_dummy_business1,coefficient_zero_cars_owned_by_hh_dummy_maint,coefficient_zero_cars_owned_by_hh_dummy_business2,coefficient_zero_cars_owned_by_hh_dummy_eat_business
util_individual_discretionary_tours_made_by_full_time_worker,@(df.pemploy==1)*df.num_discr_tours,coefficient_individual_discretionary_tours_made_by_full_time_worker_no_subtours,coefficient_individual_discretionary_tours_made_by_full_time_worker_eat,coefficient_individual_discretionary_tours_made_by_full_time_worker_business1,coefficient_individual_discretionary_tours_made_by_full_time_worker_maint,coefficient_individual_discretionary_tours_made_by_full_time_worker_business2,coefficient_individual_discretionary_tours_made_by_full_time_worker_eat_business
util_individual_discretionary_tours_made_by_part_time_worker,@(df.pemploy==2)*df.num_discr_tours,coefficient_individual_discretionary_tours_made_by_part_time_worker_no_subtours,coefficient_individual_discretionary_tours_made_by_part_time_worker_eat,coefficient_individual_discretionary_tours_made_by_part_time_worker_business1,coefficient_individual_discretionary_tours_made_by_part_time_worker_maint,coefficient_individual_discretionary_tours_made_by_part_time_worker_business2,coefficient_individual_discretionary_tours_made_by_part_time_worker_eat_business
util_individual_eating_out_tours_made_by_person,num_eatout_tours,coefficient_individual_eating_out_tours_made_by_person_no_subtours,coefficient_individual_eating_out_tours_made_by_person_eat,coefficient_individual_eating_out_tours_made_by_person_business1,coefficient_individual_eating_out_tours_made_by_person_maint,coefficient_individual_eating_out_tours_made_by_person_business2,coefficient_individual_eating_out_tours_made_by_person_eat_business
Expand Down
3 changes: 3 additions & 0 deletions src/asim/configs/resident/atwork_subtour_frequency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ preprocessor:
- land_use
- tours
- joint_tour_participants

compute_settings:
fastmath: false
3 changes: 3 additions & 0 deletions src/asim/configs/resident/cdap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ annotate_households:
DF: households
TABLES:
- persons

compute_settings:
fastmath: false
4 changes: 2 additions & 2 deletions src/asim/configs/resident/cdap_indiv_and_hhsize1.csv
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Base works from home 2016,(work_from_home),,coef_base_work_from_home_2016_N,
Part time worker who works from home,(ptype == 2) & (work_from_home),,coef_part_time_worker_work_from_home_N,
Part time worker who works from home,@(df.ptype == 2) & (df.work_from_home) & (PRE_COVID),,coef_part_time_worker_work_from_home_2016_N,
Telecommutes 1 day per week,telecommute_frequency=='1_day_week',,coef_telecommute_1_day_week_N,coef_telecommute_1_day_week_H
Telecommutes 2-3 days per week,telecommute_frequency=='2_3_days_week',,coef_telecommute_2_3_days_week_N,coef_telecommute_2_3_days_week_H
Telecommutes 2-3 days per week,@(df.telecommute_frequency=='2_days_week') | (df.telecommute_frequency=='3_days_week'),,coef_telecommute_2_3_days_week_N,coef_telecommute_2_3_days_week_H
Telecommutes 4 days per week,telecommute_frequency=='4_days_week',,coef_telecommute_4_days_week_N,coef_telecommute_4_days_week_H
Full-time worker 2016 ASC,@(df.ptype == 1) & (PRE_COVID),coef_full_time_worker_2016_asc_M,coef_full_time_worker_2016_asc_N,
Part-time worker 2016 ASC,@(df.ptype == 2) & (PRE_COVID),coef_part_time_worker_2016_asc_M,coef_part_time_worker_2016_asc_N,
Expand All @@ -36,7 +36,7 @@ Driving-age child who is in school 2016 ASC,@(df.ptype == 6) & (PRE_COVID),coef_
Pre-driving-age child who is in school 2016 ASC,@(df.ptype == 7) & (PRE_COVID),coef_pre_driving_age_child_2016_asc_M,coef_pre_driving_age_child_2016_asc_N,
Preschool child 2016 ASC,@(df.ptype == 8) & (PRE_COVID),coef_preschool_child_2016_asc_M,coef_preschool_child_2016_asc_N,
Telecommutes 1 day per week 2016,@(df.telecommute_frequency=='1_day_week') & (PRE_COVID),,coef_telecommute_1_day_week_2016_N,coef_telecommute_1_day_week_2016_H
Telecommutes 2-3 days per week 2016,@(df.telecommute_frequency=='2_3_days_week') & (PRE_COVID),,coef_telecommute_2_3_days_week_2016_N,coef_telecommute_2_3_days_week_2016_H
Telecommutes 2-3 days per week 2016,@((df.telecommute_frequency=='2_days_week') | (df.telecommute_frequency=='3_days_week')) & (PRE_COVID),,coef_telecommute_2_3_days_week_2016_N,coef_telecommute_2_3_days_week_2016_H
Telecommutes 4 days per week 2016,@(df.telecommute_frequency=='4_days_week') & (PRE_COVID),,coef_telecommute_4_days_week_2016_N,coef_telecommute_4_days_week_2016_H
Mandatory pattern unavailable if not worker or student,(is_student == False) & (is_worker == False),coef_UNAVAILABLE,,
Mandatory pattern unavailable if not works from home,(work_from_home == True) & (is_student == False),coef_UNAVAILABLE,,
Expand Down
4 changes: 2 additions & 2 deletions src/asim/configs/resident/cdap_joint_tour_coefficients.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Label,description,Expression,dependency,coefficient
,person x is kid and DAP is N,ptype_px > 6,N_px,1.6898
,Accessibility to retail employment/Non-Mandatory Attractions,shopping_accessibility_p1,,0.055031985
,Income less than $30k,income_p1 < 30000,,-0.192506367
,Income between $60k and $100k,(income_p1 >= 60000) & (income_p1 < =100000),,0.104325349
,Income between $60k and $100k,(income_p1>=60000) & (income_p1<=100000),,0.104325349
,Income more than $100k,income_p1 > 100000,,0.104325349
,No Car Households,auto_ownership_p1 == 0,,0
,Cars Less than Workers,auto_ownership_p1 < num_workers_p1,,0.088402389
,Cars More than Workers,auto_ownership_p1 > num_workers_p1,,-0.005896499
,WorkAccessForMandatoryDap,"@df.workplace_modechoice_logsum_px.fillna(0)",M_px,0.17217579
,WorkAccessForMandatoryDap,"@np.nan_to_num(df.workplace_modechoice_logsum_px)",M_px,0.17217579
,If All Adults stay at Home/ None of the Adults have Dap 1 or 2,(ptype_pxprod < 7) | (ptype_pxprod > 6),H_px,-0.988838929
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Label,Description,Expression,external_tour,internal_tour
util_dist_to_nearest_ext_station,Distance to nearest external station,dist_to_external_zone,coef_dist_to_nearest_ext_station,
util_log_size,Log size of nearest station,"@np.log1p(reindex(land_use.external_nonwork, df.closest_external_zone))",coef_log_size_of_nearest_ext_station,
util_log_size,Log size of nearest station,@np.log1p(df.reindex_land_use_external_nonwork_zone_to_closest_external_zone),coef_log_size_of_nearest_ext_station,
util_escort,escort tour ASC,"@np.where(df.tour_type == 'escort', 1, 0)",coef_escort,
util_shopping,shopping tour ASC,"@np.where(df.tour_type == 'shopping', 1, 0)",coef_shopping,
util_othmaint,othmaint tour ASC,"@np.where(df.tour_type == 'othmaint', 1, 0)",coef_othmaint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ LOGIT_TYPE: MNL
EXTERNAL_COL_NAME: is_external_tour
# set to True if not external but CHOOSER_FILTER_COLUMN_NAME is True
INTERNAL_COL_NAME: is_internal_tour

preprocessor:
SPEC: external_non_mandatory_identification_preprocessor.csv
DF: df
TABLES:
- land_use
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Description,Target,Expression
reindex_land_use_external_nonwork_zone_to_closest_external_zone,reindex_land_use_external_nonwork_zone_to_closest_external_zone,"reindex(land_use.external_nonwork, df.closest_external_zone)"


Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Label,Description,Expression,work_external,work_internal
util_dist_to_nearest_ext_station,Distance to nearest external station,dist_to_external_zone,coef_dist_to_nearest_ext_station,
util_size_of_nearest_ext_station,Size of nearest external station,"@np.log1p(reindex(land_use.external_work,df.closest_external_zone))",coef_size_of_nearest_ext_station,
util_size_of_nearest_ext_station,Size of nearest external station,"@np.log1p(df.reindex_land_use_external_to_work_external_zone)",coef_size_of_nearest_ext_station,
util_dist_lt_2p5,Distance less than 2.5 miles,"@np.where(df.dist_to_external_zone<2.5,1,0)",coef_dist_lt_2p5,
util_part_time,Part time worker,"@np.where(df.is_parttime_worker==""TRUE"",1,0)",coef_part_time,
util_inc_lt15,Household Income less than $15k,@(df.income<15000),coef_inc_lt15,
Expand Down
6 changes: 6 additions & 0 deletions src/asim/configs/resident/external_worker_identification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ CHOOSER_FILTER_COLUMN_NAME: is_out_of_home_worker
EXTERNAL_COL_NAME: is_external_worker
# set to True if not external but CHOOSER_FILTER_COLUMN_NAME is True
INTERNAL_COL_NAME: is_internal_worker

preprocessor:
SPEC: external_worker_identification_preprocessor.csv
DF: df
TABLES:
- land_use
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Description,Target,Expression
reindex_land_use_external_work_external_zone,reindex_land_use_external_to_work_external_zone,"reindex(land_use.external_work,df.closest_external_zone)"


2 changes: 1 addition & 1 deletion src/asim/configs/resident/external_workplace_location.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ local_dist,,_DIST@skims['DIST'],1
util_dist,,"@np.minimum(_DIST,10)",coef_dist_capped
util_size_variable,Size variable,@(df['size_term']).apply(np.log1p),coef_size
util_no_attractions,No attractions,@df['size_term']==0,-999
mode_choice_logsum,Mode choice logsum,@df.mode_choice_logsum if 'mode_choice_logsum' in df.columns else 0,coef_mode_logsum
mode_choice_logsum,Mode choice logsum,"@df.get('mode_choice_logsum', 0)",coef_mode_logsum

This file was deleted.

Loading