Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Formulas in Coefficients File #332

Closed

Conversation

danielsclint
Copy link

@danielsclint danielsclint commented Aug 25, 2020

Adds two three four components and cleans up one error in the test data.

  1. 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.

  2. 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.

image

  1. [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)

  2. [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)

  3. 4. 3. Remove duplicate coefficient specification in non_mandatory_tour_destination_coeffs.csv.

Review Criteria Responses

  1. 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.

  2. Does it implement good methods (i.e. is it consistent with good practices in travel modeling)?
    Yes. Better debugging of user files.

  3. Are the runtimes reasonable and does it provide documentation justifying this claim?
    This change has no material impact on runtimes.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. Does it include sufficient test coverage and test data for existing and proposed features?
    No

  9. 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.

@coveralls
Copy link

coveralls commented Aug 25, 2020

Coverage Status

Coverage decreased (-0.007%) to 81.083% when pulling 53d03f8 on danielsclint:ft_error_checks into 05a25f6 on ActivitySim:develop.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 81.049% when pulling c04fe90 on danielsclint:ft_error_checks into 05a25f6 on ActivitySim:develop.

@danielsclint danielsclint changed the title Error check for COEFFICIENT files Allow Formulas in Coefficients File Aug 26, 2020
@bstabler
Copy link
Contributor

thanks @danielsclint. @toliwaga is going to setup a meeting to discuss design considerations around supporting formulas in coefficient files and estimation integration.

@danielsclint
Copy link
Author

Based on conversation, closing this PR and will issue a modified PR without the change to constants in the coefficient file.

@danielsclint danielsclint deleted the ft_error_checks branch October 23, 2020 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants