Conversation
There was a problem hiding this comment.
Pull request overview
Adds new CHP dispatch policy inputs and separates absorption-chiller heat flows into distinct time-series outputs, aligning the API contract with updated REopt.jl dispatch behavior.
Changes:
- Added new
CHPInputsflags for electrical-load-following and absorption-chiller-only serving (with month scoping). - Added new
*_to_absorption_chiller_series_mmbtu_per_hour(and storage-to-absorption-chiller) outputs across multiple heating/storage technologies, and renamed storage-to-steam-turbine output series. - Bumped the Julia
REoptdependency version in the Julia environment.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
reoptjl/test/posts/test_thermal_in_results.json |
Updates test POST payload with new CHP input fields. |
reoptjl/models.py |
Introduces new CHP input fields and new/renamed thermal dispatch result fields. |
julia_src/Manifest.toml |
Updates the pinned REopt Julia package version. |
CHANGELOG.md |
Documents the new CHP inputs/results and the output-field rename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| serve_absorption_chiller_only = models.BooleanField( | ||
| default=True, | ||
| null=True, | ||
| blank=True, | ||
| help_text="Boolean indicator if CHP produced heat either serves absorption chiller or sends it to waste" | ||
| ) | ||
| months_serving_absorption_chiller_only = ArrayField( | ||
| models.IntegerField( | ||
| validators=[ | ||
| MinValueValidator(1), | ||
| MaxValueValidator(12) | ||
| ], | ||
| null=True, blank=True | ||
| ), | ||
| default=list, blank=True, | ||
| help_text="Months of the year in which the CHP only serves the absorption chiller load, only used if serve_absorption_chiller_only is True" | ||
| ) | ||
| follow_electrical_load = models.BooleanField( | ||
| default=True, | ||
| null=True, | ||
| blank=True, | ||
| help_text="Boolean indicator if CHP follows the electrical load by running at capacity or meeting the load only" | ||
| ) | ||
| include_cooling_in_chp_size = models.BooleanField( | ||
| default=True, | ||
| null=True, | ||
| blank=True, | ||
| help_text="Boolean indicator if cooling load (via absorption chiller) is included in the heuristic CHP sizing calculation along with heating loads" | ||
| ) |
There was a problem hiding this comment.
These new CHP input fields (and the other output-field additions/renames in this PR) require a corresponding Django migration; otherwise the DB schema will be out of sync with models.py and runtime queries/updates will fail. Please add a migration that adds these columns and also handles the Hot/HighTempThermalStorage output field rename as a RenameField to preserve existing data.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
| thermal_to_absorption_chiller_series_mmbtu_per_hour = ArrayField( | ||
| models.FloatField( | ||
| null=True, blank=True | ||
| ), | ||
| default=list, | ||
| help_text="Thermal power to absorption chiller time-series array [MMBtu/hr]" | ||
| ) |
There was a problem hiding this comment.
The newly added thermal_to_absorption_chiller_series_mmbtu_per_hour (and the analogous additions on other heating tech outputs) changes the results contract, but the existing thermal-results test only asserts legacy keys. Please extend the test suite to assert the presence/shape of the new absorption-chiller series outputs (and the renamed storage_to_steamturbine_series_mmbtu_per_hour) so regressions are caught.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s_serving_absorption_chiller_only Agent-Logs-Url: https://github.com/NatLabRockies/REopt_API/sessions/5302ba85-a575-4efc-be0a-ea549b3ddaa5 Co-authored-by: zolanaj <12503579+zolanaj@users.noreply.github.com>
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
What is the current behavior?
Flows to the absorption chiller were previously considered as part of the flows to heating loads.
What is the new behavior (if this is a feature change)?
Flows to the absorption chiller are now separate results from those going to serve a given heating load.
Does this PR introduce a breaking change?
(What changes might users need to make in their application due to this PR?)
If an absorption chiller was included as a technology, dispatch results that formerly reconciled may now be incomplete without including the new flows.
Other information:
CHP is not currently in job/test/posts/all_inputs_test.json so the new CHP inputs were added to reoptjl/test/posts/chp_defaults_post.json