Skip to content

Commit

Permalink
Merge pull request #1 from driftlesslabs/patch-tidy
Browse files Browse the repository at this point in the history
Patch tidy
  • Loading branch information
vivekyadav26 authored Apr 5, 2024
2 parents b0c839e + 6c7853d commit 14a3677
Show file tree
Hide file tree
Showing 26 changed files with 4,441 additions and 96 deletions.
18 changes: 3 additions & 15 deletions .github/workflow/ci.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: 'ActivitySim/activitysim'
ref: main
ref: preview
path: 'activitysim'
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing

Expand All @@ -57,19 +57,6 @@ jobs:
- 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
Expand All @@ -84,4 +71,5 @@ jobs:
mamba list
- name: Test this implementation
run: |
python -m pytest sandag-abm3-example/test
cd activitysim-sandag-abm3/test
python -m pytest test_sandag_abm3.py::test_sandag_abm3_progressive
2 changes: 1 addition & 1 deletion configs/resident/cdap_joint_tour_coefficients.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Label,description,Expression,dependency,coefficient
,person x is kid and DAP is N,ptype_px > 6,N_px,1.6898
,Accessibility to retail employment/Non-Mandatory Attractions,shopping_accessibility_p1,,0.055031985
,Income less than $30k,income_p1 < 30000,,-0.192506367
,Income between $60k and $100k,(income_p1 >= 60000) & (income_p1 < =100000),,0.104325349
,Income between $60k and $100k,(income_p1>=60000) & (income_p1<=100000),,0.104325349
,Income more than $100k,income_p1 > 100000,,0.104325349
,No Car Households,auto_ownership_p1 == 0,,0
,Cars Less than Workers,auto_ownership_p1 < num_workers_p1,,0.088402389
Expand Down
3 changes: 3 additions & 0 deletions configs/resident/external_worker_identification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ CHOOSER_FILTER_COLUMN_NAME: is_out_of_home_worker
EXTERNAL_COL_NAME: is_external_worker
# set to True if not external but CHOOSER_FILTER_COLUMN_NAME is True
INTERNAL_COL_NAME: is_internal_worker

sharrow_settings:
skip: true
3 changes: 3 additions & 0 deletions configs/resident/external_workplace_location.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ SEGMENT_IDS:

# not loaded if commented out
# SAVED_SHADOW_PRICE_TABLE_NAME: workplace_shadow_prices.csv

sharrow_settings:
skip: true
10 changes: 5 additions & 5 deletions configs/resident/non_mandatory_tour_destination.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Label,Description,Expression,escort,shopping,eatout,othmaint,social,othdiscr
,,"[email protected](skims['DIST'], 20)",1,1,1,1,1,1
,,_DIST_SQUARED@_DIST**2,1,1,1,1,1,1
,,_DIST_CUBED@_DIST**3,1,1,1,1,1,1
,,[email protected](_DIST + 0.001),1,1,1,1,1,1
,,"[email protected](df.tour_type == 'escort', 20, np.where(df.tour_type == 'othmaint', 8, 10))",1,1,1,1,1,1
DIST,,"[email protected](skims['DIST'], 20)",1,1,1,1,1,1
DIST_SQUARED,,_DIST_SQUARED@_DIST**2,1,1,1,1,1,1
DIST_CUBED,,_DIST_CUBED@_DIST**3,1,1,1,1,1,1
DIST_LOGGED,,[email protected](_DIST + 0.001),1,1,1,1,1,1
CALIB_DIST,,"[email protected](df.tour_type == 'escort', 20, np.where(df.tour_type == 'othmaint', 8, 10))",1,1,1,1,1,1
util_dist,dist,@_DIST,coef_dist_escort,coef_dist_shopping,coef_dist_eatout,coef_dist_maint,coef_dist_social,coef_dist_discr
util_dist_squared,dist_squared,@_DIST_SQUARED,coef_distsqrd_escort,coef_distsqrd_shopping,coef_distsqrd_eatout,coef_distsqrd_maint,coef_distsqrd_social,coef_distsqrd_discr
util_dist_cubed,dist_cubed,@_DIST_CUBED,coef_zero,coef_distcubed_shopping,coef_distcubed_eatout,coef_zero,coef_distcubed_social,coef_distcubed_discr
Expand Down
11 changes: 5 additions & 6 deletions configs/resident/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ want_dest_choice_sample_tables: False
# households with all tour types
# trace_hh_id: 1051657

chunk_training_mode: disabled

# trace origin, destination in accessibility calculation; comment out or leave empty for no trace
#trace_od:

Expand All @@ -46,6 +44,8 @@ input_table_list:
mgra: home_zone_id
hinc: income
hht: HHT
recode_columns:
home_zone_id: land_use.zone_id
keep_columns:
- home_zone_id
- income
Expand All @@ -58,8 +58,6 @@ input_table_list:
- tablename: persons
filename: persons.csv
index_col: person_id
rename_columns:
PERID: person_id
rename_columns:
hhid: household_id
perid: person_id
Expand All @@ -80,6 +78,9 @@ input_table_list:
index_col: zone_id
rename_columns:
MAZ: zone_id
recode_columns:
zone_id: zero-based
TAZ: zero-based
drop_columns:
- i1
- i2
Expand Down Expand Up @@ -127,8 +128,6 @@ distributed_time_factor_nonwork_stddev: 0.6
distributed_time_factor_min: 0.1
distributed_time_factor_max: 10

resume_after:

models:
### mp_init_proto_pop (single process)
- initialize_proto_population # Separate step so proto tables can be split for multiprocess.
Expand Down
Loading

0 comments on commit 14a3677

Please sign in to comment.