Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 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
ffb03ef
make MAZ col a requirement
ednaaguilar Mar 18, 2026
1e0c310
make knr skim retrieval conditional
ednaaguilar Mar 24, 2026
d50ad8a
create flat rate skim, skats configs
ednaaguilar Mar 24, 2026
5f55a12
skats configs
ednaaguilar Mar 24, 2026
816e60a
skata data gitignore
ednaaguilar Mar 24, 2026
96da430
add skats configs
ednaaguilar Mar 26, 2026
80ff469
densities capped, skats running
dhensle Mar 27, 2026
3d69091
drop existing acres field, check for density columns considering case
ednaaguilar Apr 8, 2026
66c416e
use INTHMI for int count
ednaaguilar Apr 8, 2026
30f8e80
updated export skim from initial_model_setup
ednaaguilar Apr 8, 2026
8b81454
add exp parking debug settings
ednaaguilar Apr 8, 2026
d8a26eb
updated visum export file from intial_model_setup
ednaaguilar Apr 8, 2026
c70754e
add comments and print statements
ednaaguilar Apr 8, 2026
1be9b2a
remove index
ednaaguilar Apr 8, 2026
5b38d02
remove pnr_spaces quick fix
ednaaguilar Apr 8, 2026
f0d30f5
add exp parking costs
ednaaguilar Apr 8, 2026
e850f48
update configs to use exp costs
ednaaguilar Apr 8, 2026
8dd7a4a
add exp parking to configs
ednaaguilar Apr 8, 2026
c648ab8
add cropped skats data
ednaaguilar Apr 9, 2026
c84e26b
Add skats ci
ednaaguilar Apr 23, 2026
68247fe
Update skats cropped daata
ednaaguilar Apr 23, 2026
c34ceab
update parking cost logic
ednaaguilar Apr 27, 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
5f1d6b0
Merge branch 'initial_model_setup' into maz_col_check
ednaaguilar Apr 28, 2026
5170c8c
update cropped data
ednaaguilar Apr 28, 2026
518987e
Add fares to cropped data
ednaaguilar Apr 28, 2026
b0aabdf
fix syntax error in pytype school expression
ednaaguilar Apr 28, 2026
b22be06
add telecommute_freq fallback if not in df.columns
ednaaguilar Apr 28, 2026
b887efa
update metro cropped land use
ednaaguilar Apr 28, 2026
f3c1638
add skats configs to test cropped
ednaaguilar 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
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
50 changes: 47 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- "3.10"
fail-fast: false

name: cropped-example-py${{ matrix.python-version }}
name: metro-cropped-example-py${{ matrix.python-version }}
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -49,7 +49,51 @@ jobs:
uv pip list

# Run the test
- name: Run cropped example test
- name: Run Metro cropped example test
run: |
cd ../activitysim
uv run python $GITHUB_WORKSPACE/resident/test/test_cropped_dataset.py
uv run python $GITHUB_WORKSPACE/resident/test/test_cropped_dataset_metro.py
skats_cropped_example:
strategy:
matrix:
python-version:
- "3.10"
fail-fast: false

name: skats-cropped-example-py${{ matrix.python-version }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

# Clone ActivitySim from SimOR_pnr branch
- name: Clone ActivitySim
run: |
cd ..
git clone --branch SimOR_pnr https://github.com/RSGInc/activitysim.git
pwd
ls -la

# Install UV
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
version: "latest"

# Set up Python with UV
- name: Set up Python
run: uv python install ${{ matrix.python-version }}

# Install dependencies using UV and the lock file from ActivitySim
- name: Install dependencies with UV
run: |
cd ../activitysim
uv sync --frozen
uv pip install -e . --no-deps
uv pip list

# Run the test
- name: Run SKATS cropped example test
run: |
cd ../activitysim
uv run python $GITHUB_WORKSPACE/resident/test/test_cropped_dataset_skats.py
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
"-o", "outputs/full",
]
},
{
"name": "Run 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",
]
},
{
"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
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
16 changes: 8 additions & 8 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 == 18) & (pstudent == 1))), PTYPE_SCHOOL, ptype)"
,ptype,"np.where(persons.age < 5, PTYPE_PRESCHOOL, ptype)"
,ptype,"np.where(pstudent == 2, PTYPE_UNIVERSITY, ptype)"
# FIXME are these rules for preschoolers still wanted?,,
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
7 changes: 5 additions & 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 @@ -351,4 +350,8 @@ PkVTCr: 0.1858
OpVTCa: 0.0432
OpVTCe: 0.0984
OpVTCl: 0.1442
OpVTCr: 0.1442
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"
23 changes: 12 additions & 11 deletions resident/configs/destination_choice_size_terms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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,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.05
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
2 changes: 1 addition & 1 deletion resident/configs/license_holding_status.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Label,Description,Expression,has_license,does_not_have_license
# dummy specification for license holding status model,,,
# dummy specification for license holding status model,,,,
util_constant,alternative specific constant,1,coef_has_license_ASC,0
util_unavailable_for_under_16,unavailable for persons under 16 years old,@df.age < 16,coef_unavailable,0
util_age,Age of person in years,@df.age,coef_age,0
Expand Down
4 changes: 2 additions & 2 deletions resident/configs/logging.yaml
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ duration_reference_bin,durationRefBin,20
departure_shift,departureLinearShift1,"(9-df.start)*(df.start<=9) + (df.start-9)*(df.start>9)"
arrival_shift,arrivalLinearShift1,"(29-df.end)*(df.end<=29) + (df.end-29)*(df.end>29)"
duration_shift,durationShift,"(20-df.duration)*(df.duration<=20) + (df.duration-20)*(df.duration>20)"
# school specific bins
# school specific bins,,
departure_reference_bin_school,departureRefBin_school,9
arrival_reference_bin_school,arrivalRefBin_school,29
duration_reference_bin_school,durationRefBin_school,16
Expand Down
Loading
Loading