Skip to content

Commit

Permalink
Revert "making fixes per review comments"
Browse files Browse the repository at this point in the history
This reverts commit c05c7f3.
  • Loading branch information
aletzdy committed May 12, 2023
1 parent 37741aa commit d83019a
Show file tree
Hide file tree
Showing 220 changed files with 231 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/core_tests.yml
Expand Up @@ -180,7 +180,7 @@ jobs:
- prototype_mtc_extended
- placeholder_sandag
- prototype_sandag_xborder
- production_semcog
- example_semcog
- prototype_mwcog
- placeholder_multiple_zone
fail-fast: false
Expand Down
6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

40 changes: 20 additions & 20 deletions activitysim/examples/example_manifest.yaml
Expand Up @@ -488,34 +488,34 @@
data/final_accessibility.csv
949994345c9965054be260589fd64079e4032d2e4079e46b9eb9c758a40527c3

- name: production_semcog
- name: example_semcog
description: 67 zone test example for the SEMCOG region
# activitysim create -e production_semcog -d test_production_semcog
# cd test_production_semcog
# activitysim create -e example_semcog -d test_example_semcog
# cd test_example_semcog
# python simulation.py -c configs -o output -d data
# cd ..
include:
- production_semcog/extensions
- production_semcog/data
- production_semcog/configs
- production_semcog/configs_mp
- production_semcog/output
- production_semcog/README.MD
- production_semcog/simulation.py
- example_semcog/extensions
- example_semcog/data
- example_semcog/configs
- example_semcog/configs_mp
- example_semcog/output
- example_semcog/README.MD
- example_semcog/simulation.py

