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

Adds method to process modelica results #646

Merged
merged 21 commits into from
Oct 1, 2024
Merged

Adds method to process modelica results #646

merged 21 commits into from
Oct 1, 2024

Conversation

tanushree04
Copy link
Collaborator

@tanushree04 tanushree04 commented Jul 31, 2024

Objective :

  • add uo des cli call and methods to query results from modelica models
  • these results are required for the REOPT GHP LCCA analysis that will be run using the urbanopt SDK
  • this cli call will be run in the following sequence :
  1. create modelica model with GHP
  2. run thermal network to size GHP
  3. run modelica model
  4. query results using this cli call
  5. run reopt GHP LCCA analysis using urbanopt cli

This cli call takes the modelica folder created and run previously as an argument. It then reads the .mat file and queries timeseries results for heating, cooling electricity consumption of heat pumps, ets pump electricity consumption, pump associated with building electricity consumption loop pump electricity consumption and heat pump sizing for the GHP network.

This uses methods from the modelica buildingspy library to query results. https://simulationresearch.lbl.gov/modelica/buildingspy/

To test :

Use uo_des des-process <modelica_model_name>`

Run poetry run pytest tests poetry run pytest .\tests\geojson_modelica_translator\test_results_ghp.py

Check the "geojson-modelica-translator\tests\geojson_modelica_translator\data\modelica_5\modelica_5.Districts.DistrictEnergySystem_results\modelica_5.Districts.DistrictEnergySystem_result.csv" file created with results queried for REopt GHP at 15 minute intervals.

@tanushree04 tanushree04 requested a review from vtnate July 31, 2024 00:30
Copy link
Contributor

@vtnate vtnate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run pre-commit and address the linting & formatting changes.

Overall it's not clear to me what this command is for. Will you add more context to the PR description (and perhaps a bit to the cli command description) explaining what the output is, why someone would use this command, and how to interpret it?

geojson_modelica_translator/results_ghp.py Outdated Show resolved Hide resolved
management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Show resolved Hide resolved
management/uo_des.py Show resolved Hide resolved
tests/geojson_modelica_translator/test_results_ghp.py Outdated Show resolved Hide resolved
@vtnate vtnate added the enhancement New feature or request label Aug 8, 2024
@tanushree04
Copy link
Collaborator Author

#645

This needs to be incorporated

@vtnate
Copy link
Contributor

vtnate commented Aug 13, 2024

#645

This needs to be incorporated

Ah. That is in #644.

@tanushree04
Copy link
Collaborator Author

pre-co

what is the pre commit command?

@vtnate
Copy link
Contributor

vtnate commented Aug 27, 2024

what is the pre commit command?

poetry run pre-commit run -a

Copy link
Contributor

@vtnate vtnate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the tests all pass, but there are still linting issues found by Ruff in pre-commit. Please address those as well as my comments here.

management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Outdated Show resolved Hide resolved
management/uo_des.py Show resolved Hide resolved
tests/geojson_modelica_translator/test_results_ghp.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vtnate vtnate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making use of results! ❤️ This is fantastic. In FY25 we should incorporate some of Nicholas' work from the UO_DES repo to expand this even more.

@tanushree04 tanushree04 merged commit f8cd8d0 into develop Oct 1, 2024
10 checks passed
@tanushree04 tanushree04 deleted the ghp branch October 1, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants