-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit of ABM3 configs and CI infrastructure
- Loading branch information
Showing
296 changed files
with
1,206,172 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Implementation Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
env: | ||
CACHE_NUMBER: 0 # increase to reset cache manually | ||
|
||
jobs: | ||
foundation: | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
name: linux-64-py${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout the code in this repository | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: 'activitysim-sandag-abm3' | ||
|
||
# checkout the main branch of ActivitySim itself | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: 'ActivitySim/activitysim' | ||
ref: main | ||
path: 'activitysim' | ||
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing | ||
|
||
- name: Setup Mambaforge | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: asim-test | ||
use-mamba: true | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Set cache date for year and month | ||
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: /usr/share/miniconda3/envs/asim-test | ||
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }} | ||
id: cache | ||
|
||
- name: Update environment | ||
run: | | ||
mamba env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml | ||
mamba install --yes \ | ||
"psutil=5.9.5" \ | ||
"pydantic=2.6.1" \ | ||
"pypyr=5.8.0" \ | ||
"pytables=3.6.1" \ | ||
"pytest-cov" \ | ||
"pytest-regressions=2.5.0" \ | ||
"scikit-learn=1.2.2" \ | ||
"sharrow>=2.6.0" \ | ||
"simwrapper=1.8.5" \ | ||
"xarray=2023.2.0" \ | ||
"zarr=2.14.2" \ | ||
"zstandard=0.21.0" | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
|
||
- name: Install activitysim | ||
# installing without dependencies is faster, we trust that all needed dependencies | ||
# are in the conda environment defined above. Also, this avoids pip getting | ||
# confused and reinstalling tables (pytables). | ||
run: | | ||
python -m pip install -e ./activitysim --no-deps | ||
- name: Conda checkup | ||
run: | | ||
mamba info -a | ||
mamba list | ||
- name: Test this implementation | ||
run: | | ||
python -m pytest sandag-abm3-example/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
output/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
# sandag-abm3-example | ||
# sandag-abm3-example | ||
|
||
SANDAG ABM3 Example -- Currently in development... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,296 @@ | ||
## ActivitySim | ||
## See full license in LICENSE.txt. | ||
|
||
scenarioYear: 2022 | ||
# set below to 1 for everything to be internal, 0 otherwise | ||
NO_EXTERNAL: 0 | ||
|
||
# set below to be 1 for years before 2021, 0 otherwise | ||
PRE_COVID: 0 | ||
|
||
walk_speed: 3 #mph | ||
|
||
#HHT_NONE: 0 | ||
#HHT_FAMILY_MARRIED: 1 | ||
#HHT_FAMILY_MALE: 2 | ||
#HHT_FAMILY_FEMALE: 3 | ||
#HHT_NONFAMILY_MALE_ALONE: 4 | ||
#HHT_NONFAMILY_MALE_NOTALONE: 5 | ||
#HHT_NONFAMILY_FEMALE_ALONE: 6 | ||
#HHT_NONFAMILY_FEMALE_NOTALONE: 7 | ||
|
||
# convenience for expression files | ||
HHT_NONFAMILY: [4, 5, 6, 7] | ||
HHT_FAMILY: [1, 2, 3] | ||
|
||
PSTUDENT_GRADE_OR_HIGH: 1 | ||
PSTUDENT_UNIVERSITY: 2 | ||
PSTUDENT_NOT: 3 | ||
|
||
GRADE_SCHOOL_MAX_AGE: 14 | ||
GRADE_SCHOOL_MIN_AGE: 5 | ||
|
||
SCHOOL_SEGMENT_NONE: 0 | ||
SCHOOL_SEGMENT_PREK: 1 | ||
SCHOOL_SEGMENT_GRADE: 2 | ||
SCHOOL_SEGMENT_HIGH: 3 | ||
SCHOOL_SEGMENT_UNIV: 4 | ||
|
||
|
||
INCOME_SEGMENT_LOW: 1 | ||
INCOME_SEGMENT_MED: 2 | ||
INCOME_SEGMENT_HIGH: 3 | ||
INCOME_SEGMENT_VERYHIGH: 4 | ||
|
||
PEMPLOY_FULL: 1 | ||
PEMPLOY_PART: 2 | ||
PEMPLOY_NOT: 3 | ||
PEMPLOY_CHILD: 4 | ||
|
||
PTYPE_FULL: 1 | ||
PTYPE_PART: 2 | ||
PTYPE_UNIVERSITY: 3 | ||
PTYPE_NONWORK: 4 | ||
PTYPE_RETIRED: 5 | ||
PTYPE_DRIVING: 6 | ||
PTYPE_SCHOOL: 7 | ||
PTYPE_PRESCHOOL: 8 | ||
|
||
PTYPE_NAME: | ||
PTYPE_FULL: 1 | ||
PTYPE_PART: 2 | ||
PTYPE_UNIVERSITY: 3 | ||
PTYPE_NONWORK: 4 | ||
PTYPE_RETIRED: 5 | ||
PTYPE_DRIVING: 6 | ||
PTYPE_SCHOOL: 7 | ||
PTYPE_PRESCHOOL: 8 | ||
PTYPE_VALUE: | ||
1: PTYPE_FULL | ||
2: PTYPE_PART | ||
3: PTYPE_UNIVERSITY | ||
4: PTYPE_NONWORK | ||
5: PTYPE_RETIRED | ||
6: PTYPE_DRIVING | ||
7: PTYPE_SCHOOL | ||
8: PTYPE_PRESCHOOL | ||
|
||
|
||
CDAP_ACTIVITY_MANDATORY: M | ||
CDAP_ACTIVITY_NONMANDATORY: N | ||
CDAP_ACTIVITY_HOME: H | ||
|
||
# Defines cuts on psedomsa in landuse file. Replacement for area_type | ||
cbd_threshold: 2 | ||
urban_threshold: 5 | ||
rural_threshold: 5 | ||
|
||
distributed_time_factor_work_mean: 1.0 | ||
distributed_time_factor_work_stddev: 0.7 | ||
distributed_time_factor_nonwork_mean: 1.0 | ||
distributed_time_factor_nonwork_stddev: 0.6 | ||
distributed_time_factor_min: 0.1 | ||
distributed_time_factor_max: 10 | ||
|
||
c_drive: 1.5 | ||
|
||
useAV: 0 | ||
autoIVTFactorAV: 0.75 | ||
autoParkingCostFactorAV: 0.5 | ||
autoCostPerMileFactorAV: 0.7 | ||
autoTerminalTimeFactorAV: 0.65 | ||
minAgeDriveAloneAV: 13 | ||
|
||
|
||
#valueOfTime: 8.00 | ||
costPerMile: 18.29 | ||
costShareSr2: 1.75 | ||
costShareSr3: 2.50 | ||
waitThresh: 10.00 | ||
walkThresh: 1.50 | ||
shortWalk: 0.333 | ||
longWalk: 0.667 | ||
walkSpeed: 3.00 | ||
bikeThresh: 6.00 | ||
bikeSpeed: 7.80 | ||
ebikeSpeed: 10.00 | ||
escooterSpeed: 6.70 | ||
driveSpeed: 25.00 | ||
maxCbdAreaTypeThresh: 2 | ||
indivTour: 1.00000 | ||
|
||
#### [NICK] WHAT ARE THESE? DO WE EVEN NEED THESE? | ||
upperEA: 5 | ||
upperAM: 10 | ||
upperMD: 15 | ||
upperPM: 19 | ||
|
||
# SHOULD IT BE THIS? | ||
# upperEA: 6 | ||
# upperAM: 12 | ||
# upperMD: 25 | ||
# upperPM: 32 | ||
|
||
### Crosswalk between SOC codes and SANDAG occupation classification | ||
soc_occupation_xwalk: | ||
11: mngt_busi_scic_arts # 11 - Management Occupations | ||
13: mngt_busi_scic_arts # 13 - Business and Financial Operations Occupations | ||
15: mngt_busi_scic_arts # 15 - Computer and Mathematical Occupations | ||
17: mngt_busi_scic_arts # 17 - Architecture and Engineering Occupations | ||
19: mngt_busi_scic_arts # 19 - Life, Physical, and Social Science Occupations | ||
21: mngt_busi_scic_arts # 21 - Community and Social Service Occupations | ||
23: mngt_busi_scic_arts # 23 - Legal Occupations | ||
25: services # 25 - Educational Instruction and Library Occupations | ||
27: mngt_busi_scic_arts # 27 - Arts, Design, Entertainment, Sports, and Media Occupations | ||
29: health # 29 - Healthcare Practitioners and Technical Occupations | ||
31: health # 31 - Healthcare Support Occupations | ||
33: services # 33 - Protective Service Occupations | ||
35: services # 35 - Food Preparation and Serving Related Occupations | ||
37: services # 37 - Building and Grounds Cleaning and Maintenance Occupations | ||
39: services # 39 - Personal Care and Service Occupations | ||
41: sales_office # 41 - Sales and Related Occupations | ||
43: sales_office # 43 - Office and Administrative Support Occupations | ||
45: constr_maint # 45 - Farming, Fishing, and Forestry Occupations | ||
47: constr_maint # 47 - Construction and Extraction Occupations | ||
49: constr_maint # 49 - Installation, Maintenance, and Repair Occupations | ||
51: prod_trans_move # 51 - Production Occupations | ||
53: prod_trans_move # 53 - Transportation and Material Moving Occupations | ||
55: military # 55 - Military Specific Occupations | ||
99: # 99 - Non-workers, Code not part of SOC system | ||
|
||
# RIDEHAIL Settings | ||
Taxi_baseFare: 2.20 | ||
Taxi_costPerMile: 2.30 | ||
Taxi_costPerMinute: 0.10 | ||
Taxi_waitTime_mean: | ||
1: 5.5 | ||
2: 9.5 | ||
3: 13.3 | ||
4: 17.3 | ||
5: 26.5 | ||
#### [NICK] Updated all SD numbers from sandag_abm.properties. Were all 0 before | ||
Taxi_waitTime_sd: | ||
1: 6.4 | ||
2: 6.4 | ||
3: 6.4 | ||
4: 6.4 | ||
5: 6.4 | ||
TNC_single_baseFare: 2.20 | ||
TNC_single_costPerMile: 1.33 | ||
TNC_single_costPerMinute: 0.24 | ||
TNC_single_costMinimum: 7.20 | ||
TNC_single_waitTime_mean: | ||
1: 3.0 | ||
2: 6.3 | ||
3: 8.4 | ||
4: 8.5 | ||
5: 10.3 | ||
TNC_single_waitTime_sd: | ||
1: 4.1 | ||
2: 4.1 | ||
3: 4.1 | ||
4: 4.1 | ||
5: 4.1 | ||
TNC_shared_baseFare: 2.20 | ||
TNC_shared_costPerMile: 0.53 | ||
TNC_shared_costPerMinute: 0.10 | ||
TNC_shared_costMinimum: 3.00 | ||
TNC_shared_IVTFactor: 1.5 | ||
TNC_shared_waitTime_mean: | ||
1: 5.0 | ||
2: 8.0 | ||
3: 11.0 | ||
4: 15.0 | ||
5: 15.0 | ||
TNC_shared_waitTime_sd: | ||
1: 4.1 | ||
2: 4.1 | ||
3: 4.1 | ||
4: 4.1 | ||
5: 4.1 | ||
min_waitTime: 0 | ||
max_waitTime: 50 | ||
|
||
ivt_lrt_multiplier: 0.65 | ||
ivt_brt_multiplier: 0.95 | ||
ivt_cmr_multiplier: 0.65 | ||
ivt_ltd_multiplier: 1.0 | ||
ivt_cost_multiplier: 0.6 | ||
# line-haul mode constants; note commuter rail is based on CMRIVTT. Also currently hyperloop is not applied because we do not skim hyperloop IVTT | ||
eb_equiv_asc: 10 | ||
brt_equiv_asc: -5 | ||
lrt_equiv_asc: -20 | ||
hyp_equiv_asc: -20 | ||
pnr_lrt_equiv_asc: -20 | ||
# | ||
walktimeshort_multiplier: 2 | ||
walktimelong_multiplier: 10 | ||
biketimeshort_multiplier: 4 | ||
biketimelong_multiplier: 20 | ||
short_i_wait_multiplier: 2 | ||
long_i_wait_multiplier: 1 | ||
wacc_multiplier: 2 | ||
wegr_multiplier: 2 | ||
waux_multiplier: 2 | ||
dtim_multiplier: 2 | ||
xwait_multiplier: 2 | ||
dacc_ratio: 0 | ||
xfers_wlk_multiplier: 10 | ||
xfers_drv_multiplier: 20 | ||
drvtrn_distpen_0_multiplier: 270 | ||
drvtrn_distpen_max: 15 | ||
density_index_multiplier: -0.2 | ||
# joint_sr2_ASC_no_auto: 0 | ||
# joint_sr2_ASC_auto_deficient: 0 | ||
# joint_sr2_ASC_auto_sufficient: 0 | ||
# joint_drive_transit_ASC_no_auto: 0 | ||
cost_share_s2: 0.57 | ||
cost_share_s3: 0.37 | ||
vot_threshold_low: 8.81 | ||
vot_threshold_med: 18.00 | ||
max_walk_time: 60 | ||
max_bike_time: 60 | ||
max_walk_distance: 3 | ||
max_bike_distance: 12 | ||
# Location of attractions for associated special size terms | ||
cabrillo_maz: 23831 | ||
seaworld_maz: 8127 | ||
legoland_maz: 24245 | ||
safari_maz: 14345 | ||
midway_maz: 10646 | ||
zoo_maz: 10561 | ||
torrypines_maz: 4093 | ||
|
||
# Micromobility constants | ||
microSpeed: 12 | ||
microVarCost: 20 #cents | ||
microFixedCost: 100 #cents | ||
microRentTime: 1 | ||
microConstant: 60 | ||
microAccessThreshold: 100 | ||
ebikeownership: 0.008 | ||
ebikeMaxDist: 10.50 | ||
escooterMaxDist: 2.00 | ||
|
||
# Microtransit and NEV constants | ||
microtransitSpeed: 30 | ||
microtransitCost: 125 #cents | ||
microtransitWaitTime: 12 | ||
microtransitMaxDist: 4.5 | ||
microtransitDiversionConstant: 5 | ||
microtransitDiversionFactor: 1.25 | ||
nevSpeed: 17 | ||
nevCost: 125 #cents | ||
nevWaitTime: 12 | ||
nevMaxDist: 3 | ||
nevDwellMinutesPerMile: 0.5 | ||
nevDiversionConstant: 5 | ||
nevDiversionFactor: 1.25 | ||
maxWalkIfMTAccessAvailable: 0.5 # Maximum distance to walk to premium transit if microtransit access is available | ||
|
||
# cost of "average" monthly transit pass cost. Used in transit pass ownership model. | ||
# cost of pass divided by 2 for age < 18 and 65+. | ||
monthly_transit_pass_cost: 100 | ||
|
||
# year after which a vehicle (therefore its household) must have transponder | ||
hhTR_Vehyear: 2035 |
Oops, something went wrong.