Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
ab7b0c7
adding estimation configs
dhensle Jan 16, 2026
066a475
Merge branch 'initial_model_setup' into estimation
americalexander Jan 20, 2026
75202ac
Fix school location model spec
americalexander Jan 26, 2026
732eb96
adding missing occupation segment in wlc
dhensle Jan 26, 2026
89f1223
adding missing occup to shadow pricing
dhensle Jan 26, 2026
6f5f5bb
Merge remote-tracking branch 'origin/new_synthetic_pop' into estimation
americalexander Feb 4, 2026
becafb2
Remove hard-coded alt # from ext worker ident model
americalexander Feb 4, 2026
2229159
Fix jtf composition spec
americalexander Feb 10, 2026
b62c9be
Fix dupl. label in nm tour destination spec
americalexander Feb 16, 2026
74a57dd
updated nm size terms
americalexander Feb 16, 2026
37e5185
Merge branch 'initial_model_setup' into estimation
americalexander Feb 17, 2026
75492fd
ISO timestamp format
americalexander Feb 17, 2026
d23e483
more dest size terms updates
americalexander Feb 19, 2026
5f1e2a5
update trace label for Ext NMT Ident
americalexander Feb 19, 2026
2b2e4ce
Destination choice size terms made nonzero
americalexander Feb 19, 2026
be6c07e
Merge branch 'initial_model_setup' into estimation
dhensle Feb 20, 2026
867f5ba
preprocessor adds TAZ column to landuse
dhensle Feb 20, 2026
d97f584
fixing logging file
dhensle Feb 23, 2026
290af20
active acres size term
dhensle Feb 23, 2026
c5b94ec
Fix logging config
americalexander Feb 23, 2026
59682f3
Fix typo in previous commit
americalexander Feb 23, 2026
6a3ba21
clean up labels, knr skims for bnr, school trip size terms
dhensle Feb 24, 2026
04cfdd3
Merge branch 'estimation' of https://github.com/RSGInc/SimOR into est…
dhensle Feb 24, 2026
4aac9b3
One more logging fix
americalexander Feb 24, 2026
18c6803
allowing FT workers to go to univ
dhensle Feb 25, 2026
cb38524
shopping to HCS employment
americalexander Feb 25, 2026
04fb248
Actually lets just make it all employment
americalexander Feb 25, 2026
b7d73d0
estimation specific size terms
dhensle Feb 25, 2026
80172a3
Merge branch 'estimation' of https://github.com/RSGInc/SimOR into est…
dhensle Feb 25, 2026
327ebe5
adding missing alts for estimation
dhensle Feb 26, 2026
2597171
turn availability conditions off for trip mode choice
dhensle Mar 3, 2026
e5d13e1
Add one weird NMT frequency alt
americalexander Mar 10, 2026
0734d10
Update trip mode choice spec unavail conds for estimation
americalexander Mar 11, 2026
668da65
Merge remote-tracking branch 'origin/initial_model_setup' into estima…
americalexander Apr 28, 2026
2371298
Fix mismatched parens in annotate persons
americalexander Apr 28, 2026
978f781
Ensure consistent number of fields
americalexander Apr 28, 2026
a8b8eaf
define KNR_available
americalexander Apr 28, 2026
99e0234
Merge remote-tracking branch 'origin/maz_col_check' into estimation
americalexander Apr 29, 2026
f9115b4
Bugfix in pstudent annotation
americalexander May 1, 2026
cb43357
Trip mode choice bugfixes
americalexander May 1, 2026
841334e
remove hard-coded external alternative
americalexander May 6, 2026
63da533
Transit pass subsidy spec changes
americalexander May 7, 2026
547655c
Compatibility fixes for previous commit
americalexander May 7, 2026
2c57edc
Fix auto sufficiency condition
americalexander May 7, 2026
615f553
Fix transit pass subsidy availability cond
americalexander May 7, 2026
29354e4
Update escortee age limit
americalexander May 14, 2026
d581a66
Merge remote-tracking branch 'origin/main' into estimation
americalexander May 18, 2026
6371c81
NMT scheduling fixes
americalexander May 20, 2026
01511ec
Trip mode choice spec changes
americalexander May 21, 2026
6bc3337
More trip mode choice spec changes
americalexander May 21, 2026
991fc99
Updated destination size terms
americalexander May 21, 2026
5a7c954
edited land-use preprocessor to remove references to fields that shou…
jfdman Jun 16, 2026
1b47839
bug fixes
jfdman Jun 16, 2026
8b0bff5
Rebuild cropped dataset
americalexander Jun 17, 2026
0d9814a
Rebuild SKATS cropped data
americalexander Jun 17, 2026
c5545f9
Remove stray commas from land use
americalexander Jun 17, 2026
1bbadc5
Add launch configs
americalexander Jun 17, 2026
01932e5
Merge remote-tracking branch 'origin/main' into estimation
americalexander Jun 17, 2026
2ebbd39
rename external size term
americalexander Jun 18, 2026
514677e
Merge branch 'main' into estimation
americalexander Jun 20, 2026
2d26de6
Fixed SKATS land use
americalexander Jun 22, 2026
e2e8818
Merge remote-tracking branch 'origin/main' into estimation
americalexander Jun 22, 2026
f4df952
Fix size term formatting breaking CI test
americalexander Jun 22, 2026
650b89f
Reset destination size terms for non-estimation
americalexander Jun 22, 2026
b098496
Pull preprocessor.py from main
americalexander Jun 22, 2026
fa4e846
Reset new coefficients to 0
americalexander Jun 22, 2026
b25391d
Revert preprocessor reversion
americalexander Jun 22, 2026
c8c6556
Merge remote-tracking branch 'origin/main' into fix_modechoice
americalexander Jun 22, 2026
6ff9918
CSV file length fixes
americalexander Jun 22, 2026
29251bc
Remove pseudomsa attribute
americalexander Jun 22, 2026
a588e30
Fix dest size term for park attractiveness
americalexander Jun 22, 2026
07b6098
Bugfix in tour mode choice preprocessor
americalexander Jun 22, 2026
4a06069
One more tour mode choice preprocessor fix
americalexander Jun 22, 2026
b1a4caf
And another
americalexander Jun 22, 2026
83a0bca
Merge branch 'main' into fix_modechoice
americalexander Jun 22, 2026
8644092
Tour MC preprocessor fixes
americalexander Jun 22, 2026
27ed993
Merge branch 'fix_modechoice' of https://github.com/RSGInc/SimOR into…
americalexander Jun 22, 2026
9cfd939
Add bike logsums to cropped dataset
americalexander Jun 22, 2026
af2311f
Merge remote-tracking branch 'origin/main' into estimation
americalexander Jun 23, 2026
a50626f
Rogue nmtf alts
americalexander Jun 23, 2026
07e88b0
Merge branch 'fix_modechoice' into estimation
americalexander Aug 6, 2026
70aa4ff
Merge branch 'main' into estimation
americalexander Aug 6, 2026
22660bc
Update SKATS bike logsums
americalexander Aug 7, 2026
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
20 changes: 17 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/rogue/data_full",
"-o", "outputs/rogue",
"-o", "outputs/estimation_rogue",
]
},
{
"name": "Run Cropped Example",
"name": "Run Cropped Metro Example",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
Expand All @@ -112,7 +112,21 @@
"args": [
"-c", "configs", // check the settings.yaml file for run settings!
"-d", "model_data/metro/data_cropped",
"-o", "outputs/cropped",
"-o", "outputs/metro_cropped",
]
},
{
"name": "Run Cropped SKATS Example",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_skats",
"-c", "configs", // check the settings.yaml file for run settings!
"-d", "model_data/skats/data_cropped",
"-o", "outputs/skats_cropped",
]
},
{
Expand Down
1 change: 1 addition & 0 deletions resident/configs/accessibility.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# columns from land_use table to add to df
land_use_columns: ['EMP_RET', 'EMP_TOTAL', 'TOTHHS', 'walk_dist_local_bus']
explicit_chunk: 0.2
2 changes: 1 addition & 1 deletion resident/configs/annotate_disaggregate_accessibility.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# annotating the proto_disaggregate_accessibilty table
# annotating the proto_disaggregate_accessibilty table,,
Description,Target,Expression
workplace location for zero auto only,workplace_location_accessibility_0,"np.where(df.auto_ownership == 0, df.workplace_location_accessibility, np.nan)"
workplace location for auto deficient,workplace_location_accessibility_1,"np.where(df.auto_ownership == 1, df.workplace_location_accessibility, np.nan)"
Expand Down
6 changes: 2 additions & 4 deletions resident/configs/annotate_households.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ number of non-working adult in the household,num_nonworker_adults,"_PERSON_COUNT
number of full time workers,num_fullTime_workers,"_PERSON_COUNT('pemploy == 1', persons, households)"
number of part time workers,num_partTime_workers,"_PERSON_COUNT('pemploy == 2', persons, households)"
number of retired adults in the household,num_retired_adults,"_PERSON_COUNT('ptype == 5', persons, households)"
#,,FIXME is this the best replacement for area_type??
home_is_urban,home_is_urban,"reindex(land_use.pseudomsa, households.home_zone_id) <= urban_threshold"
home_is_rural,home_is_rural,"reindex(land_use.pseudomsa, households.home_zone_id) > rural_threshold"
#,,
,num_hh_in_zone,"reindex(households.groupby('home_zone_id').size(), households.home_zone_id)"
#,multiple_auto_hh_in_zone,"reindex_i(df.groupby('home_zone_id').multiple_auto_hh.sum(), df.index)"
#,multiple_auto_hh_in_zone_share,multiple_auto_hh_in_zone/num_hh_in_zone
hh owns an ebike,ebike_owner,"rng.random_for_df(households)[:,0] < ebikeownership"
hh owns an ebike,ebike_owner,"rng.random_for_df(households)[:,0] < ebikeownership"
Retired Adults Only Households,retired_adults_only_hh,(households.hhsize > 0) & (households.hhsize == num_retired_adults)
17 changes: 2 additions & 15 deletions resident/configs/annotate_landuse.csv
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
Description,Target,Expression
#,, annotate landuse table after import
household_density,household_density,land_use.TOTHHS / land_use.ACRES.clip(lower=1)
population_density,population_density,land_use['TOTPOP'] / land_use.ACRES.clip(lower=1)
employment_density,employment_density,(land_use['EMP_TOTAL'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
density_index,density_index,(household_density * employment_density) / (household_density + employment_density).clip(lower=1)
# FIXME pseudomsa is used in a few places but there is no equivalent in Metro landuse,,
,pseudomsa,0
# FIXME missing in landuse but used in SANDAG -- setting to 0 for now,,
,ACTIVE_ACRES,0
,micro_dist_local_bus,0
,microtransit,0
,nev,0
,ESCOOACCTIME,land_use.ESCOOACCTIME.fillna(0)
density_index,density_index,(land_use['duden'] * land_use['empden']) / (land_use['duden'] + land_use['empden']).clip(lower=1)
# FIXME need to decide on what the preschool target looks like,,
preschool target for mandatory constraint - sum of all size terms,preschool_target,land_use['TOTPOP'] + land_use.EMP_TOTAL
# FIME whats the criteria for parking zone?,,
Is a zone with parking,is_parking_zone,"np.where(land_use.PRKCST_MNTH > 0, True, False)"
Is a zone with parking used to apply parking location choice model,is_parking_zone,"np.where(land_use.PARKAREA==1, True, False)"
14 changes: 7 additions & 7 deletions resident/configs/annotate_persons.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ employment status type,pemploy,"pd.Series(np.zeros(len(persons)), index=persons.
,pemploy,"np.where((persons.age >= 16) & ((persons.ESR == 3) | (persons.ESR == 6)), PEMPLOY_NOT, pemploy)"
,pemploy,"np.where((persons.age>=16) & (persons.ESR != 3) & (persons.ESR != 6) & (persons.WKHP >= 35) & (persons.WKW >= 1) & (persons.WKW <= 4), PEMPLOY_FULL, pemploy)"
student category,pstudent,"pd.Series(np.zeros(len(persons)), index=persons.index)"
,pstudent,"np.where((pemploy == 1) & (persons.age >= 16), PSTUDENT_NOT, pstudent)"
,pstudent,"np.where((pemploy == 1) & (persons.age < 16), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((pemploy == PEMPLOY_FULL) & (persons.age >= 16), PSTUDENT_NOT, pstudent)"
,pstudent,"np.where((pemploy == PEMPLOY_FULL) & (persons.age < 16), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.SCHG < 1) & (persons.age >= 16), PSTUDENT_NOT, pstudent)"
,pstudent,"np.where((persons.SCHG < 1) & (persons.age < 16), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.SCHG >= 15) & (persons.age >= 16) & (pemploy != 1), PSTUDENT_UNIVERSITY, pstudent)"
,pstudent,"np.where((persons.SCHG >= 15) & (persons.age < 16) & (pemploy != 1), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.age <= 19) & (pemploy != 1) & (persons.SCHG >=1) & (persons.SCHG<=14), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.age > 19) & (pemploy != 1) & (persons.SCHG >=1) & (persons.SCHG<=14), PSTUDENT_UNIVERSITY, pstudent)"
,pstudent,"np.where((persons.SCHG >= 15) & (persons.age >= 16), PSTUDENT_UNIVERSITY, pstudent)"
,pstudent,"np.where((persons.SCHG >= 15) & (persons.age < 16), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.age <= 19) & (persons.SCHG >=1) & (persons.SCHG<=14), PSTUDENT_GRADE_OR_HIGH, pstudent)"
,pstudent,"np.where((persons.age > 19) & (persons.SCHG >=1) & (persons.SCHG<=14), PSTUDENT_UNIVERSITY, pstudent)"
,pstudent,"np.where(pstudent == 0, 3, pstudent)"
person type,ptype,"pd.Series(PTYPE_NONWORK, index=persons.index)"
,ptype,"np.where(persons.age >= 65, PTYPE_RETIRED, ptype)"
Expand Down Expand Up @@ -62,4 +62,4 @@ travel time sensitivity factor for non-work travel,time_factor_nonwork,"np.minim
,naics_code,_naics_code.astype('int') if all(_naics_code!=0) else 0
#,,
# FIXME does filling with -1 make sense here? depends on what the missing values mean,,
occupation categories mapped to workplace segments,occupation,persons.OCCP.fillna(-1).map(occupation_xwalk)
occupation categories mapped to workplace segments,occupation,persons.OCCP.fillna(999).map(occupation_xwalk)
1 change: 0 additions & 1 deletion resident/configs/annotate_persons_workplace.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Description,Target,Expression
,workplace_location_logsum,"np.where(persons.get('external_workplace_zone_id',-1) > 0, persons.get('external_workplace_location_logsum',-1), persons.workplace_location_logsum)"
,workplace_modechoice_logsum,"np.where(persons.get('external_workplace_zone_id',-1) > 0, persons.get('external_workplace_modechoice_logsum',-1), persons.workplace_modechoice_logsum)"
,distance_to_work,"np.where(workplace_zone_id>=0,skim_dict.lookup(persons.home_zone_id, workplace_zone_id, ('SOV_M_DIST', 'MD')),np.nan)"
work_zone_area_type,work_zone_area_type,"reindex(land_use.pseudomsa, persons.workplace_zone_id)"
#,, auto time to work - free flow travel time in both directions. MTC TM1 was MD and MD
#,,roundtrip_auto_time_to_work
,auto_time_home_to_work,"skim_dict.lookup(persons.home_zone_id, workplace_zone_id, ('SOV_M_TIME', 'AM'))"
Expand Down
2 changes: 0 additions & 2 deletions resident/configs/atwork_subtour_frequency.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ util_participation_in_joint_discretionary_tours,num_joint_discr,coefficient_part
util_log_of_the_work_tour_duration,@np.log(df.duration+0.5),coefficient_log_of_the_work_tour_duration_no_subtours,coefficient_log_of_the_work_tour_duration_eat,coefficient_log_of_the_work_tour_duration_business1,coefficient_log_of_the_work_tour_duration_maint,coefficient_log_of_the_work_tour_duration_business2,coefficient_log_of_the_work_tour_duration_eat_business
util_dummy_for_drive_alone_mode_for_work_tour,work_tour_is_SOV,coefficient_dummy_for_drive_alone_mode_for_work_tour_no_subtours,coefficient_dummy_for_drive_alone_mode_for_work_tour_eat,coefficient_dummy_for_drive_alone_mode_for_work_tour_business1,coefficient_dummy_for_drive_alone_mode_for_work_tour_maint,coefficient_dummy_for_drive_alone_mode_for_work_tour_business2,coefficient_dummy_for_drive_alone_mode_for_work_tour_eat_business
util_two_work_tours_by_person,num_work_tours==2,coefficient_two_work_tours_by_person_no_subtours,coefficient_two_work_tours_by_person_eat,coefficient_two_work_tours_by_person_business1,coefficient_two_work_tours_by_person_maint,coefficient_two_work_tours_by_person_business2,coefficient_two_work_tours_by_person_eat_business
util_workplace_urban_area_dummy,work_zone_area_type<4,coefficient_workplace_urban_area_dummy_no_subtours,coefficient_workplace_urban_area_dummy_eat,coefficient_workplace_urban_area_dummy_business1,coefficient_workplace_urban_area_dummy_maint,coefficient_workplace_urban_area_dummy_business2,coefficient_workplace_urban_area_dummy_eat_business
util_workplace_suburban_area_dummy,(work_zone_area_type>3) & (work_zone_area_type<6),coefficient_workplace_suburban_area_dummy_no_subtours,coefficient_workplace_suburban_area_dummy_eat,coefficient_workplace_suburban_area_dummy_business1,coefficient_workplace_suburban_area_dummy_maint,coefficient_workplace_suburban_area_dummy_business2,coefficient_workplace_suburban_area_dummy_eat_business
util_auto_accessibility_to_retail_for_work_taz,auOpRetail,coefficient_auto_accessibility_to_retail_for_work_taz_no_subtours,coefficient_auto_accessibility_to_retail_for_work_taz_eat,coefficient_auto_accessibility_to_retail_for_work_taz_business1,coefficient_auto_accessibility_to_retail_for_work_taz_maint,coefficient_auto_accessibility_to_retail_for_work_taz_business2,coefficient_auto_accessibility_to_retail_for_work_taz_eat_business
util_walk_accessibility_to_retail_for_work_taz,nmRetail,coefficient_walk_accessibility_to_retail_for_work_taz_no_subtours,coefficient_walk_accessibility_to_retail_for_work_taz_eat,coefficient_walk_accessibility_to_retail_for_work_taz_business1,coefficient_walk_accessibility_to_retail_for_work_taz_maint,coefficient_walk_accessibility_to_retail_for_work_taz_business2,coefficient_walk_accessibility_to_retail_for_work_taz_eat_business
util_dummy_for_worker_or_student_with_non_mandatory_tour,(is_worker | is_student) * num_non_mand,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_no_subtours,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_eat,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_business1,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_maint,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_business2,coefficient_dummy_for_worker_or_student_with_non_mandatory_tour_eat_business
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/auto_ownership.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ util_hh_income_verylow,household income <15k,@(df.income<15000),coef_household_i
util_hh_income_low,household income 15k-30k,@((df.income>=15000) & (df.income<30000)),coef_household_income_1530k_0_CARS,,coef_household_income_1530k_2_CARS,coef_household_income_1530k_3_CARS,coef_household_income_1530k_4_CARS
util_hh_income_mid,household income 30-60k,@((df.income>=30000) & (df.income<60000)),coef_household_income_3060k_0_CARS,,coef_household_income_3060k_2_CARS,coef_household_income_3060k_3_CARS,coef_household_income_3060k_4_CARS
util_hh_income_veryhigh,household income 100k+,@(df.income>=100000),coef_household_income_100k_0_CARS,,coef_household_income_100k_2_CARS,coef_household_income_100k_3_CARS,coef_household_income_100k_4_CARS
# FIXME no bldgsz equivalent in the Metro data,,,,,,
# FIXME no bldgsz equivalent in the Metro data,,,,,,,
# util_attached,attached dwelling,"@np.where(df.bldgsz == 2, 0, 1)",coef_attached_0_CARS,,coef_attached_2_CARS,coef_attached_3_CARS,coef_attached_4_CARS
# 0.785 sq miles in 1/2 mile radius * 640 acres per square mile = 502,,,,,,,
util_intersection_density,Intersection count in 1/2 mile radius of household,totint/502,coef_intersection_density_0_CARS,,coef_intersection_density_2_CARS,coef_intersection_density_3_CARS,coef_intersection_density_4_CARS
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/auto_ownership_preprocessor.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Description,Target,Expression
,_PERSON_COUNT,"lambda query, persons, households: persons.query(query).groupby('household_id').size().reindex(households.index).fillna(0).astype(np.int8)"
,num_old_retirees,"_PERSON_COUNT('80 <= age', persons, households)"
# averaging disaggregate accessibilities across all household members
# averaging disaggregate accessibilities across all household members,,
,shopping_accessibility_0,persons_merged.groupby('household_id').shopping_accessibility_0.mean().reindex(df.index)
,shopping_accessibility_1,persons_merged.groupby('household_id').shopping_accessibility_1.mean().reindex(df.index)
,shopping_accessibility_2,persons_merged.groupby('household_id').shopping_accessibility_2.mean().reindex(df.index)
Expand Down
3 changes: 1 addition & 2 deletions resident/configs/constants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ occupation_xwalk:
5: nat_res_cnstr_maint
6: prod_trans_move
999: missing # no occupation
-1: missing # no occupation

# RIDEHAIL Settings - all costs in dollars, times in minutes
Taxi_baseFare: 3.00
Expand Down Expand Up @@ -355,4 +354,4 @@ OpVTCr: 0.1442

# model region constants
KNR_available: True # SKATS does not have KNR, so set to False in configs_skats/constants.yaml
model_region_name: "Metro"
model_region_name: "Metro"
2 changes: 1 addition & 1 deletion resident/configs/destination_choice_size_terms.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
model_selector,segment,TOTHHS,TOTPOP,EMP_NRM,EMP_CON,EMP_MFG,EMP_WT,EMP_TWU,EMP_RET,EMP_IFRPBS,EMP_HCS,EMP_OSV,EMP_GOV,EMP_EDU,EMP_AER,EMP_AFS,EMP_TOTAL,ENROLLGRADEKto8,ENROLLGRADE9to12,COLLEGEENROLL,ACTIVE_ACRES,EXTERNAL
model_selector,segment,TOTHHS,TOTPOP,EMP_NRM,EMP_CON,EMP_MFG,EMP_WT,EMP_TWU,EMP_RET,EMP_IFRPBS,EMP_HCS,EMP_OSV,EMP_GOV,EMP_EDU,EMP_AER,EMP_AFS,EMP_TOTAL,ENROLLGRADEKto8,ENROLLGRADE9to12,COLLEGEENROLL,PARKATTRACT,EXTERNAL
workplace,mngt_busi_scic_arts,0,0,0.023150473,0.105478261,0.033921273,0.520588696,0.019155288,0.063194096,1,0.12997306,0.101893393,0.357056089,0.046020203,0.044384337,0.014582422,0,0,0,0,0,0
workplace,white_collar,0,0,0.011768937,0.051276887,0.174045033,1,0.206618229,0.914135674,0.494698223,0.170534494,0.142953744,0.337702324,0.048183584,0.052183296,0.031177613,0,0,0,0,0,0
workplace,blue_collar,0,0,0.044941354,0.059838173,0.160289782,0.055761149,0.692090573,0.577996613,0.289719626,0.051119614,0.300100358,0.169102427,0.010851157,0.045537226,0.039515775,0,0,0,0,0,0
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/disaggregate_accessibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ CREATE_TABLES:
# FIXME this should be updated when occupation_xwalk is updated
OCCP: # occupation codes
1: 1 # Management Occupations
2: -1 # Non-worker
2: 999 # Non-worker

PROTO_TOURS:
index_col: proto_tour_id
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/external_non_mandatory_identification.csv
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,
# FIXME need actual external counts at external station - fix in destination choice size terms too
# FIXME need actual external counts at external station - fix in destination choice size terms too,,,,
# 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(reindex(land_use.EXTERNAL, df.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,
Expand Down
2 changes: 2 additions & 0 deletions resident/configs/external_non_mandatory_identification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ 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

EXTERNAL_TOUR_ALT: 1
30 changes: 15 additions & 15 deletions resident/configs/external_worker_identification.csv

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of change to externalize alternative selection (remove hard-coding alt)

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
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,
Label,Description,Expression,work_internal,work_external
util_dist_to_nearest_ext_station,Distance to nearest external station,dist_to_external_zone,,coef_dist_to_nearest_ext_station
# FIXME just have a single external indicator not counts at the station here and in destination choice size terms,,,,
#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(reindex(land_use.EXTERNAL,df.closest_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.pemploy == 2,1,0)",coef_part_time,
util_inc_lt15,Household Income less than $15k,@(df.income<15000),coef_inc_lt15,
util_inc_15_25,Household income $15k-$25k,@(df.income>=15000) & (df.income<25000) ,coef_inc_15_25,
util_inc_25_50,Household Income $25k-$50k,@(df.income>=25000) & (df.income<50000) ,coef_inc_25_50,
util_inc_150_250,Household Income $150k-$50k,@(df.income>=150000) * (df.income<250000) ,coef_inc_150_250,
util_inc_250plus,Household Income $250k+,@(df.income>=250000),coef_inc_250plus,
util_asc,Alternative-specific constant for external worker,1,asc_external_worker,
util_global_switch,Global switch to have everything internal,@NO_EXTERNAL,-999,
util_2016,Constant for pre-COVID conditions,@PRE_COVID,asc_external_2016,
util_calib,Constant for calibration,1,0.35,
#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(reindex(land_use.EXTERNAL,df.closest_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.pemploy == 2,1,0)",,coef_part_time
util_inc_lt15,Household Income less than $15k,@(df.income<15000),,coef_inc_lt15
util_inc_15_25,Household income $15k-$25k,@(df.income>=15000) & (df.income<25000) ,,coef_inc_15_25
util_inc_25_50,Household Income $25k-$50k,@(df.income>=25000) & (df.income<50000) ,,coef_inc_25_50
util_inc_150_250,Household Income $150k-$50k,@(df.income>=150000) * (df.income<250000) ,,coef_inc_150_250
util_inc_250plus,Household Income $250k+,@(df.income>=250000),,coef_inc_250plus
util_asc,Alternative-specific constant for external worker,1,,asc_external_worker
util_global_switch,Global switch to have everything internal,@NO_EXTERNAL,,-999
util_2016,Constant for pre-COVID conditions,@PRE_COVID,,asc_external_2016
util_calib,Constant for calibration,1,,0.35
2 changes: 2 additions & 0 deletions resident/configs/external_worker_identification.yaml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also removes hard-coding

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ COEFFICIENTS: external_worker_identification_coeffs.csv

LOGIT_TYPE: MNL

EXTERNAL_WORKER_ALT: 1

# boolean column to filter choosers (True means keep)
# will only expose these people to the model
CHOOSER_FILTER_COLUMN_NAME: is_out_of_home_worker
Expand Down
Loading
Loading