Skip to content

CHP load-following and absorption-chiller-only dispatch strategies#577

Open
zolanaj wants to merge 51 commits intodevelopfrom
chp-load-following
Open

CHP load-following and absorption-chiller-only dispatch strategies#577
zolanaj wants to merge 51 commits intodevelopfrom
chp-load-following

Conversation

@zolanaj
Copy link
Collaborator

@zolanaj zolanaj commented Feb 11, 2026

Please check if the PR fulfills these requirements

  • CHANGELOG.md is updated
  • Docs have been added / updated if applicable
  • Any new packages have been added to the [compat] section of Project.toml
  • REopt version number is updated in Project.toml and CHANGELOG.md if merging into master (do this right before merging)
  • Tests for the changes have been added. These tests should compare against expected values that are calculated independently of running REopt. Tests should also include garbage collection (see other tests for examples).
  • [] Any new REopt outputs and required inputs have been added to the corresponding Django model in the REopt API

Added

  • New optional attributes for CHP object CHP.serve_absorption_chiller_only, CHP.months_serving_absorption_chiller_only, and CHP.follow_electrical_load, which impose constraints on CHP operations if selected. The default is set to false for both attributes.

Fixed

  • Fixed a bug in which the CHP system requires a DomesticHotWater load.

@zolanaj zolanaj requested a review from Bill-Becker February 11, 2026 19:35
@zolanaj
Copy link
Collaborator Author

zolanaj commented Feb 11, 2026

@Bill-Becker this is ready for your review! I'm still crafting a test case for the false CHP DomesticHotWater load requirement in #576 but playtesting showed it worked... not sure if the specific instance requiring your workaround is available but I can try that if you have it. The failing tests in the most recent push are currently the PVWatts tests on actions and not related to this PR.

Only other note is that the storage doesn't have a variable sending to the absorption chiller at the moment - I think that may make this incomplete as a result. I'm working on that right now. (API dev will be done on this shortly, too.)

sum(sum(m[Symbol("dvHeatingProduction"*_n)][t,q,ts] for q in p.heating_loads) + m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts]
for t in p.techs.chp) - CHPToHotTES[ts] - CHPToSteamTurbineKW[ts] - CHPThermalToWasteKW[ts])
r["thermal_to_load_series_mmbtu_per_hour"] = round.(value.(CHPThermalToLoadKW ./ KWH_PER_MMBTU), digits=5)

Copy link
Collaborator

Choose a reason for hiding this comment

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

@zolanaj I deleted these lines of code as CHPtoLoadKW seems like an older version of CHPThermalToLoadKW and r["thermal_to_load_series_mmbtu_per_hour"] is a duplicate of above. Please double check!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

looks like the duplicate was removed correctly, thank you!

@Bill-Becker Bill-Becker changed the title Chp load following and absorption-chiller-only policies CHP load-following and absorption-chiller-only dispatch strategies Feb 23, 2026
@zolanaj
Copy link
Collaborator Author

zolanaj commented Feb 25, 2026

@Bill-Becker while getting the CHP sizing heuristic updated to include the cooling load (optionally), I added some tests and found a somewhat peculiar result - if the sizing heuristic includes both an average+max electric load and an average thermal load, the electric load is not considered at all and only the thermal load is used to size the system. was this intentional? I would think the max sizing of the two would be used (unless the CHP is electric_only, in which case only the electric load is used) but that's not the case - I'm guessing maybe the heating load is perhaps more important in CHP sizing when the heuristic is used?

I added a new test to verify this here and, if we want to include electric load, an update to this is straightforward (I implemented, then reverted it).

@Bill-Becker
Copy link
Collaborator

@Bill-Becker while getting the CHP sizing heuristic updated to include the cooling load (optionally), I added some tests and found a somewhat peculiar result - if the sizing heuristic includes both an average+max electric load and an average thermal load, the electric load is not considered at all and only the thermal load is used to size the system. was this intentional? I would think the max sizing of the two would be used (unless the CHP is electric_only, in which case only the electric load is used) but that's not the case - I'm guessing maybe the heating load is perhaps more important in CHP sizing when the heuristic is used?

I added a new test to verify this here and, if we want to include electric load, an update to this is straightforward (I implemented, then reverted it).

My understanding was that only if the is_electric_only argument is true, then it would use the electric load params for sizing. Otherwise, it should use the avg heating load. Is that not what you're seeing?

@zolanaj
Copy link
Collaborator Author

zolanaj commented Feb 25, 2026

@Bill-Becker while getting the CHP sizing heuristic updated to include the cooling load (optionally), I added some tests and found a somewhat peculiar result - if the sizing heuristic includes both an average+max electric load and an average thermal load, the electric load is not considered at all and only the thermal load is used to size the system. was this intentional? I would think the max sizing of the two would be used (unless the CHP is electric_only, in which case only the electric load is used) but that's not the case - I'm guessing maybe the heating load is perhaps more important in CHP sizing when the heuristic is used?
I added a new test to verify this here and, if we want to include electric load, an update to this is straightforward (I implemented, then reverted it).

My understanding was that only if the is_electric_only argument is true, then it would use the electric load params for sizing. Otherwise, it should use the avg heating load. Is that not what you're seeing?

That's my understanding. I think the question is this: the heuristic currently sizes according to (1) only the electric load, or (2) only the thermal load. Is there a case in which you would want to look at both the electric and thermal loads for heuristic sizing, whether it's the lower or higher of the two that informs it?

If the answer is "no" then no further adjustments are required and this is ready for your re-review.

@Bill-Becker
Copy link
Collaborator

@Bill-Becker while getting the CHP sizing heuristic updated to include the cooling load (optionally), I added some tests and found a somewhat peculiar result - if the sizing heuristic includes both an average+max electric load and an average thermal load, the electric load is not considered at all and only the thermal load is used to size the system. was this intentional? I would think the max sizing of the two would be used (unless the CHP is electric_only, in which case only the electric load is used) but that's not the case - I'm guessing maybe the heating load is perhaps more important in CHP sizing when the heuristic is used?
I added a new test to verify this here and, if we want to include electric load, an update to this is straightforward (I implemented, then reverted it).

My understanding was that only if the is_electric_only argument is true, then it would use the electric load params for sizing. Otherwise, it should use the avg heating load. Is that not what you're seeing?

That's my understanding. I think the question is this: the heuristic currently sizes according to (1) only the electric load, or (2) only the thermal load. Is there a case in which you would want to look at both the electric and thermal loads for heuristic sizing, whether it's the lower or higher of the two that informs it?

If the answer is "no" then no further adjustments are required and this is ready for your re-review.

I'm sure there's a way to smartly consider both, but for now let's just leave it as one or the other. Thanks!

@zolanaj zolanaj requested a review from Bill-Becker February 25, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants