Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First: when using non-sharrow, the trip_period values for the trip table are stored as strings “EA”, “AM”, “MD”, etc. When using sharrow, for efficiency these values get encoded as the integer position within the time dimension 0, 1, 2, etc.
These two lines in the preprocessor work only for the legacy code:
https://github.com/wsp-sag/client_arc_abm/blob/3b22eb234537e69d26b2fddc953e0d8f7c713390/configs/trip_mode_choice_annotate_trips_preprocessor.csv#L16-L17
But are easily modified for sharrow compatibility:
https://github.com/driftlesslabs/client_arc_abm/blob/1852f8a42fdaf9d639dea6e208c2331c4dcf4c6d/configs/trip_mode_choice_annotate_trips_preprocessor.csv#L16-L17
Second, I’ve found an inconsistency in the trip mode choice spec. The preprocessor defines “_in_period” as shown above using
['MD','PM']
, and uses it in several places, but then the main trip mode spec has several lines that probably should use the same “_in_period” but instead recompute theisin
with different operands (['PM','EV']
):https://github.com/wsp-sag/client_arc_abm/blob/3b22eb234537e69d26b2fddc953e0d8f7c713390/configs/trip_mode_choice.csv#L199-L206
I've change the code in this PR to emit
is_in_period
from the preprocessor with['MD','PM']
and use it in the main spec. @i-am-sijia can you confirm (a) that we do want a consistent set of time periods used, and (b) whether the correct set of time periods is['MD','PM']
,['PM','EV']
, or something else?