-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use data models #214
Open
spahrenk
wants to merge
224
commits into
main
Choose a base branch
from
use-data-models
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Use data models #214
Conversation
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
# Conflicts: # test/CMakeLists.txt # test/ref/test30_Preset_AOSmithHPTS40.csv # test/ref/test50_Preset_AOSmithHPTS40.csv # test/ref/test70_Preset_AOSmithHPTS40.csv # test/ref/test95_Preset_AOSmithHPTS40.csv
…to use-data-models # Conflicts: # src/HPWHpresets.cc # test/CMakeLists.txt # test/LG_APHWC50.txt # test/ref/DOE2014_LGC50_24hr50_Preset_LG_APHWC50.csv # test/ref/DOE2014_LGC50_24hr67_Preset_LG_APHWC50.csv # test/ref/DOE2014_LGC50_24hr95_Preset_LG_APHWC50.csv # test/ref/DP_LGC50_HVT_Preset_LG_APHWC50.csv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Enables initialization of HPWH objects from IHPWH data-model specification in JSON format. The IHPWH data-model specification is defined by schema entries in repository hpwh-data-model. The schema are used by lattice to generate a code library for reading the JSON representations of the HPWH models. The code-generation step could be initiated by cmake when building the project (rather than being retaining the code in HPWHsim, but this has not been implemented, due to a relatively small number of manual changes that remain necessary in the generated code.
The command-line utility convert was added to the hpwh executable. This was used to convert all existing IHPWH models from preset entries to JSON files. These models were exported to the folder "models_json " in the "test" folder. Many of these models were previously implemented using polynomial expansions at specific environment temperatures of the variation of input power and cop with heat-source temperature (determined by the condensity-weighted tank temperature.) These were converted by sampling into performance grids for evaluation using btwxt. Criteria were developed for the number of grid points, based on the curvatures of the input-power and cop functions, to ensure sufficient resolution of the grid representations for the reproduction of reference test results.
The assigned JSON file names correspond to their predefined model names. However, 'cse' primarily specifies HPWH presets by HPWH::MODELS number, whereas HPWHsim uses only specification by model name, not number, for testing. Furthermore, roughly eight models did not have assigned names, and were inaccessible via command line. To export these models to JSON, the convert utility also allows specification by either model name or number. Obvious names were also defined in the code for these models. However, no mechanism exists currently to initiate a model from a JSON representation via model number.
Tests were added for comparison of the JSON and Preset (and File) representations.