Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8c717ca
pnr config updates
dhensle Sep 29, 2025
1a09279
Merge branch 'initial_model_setup' into pnr_capacity
dhensle Sep 29, 2025
8d0f43b
maz duplicate fix and data paths update
tedlini Oct 2, 2025
6d15fd1
add missing pnr coeff
tedlini Oct 2, 2025
cb7ea5b
add pnr data with some placeholders in land_use.csv
tedlini Oct 7, 2025
6bad34c
add pnr capacity and cost in configs
tedlini Oct 7, 2025
0f24578
make work tours unavaiable for children 15 and under
tedlini Oct 7, 2025
f0d17fc
add missing trip purpose probabilities
tedlini Oct 7, 2025
dfdbffe
fix availability condition for micromobility modes
tedlini Oct 9, 2025
e1687e3
update pnr lot capacity in land_use.csv
tedlini Oct 16, 2025
888f908
fix parking cost unit conversion in trip mode choice
tedlini Oct 16, 2025
d52ed03
modify tour mc coeff to test pnr
tedlini Nov 11, 2025
b834f64
add stop type and vehicle type constants to transit utilities
tedlini Nov 11, 2025
b16ba6f
update pnr parking cost utility
tedlini Nov 11, 2025
1227632
Use updated land use file and update MAZ/TAZ to new zone system
ednaaguilar Dec 24, 2025
8d6bae5
drop hh's with no MAZ match in new zones system
ednaaguilar Dec 24, 2025
7885ec9
Merge branch 'initial_model_setup' into pnr_capacity
dhensle Jan 12, 2026
80f4dc4
col name change
ednaaguilar Jan 15, 2026
68d0979
Merge branch 'pnr_capacity' of https://github.com/RSGInc/SimOR into p…
ednaaguilar Jan 15, 2026
8df1f40
working with new landuse file
dhensle Jan 15, 2026
2b352e2
Merge branch 'pnr_capacity' of https://github.com/RSGInc/SimOR into p…
dhensle Jan 15, 2026
c81147a
recreating test example dataset using new landuse
dhensle Jan 15, 2026
69d9539
using sov dist for bike time
dhensle Jan 15, 2026
be00190
fixing CI test to use UV
dhensle Jan 15, 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: 19 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ on:
- '**'

jobs:
oregon_metro_mini_example:
env:
conda-env-prefix: /usr/share/miniconda3/envs/conda-abm_dev
label: linux-64
oregon_metro_cropped_example:
strategy:
matrix:
region:
- oregon_metro
python-version:
- "3.10"
fail-fast: false
defaults:
run:
shell: bash -l {0}

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

steps:
Expand All @@ -36,32 +28,28 @@ jobs:
cd ..
git clone --branch SimOR_pnr https://github.com/RSGInc/activitysim.git
pwd
tree -L 2
ls -la

- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
# Install UV
- name: Install UV
uses: astral-sh/setup-uv@v4
with:
auto-update-conda: true
miniforge-version: latest
mamba-version: "2.0.5"
conda-solver: classic
conda-remove-defaults: true
environment-file: ../activitysim/conda-environments/github-actions-tests.yml
activate-environment: asim-test
python-version: ${{ matrix.python-version }}
version: "latest"

# Install cloned fork of ActivitySim
- name: Install ActivitySim in editable mode
# 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: |
pwd
cd ../activitysim
python -m pip install -e . --no-deps
cd ..
cd SimOR
ls
conda info -a
conda list
uv sync --frozen
uv pip install -e . --no-deps
uv pip list

