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

Bmi parameter initialization integration #368

Merged
merged 19 commits into from
Mar 15, 2022

Conversation

hellkite500
Copy link
Member

@hellkite500 hellkite500 commented Jan 25, 2022

This change allows the ngen framework to read a model parameter key in the realization configuration and, once a BMI model has been initialized, it will use Set_value to modify the parameter values of the BMI model to use the ones read from the ngen configuration.

Additions

  • a model_params optional key in the configuration input file.
  • private JSONProperty::PropertyVariant member
  • private JSONProperty::PropertyVistor struct
  • public JSONProperty::as_vector() template function
  • private helper functions in BMI_Module_Formulation:
    • as_c_array()
    • get_values_as_types()

Removals

Changes

  • Formulations now look for and loop through model_params in the passed property tree and attempt to Set_value for those parameter variables.

Testing

  1. Tested with ngen_cal to support calibration iterations.
  2. Unit tests added (and passed) for JSON Property and BMI_C_Formulation

Screenshots

Notes

  • Requires BMI models to enable Set_value for the respective parameter variables.

Todos

  • Optimize the handling of data between JSONProperty and Formulation
  • Refactor JSONProperty using newly introduced PropertyVariant

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Target Environment support

  • Linux
  • MacOS

@hellkite500 hellkite500 force-pushed the bmi_calibration_parameters branch from ef4d79e to 9c99e93 Compare February 15, 2022 20:05
@hellkite500 hellkite500 force-pushed the bmi_calibration_parameters branch from 9c99e93 to 2f2e9c9 Compare March 3, 2022 18:54
@hellkite500 hellkite500 marked this pull request as ready for review March 3, 2022 18:54
@hellkite500 hellkite500 force-pushed the bmi_calibration_parameters branch from e04fd27 to ea14565 Compare March 11, 2022 16:47
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.

2 participants