Bug fixes in TES-to-Turbine results and CHP heuristic input processing#594
Bug fixes in TES-to-Turbine results and CHP heuristic input processing#594
Conversation
|
@Bill-Becker I think this addresses the issue, at least things seem to work on the REopt.jl side; I'll push a change that points to this feature branch on the API side. The updated test includes the "include_cooling_in_chp_size" parameter now; I ran the all_inputs cleaned up post separately but didn't add that to the test set just in the interest of runtime. |
Thanks Alex. So you were able to get the cleaned all_inputs file to run/solve in this branch? |
|
yes, exactly.
Yes, that's correct - the cleaned all_inputs file builds, solves, and returns results on my end, as well as a case in which we add "include_cooling_in_chp_size" to CHP inputs in a separate test. |
Bill-Becker
left a comment
There was a problem hiding this comment.
Just a few minor comments/questions to respond to.
| absorption_chiller_cop = nothing | ||
| # User can override by explicitly setting include_cooling_in_chp_size = false | ||
| include_cooling_in_size = get(d["CHP"], "include_cooling_in_chp_size", haskey(d, "AbsorptionChiller")) | ||
| if "include_cooling_in_chp_size" in keys(d["CHP"]) |
There was a problem hiding this comment.
The pop!() function handles a default value like the get() function does, so this could be reduced to one line: pop!(d["CHP"], "include_cooling_in_chp_size", haskey(d, "AbsorptionChiller")). If you prefer this more verbose way for clarity, or I'm wrong about that, you can leave it.
| federal_procurement_type = site.federal_procurement_type) | ||
| else # Only if modeling CHP without heating_load and existing_boiler (for prime generator, electric-only) | ||
| chp = CHP(d["CHP"], | ||
| chp = CHP(d["CHP"]; |
There was a problem hiding this comment.
I'm curious why this wasn't erroring before, unless we never got into this block.
| if "AbsorptionChiller" in p.techs.cooling | ||
| @expression(m, NewBoilertoAbsorptionChillerKW[ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts] for q in p.heating_loads))) | ||
| @expression(m, NewBoilertoAbsorptionChillerByQualityKW[q in p.heating_loads, ts in p.time_steps], sum(value.(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts]))) | ||
| @expression(m, NewBoilertoAbsorptionChillerKW[ts in p.time_steps], sum(m[:dvHeatToAbsorptionChiller]["Boiler",q,ts] for q in p.heating_loads)) |
There was a problem hiding this comment.
Was this (and all other related changes below) causing an error when creating the results, or is it just less efficient?
Please check if the PR fulfills these requirements
Fixed
include_cooling_in_chp_sizefrom being included in CHP inputs.Changed
value.isn't called within them.