Allow Formulas in Coefficients File #332
Closed
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.
Adds
twothreefour components and cleans up one error in the test data.Allow formulas in the coefficients files. This was previously allowed and it makes defining coefficients for some models more succinct. In the ARC case, several mode choice coefficients are multiples of IVT. Specifying the formula in the coefficient files makes it clear of the relationship in the model configuration.
try...except blocks to help track down which file is causing the error. Some models have underlying connections to other models (e.g., mode_choice), so its not always apparent which model the error is originating. This adds a simple output to more clearly delineate which user input file is causing problems.
[Update 8/27/2020] Move up coefficient processing in vectorize_tour_scheduling.py to ensure the coefficients are available to the preprocessor (Coefficients by Segment Necessary for Preprocessor #333)
[Update 8/27/2020] Point joint_tour_destination.py to use the joint_tour_destination.yaml file. (Joint Tour Destination Changed to Use Non-Mandatory Destination Choice Model Settings #335)
4.3.Remove duplicate coefficient specification in non_mandatory_tour_destination_coeffs.csv.Review Criteria Responses
Does it contain all the required elements, including a runnable example, documentation, and tests?
This code doesn't change the examples or documentation. It is a background fix to restore prior functionality.
Does it implement good methods (i.e. is it consistent with good practices in travel modeling)?
Yes. Better debugging of user files.
Are the runtimes reasonable and does it provide documentation justifying this claim?
This change has no material impact on runtimes.
Does it include non-Python code, such as C/C++? If so, does it compile on any OS and are compilation instructions included?
No. This is a Python-only change.
Is it licensed with the ActivitySim license that allows the code to be freely distributed and modified and includes attribution so that the ‘provenance’ of the code can be tracked? Does it include an official release of ownership from the funding agency if applicable?
This work was done under contract to ARC, and, presumably, ARC is providing the changes without any additional licensing beyond the existing ActivitySim licensing.
Does it appropriately interact with the data pipeline (i.e. it doesn't create new ways of managing data)?
This change does not impact the data pipeline.
Does it include regression tests to enable checking that consistent results will be returned when updates are made to the framework?
No regression testing has been done.
Does it include sufficient test coverage and test data for existing and proposed features?
No
Any other comments or suggestions for improving the developer experience?
This PR restore some functionality that was lost during PR major work on phase 5 #325.