Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 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
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
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
85 changes: 85 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,91 @@
"-o", "outputs/full",
]
},
{
"name": "Metro Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/metro/data_full",
"-o", "outputs/estimation_metro",
]
},
{
"name": "SKATS Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_skats",
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/skats/data_full",
"-o", "outputs/estimation_skats",
]
},
{
"name": "LCOG Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/lcog/data_full",
"-o", "outputs/estimation_lcog",
]
},
{
"name": "CALM Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/calm/data_full",
"-o", "outputs/estimation_calm",
]
},
{
"name": "Bend Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/bend/data_full",
"-o", "outputs/estimation_bend",
]
},
{
"name": "Rogue Estimation Mode",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "simulation.py",
"console": "integratedTerminal",
"args": [
"-c", "configs_estimation", // check the settings.yaml file for run settings!
"-c", "configs",
"-d", "model_data/rogue/data_full",
"-o", "outputs/rogue",
]
},
{
"name": "Run Cropped Example",
"type": "debugpy",
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
3 changes: 2 additions & 1 deletion resident/configs/annotate_households.csv
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ home_is_rural,home_is_rural,"reindex(land_use.pseudomsa, households.home_zone_id
,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)
2 changes: 1 addition & 1 deletion resident/configs/annotate_landuse.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ household_density,household_density,land_use.TOTHHS / land_use.ACRES.clip(lower=
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)
effective active acres,ACTIVE_ACRES,land_use.ACRES * land_use.PARKATTRACT
# 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
Expand Down
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)
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"
27 changes: 14 additions & 13 deletions 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,ACTIVE_ACRES,external_size_term
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 All @@ -10,21 +10,22 @@ school,preschool,0,0.1888,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0
school,gradeschool,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
school,highschool,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
school,university,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
non_mandatory,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
non_mandatory,shopping,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0
non_mandatory,othmaint,0,0,0,0,0,0,0,1.60296,0.42255,0.42255,0,0.24001,0,0,0,0,0,0,0,0,0
non_mandatory,eatout,0.5512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
non_mandatory,social,0.3006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
non_mandatory,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0.1,0
non_mandatory,shopping,0.01,0,0.1,0.1,0.1,0.1,0.1,1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0,0,0,0,0.1,0
non_mandatory,othmaint,0.01,0,0.1,0.1,0.1,0.1,0.1,1.60296,0.42255,0.42255,0.1,0.24001,0.1,0.1,0.1,0,0,0,0,0.1,0
non_mandatory,eatout,0.5512,0,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,1,0,0,0,0,0.1,0
non_mandatory,social,0.3006,0,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0,0,0,0,0.1,0
non_mandatory,othdiscr,0.04333,0,0,0,0,0.004465,0,0.042025,0.004465,0,1,0.005953,0,0.20337,0.03453,0,0.03167,0.05136,0.02258,3.71685,0
atwork,atwork,0,0,0,0,0,0,0,0.104,0.0145,0,0,0,0,0,0,0,0,0,0,0,0
atwork,atwork,0,0,0.1,0.1,0.1,0.1,0.1,0.104,0.0145,0.1,0.1,0.1,0.1,0.1,0.1,0,0,0,0,0,0
trip,work,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
trip,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0
trip,shopping,0.000001,0,0,0,0,0,0,0.375,0,0,0,0,0,0,0,0.0001,0,0,0,0,0
trip,othmaint,0.000001,0,0,0,0,0,0,1.2379255,0.025,1.464014,0,0.661904,0,0,0,0.0001,0,0,0,0,0
trip,eatout,0.010162,0,0,0,0,0,0,0.0689145,0,0,0,0,0,0,0,0,0,0,0,0,0
trip,social,0.495249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
trip,othdiscr,0.027342,0,0,0,0,0,0,0.0194215,0,0,1,0,0,0.473744,0.092343,0,0,0,0,3.71685,0.05
trip,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0.1,0
trip,shopping,0.000001,0,0,0,0,0,0,0.375,0,0,0,0,0,0,0,0.0001,0,0,0,0.1,0
trip,othmaint,0.000001,0,0,0,0,0,0,1.2379255,0.025,1.464014,0,0.661904,0,0,0,0.0001,0,0,0,0.1,0
trip,eatout,0.010162,0,0,0,0,0,0,0.0689145,0,0,0,0,0,0,0,0,0,0,0,0.1,0
trip,social,0.495249,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.1,0
trip,othdiscr,0.027342,0,0,0,0,0,0,0.0194215,0,0,1,0,0,0.473744,0.092343,0,0,0,0,3.71685,0
trip,univ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
trip,school,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0
# not needed as school is not chosen as an intermediate trip destination,,,,,,,,,,,,,,,,,,,,,,
#trip,gradeschool,0,,,,,,,,,,,,,,,,,,,,
#trip,highschool,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
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
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
2 changes: 1 addition & 1 deletion resident/configs/joint_tour_frequency_composition.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ util_constant_for_2_visiting_tour,Constant for 2 visiting tour,@df.social==2,coe
util_constant_for_1_visiting_tour,Constant for 1 visiting tour,@df.social==2,coef_constant_for_1_visiting_tour
util_1_visiting_and_1_discretionary_tour,1 Visiting and 1 Discretionary Tour,@((df.social==1) & (df.othdiscr==1)),coef_1_visiting_and_1_discretionary_tour
util_constant_for_2_discretionary_tour,Constant for 2 discretionary tour,othdiscr==2,coef_constant_for_2_discretionary_tour
util_constant_for_2_discretionary_tour,Constant for 2 discretionary tour,othdiscr==1,coef_constant_for_1_discretionary_tour
util_constant_for_1_discretionary_tour,Constant for 1 discretionary tour,othdiscr==1,coef_constant_for_1_discretionary_tour
util_number_of_active_full_time_workers_shopping,Number of Active Full time workers /Shopping,num_travel_active_full_time_workers * shopping,coef_number_of_active_full_time_workers_shopping
util_number_of_active_nonworkers_shopping,Number of Active Non-workers /Shopping,num_travel_active_non_workers * shopping,coef_number_of_active_nonworkers_shopping
util_number_of_active_pre_driving_age_school_children_shopping,Number of Active Pre- Driving Age School Children /Shopping,num_travel_active_pre_driving_age_school_kids * shopping,coef_number_of_active_pre_driving_age_school_children_shopping
Expand Down
Loading
Loading