-
Notifications
You must be signed in to change notification settings - Fork 11
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
Detailed models #517
Detailed models #517
Conversation
per your question... are any of the inherited base models using the building area? If not, then feel free to demote it. otherwise, we should respect the inheritance (I think). Thanks for finding this and supporting our users! |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great!
* Don't crash if missing reopt data, just warn and move on * poetry update * update microgrid sys-params with modern opendss output * wip compile & run with spawn & optimica * flesh out spawn.py * tiny typo fix of web link in docstring * add a little to spawn.py docstring * clarify comments in compile_fmu function * shell function to kill container if process is interrupted * enable simulating pre-built fmu with spawn * wip spawn_docker.sh, still missing docker run command * create spawn image * update comment. maybe a line of code is not needed? * one tiny update from os.path to pathlib * itty bitty formatting & comment cleanup * clean up dockerfile * start docker-compose file * [skip ci] wip: clean up call to spawn_docker & spawn.py * small step forward with docker-compose file * clean up subprocess call and add compiler parameter * clean up dockerfile even more * add docker run command, and modelon license env var stuff * tiny comment change * questions when building the spawn image * questions when starting the spawn container * questions about calling the image in docker-compose * ensure valid compiler is passed to spawn.py * new path to spawn.py inside conatiner * functional docker-compose file * trying to install spawn into docker image * make the create-sys-param command slightly less brittle * cli build-sys-param command now does not break at residential buildings * [skip ci] replace os with pathlib in base_test_case * fix bug where district microgrid features were not processed * include assertion for pv on a building, not just district * uncomment simulation commands now covered with "not simulation" * map from ditto-reader wires to mbl wires for templates * use appropriate mbl wires in template * add python to spawn container, default debugging, fix path passing * use mbl line names in the cables; add todo regarding wire mapping * Mingzhe fixed my template * move pytest marker definition to pyproject.toml * delete commented code that was moved to pyproject.toml * poetry update * run with optimica, only works for bouncing ball right now * old version of spawn * update issue template * add pyfmi * enable successful type hinting in 3.8 & 3.9 * make some spawn.py arguments specifically not required. Add some type hints * poetry update * remove redundant Action trigger * Revert "enable successful type hinting in 3.8 & 3.9" This reverts commit a69cbb6. * type hint for list only wants one instance of dict apparently * positional arguments need a different way of being optional * replace named arguments in spawn_docker.sh * wip: clean up paths transferred to spawn.py * crazy way of including paths in the container, but it works * autopep8 * remove reference to arg_list which is no longer used * add in optimica-based compilation * rename docker hub user to nrel * use bash when piping file * restructure weather file download * update lock file * update lock file * fix i/o error * reenable downloading both mos and epw * reenable downloading both mos and epw * upgrade ci to mbl master/9.1.0 * dump stdout log to logger * Update license secret * remove debug logs * Add 5g to sysparams (#469) * fix error in schema * small refactor before 5G addition * add choice for 4G and 5G systems * fix oneOf condition in json schema * update sys-params.py to work with explicitly labeled 4gdhc systems * update some test sys param files to explicitly label 4gdhc systems * remove "custom" title, require "ets_model" in building_def * remove default path elements in sys_param call * update test sys param file * improve schema validation failure reporting * updating schema hierarchy and types in a few places * more updates to test sys-param file to work with choice of system generation * json keys are not allowed to start with a number * loop differently now that "buildings" object itself is a list * change expanded_path test to work when called from anywhere * fix another test now that "buildings" is a list * update another test sys-param file to work with new schema * WIP: fix most sys-param tests * Revert "improve schema validation failure reporting" This reverts commit c212750. * fix xpath path to parse lists correctly * fix xpath path in test so list gets parsed correctly * update test sys param files to work with 5g schema * simplify get_param_by_building_id now that the param default section is not a thing * remove duplicate spawn sys param file * update cooling plant xpath paths to district system in sys params file * remove newly unnecessary function parameter * remove unnecessary if-statement level * update jsonpath parsing now that "buildings" itself is an array * update jsonpath in model_base for new jsonpath in district_systems * update jsonpath in load_base for indirect params * Revert "remove unnecessary if-statement level" This reverts commit 47b44d7. * update sys-param tests with new jsonpaths and new exception types * Revert "change expanded_path test to work when called from anywhere" This reverts commit 9bd7d70. * change more jsonpaths away from "default" * skip geojson validation for features with "detailed_model_filename" * remove another instace of "custom" in hardcoded jsonpath * change jsonpath key to indirect ets params in their py files * remove "custom" from jsonpath in load_base * fix jsonpaths in teaser.py * update jsonpaths in chp.py to explicitly look at 4th gen * update jsonpaths, make filechecks more detailed in sysparams.py * remove default values in function call, and the test for those default values * update dict indexing in test to get to correct value now that sys-param hierarchy has changed * fix test json path that came in from microgrid PR * set model_base log level to info * autopep8 * change fourthGDHC to fourth_generation and same for fifth * remove test that only tested default sys-param values, which no longer exist * remove sys-param file from tests that was not being used * require ets params for each building * implement ets requirement in each load_connector type * fix jsonpath for new schema hierarchy * Revert "require ets params for each building" This reverts commit f5cf3bc. * Revert "implement ets requirement in each load_connector type" This reverts commit ec36396. * remove unused variables from spawn building template * remove unused ets variable from teaser building template * remove ets sys-param code that is not needed, variables removed from templates Co-authored-by: Nicholas Long <nicholas.long@nrel.gov> Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com> * Bump mako from 1.2.1 to 1.2.2 Bumps [mako](https://github.com/sqlalchemy/mako) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/sqlalchemy/mako/releases) - [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES) - [Commits](https://github.com/sqlalchemy/mako/commits) --- updated-dependencies: - dependency-name: mako dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Weather file at top level (#497) * move weather to top-level in sys-param files * update sys-param schema to put weather at top-level * handle new weather file location in sys-params * update sys-param tests for new weather file location * Update schema.json * test with 3.10 * bump supported python version * update lock file * change max python version to be <3.11 * poetry update * update poetry version used for ci * trying not supporting 3.7 in ci * ensure "poetry update" is run in CI (cherry picked from commit 26bb2d5) * only support python 3.10 * only support python 3.10 in ci * poetry update again * simplifying tox call in ci * bump pre-commit isort version * quotes around 3 in pre-commit isort command * use officially sanctioned isort for pre-commit * set isort configs in pyproject.toml * poetry update * pre-commit ran with new isort version * another attempt at passing message to pytest in tox env * update Actions checkout and setup-python versions * still trying to pass messages to pytest in tox * what are the chances this works? * surely this does not matter, right? * back to nearly original tox call * what if we didn't use tox in the CI tests? * add some commands formerly supplied by the tox env * re-enable GMT supporting python 3.7.1 * run CI tests with python 3.7 as well as 3.10 * one more poetry update * set min python version to 3.8 * poetry update * Revert "poetry update" This reverts commit e882140. * Revert "set min python version to 3.8" This reverts commit 2093bfb. * add python 3.10 to list of supported versions * only support python 3.10 * revert name of test step to Tox alone, not Test/Tox * update dependencies with poetry * different way of running pre-commit and building docs * ugh, case sensitivity * comment bits about modelon in ci for now * maybe hacky way of selecting docs env in ci * oops, need to be in docs folder to make docs * support python 3.7.1 * apparently we need quotes * undelete metadata confirming this works in python 3.7.1-3.10 * 4G or 5G timeseries in Dymola (#489) * fix error in schema * small refactor before 5G addition * add choice for 4G and 5G systems * duplicate mofile from mbl, modelica-fmt ran automatically * use dynamic model name * ugh, ensure model name matches file name. and a few other tweaks * beginning to update template to match mbl9.1 * enable running multiple timeseries templates in a row for ets-buildings * pre-commit checks * put templates in dict instead of list * clean up redeclare statement, consider eliminating duplicate call for filNam * update timeseriesbuilding template to match mbl9.1 * update template annotations to work with MBLv9 * autopep8 fixing blankspaces * remove "final" label from intermediate model * comment out variables that are no longer hardcoded in the instance * declare filNam in this model, not the other. Set have_hotWat = true * add missing parameters, uncomment others, alter how filNam is called * uncomment 2 variables, remove dangling comma * re-map some timeseries couplings to the "old" building model * fix oneOf condition in json schema * undo silly change to cooling mass flow rate parameter * WIP - specify district generation in test sys params file * WIP - enabling time series to determine which generation model to build * update sys-params.py to work with explicitly labeled 4gdhc systems * update some test sys param files to explicitly label 4gdhc systems * Revert "WIP - specify district generation in test sys params file" This reverts commit 1c4830d. * remove "custom" title, require "ets_model" in building_def * remove default path elements in sys_param call * update test sys param file * improve schema validation failure reporting * updating schema hierarchy and types in a few places * more updates to test sys-param file to work with choice of system generation * json keys are not allowed to start with a number * loop differently now that "buildings" object itself is a list * change expanded_path test to work when called from anywhere * fix another test now that "buildings" is a list * update another test sys-param file to work with new schema * WIP: fix most sys-param tests * Revert "improve schema validation failure reporting" This reverts commit c212750. * fix xpath path to parse lists correctly * fix xpath path in test so list gets parsed correctly * update test sys param files to work with 5g schema * simplify get_param_by_building_id now that the param default section is not a thing * remove duplicate spawn sys param file * update cooling plant xpath paths to district system in sys params file * remove newly unnecessary function parameter * remove unnecessary if-statement level * update jsonpath parsing now that "buildings" itself is an array * update jsonpath in model_base for new jsonpath in district_systems * update jsonpath in load_base for indirect params * Revert "remove unnecessary if-statement level" This reverts commit 47b44d7. * update sys-param tests with new jsonpaths and new exception types * Revert "change expanded_path test to work when called from anywhere" This reverts commit 9bd7d70. * change more jsonpaths away from "default" * skip geojson validation for features with "detailed_model_filename" * remove another instace of "custom" in hardcoded jsonpath * change jsonpath key to indirect ets params in their py files * remove "custom" from jsonpath in load_base * fix jsonpaths in teaser.py * update jsonpaths in chp.py to explicitly look at 4th gen * update jsonpaths, make filechecks more detailed in sysparams.py * remove default values in function call, and the test for those default values * update dict indexing in test to get to correct value now that sys-param hierarchy has changed * fix test json path that came in from microgrid PR * set model_base log level to info * autopep8 * change fourthGDHC to fourth_generation and same for fifth * remove test that only tested default sys-param values, which no longer exist * remove sys-param file from tests that was not being used * require ets params for each building * implement ets requirement in each load_connector type * fix jsonpath for new schema hierarchy * Revert "require ets params for each building" This reverts commit f5cf3bc. * Revert "implement ets requirement in each load_connector type" This reverts commit ec36396. * remove unused variables from spawn building template * remove unused ets variable from teaser building template * remove ets sys-param code that is not needed, variables removed from templates * read proper template depending on district generation in sys-param file * autopep8 * make test_time_series pass, only works for 4G models currently * slightly different way of handling fith and fourth gen districts * fixing whatever was broken in my brain last time * test file and sys-params for 5g time-series * hack in some variables to enable user to choose between 4g & 5g models * another hack to get time-series to generate both 4g and 5g models * handling 4g & 5g formatting of timeseries_instance file * ugly handling of district template data in model_base * update 5g sys-params with new weather file location * restore timeseries load data to 4g model after I mistakenly removed it * add displayUnit tags to a few district template lines * improve 5g building model descriptive text * default 5g building to not have district service water * add missing connect statements * add minimum value to delTAirHea and delTAirCoo so they are never zero * jinja logic in a few instance templates * add 5G district template to skipped list in modelica formatter * update one sys-param value in 5G test file * wip: starting to modify district.py to handle 5G district templates * 5G district template * pretty sure that semicolon does not belong there * remove datDes annotation, move comment characters * fix comment on coupling templates to refer to correct model * new 5g coupling templates * fix comment in wind turbines code * add line to handle 5G couplings * update call to coupling class in 5G test with district type * new dir for 5G couplings * update coupling code to look for 5G couplings * remove coupling from the wrong dir * update test_5G file to look for 5G coupling templates * update dependencies with poetry * removing a few more ets references in 5G templates * remove outdated way of looking up 5G templates * update 5G heated water stub definition template * oof. isort has opinions and it makes pre-commit sad * only use ambient netwoork coupling template * create new ambient water network stub * minor formatting of 5G district template * update 5g test to work with ambient network stub * new ambient temp network stub instance * couplings are looking better! * templatizing 5g connection diagram lines * clean up some leftover code from earlier exploration * slightly less amateur way of looking in a dict * more amateurish dict lookups removed * remove unnecessary 5G code from 4G network stub templates, and templatize cooling temp * remove comment about 5G test that has been addressed * change initial values in model so heat pump does not spaz out * slightly more realistic value for cooling water temp in 5G system * increase temp of 5G cooling supply water * remove comments, clean up formatting in AmbientStub definition * increase cold water temp by 1 degree for 5G loop * update coupling to connect cool to cool instead of hot to cool * warm up 5G cool water temp to something more like ambient * finish coupling cool to cool. oops. * update lock file * remove abandoned code for 5G district choice * change BuildingTimeSeries model name to TimeSeriesBuilding to match filename Co-authored-by: Nicholas Long <nicholas.long@nrel.gov> Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com> * Prep 0.4.0 release (#505) * bump version to 0.4.0 * initial commit for automated release note config file * add dependabot to list of authors excluded from automated release notes * add `dependencies` to list of excluded release labels * update changelog with copy of GH automated output * update test geojson file to match sdk * `poetry update` * remove explicit float transformation, and add a log message * make mos weatherfile explicit in code * fix typo in microgrid commercial cable comment * different way of rounding * in ci: add github token, and use maint_9.1.x branch of mbl * pin ubuntu to 20.04 to maintain use of python 3.7 * gah, missed one spot of hard-coded os version * even the commented line, to be complete * update developer docs with pytest message command * use formal path to MBL, not github link * `poetry update` again * Detailed models (#517) * time-series test file that only works on Nate's computer * put geojson detailed model check in the right place * wip: handling detailed models without geojson area * handle cases when building_area is not provided * doh, remove the file that only works on my machine * add sphinx extension to make section links work easily * move docs for cloning MBL to dev resources * specify that GMT version 0.2.3 can use JModelica to simulate models * `poetry update` * bugfix of the bugfix, yay (#519) * force casting to float when mfrt heating load is 0 * cast with float() instead of multiplying by 1.000 * update precommit and licenses on files * add and cleanup license * use python 3.8, update dev dependencies * add a forgotten test output to gitignore * bump version to 0.4.1 * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Nicholas Long <nicholas.long@nrel.gov> Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com> Co-authored-by: amyeallen1 <amy.allen@colorado.edu> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Any background context you want to provide?
We should handle geojson files that include detailed models
What does this PR accomplish?
How should this be manually tested?
Run a test using a geojson file that refers to detailed models
Questions!
Do we really need LoadBase to provide building area? If not, this is an easy fix. If so, I think we need UO SDK to ensure it will always provide it in the geojson.