Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 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
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
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
08fd348
Merge branch 'main' into estimation
dhensle Aug 17, 2026
4f37679
including age 19 in highschool ptype if student
dhensle Aug 17, 2026
ac57cf5
Update estimation configs
americalexander Aug 22, 2026
fdaca7c
change external tour alt
americalexander Aug 26, 2026
14a3cac
Add visualizer setup to batch script
americalexander Sep 2, 2026
1cc45c0
Add metro cropped example to batch and CI scripts
americalexander Sep 2, 2026
595bd08
Add visualizer setup to CI
americalexander Sep 2, 2026
8acbb6c
Replace visualizer config
americalexander Sep 2, 2026
36188ae
Fix output dir
americalexander Sep 2, 2026
dfa8850
Fix path again
americalexander Sep 2, 2026
b9fe490
More path fixes
americalexander Sep 2, 2026
03765cf
Update metro cropped visualizer config
americalexander Sep 2, 2026
5c7c7af
various path bugfixes, add missing cropped file
americalexander Sep 2, 2026
b0e457e
More visualizer fixes
americalexander Sep 2, 2026
90f7834
minor readme edits
dhensle Sep 4, 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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ jobs:
uv pip install -e . --no-deps
uv pip list

# Clone the ActivitySim visualizer and build its virtual environment
- name: Set up ActivitySim visualizer
run: |
mkdir -p $GITHUB_WORKSPACE/ext_dependencies
cd $GITHUB_WORKSPACE/ext_dependencies
git clone --branch main https://github.com/RSGInc/activitysim_visualizer.git
cd activitysim_visualizer
uv sync

# Run the test
- name: Run Metro cropped example test
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Before running the model, make sure the following are available:

`sandag_parking` is not required for a typical model run. It is only needed when preparing land use inputs that require expected parking costs. In that workflow, it can be run once to generate the parking cost input file used by the preprocessor.

If permissions errors arise, try running the setup with Administrator privileges. The Visum Python package install in particular may require elevated permissions.
**If permissions errors arise, try running the setup with Administrator privileges. The Visum Python package install in particular may require elevated permissions.**

2. **Place the Visum version file**

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
3 changes: 2 additions & 1 deletion resident/configs/annotate_households.csv
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ number of retired adults in the household,num_retired_adults,"_PERSON_COUNT('pty
,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)
14 changes: 7 additions & 7 deletions resident/configs/annotate_persons.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ 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)"
,ptype,"np.where(pemploy == 2, PTYPE_PART, ptype)"
,ptype,"np.where(pemploy == 1, PTYPE_FULL, ptype)"
,ptype,"np.where((persons.age >= 5) & ((persons.age < 18) | ((persons.age == 18) & (pstudent == 1))), PTYPE_SCHOOL, ptype)"
,ptype,"np.where(((persons.age >= 5) & (persons.age < 18)) | (persons.age.isin([18,19]) & (pstudent == PSTUDENT_GRADE_OR_HIGH)), PTYPE_SCHOOL, ptype)"
,ptype,"np.where(persons.age < 5, PTYPE_PRESCHOOL, ptype)"
,ptype,"np.where(pstudent == 2, PTYPE_UNIVERSITY, ptype)"
is_student,is_student,"np.isin(pstudent, [PSTUDENT_GRADE_OR_HIGH, PSTUDENT_UNIVERSITY])"
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/constants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -330,4 +330,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"
MSA_POP: 2500000 # used in vehicle type choice model
MSA_POP: 2500000 # used in vehicle type choice model
2 changes: 1 addition & 1 deletion resident/configs/disaggregate_accessibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CREATE_TABLES:
2: "N"
occupation: # 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: 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: 0
28 changes: 14 additions & 14 deletions resident/configs/external_worker_identification.csv
Comment thread
dhensle marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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,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,
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
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
Comment thread
dhensle marked this conversation as resolved.
Resolved
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
4 changes: 2 additions & 2 deletions resident/configs/logging.yaml
Comment thread
dhensle marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ logging:
class: logging.Formatter
# format: '%(levelname)s - %(name)s - %(message)s'
format: '%(levelname)s - %(message)s'
datefmt: '%d/%m/%Y %H:%M:%S'
datefmt: '%Y-%m-%dT%H:%M:%S%z'

