Skip to content

Commit ad384fa

Browse files
authored
Merge pull request #3 from camsys/main
Sharrow Run Fail: School Escorting
2 parents b0c839e + 92eab1d commit ad384fa

File tree

58 files changed

+4612
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4612
-175
lines changed
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,38 +50,26 @@ jobs:
5050

5151
- uses: actions/cache@v4
5252
with:
53-
path: /usr/share/miniconda3/envs/asim-test
53+
path: miniconda3/envs/asim-test
5454
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
5555
id: cache
5656

5757
- name: Update environment
5858
run: |
5959
mamba env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
60-
mamba install --yes \
61-
"psutil=5.9.5" \
62-
"pydantic=2.6.1" \
63-
"pypyr=5.8.0" \
64-
"pytables=3.6.1" \
65-
"pytest-cov" \
66-
"pytest-regressions=2.5.0" \
67-
"scikit-learn=1.2.2" \
68-
"sharrow>=2.6.0" \
69-
"simwrapper=1.8.5" \
70-
"xarray=2023.2.0" \
71-
"zarr=2.14.2" \
72-
"zstandard=0.21.0"
7360
if: steps.cache.outputs.cache-hit != 'true'
7461

7562
- name: Install activitysim
7663
# installing without dependencies is faster, we trust that all needed dependencies
7764
# are in the conda environment defined above. Also, this avoids pip getting
7865
# confused and reinstalling tables (pytables).
7966
run: |
80-
python -m pip install -e ./activitysim --no-deps
67+
python -m pip install ./activitysim --no-deps
8168
- name: Conda checkup
8269
run: |
8370
mamba info -a
8471
mamba list
8572
- name: Test this implementation
8673
run: |
87-
python -m pytest sandag-abm3-example/test
74+
cd activitysim-sandag-abm3/test
75+
python -m pytest test_sandag_abm3.py::test_sandag_abm3_progressive

configs/resident/atwork_subtour_destination.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Label,Description,Expression,atwork
22
,,"[email protected](skims['DIST'], 20)",1
3-
,,_DIST_SQUARED@_DIST**2,1
4-
,,_DIST_CUBED@_DIST**3,1
5-
,,[email protected](_DIST + 0.001),1
3+
ATWORK_DIST_SQUARED,,_DIST_SQUARED@_DIST**2,1
4+
ATWORK_DIST_CUBED,,_DIST_CUBED@_DIST**3,1
5+
ATWORK_DIST_LOGGED,,[email protected](_DIST + 0.001),1
66
util_Distance,Distance,@_DIST,coef_dist_atwork
77
util_Distance_squared,Distance_squared,@_DIST_SQUARED,coef_distsqrd_atwork
88
util_Distance_fulltime_worker,Distance_fulltime_worker,@_DIST * (df.ptype==1),coef_dist_ftworker_atwork

configs/resident/atwork_subtour_frequency.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ util_dummy_for_non_full_time_worker,pemploy!=1,coefficient_dummy_for_non_full_ti
44
util_dummy_for_non_workers,"ptype in [4, 5]",coefficient_dummy_for_non_workers_no_subtours,coefficient_dummy_for_non_workers_eat,coefficient_dummy_for_non_workers_business1,coefficient_dummy_for_non_workers_maint,coefficient_dummy_for_non_workers_business2,coefficient_dummy_for_non_workers_eat_business
55
util_medium_hh_income_dummy,income_segment == 2,coefficient_medium_hh_income_dummy_no_subtours,coefficient_medium_hh_income_dummy_eat,coefficient_medium_hh_income_dummy_business1,coefficient_medium_hh_income_dummy_maint,coefficient_medium_hh_income_dummy_business2,coefficient_medium_hh_income_dummy_eat_business
66
util_high_hh_income_dummy,(income_segment > 2) & (income_segment < 5),coefficient_high_hh_income_dummy_no_subtours,coefficient_high_hh_income_dummy_eat,coefficient_high_hh_income_dummy_business1,coefficient_high_hh_income_dummy_maint,coefficient_high_hh_income_dummy_business2,coefficient_high_hh_income_dummy_eat_business
7-
util_zero_cars_owned_by_hh_dummy, auto_ownership == 0,coefficient_zero_cars_owned_by_hh_dummy_no_subtours,coefficient_zero_cars_owned_by_hh_dummy_eat,coefficient_zero_cars_owned_by_hh_dummy_business1,coefficient_zero_cars_owned_by_hh_dummy_maint,coefficient_zero_cars_owned_by_hh_dummy_business2,coefficient_zero_cars_owned_by_hh_dummy_eat_business
7+
util_zero_cars_owned_by_hh_dummy,auto_ownership==0,coefficient_zero_cars_owned_by_hh_dummy_no_subtours,coefficient_zero_cars_owned_by_hh_dummy_eat,coefficient_zero_cars_owned_by_hh_dummy_business1,coefficient_zero_cars_owned_by_hh_dummy_maint,coefficient_zero_cars_owned_by_hh_dummy_business2,coefficient_zero_cars_owned_by_hh_dummy_eat_business
88
util_individual_discretionary_tours_made_by_full_time_worker,@(df.pemploy==1)*df.num_discr_tours,coefficient_individual_discretionary_tours_made_by_full_time_worker_no_subtours,coefficient_individual_discretionary_tours_made_by_full_time_worker_eat,coefficient_individual_discretionary_tours_made_by_full_time_worker_business1,coefficient_individual_discretionary_tours_made_by_full_time_worker_maint,coefficient_individual_discretionary_tours_made_by_full_time_worker_business2,coefficient_individual_discretionary_tours_made_by_full_time_worker_eat_business
99
util_individual_discretionary_tours_made_by_part_time_worker,@(df.pemploy==2)*df.num_discr_tours,coefficient_individual_discretionary_tours_made_by_part_time_worker_no_subtours,coefficient_individual_discretionary_tours_made_by_part_time_worker_eat,coefficient_individual_discretionary_tours_made_by_part_time_worker_business1,coefficient_individual_discretionary_tours_made_by_part_time_worker_maint,coefficient_individual_discretionary_tours_made_by_part_time_worker_business2,coefficient_individual_discretionary_tours_made_by_part_time_worker_eat_business
1010
util_individual_eating_out_tours_made_by_person,num_eatout_tours,coefficient_individual_eating_out_tours_made_by_person_no_subtours,coefficient_individual_eating_out_tours_made_by_person_eat,coefficient_individual_eating_out_tours_made_by_person_business1,coefficient_individual_eating_out_tours_made_by_person_maint,coefficient_individual_eating_out_tours_made_by_person_business2,coefficient_individual_eating_out_tours_made_by_person_eat_business

