forked from ActivitySim/activitysim
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Differentiate examples between quality and validity of example models (ActivitySim#571) * change examples that are no longer tied to an agency to fictional place names * change name of full example also * add back missing output dir * restore test output dir also * more empty dirs that got lost * clean up docs * example_mtc -> prototype_mtc * Prototype MTC extended * add all the ignored files * add test output dirs * remove superfluous example_test * prototype_sf * prototype_arc * prototype_marin * move dirs * psrc * semcog * sandag_xborder * placeholder_sandag * placeholder_multiple_zone * no more coveralls * repair docs * clean up example names * black and isort (ActivitySim#578) * black and isort * stop emitting output dir it fails later tests * trace files in nested directories because windows * swap files for xborder model * repair ARC MP * print checksum even when not used * add hashes for sandag_xborder_full * fix dtype in university hack * fix persons to match tours * repair ARC * Bump version: 1.0.4 → 1.1.0 * Added mwcog small area * missed one edit * reformatting * Update README.MD * call as module * github actions tests * pre commit hooks * pyproject toml * limit numpy * docs for mamba instead of conda * ignore generated files * add nbmake to test env * fix dupe line * repair test multiple zones for github actions * publish develop docs * fix docbuild env * Update .travis.yml * fixed testing files * fixed testing files (again) * fixed test script again * publish docs to branch name * updated testing scripts (note shorter travis script for now) * fixed slash (windows vs. linux testing issue) * added output folders * updated travis script to run all tests, should pass * docs cleaning * docs re-style * rebuild * dynamic versioning docs * version switcher * blacken * fix switcher url * fix conf * switcher update * master to main * deployment actions * actions * build wheel * fix for testpypi * blacken * manual switcher * branch docs service [makedocs] * syntax [makedocs] * travis depends * checkout v3, fix versioning in docs * only build develop docs once * failsafe version * documentation repairs * python-simplified-semver * front cards * end testing w travis * add mwcog test to gh-actions * add mwcog to docs * point to data not copy it * sort dependencies * req sh 2.2.4 * account for variance across platforms in trip dest est * copy bike skims for sandag test * param on rtol * fix sandag_2 test files * fix test file names * added pre-processor option to trip scheduling * trip scheduling relative mode initial commit * moved everything to mwcog example * adding output analysis notebook * adding additional segmentation * testing and documentation * blacken * not assuming scheduling mode is set * fixing merge trip scheduling * still fixing merge * reverting regression trips * fixing bad merge and updating test Co-authored-by: Jeffrey Newman <jeffnewman@camsys.com> Co-authored-by: Andrew Rohne <andrew@siliconcreek.net>
- Loading branch information
1 parent
7386a4d
commit 9506f16
Showing
9 changed files
with
414 additions
and
62 deletions.
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
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
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
19 changes: 18 additions & 1 deletion
19
activitysim/examples/prototype_mwcog/configs/trip_scheduling.yaml
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,10 +1,27 @@ | ||
|
||
# int to add to probs column index to get time period it represents. | ||
# e.g. depart_alt_base = 5 means first column (column 0) represents period 5 | ||
DEPART_ALT_BASE: 1 | ||
DEPART_ALT_BASE: 0 | ||
|
||
MAX_ITERATIONS: 100 | ||
|
||
#FAILFIX: drop_and_cleanup | ||
FAILFIX: choose_most_initial | ||
|
||
# --- relative trip scheduling settings | ||
PROBS_SPEC: trip_scheduling_probs_purpose_stops.csv | ||
|
||
scheduling_mode: relative | ||
|
||
probs_join_cols: | ||
- periods_left_min | ||
- periods_left_max | ||
- outbound | ||
- tour_purpose_grouped | ||
- half_tour_stops_remaining_grouped | ||
|
||
preprocessor: | ||
SPEC: trip_scheduling_preprocessor | ||
DF: choosers | ||
TABLES: | ||
- tours |
8 changes: 8 additions & 0 deletions
8
activitysim/examples/prototype_mwcog/configs/trip_scheduling_preprocessor.csv
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,8 @@ | ||
Description,Target,Expression | ||
,periods_left,(df.latest - df.earliest) | ||
# binning the periods differently for inbound and outbound | ||
,periods_left_min,"np.where(df['outbound'], periods_left.clip(upper=25), periods_left.clip(upper=34))" | ||
,periods_left_max,"np.where(((periods_left >= 25) & (df['outbound'])) | ((periods_left >= 34) & (~df['outbound'])), 47, periods_left)" | ||
,tour_purpose,"reindex(tours.tour_type, df.tour_id)" | ||
,tour_purpose_grouped,"np.where(tour_purpose.isin(['work','school','univ']), 'mand', 'non_mand')" | ||
,half_tour_stops_remaining_grouped,(df.trip_count - df.trip_num).clip(upper=1) |
Oops, something went wrong.