fileFormatter:
class: logging.Formatter
format: '%(asctime)s - %(levelname)s - %(name)s - %(message)s'
datefmt: '%d/%m/%Y %H:%M:%S'
datefmt: '%Y-%m-%dT%H:%M:%S%z'

elapsedFormatter:
(): activitysim.core.tracing.ElapsedTimeFormatter
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/non_mandatory_tour_destination.csv
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ util_joint_0_2_ASC,joint tours in 0_2bin calibration constant,"@(_DIST.between(0
util_joint_2_5_ASC,joint tours in 2_5bin calibration constant,"@(_DIST.between(2,5)) * (df.get('tour_category', default=False) == 'joint')",,coef_abm3_dist_2_5jointmaint_asc,coef_abm3_dist_2_5jointdisc_asc,coef_abm3_dist_2_5jointmaint_asc,coef_abm3_dist_2_5jointdisc_asc,coef_abm3_dist_2_5jointdisc_asc
util_joint_5_10_ASC,joint tours in 5_10bin calibration constant,"@(_DIST.between(5,10)) * (df.get('tour_category', default=False) == 'joint')",,coef_abm3_dist_5_10jointmaint_asc,coef_abm3_dist_5_10jointdisc_asc,coef_abm3_dist_5_10jointmaint_asc,coef_abm3_dist_5_10jointdisc_asc,coef_abm3_dist_5_10jointdisc_asc
util_joint_10_30_ASC,joint tours in 10_30bin calibration constant,"@(_DIST.between(10,30)) * (df.get('tour_category', default=False) == 'joint')",,coef_abm3_dist_10_30jointmaint_asc,coef_abm3_dist_10_30jointdisc_asc,coef_abm3_dist_10_30jointmaint_asc,coef_abm3_dist_10_30jointdisc_asc,coef_abm3_dist_10_30jointdisc_asc
util_indiv_dist_ASC,indiv tours in distance calibration constant,"@(_DIST) * (df.get('tour_category', default=False) == 'joint')",,0.10,,0.10,,
util_joint_dist_ASC,indiv tours in distance calibration constant,"@(_DIST) * (df.get('tour_category', default=False) == 'joint')",,0.10,,0.10,,
1 change: 1 addition & 0 deletions resident/configs/non_mandatory_tour_destination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SPEC: non_mandatory_tour_destination.csv
COEFFICIENTS: non_mandatory_tour_destination_coefficients.csv

SAMPLE_SIZE: 30
ESTIMATION_SAMPLE_SIZE: 30

SIZE_TERM_SELECTOR: non_mandatory

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,5 @@ escort,shopping,othmaint,eatout,social,othdiscr
2,1,1,0,1,1
2,1,2,1,0,0
2,0,2,1,1,0
2,0,2,0,1,1
2,1,1,1,1,0
1 change: 1 addition & 0 deletions resident/configs/non_mandatory_tour_scheduling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ SIMULATE_CHOOSER_COLUMNS:
- num_non_escort_tours
- num_add_shop_maint_tours
- num_add_soc_discr_tours
- retired_adults_only_hh

LOGSUM_SETTINGS: tour_mode_choice.yaml

Expand Down
2 changes: 2 additions & 0 deletions resident/configs/school_escorting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ ALTS: school_escorting_alts.csv

LOGIT_TYPE: MNL

ESCORTEE_AGE_CUTOFF: 19

NUM_ESCORTEES: 3
NUM_CHAPERONES: 2