configs/resident/cdap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,6 @@ annotate_households:
4545
DF: households
4646
TABLES:
4747
- persons
48+
49+
compute_settings:
50+
sharrow_skip: true

configs/resident/cdap_joint_tour_coefficients.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Label,description,Expression,dependency,coefficient
1010
,person x is kid and DAP is N,ptype_px > 6,N_px,1.6898
1111
,Accessibility to retail employment/Non-Mandatory Attractions,shopping_accessibility_p1,,0.055031985
1212
,Income less than $30k,income_p1 < 30000,,-0.192506367
13-
,Income between $60k and $100k,(income_p1 >= 60000) & (income_p1 < =100000),,0.104325349
13+
,Income between $60k and $100k,(income_p1>=60000) & (income_p1<=100000),,0.104325349
1414
,Income more than $100k,income_p1 > 100000,,0.104325349
1515
,No Car Households,auto_ownership_p1 == 0,,0
1616
,Cars Less than Workers,auto_ownership_p1 < num_workers_p1,,0.088402389

configs/resident/external_non_mandatory_identification.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Label,Description,Expression,external_tour,internal_tour
22
util_dist_to_nearest_ext_station,Distance to nearest external station,dist_to_external_zone,coef_dist_to_nearest_ext_station,
3-
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,
3+
util_log_size,Log size of nearest station,@np.log1p(df.reindex_land_use_external_nonwork_zone_to_closest_external_zone),coef_log_size_of_nearest_ext_station,
44
util_escort,escort tour ASC,"@np.where(df.tour_type == 'escort', 1, 0)",coef_escort,
55
util_shopping,shopping tour ASC,"@np.where(df.tour_type == 'shopping', 1, 0)",coef_shopping,
66
util_othmaint,othmaint tour ASC,"@np.where(df.tour_type == 'othmaint', 1, 0)",coef_othmaint,

configs/resident/external_non_mandatory_identification.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ LOGIT_TYPE: MNL
99
EXTERNAL_COL_NAME: is_external_tour
1010
# set to True if not external but CHOOSER_FILTER_COLUMN_NAME is True
1111
INTERNAL_COL_NAME: is_internal_tour
12+
13+
preprocessor:
14+
SPEC: external_non_mandatory_identification_preprocessor.csv
15+
DF: df
16+
TABLES:
17+
- land_use
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Description,Target,Expression
2+
reindex_land_use_external_nonwork_zone_to_closest_external_zone,reindex_land_use_external_nonwork_zone_to_closest_external_zone,"reindex(land_use.external_nonwork, df.closest_external_zone)"
3+
4+

configs/resident/external_student_identification.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ CHOOSER_FILTER_COLUMN_NAME: is_student
1212
# Adds this column to the persons table and is set to True if workplace is external
1313
EXTERNAL_COL_NAME: is_external_student
1414
# set to True if not external but CHOOSER_FILTER_COLUMN_NAME is True
15-
INTERNAL_COL_NAME: is_internal_student
15+
INTERNAL_COL_NAME: is_internal_student

configs/resident/external_worker_identification.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Label,Description,Expression,work_external,work_internal
22
util_dist_to_nearest_ext_station,Distance to nearest external station,dist_to_external_zone,coef_dist_to_nearest_ext_station,
3-
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,
3+
util_size_of_nearest_ext_station,Size of nearest external station,"@np.log1p(df.reindex_land_use_external_to_work_external_zone)",coef_size_of_nearest_ext_station,
44
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,
55
util_part_time,Part time worker,"@np.where(df.is_parttime_worker==""TRUE"",1,0)",coef_part_time,
66
util_inc_lt15,Household Income less than $15k,@(df.income<15000),coef_inc_lt15,

0 commit comments

Comments
 (0)