# Run the test
- name: Run cropped example test
run: python resident/test/test_cropped_dataset.py
run: |
cd ../activitysim
uv run python $GITHUB_WORKSPACE/resident/test/test_cropped_dataset.py
11 changes: 10 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,17 @@
"args": [
"-c", "configs", // check the settings.yaml file for run settings!
"-d", "model_data/metro/data_cropped",
"-o", "outputs/test",
"-o", "outputs/cropped",
]
},
{
"name": "Run Preprocessor",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/resident",
"program": "preprocessor.py",
"console": "integratedTerminal",
"args": "preprocessor_settings.yaml"
}
]
}
10 changes: 5 additions & 5 deletions resident/configs/accessibility.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Description,Target,Expression
peak round trip distance,_auPkTime,"skim_od[('SOV_M_TIME', 'AM')] + skim_do[('SOV_M_TIME', 'PM')]"
decay function,_decay, exp(_auPkTime * dispersion_parameter_automobile)
auto peak retail,auPkRetail,df.EMP_RET * _decay
auto peak total,auPkTotal,df.EMP_TOT * _decay
auto peak total,auPkTotal,df.EMP_TOTAL * _decay
#,,
#,, auto off-peak
#,,
#,, assume midday occurs entirely in the midday period
off-peak round trip distance,_auOpTime,"skim_od[('SOV_M_TIME', 'MD')] + skim_do[('SOV_M_TIME', 'MD')]"
decay function,_decay, exp(_auOpTime * dispersion_parameter_automobile)
auto off-peak retail,auOpRetail,df.EMP_RET * _decay
auto off-peak total,auOpTotal,df.EMP_TOT * _decay
auto off-peak total,auOpTotal,df.EMP_TOTAL * _decay
#,,
#,, transit peak
#,, assume peak outbound transit occurs in AM
Expand All @@ -30,7 +30,7 @@ peak transit time,_trPkTime,(_trPkTime_od + _trPkTime_do).clip(0)
round trip path is available,_rt_available,(_trPkTime_od > 0) & (_trPkTime_do > 0)
decay function,_decay,_rt_available * exp(_trPkTime * dispersion_parameter_transit)
transit peak retail,trPkRetail,df.EMP_RET * _decay
transit peak total,trPkTotal,df.EMP_TOT * _decay
transit peak total,trPkTotal,df.EMP_TOTAL * _decay
transit peak total,trPkHH,df.TOTHHS * _decay
####,,
####,, transit off-peak
Expand All @@ -42,12 +42,12 @@ off-peak transit time,_trOpTime,(_trOpTime_od + _trPkTime_do).clip(0)
round trip path is available,_rt_available,(_trOpTime_od > 0) & (_trOpTime_do > 0)
decay function,_decay,_rt_available * exp(_trOpTime * dispersion_parameter_transit)
transit off-peak retail,trOpRetail,df.EMP_RET * _decay
transit off-peak total,trOpTotal,df.EMP_TOT * _decay
transit off-peak total,trOpTotal,df.EMP_TOTAL * _decay
#,,
#,, non motorized
#,,
non-motorized round trip distance,_nmDist,"skim_od[('SOV_M_DIST', 'MD')] + skim_do[('SOV_M_DIST', 'MD')]"
round trip path is available,_rt_available,_nmDist <= max_walk_distance
decay function,_decay,_rt_available * exp(_nmDist * dispersion_parameter_walk)
retail accessibility,nmRetail,df.EMP_RET * _decay
total accessibility,nmTotal,df.EMP_TOT * _decay
total accessibility,nmTotal,df.EMP_TOTAL * _decay
2 changes: 1 addition & 1 deletion resident/configs/accessibility.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# columns from land_use table to add to df
land_use_columns: ['EMP_RET', 'EMP_TOT', 'TOTHHS', 'walk_dist_local_bus']
land_use_columns: ['EMP_RET', 'EMP_TOTAL', 'TOTHHS', 'walk_dist_local_bus']
21 changes: 13 additions & 8 deletions resident/configs/annotate_landuse.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ 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)
# 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
,totint,0
,micro_dist_local_bus,0
,microtransit,0
,nev,0
,ESCOOACCTIME,land_use.ESCOOACCTIME.fillna(0)
# 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_TOT
Is a zone with parking,is_parking_zone,"np.where(land_use.PRKSPACES > 0, True, False)"
employment_density,employment_density,(land_use['EMP_TOT'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
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)"
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 not sure what the mapping between parking_type in the sandag model is and our current parkingConstrainedArea
temporary parking type,parking_type,land_use['PARKAREA']
# FIXME temporary density calculation -- again I don't think this calculation matches what's in sandag,,
dwelling unit density,duden,(land_use['TOTHHS'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
population density,popden,(land_use['TOTPOP'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
employment unit density,empden,(land_use['EMP_TOT'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
retail employment density,retempden,(land_use['EMP_RET'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
total park and ride capacity,PNR_CAP_TOTAL,(land_use['PNR_CAP_FORMAL'] + land_use['PNR_CAP_INFORMAL'])
employment unit density,empden,(land_use['EMP_TOTAL'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
retail employment density,retempden,(land_use['EMP_RET'] / land_use.ACRES.clip(lower=1)).clip(upper=500)
76 changes: 38 additions & 38 deletions resident/configs/destination_choice_size_terms.csv
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
model_selector,segment,TOTHHS,TOTPOP,EMP_NRM,EMP_CON,EMP_NHTMFG,EMP_HTMFG,EMP_WT,EMP_TWU,EMP_RET,EMP_IFRPBS,EMP_HCS,EMP_OSV,EMP_GOV,EMP_EDU,EMP_AER,EMP_ACC,EMP_FSD,EMP_TOT,ENROLL_K8,ENROLL_912,ENROLL_COLL,ACTIVE_ACRES,external_work,external_nonwork
workplace,constr_maint,0,0,0.114467809,1,0.019444044,0.078208267,0.053921216,0.042038744,0.057720006,0.149701138,0.007849633,0.160935475,0.137710644,0.014673052,0.021406453,0.007723607,0.001836382,0,0,0,0,0,0,0
workplace,health,0,0,0,0.000229486,0.000272515,0.003012005,0.028269818,0,0.056869523,0.064585993,1,0.078627673,0.181566529,0.019735804,0.006167439,0.001161773,8.61E-05,0,0,0,0,0,0,0
workplace,military,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
workplace,mngt_busi_scic_arts,0,0,0.023150473,0.105478261,0.033921273,0.345664415,0.520588696,0.019155288,0.063194096,1,0.12997306,0.101893393,0.357056089,0.046020203,0.044384337,0.014582422,0.071675764,0,0,0,0,0,0,0
workplace,prod_trans_move,0,0,0.044941354,0.059838173,0.160289782,1,0.055761149,0.692090573,0.577996613,0.289719626,0.051119614,0.300100358,0.169102427,0.010851157,0.045537226,0.039515775,0.116759706,0,0,0,0,0,0,0
workplace,sales_office,0,0,0.011768937,0.051276887,0.174045033,0.201999856,1,0.206618229,0.914135674,0.494698223,0.170534494,0.142953744,0.337702324,0.048183584,0.052183296,0.031177613,0.216603122,0,0,0,0,0,0,0
workplace,services,0,0,0.03214445,0.013782902,0.002031041,0.02819977,0.064277161,0.007689779,0.04669046,0.477412008,0.145096152,0.403566649,0.565075489,0.264904083,0.154746531,0.079950222,1,0,0,0,0,0,0,0
school,preschool,0,0.1888,0,0,0,0,0,0,0,0,1,1,1,1,0,0,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,0,0,1,0,0,0,0,0
school,highschool,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
school,university,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
non_mandatory,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
non_mandatory,shopping,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
non_mandatory,othmaint,0,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,0,0
non_mandatory,eatout,0.5512,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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.1,0,0,0,0,0,0,0
non_mandatory,othdiscr,0.04333,0,0,0,0,0,0.004465,0,0.042025,0.004465,0,1,0.005953,0,0.20337,0.03453,0.15911,0,0.03167,0.05136,0.02258,3.71685,0,0
atwork,atwork,0,0,0,0,0,0,0,0,0.104,0.0145,0,0,0,0,0,0,0.367,0,0,0,0,0,0,0
trip,work,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
trip,escort,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0
trip,shopping,0.000001,0,0,0,0,0,0,0,0.375,0,0,0,0,0,0,0,0.214689,0.0001,0,0,0,0,0,0
trip,othmaint,0.000001,0,0,0,0,0,0,0,1.2379255,0.025,1.464014,0,0.661904,0,0,0,0,0.0001,0,0,0,0,0,0
trip,eatout,0.010162,0,0,0,0,0,0,0,0.0689145,0,0,0,0,0,0,0,1,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,1,0,0,0,0,0,0,0
trip,othdiscr,0.027342,0,0,0,0,0,0,0,0.0194215,0,0,1,0,0,0.473744,0.092343,0.122872,0,0,0,0,3.71685,0.05,0
trip,univ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0
# not needed as school is not chosen as an intermediate trip destination,,,,,,,,,,,,,,,,,,,,,,,,,
#trip,gradeschool,0,,,,,,,,,,,,,,,,,,,,,,,
#trip,highschool,0,,,,,,,,,,,,,,,,,,,,,,,
external_workplace,external_workplace,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0
external_nonwork,external_nonwork,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,escort,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,shopping,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,othmaint,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,eatout,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,social,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,othdiscr,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
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
workplace,constr_maint,0,0,0.114467809,1,0.019444044,0.053921216,0.042038744,0.057720006,0.149701138,0.007849633,0.160935475,0.137710644,0.014673052,0.021406453,0.007723607,0,0,0,0,0,0
workplace,health,0,0,0,0.000229486,0.000272515,0.028269818,0,0.056869523,0.064585993,1,0.078627673,0.181566529,0.019735804,0.006167439,0.001161773,0,0,0,0,0,0
workplace,military,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
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,prod_trans_move,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
workplace,sales_office,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,services,0,0,0.03214445,0.013782902,0.002031041,0.064277161,0.007689779,0.04669046,0.477412008,0.145096152,0.403566649,0.565075489,0.264904083,0.154746531,0.079950222,0,0,0,0,0,0
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,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
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,univ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0
# not needed as school is not chosen as an intermediate trip destination,,,,,,,,,,,,,,,,,,,,,,
#trip,gradeschool,0,,,,,,,,,,,,,,,,,,,,
#trip,highschool,0,,,,,,,,,,,,,,,,,,,,
external_workplace,external_workplace,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_nonwork,external_nonwork,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,escort,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,shopping,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,othmaint,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,eatout,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,social,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
external_non_mandatory,othdiscr,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
4 changes: 3 additions & 1 deletion resident/configs/external_non_mandatory_identification.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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,
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,
# 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,
util_shopping,shopping tour ASC,"@np.where(df.tour_type == 'shopping', 1, 0)",coef_shopping,
util_othmaint,othmaint tour ASC,"@np.where(df.tour_type == 'othmaint', 1, 0)",coef_othmaint,
Expand Down
4 changes: 3 additions & 1 deletion resident/configs/external_worker_identification.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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_work,df.closest_external_zone))",coef_size_of_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,
Expand Down
8 changes: 5 additions & 3 deletions resident/configs/park_and_ride_lot_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ util_xfer_wait,transfer wait time,@(ldt_skims['WTW_XWT'] + dlt_skims['WTW_XWT'])
util_walk_time,walk time,@(ldt_skims['WTW_AUX'] + dlt_skims['WTW_AUX']),coef_xwalk_work
util_ivtt,in vehcile transit time,@(ldt_skims['WTW_TIV'] + dlt_skims['WTW_TIV']),coef_ivt_work
util_xfer_penalty,transfer penalty,"@(-23+23*np.exp(0.414*np.clip(ldt_skims['WTW_XFR'], a_min=None,a_max=4))) + (-23+23*np.exp(0.414*np.clip(dlt_skims['WTW_XFR'], a_min=None,a_max=4)))",coef_xfer_work
util_stop_type_constant,stop type constant,@(ldt_skims['WTW_RST'] + dlt_skims['WTW_RST']),coef_ivt_work
util_vehicle_type_constant,vehicle type constant,@(ldt_skims['WTW_VTC'] + dlt_skims['WTW_VTC']),coef_ivt_work
# FIXME need fares,,,
#util_fare,transit fare,"@df.transitSubsidyPassDiscount * (odt_skims['WTW_FARE'] + dot_skims['WTW_FARE']) * 100*df.num_participants/df.cost_sensitivity",coef_income_work
util_parking_cost,parking cost,@df['PNR_PRKCST'],coef_income_work
# Size Term,,,
util_size_variable,Size variable,@df['PNR_CAP_TOTAL'].apply(np.log1p),1
util_small_lot,Small lot penalty -- 10 min penalty,"@np.where(df['PNR_SPACES'] < 100,10,0)",coef_ivt_work
#util_med_lot,med lot penalty -- no penalty,"@np.where((df['PNR_SPACES'] >= 100) & (df['PNR_SPACES'] < 500),1,0) * 0",coef_ivt_work
util_large_lot,large lot penalty -- 10 min back,"@np.where(df['PNR_SPACES'] >= 500,-10,0)",coef_ivt_work
util_capacity,lot capacity availability,@df['pnr_lot_full'],coef_unavailable
4 changes: 2 additions & 2 deletions resident/configs/park_and_ride_lot_choice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ preprocessor:
- vehicles
- tours


LANDUSE_PNR_SPACES_COLUMN: PNR_CAP_TOTAL
LANDUSE_PNR_SPACES_COLUMN: PNR_SPACES

# will check the tour destination to make sure transit access is available
# if no transit access, then no PNR lot will be available and could get
# zero probabilities error
TRANSIT_SKIMS_FOR_ELIGIBILITY:
- WTW_TIV__PM
- WTW_TIV__MD

# Precompute destination eligibility for tours
# LANDUSE_COL_FOR_PNR_ELIGIBLE_DEST: is_pnr_eligible_destination
Expand Down
Loading