Expand Down
6 changes: 3 additions & 3 deletions resident/configs/school_location.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Label,Description,Expression,university,highschool,gradeschool,preschool
local_dist,,"_DIST@skims[('SOV_M_DIST', 'MD')]",1,1,1,1
dest_college_enroll,total the destination TAZ (summed over MAZs and df index is dest_TAZ),"_dCOLLEGEENROLL@reindex(land_use.groupby('TAZ').COLLEGEENROLL.sum(), df.index)",1,1,1,1
util_mode_choice_logsum,Mode choice logsum,mode_choice_logsum,coef_mclogsum_univ,coef_mclogsum_hsch,coef_mclogsum_gs,coef_mclogsum_ps
util_Distance,Distance,@_DIST.clip(upper=50),coef_dist_univ,coef_dist_hsch,coef_dist_gs,coef_dist_ps
util_Distance,Distance,@_DIST.clip(upper=50).fillna(0),coef_dist_univ,coef_dist_hsch,coef_dist_gs,coef_dist_ps
util_log_Distance,log_Distance,@np.log(_DIST.clip(upper=50)+1),coef_lndist_univ,coef_zero,coef_zero,coef_lndist_ps
util_Distance_squareroot,Squareroot of distance,@_DIST.clip(upper=50)**0.5,coef_sqrtdist_univ,coef_sqrtdist_hsch,coef_sqrtdist_gs,coef_sqrtdist_ps
util_Distance_squared,Distance_squared,@_DIST.clip(upper=50)**2,coef_sqrddist_univ,coef_sqrddist_hsch,coef_sqrddist_gs,coef_sqrddist_ps
Expand All @@ -11,10 +11,10 @@ util_Distance_worker_univ,Distance for a worker_university specific,"@np.where(d
util_Distance_largeuniversity_univ,Distance for large university enrollment,"@np.where(_dCOLLEGEENROLL>5000, _DIST.clip(upper=50), 0)",coef_univenrol_dist_univ,coef_zero,coef_zero,coef_zero
util_Distance _lowincome_prek,Distance - low income,"@np.where(df.income<60000, _DIST.clip(upper=50), 0)",coef_zero,coef_zero,coef_zero,coef_lowincdist_ps
util_Distance - age03_prek,Distance - age 0 to 3,"@np.where(df.age<3,_DIST.clip(upper=50),0)",coef_zero,coef_zero,coef_zero,coef_age03dist_ps
util_LoggedSize,Logged Size variable - University specific,@df['size_term'].apply(np.log1p),coef_lnSize,coef_lnSize,coef_lnSize,coef_lnSize
util_LoggedSize,Logged Size variable - University specific,@df['size_term'].fillna(0).apply(np.log1p),coef_lnSize,coef_lnSize,coef_lnSize,coef_lnSize
util_no_attractions,no attractions if logged university size is zero,@df['size_term']==0,-999,-999,-999,-999
util_sample_of_corrections_factor,Sample of alternatives correction factor,"@np.minimum(np.log(df.pick_count/df.prob), 60)",1,1,1,1
util_sp_utility_adjustment,shadow price utility adjustment,@df['shadow_price_utility_adjustment'],1,1,1,
util_sp_utility_adjustment,shadow price utility adjustment,@df['shadow_price_utility_adjustment'].fillna(0),1,1,1,
#,,,,,,
util_ABM2calibration_0-1miles,ABM2 calibration_0-1miles,@(_DIST<1),coef_zero,coef_abmcalib_01miles,coef_abmcalib_01miles,coef_abmcalib_01miles
util_ABM2calibration_1-2miles,ABM2 calibration_1-2miles,@(_DIST<2) * (_DIST>=1),coef_zero,coef_abmcalib_12miles,coef_abmcalib_12miles,coef_abmcalib_12miles
Expand Down
2 changes: 1 addition & 1 deletion resident/configs/school_location.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SAMPLE_SIZE: 30
ESTIMATION_SAMPLE_SIZE: 10
ESTIMATION_SAMPLE_SIZE: 30

