Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for Python 3.11 (#518) * adjust dependency versions to support python 3.11 * skip compilation and simulation tests in tox env * update ci for python 3.11 * change asserts to if/raise statements in modelica_runner * ugh, forgot to change the test when I changed the assertions * update poetry version in ci * `poetry update` * specify ports for each time series building in instance template (#525) Co-authored-by: Nicholas Long <[email protected]> * update license language (#529) * add max_electrical_load to building sys-param data (#530) * add max_electrical_load to building sys-param data * alphabetize some template sys-param entries * Modifications for GHE (#526) * Add GHE properties to system parameter * add ghe parameters * add end of file line * Add test * modify schema * additional properties * run precommit * add description and default * pre-commit * add schema changes * edit default --------- Co-authored-by: Nathan Moore <[email protected]> * update dependency versions (#534) * Removing remaining tox calls (#535) * removing remaining tox parts * `poetry update` --------- Co-authored-by: Nathan Moore <[email protected]> * pre-commit has been running on all checks already (#538) * Add Level 1 5G DES system (#539) * update dependency versions * initial files added for creating 5g system from existing load files * fix path type, ignore for now * fix types on methods, bump to python 3.8 (#540) * fix types on methods, bump to python 3.8 * update ci exclude * add in directory to the mos copying * systemparameter needs to use the same data... favor param_template over data. * expose nBui to set correctly * default to openmodelica and fix space check in file name * Set SWH peak to 1/10th of space heating or min 5000W (#542) * set swh peak to one-tenth of space heating or min 5000W * max/min are hard * Update geojson_modelica_translator/modelica/GMT_Lib/DHC/DHC_5G_waste_heat_GHX.py * Update geojson_modelica_translator/modelica/GMT_Lib/DHC/DHC_5G_waste_heat_GHX.py Co-authored-by: Nathan Moore <[email protected]> * float precision is not needed. now using int instead * test for new int value in shw instead of float * update dependencies --------- Co-authored-by: Nathan Moore <[email protected]> * Issue511 ghe templates (#533) * Add redeclaration of allowFlowReverseSer=true * Inital implementation of district system template with single GHE * Add modified GroundTemperatureResponse class to overwrite MBL * Initial implementation of OneUTube and PartialBorefield templates * Fix bug of inconsistent template name and Modelica class name of BuildingTimeSeries * Update system template, removed temperature sensors * District energy test file that has multiple buildings * Add comment and test version control with VSCode * Add declaration of borefield data parameters * Add template for TwoUTubes borefield * Remove unneeded mo files * Modify input field names based on schema * Change within statement * Initial implementation of borefield.py * Conversion of shank spacing * Modify shank spacing conversion * Remove unneeded mo file * Minor changes to model_name * Add system template for testing borefield template * Initial implementation of borefield test * Move ghe system parameter files to right location * Take out SingleGHE system template for now * Change within statement * Initial implementation of borefield coupling * Add code to point to BorefieldSystem.mot * Remove duplicated test script * Rename package * Add {%endraw%} at the end * Add input fields needed for the test * Debugging changes * Add borefield_instance.mopt * Changes for debugging, now the test passes * Add borehole_length to example system params file * Debug PartialBorefield.mot, it passes check * Change coupling definitions * Minor changes * Remove partial template models * Add sample g-function and path * Reverting 3 system params files * pre-commit now with more modelica-fmt * Apply uniform 5G district system template * Remove unused GHE district template * Fix for non-ghe 5G districts --------- Co-authored-by: Nathan Moore <[email protected]> * Add MOS file wrapper and size the 5G mass flow rate (#548) * new class for reading mos file variables * add mf sizing and expose plant mass flow variable * fix typing warning for round * reduce delta t to 10C * reduce delta t to 5C * Add OpenModelica compatibility (#516) * updating plant components to work with OpenModelica * add "each" to array of parameters. first pass * remove nports count setting for OM * bump requests version to remove RequestsDependencyWarning about charset_normalizer * `poetry update` * redeclare the correct building class in 5G timeseries template * `allowFlowReversal` in timeseries_instance to make OM solver happy * put FlowReversal only in the 5g part of TimeSeries_Instance * lower 5G building hot water supply/return temps * restore nports=1 for 4g timeseries buildings * allowFlowReversal=true in heat exchanger * add within statement at top of getPeakMassFlowRate.mo * read getPeakMassFlowRate.mo as a template, so we can have the model name added properly * add spaces around project_name in mft template * add allowFlowReversal=true to all 4G timeseries buildings * allowFlowReversal=true in network2pip_instance [skip-ci] * set all remaining allowFlowReversal=true [ci skip] * tell modelica formatter to ignore getPeakMassFlowRate.mo because of failures * change getPeakMassFlowRate.mo to *.mot, reactivate modelica-fmt on it * oops, look for new filename [ci-skip] * remove commented code [skip ci] * add Medium redeclaration in MFT template * add OM files folder * All_spawn_models * Teaser Single worked * add timeseries output nodes to make OM happy * allow flow reversal in spawn building * relax thermal zone constraint in teaser * properly check for chp in sys param file * fix double appending of heating plant when no chp to package.order * pre-commit on Jiazhen's temp files for OM testing; remove some spawn-single files * remove requirements.txt check from pre-commit, since we don't use that * `poetry update` * Spawn and Teaser changes * pre-commit formatted Jiazhens modelica files * hardcode numberofchillers=2 as a hack because OM does not do dot access * add `allowFlowReversal=true` to spawn load instance * hack in the hardcoded numberofchillers to make OM happy * update 5g sys-param file to use 5g ets params * add district 5g timeseries test * `poetry update` * add `.pytest_cache` to gitignore * update mft connect statements to work in OM * remove commented template code * get 5g districts of multiple buildings working * remove test models from Jiazhen * `poetry update` * use newer version of poetry in ci * remove redundant `precommit` test env from CI matrix * remind poetry that we only support python >=3.9 now * `poetry update` * use newest poetry patch in ci * autopep8 --------- Co-authored-by: jiazhenling <[email protected]> * Modify GHE params (#537) * remove connectors from ghe params * modify test and ghe system param file * update ghe parameters schema * modify ghe parameters * modify ghe parameters * add system parameter files for borehole test * update example files * update example files for model connectors * add ets 5th gen params * add array for ghe geometry params * remove print statement from test * Adds defaults and required fields for ghe_params and 5th gen ets params --------- Co-authored-by: Nicholas Long <[email protected]> * Fixing borefield test breaks due to schema changes (#550) * Add redeclaration of allowFlowReverseSer=true * Inital implementation of district system template with single GHE * Add modified GroundTemperatureResponse class to overwrite MBL * Initial implementation of OneUTube and PartialBorefield templates * Fix bug of inconsistent template name and Modelica class name of BuildingTimeSeries * Update system template, removed temperature sensors * District energy test file that has multiple buildings * Add comment and test version control with VSCode * Add declaration of borefield data parameters * Add template for TwoUTubes borefield * Remove unneeded mo files * Modify input field names based on schema * Change within statement * Initial implementation of borefield.py * Conversion of shank spacing * Modify shank spacing conversion * Remove unneeded mo file * Minor changes to model_name * Add system template for testing borefield template * Initial implementation of borefield test * Move ghe system parameter files to right location * Take out SingleGHE system template for now * Change within statement * Initial implementation of borefield coupling * Add code to point to BorefieldSystem.mot * Remove duplicated test script * Rename package * Add {%endraw%} at the end * Add input fields needed for the test * Debugging changes * Add borefield_instance.mopt * Changes for debugging, now the test passes * Add borehole_length to example system params file * Debug PartialBorefield.mot, it passes check * Change coupling definitions * Minor changes * Remove partial template models * Add sample g-function and path * Reverting 3 system params files * pre-commit now with more modelica-fmt * Apply uniform 5G district system template * Remove unused GHE district template * Fix for non-ghe 5G districts * Delete sys_param files not needed * Replace Gfunction input with csv file * Point to the right sys_param file * Updated template to reflect schema changes * Changes for the test to run * Fix backslashes * Change to adapt to recent commits * Temporary fixes to make the test pass * Change ghe_dir to relative path * Use pathlib to handle ghe_dir * Add if statement to avoid breaking other 5G tests * Change due to schema change * Pre-commit changes * Fix bug --------- Co-authored-by: Nathan Moore <[email protected]> * Updating GHE Parameters: Modifying GHE Parameters schema and example files (#551) * remove loads as required * add objects for unique ghe properties * update ghe specific schema objects * add borehole to ghe specific properties * update schema and example to not require autopopulated fields * update to relative path * update model connector examples * Fix borefield test breaks due to the schema changes in issue #551 (#554) * Add redeclaration of allowFlowReverseSer=true * Inital implementation of district system template with single GHE * Add modified GroundTemperatureResponse class to overwrite MBL * Initial implementation of OneUTube and PartialBorefield templates * Fix bug of inconsistent template name and Modelica class name of BuildingTimeSeries * Update system template, removed temperature sensors * District energy test file that has multiple buildings * Add comment and test version control with VSCode * Add declaration of borefield data parameters * Add template for TwoUTubes borefield * Remove unneeded mo files * Modify input field names based on schema * Change within statement * Initial implementation of borefield.py * Conversion of shank spacing * Modify shank spacing conversion * Remove unneeded mo file * Minor changes to model_name * Add system template for testing borefield template * Initial implementation of borefield test * Move ghe system parameter files to right location * Take out SingleGHE system template for now * Change within statement * Initial implementation of borefield coupling * Add code to point to BorefieldSystem.mot * Remove duplicated test script * Rename package * Add {%endraw%} at the end * Add input fields needed for the test * Debugging changes * Add borefield_instance.mopt * Changes for debugging, now the test passes * Add borehole_length to example system params file * Debug PartialBorefield.mot, it passes check * Change coupling definitions * Minor changes * Remove partial template models * Add sample g-function and path * Reverting 3 system params files * pre-commit now with more modelica-fmt * Apply uniform 5G district system template * Remove unused GHE district template * Fix for non-ghe 5G districts * Delete sys_param files not needed * Replace Gfunction input with csv file * Point to the right sys_param file * Updated template to reflect schema changes * Changes for the test to run * Fix backslashes * Change to adapt to recent commits * Temporary fixes to make the test pass * Change ghe_dir to relative path * Use pathlib to handle ghe_dir * Add if statement to avoid breaking other 5G tests * Change due to schema change * Pre-commit changes * Fix bug * Changes due to schema change --------- Co-authored-by: Nathan Moore <[email protected]> --------- Co-authored-by: Jing Wang <[email protected]> Co-authored-by: Nathan Moore <[email protected]> * Enable compile & simulate with OpenModelica in Docker (#545) * updating plant components to work with OpenModelica * add "each" to array of parameters. first pass * remove nports count setting for OM * bump requests version to remove RequestsDependencyWarning about charset_normalizer * `poetry update` * redeclare the correct building class in 5G timeseries template * `allowFlowReversal` in timeseries_instance to make OM solver happy * put FlowReversal only in the 5g part of TimeSeries_Instance * lower 5G building hot water supply/return temps * restore nports=1 for 4g timeseries buildings * allowFlowReversal=true in heat exchanger * add within statement at top of getPeakMassFlowRate.mo * read getPeakMassFlowRate.mo as a template, so we can have the model name added properly * add spaces around project_name in mft template * add allowFlowReversal=true to all 4G timeseries buildings * allowFlowReversal=true in network2pip_instance [skip-ci] * set all remaining allowFlowReversal=true [ci skip] * tell modelica formatter to ignore getPeakMassFlowRate.mo because of failures * change getPeakMassFlowRate.mo to *.mot, reactivate modelica-fmt on it * oops, look for new filename [ci-skip] * remove commented code [skip ci] * add Medium redeclaration in MFT template * add OM files folder * All_spawn_models * Teaser Single worked * add timeseries output nodes to make OM happy * allow flow reversal in spawn building * relax thermal zone constraint in teaser * properly check for chp in sys param file * fix double appending of heating plant when no chp to package.order * pre-commit on Jiazhen's temp files for OM testing; remove some spawn-single files * remove requirements.txt check from pre-commit, since we don't use that * `poetry update` * Spawn and Teaser changes * pre-commit formatted Jiazhens modelica files * hardcode numberofchillers=2 as a hack because OM does not do dot access * add `allowFlowReversal=true` to spawn load instance * hack in the hardcoded numberofchillers to make OM happy * update 5g sys-param file to use 5g ets params * add district 5g timeseries test * `poetry update` * add `.pytest_cache` to gitignore * update mft connect statements to work in OM * remove commented template code * get 5g districts of multiple buildings working * remove test models from Jiazhen * `poetry update` * use newer version of poetry in ci * remove redundant `precommit` test env from CI matrix * wip: OM Docker code partial setup. Needs at least more Dockerfile work * remind poetry that we only support python >=3.9 now * `poetry update` * use newest poetry patch in ci * autopep8 * ignore typing error, and temporarily(?) remove method argument * om docker-compose yml file * change call from `spawn_docker.sh` to `om_docker.sh` * OM Dockerfile, and remove old Dockerfile * update modelica_runner for OM and remove spawn references * update python and shell scripts to run OM in Docker container * remove files no longer necessary * more updates for switch from spawn to OM * update test regarding switch from spawn to OM * re-enable a third cli argument for om.py in the container * handle a third argument to the cli inside the container * clean up docstring, try a new path to om_docker.sh * uncomment the file moving lines I commented. doh * tell mypy to ignore a line in om.py * run the same model we're testing for build success * Enable tests to run in docker with omc (#552) * Modify GHE params (#537) * remove connectors from ghe params * modify test and ghe system param file * update ghe parameters schema * modify ghe parameters * modify ghe parameters * add system parameter files for borehole test * update example files * update example files for model connectors * add ets 5th gen params * add array for ghe geometry params * remove print statement from test * Adds defaults and required fields for ghe_params and 5th gen ets params --------- Co-authored-by: Nicholas Long <[email protected]> * incremental updates, bouncingball should work * refactor the run in docker command * symlink mbl when running om.py * update the signature of the run_in_docker command. * mypy updates * remove optimica vars and enable running simulations * do not run simulations on windows * update lock files * update poetry, cleanup results to not include c code * fix boreholefield build, run still fails--ignoring * mark spawn and teaser models as failing. There are errors reported even though the mat file is created * udpate create_mbl_mount bash function to get mbl path in a better way * handle case where user downloads MBL and the Buildings path is one level higher * update poetry lock * dedent * Dockerfile now builds image that works with ARM chips * Update uo_des.py --------- Co-authored-by: tanushree04 <[email protected]> Co-authored-by: Nathan Moore <[email protected]> --------- Co-authored-by: jiazhenling <[email protected]> Co-authored-by: Nicholas Long <[email protected]> Co-authored-by: tanushree04 <[email protected]> Co-authored-by: Nicholas Long <[email protected]> * Enhance and expand microgrid templates and code (#549) * capacitor template from zhanwei and code to render it * refactor to reduce line-length * add minimal capacitor examples to microgrid test sys-param * new test for creating a capacitor model from template * district battery template and code * test for building district battery from template * generator code and template * update microgrid test sys-param file to include building generators * test for building a generator model * reformat simple_gmt_base.py to shorten line length * clarify variables in generator code * template and code for electrical grid * updated micrigrid example sys-param to include electrical grid params * add test for creating grid model * inductive load template and code * microgrid sys-params for ac inductive loads * test for building inductive load model * simplify `within` statement because the models are still simple * fix ACLine template to work with OM * capitalize Inductive.py (and change test call to it) to make github happy * also capitalizing Battery.py and changing the test to match * additional parameters for capacitors so simulations succeed on OM --------- Co-authored-by: Nicholas Long <[email protected]> * Prepare 0.5 release (#556) * prep release * add changelog --------- Co-authored-by: Nathan Moore <[email protected]> Co-authored-by: tanushree04 <[email protected]> Co-authored-by: Jing Wang <[email protected]> Co-authored-by: jiazhenling <[email protected]>
- Loading branch information