- name: production_semcog_full
description: 2899 zone full size production model for the SEMCOG region
# activitysim create -e production_semcog_full -d test_production_semcog_full
# cd test_production_semcog_full
- name: example_semcog_full
description: 2899 zone full size example for the SEMCOG region
# activitysim create -e example_semcog_full -d test_example_semcog_full
# cd test_example_semcog_full
# python simulation.py -c configs_mp -c configs -o output -d data
# cd ..
include:
- production_semcog/extensions
- production_semcog/configs
- production_semcog/configs_mp
- production_semcog/output
- production_semcog/README.MD
- production_semcog/simulation.py
- example_semcog/extensions
- example_semcog/configs
- example_semcog/configs_mp
- example_semcog/output
- example_semcog/README.MD
- example_semcog/simulation.py
- https://media.githubusercontent.com/media/activitysim/activitysim_resources/master/semcog_data_full/skims_offpeak.omx
data/skims_offpeak.omx
685e93a725e2c04e4b1fc11b92609472c347ce830475448e39b52947fa729d80
Expand Down
2 changes: 2 additions & 0 deletions activitysim/examples/example_semcog/.gitignore
@@ -0,0 +1,2 @@
data_*/
output_*/
Expand Up @@ -2,6 +2,7 @@ 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,households.hincp * households.adjinc/100000
income,income,households.hincp.fillna(0)
income_in_thousands,income_in_thousands,(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)"
Expand Down
Expand Up @@ -4,3 +4,4 @@ travel_active,travel_active,persons.cdap_activity != CDAP_ACTIVITY_HOME
under16_not_at_school,under16_not_at_school,"persons.ptype.isin([PTYPE_SCHOOL, PTYPE_PRESCHOOL]) & persons.cdap_activity.isin(['N', 'H'])"
has_preschool_kid_at_home,has_preschool_kid_at_home,"other_than(persons.household_id, (persons.ptype == PTYPE_PRESCHOOL) & (persons.cdap_activity == 'H'))"
has_school_kid_at_home,has_school_kid_at_home,"other_than(persons.household_id, (persons.ptype == PTYPE_SCHOOL) & (persons.cdap_activity == 'H'))"
#,cdap_activity,"np.where((persons.work_from_home) & (persons.cdap_activity=='M'), np.random.choice(['N','H']), persons.cdap_activity)"
Expand Up @@ -5,3 +5,5 @@ Description,Target,Expression
temp auto_time_to_school,_auto_time_to_school,"skim_dict.lookup(persons.home_zone_id, persons.school_zone_id, ('SOV_TIME', 'MD'))"
temp auto_time_return,_auto_time_return,"skim_dict.lookup(persons.school_zone_id, persons.home_zone_id, ('SOV_TIME', 'MD'))"
free flow roundtrip_auto_time_to_school,roundtrip_auto_time_to_school,"np.where(persons.school_zone_id>=0,_auto_time_to_school + _auto_time_return,0)"
#,,
#,home_county,"reindex(land_use.COUNTY, persons.home_zone_id)"
Expand Up @@ -32,5 +32,6 @@ work_zone_area_type,work_zone_area_type,"reindex(land_use.AreaType, persons.work
,work_auto_savings_ratio,"(work_auto_savings / 120.0).clip(-1.0, 1.0)"
,umich_student,df.school_zone_id.isin(land_use[land_use.University_Name=='University of Michigan'].index.values)
,umich_worker,df.workplace_zone_id.isin(land_use[land_use.University_Name=='University of Michigan'].index.values)
#,umich_affiliate,"df.get(umich_worker, default=False) | df.get(umich_student, default=False)"
#,,
,dest_hourly_peak_parking_cost,"reindex(land_use.parking_hourly, df.workplace_zone_id)"
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
@@ -0,0 +1,81 @@
coefficient_name,value,constrain
coef_unavailable,-999.00,F
#,,
coef_cars1_drivers_1,�2.56,F
coef_cars1_drivers_2,�2.80,T
coef_cars1_drivers_3_up,�2.46,F
coef_cars1_persons_16_17,-0.54,T
coef_cars1_persons_18_24,�0.276,F
coef_cars1_persons_25_34,�0,F
coef_cars1_presence_children_0_4,�0,F
coef_cars1_presence_children_5_17,�0.323,T
coef_cars1_num_workers_clip_3,-0.35,T
coef_cars1_hh_income_0_15k,-2.29,F
coef_cars1_hh_income_15_35k,-0.96,F
coef_cars1_hh_income_35_50k,�0,F
coef_cars1_hh_income_50_75k,�0,T
coef_cars1_density,�0,T
coef_cars1_retail_transit,-0.43,F
coef_cars1_retail_non_motor,�0.117,F
coef_cars1_auto_time_saving_per_worker,�1.31,F
coef_cars1_univ_GQ,-3.56,T
#,,
coef_cars2_drivers_1,�2.11,F
coef_cars2_drivers_2,�5.17,F
coef_cars2_drivers_3_up,�4.71,T
coef_cars2_persons_16_17,-1.33,F
coef_cars2_persons_18_24,-0.24,F
coef_cars2_persons_25_34,-0.26,F
coef_cars2_presence_children_0_4,�0,F
coef_cars2_presence_children_5_17,�0.477,F
coef_cars2_num_workers_clip_3,�0.493,F
coef_cars2_hh_income_0_15k,-3.79,F
coef_cars2_hh_income_15_35k,-2.18,F
coef_cars2_hh_income_35_50k,-0.75,F
coef_cars2_hh_income_50_75k,-0.54,T
coef_cars2_density,-0.05,F
coef_cars2_retail_transit,-0.70,T
coef_cars2_retail_non_motor,�0,F
coef_cars2_auto_time_saving_per_worker,�0.901,F
#,,
coef_cars3_drivers_1,�1.18,T
coef_cars3_drivers_2,�4.14,F
coef_cars3_drivers_3_up,�5.40,F
coef_cars34_persons_16_17,-1.38,F
coef_cars34_persons_18_24,�0,F
coef_cars34_persons_25_34,-0.37,F
coef_cars34_presence_children_0_4,-0.46,F
coef_cars34_presence_children_5_17,�0.335,T
coef_cars3_num_workers_clip_3,�0.742,F
coef_cars3_hh_income_0_15k,-3.93,F
coef_cars3_hh_income_15_35k,-2.61,T
coef_cars3_hh_income_35_50k,-1.04,F
coef_cars3_hh_income_50_75k,-0.73,F
coef_cars3_density,-0.53,F
coef_cars3_retail_transit,-0.79,F
coef_cars3_retail_non_motor,�0,F
coef_cars3_auto_time_saving_per_worker,�0.852,F
#,,
coef_cars4_drivers_1,�0,F
coef_cars4_drivers_2,�2.87,F
coef_cars4_drivers_3_up,�4.52,F
coef_cars34_persons_16_17,-1.38,F
coef_cars34_persons_18_24,�0,F
coef_cars34_persons_25_34,-0.37,F
coef_cars34_presence_children_0_4,-0.46,T
coef_cars34_presence_children_5_17,�0.335,F
coef_cars4_num_workers_clip_3,�0.967,T
coef_cars4_hh_income_0_15k,-4.25,F
coef_cars4_hh_income_15_35k,-2.90,F
coef_cars4_hh_income_35_50k,-1.03,F
coef_cars4_hh_income_50_75k,-0.74,F
coef_cars4_density,-0.75,F
coef_cars4_retail_transit,-0.76,F
coef_cars4_retail_non_motor,�0,F
coef_cars4_auto_time_saving_per_worker,�0.669,F
#,,
coef_cars1,2.95,F
coef_cars2,5.33,F
coef_cars3,4.31,F
coef_cars4,3.16,F
coef_detroit,0.25,T
Expand Up @@ -25,10 +25,10 @@ util_can_walk_to_work_retired,Can walk to work - Retired interaction,(ptype == 5
util_can_walk_to_school_univ,Can walk to school - University student interaction,(ptype == 3) & (distance_to_school < 3),,,,coef_can_walk_to_work_school2,
util_can_walk_to_school_driving_age_child,Can walk to school - Driving-age child interaction,(ptype == 6) & (distance_to_school < 3),,,,coef_can_walk_to_work_school2,
util_can_walk_to_school_pre_driving_age_child,Can walk to school - Pre-driving age child who is in school interaction,(ptype == 7) & (distance_to_school < 3),,,,coef_can_walk_to_work_school2,
util_can_walk_to_work_or_school_ft,Can walk to work or school - Full-time worker interaction,(ptype == 1) & ((distance_to_work < 3) | (distance_to_school < 3)),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_pt,Can walk to work or school - Part-time worker interaction,(ptype == 2) & ((distance_to_work < 3) | (distance_to_school < 3)),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_univ,Can walk to work or school - University student interaction,(ptype == 3) & ((distance_to_work < 3) | (distance_to_school < 3)),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_driving_age_child,Can walk to work or school - Driving-age child interaction,(ptype == 6) & ((distance_to_work < 3) | (distance_to_school < 3)),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_ft,Can walk to work or school - Full-time worker interaction,(ptype == 1) & (distance_to_work < 3 | distance_to_school < 3),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_pt,Can walk to work or school - Part-time worker interaction,(ptype == 2) & (distance_to_work < 3 | distance_to_school < 3),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_univ,Can walk to work or school - University student interaction,(ptype == 3) & (distance_to_work < 3 | distance_to_school < 3),,,,,coef_can_walk_to_work_and_school
util_can_walk_to_work_or_school_driving_age_child,Can walk to work or school - Driving-age child interaction,(ptype == 6) & (distance_to_work < 3 | distance_to_school < 3),,,,,coef_can_walk_to_work_and_school
util_round_trip_auto_time_to_work_ft,Round trip auto time to work - Full-time worker interaction,(ptype == 1) * roundtrip_auto_time_to_work,,coef_round_trip_auto_time_to_work_work2,,,coef_round_trip_auto_time_to_work_school2
util_round_trip_auto_time_to_work_pt,Round trip auto time to work - Part-time worker interaction,(ptype == 2) * roundtrip_auto_time_to_work,,coef_round_trip_auto_time_to_work_work2,,,coef_round_trip_auto_time_to_work_school2
util_round_trip_auto_time_to_work_univ,Round trip auto time to work - University student interaction,(ptype == 3) * roundtrip_auto_time_to_work,,coef_round_trip_auto_time_to_work_work2,,,coef_round_trip_auto_time_to_work_school2
Expand Down
Expand Up @@ -53,6 +53,17 @@ COEFFICIENTS: tour_mode_choice_coeffs.csv
COEFFICIENT_TEMPLATE: tour_mode_choice_coeffs_template.csv

CONSTANTS:
# valueOfTime: 8.00
# costPerMile: 18.29
# costShareSr2: 1.75
# costShareSr3: 2.50
# waitThresh: 10.00
# walkThresh: 1.50
# shortWalk: 0.333
# longWalk: 0.667
# walkSpeed: 3.00
# bikeThresh: 6.00
# bikeSpeed: 12.00
maxCbdAreaTypeThresh: 2
indivTour: 1.00000
upperEA: 5
Expand Down Expand Up @@ -155,6 +166,11 @@ CONSTANTS:
8: 1.0
transit_subsidy_fare_discount_percent_worktour: 0.9

# joint_sr2_ASC_no_auto: 0
# joint_sr2_ASC_auto_deficient: 0
# joint_sr2_ASC_auto_sufficient: 0
# joint_drive_transit_ASC_no_auto: 0

# so far, we can use the same spec as for non-joint tours
preprocessor:
SPEC: tour_mode_choice_annotate_choosers_preprocessor
Expand Down

0 comments on commit d83019a

Please sign in to comment.