SIMULATE_CHOOSER_COLUMNS:
- home_zone_id
Expand Down
1 change: 1 addition & 0 deletions resident/configs/tour_mode_choice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ LOGSUM_CHOOSER_COLUMNS:
- age
- SEX
- auto_ownership
- num_drivers
- num_adults
- ptype
- number_of_participants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ treat tours as work if tour_type not yet decided,tour_type,"df.get('tour_type',
popempdenpermi calculated in preprocessor and input via landuse file,_origin_density_measure,"reindex(land_use.popempdenpermi, df[orig_col_name])"
,_dest_density_measure,"reindex(land_use.popempdenpermi, df[dest_col_name])"
,origin_density,"pd.cut(_origin_density_measure, bins=[-np.inf, 500, 2000, 5000, 15000, np.inf], labels=[5, 4, 3, 2, 1]).astype(int)"
,dest_density,"pd.cut(_dest_density_measure, bins=[-np.inf, 500, 2000, 5000, 15000, np.inf], labels=[5, 4, 3, 2, 1]).astype(int)"
,dest_density,"pd.cut(_dest_density_measure.fillna(0), bins=[-np.inf, 500, 2000, 5000, 15000, np.inf], labels=[5, 4, 3, 2, 1]).astype(int)"
,origin_zone_taxi_wait_time_mean,"origin_density.map({k: v for k, v in Taxi_waitTime_mean.items()})"
,origin_zone_taxi_wait_time_sd,"origin_density.map({k: v for k, v in Taxi_waitTime_sd.items()})"
,dest_zone_taxi_wait_time_mean,"dest_density.map({k: v for k, v in Taxi_waitTime_mean.items()})"
Expand Down
4 changes: 4 additions & 0 deletions resident/configs/transit_pass_subsidy.csv
Comment thread
dhensle marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ util_availability,Availability of transit pass,transit_subsidy_available==False,
util_ft_ASC,ptype_ft calibration constant,@df.ptype == 1,0,coef_ft_asc
util_pt_ASC,ptype_pt calibration constant,@df.ptype == 2,0,coef_pt_asc
util_un_ASC,ptype_un calibration constant,@df.ptype == 3,0,coef_un_asc
util_transit_ivt_home_to_work_walk_peak,Walk-transit home to work peak availability,@df.transit_ivt_home_to_work_walk_peak.fillna(0),0,coef_transit_ivt_home_to_work_walk_peak
util_transit_ivt_home_to_work_drive_peak,Drive-transit home to work peak availability,@df.transit_ivt_home_to_work_drive_peak.fillna(0),0,coef_transit_ivt_home_to_work_drive_peak
util_transit_ivt_home_to_school_walk_peak,Walk-transit home to school peak availability,@df.transit_ivt_home_to_school_walk_peak.fillna(0),0,coef_transit_ivt_home_to_school_walk_peak
util_transit_ivt_home_to_school_drive_peak,Drive-transit home to school peak availability,@df.transit_ivt_home_to_school_drive_peak.fillna(0),0,coef_transit_ivt_home_to_school_drive_peak
4 changes: 4 additions & 0 deletions resident/configs/transit_pass_subsidy_coefficients.csv
Comment thread
dhensle marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ coef_unavailable,-999.0,F
coef_ft_asc,-0.240,F
coef_pt_asc,-0.250,F
coef_un_asc,0.30,F
coef_transit_ivt_home_to_work_walk_peak,0,F
coef_transit_ivt_home_to_work_drive_peak,0,F
coef_transit_ivt_home_to_school_walk_peak,0,F
coef_transit_ivt_home_to_school_drive_peak,0,F
8 changes: 5 additions & 3 deletions resident/configs/transit_pass_subsidy_preprocessor.csv
Comment thread
dhensle marked this conversation as resolved.
Resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
Description,Target,Expression
,_transit_ivt_home_to_work_walk_peak,"skim_dict.lookup(persons.home_zone_id, persons.workplace_zone_id, ('WTW_TIV', 'AM'))"
,_transit_ivt_home_to_work_drive_peak,"skim_dict.lookup(persons.home_zone_id, persons.workplace_zone_id, ('KTW_TIV', 'AM')) if KNR_available else 0"
,transit_subsidy_available,((_transit_ivt_home_to_work_walk_peak > 0) | (_transit_ivt_home_to_work_drive_peak > 0)) & (persons.workplace_zone_id > 0)
,transit_ivt_home_to_work_walk_peak,"skim_dict.lookup(persons.home_zone_id, persons.workplace_zone_id, ('WTW_TIV', 'AM'))"
,transit_ivt_home_to_work_drive_peak,"skim_dict.lookup(persons.home_zone_id, persons.workplace_zone_id, ('KTW_TIV', 'AM')) if KNR_available else 0"
,transit_ivt_home_to_school_walk_peak,"skim_dict.lookup(persons.home_zone_id, persons.school_zone_id, ('WTW_TIV', 'AM'))"
,transit_ivt_home_to_school_drive_peak,"skim_dict.lookup(persons.home_zone_id, persons.school_zone_id, ('KTW_TIV', 'AM')) if KNR_available else 0"
,transit_subsidy_available,persons.is_worker
,trn_wk_access_hh,"np.where(persons.workplace_zone_id > 0, reindex(accessibility.trPkHH, persons.workplace_zone_id), 0)"
Loading
Loading