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

Fix sum along wrong dimension in ExistingBoiler results #452

Merged
merged 5 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Classify the change according to the following categories:
### Fixed
### Deprecated
### Removed



## Develop
### Added
- Battery residual value if choosing replacement strategy for degradation
Expand All @@ -36,6 +37,7 @@ Classify the change according to the following categories:
- 80% scaling of battery maintenance costs when using augmentation strategy
### Fixed
- Fixed conditions for which a warning is presented indicating that the wholesale benefit threshold is met.
- When setting **thermal_production_series_mmbtu_per_hour** output in **ExistingBoiler**, sum over heating loads instead of time steps

## v0.48.1
### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/results/boiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ function add_boiler_results(m::JuMP.AbstractModel, p::REoptInputs, d::Dict; _n="
r["annual_fuel_consumption_mmbtu"] = round(sum(r["fuel_consumption_series_mmbtu_per_hour"]), digits=3)

r["thermal_production_series_mmbtu_per_hour"] =
round.(sum(value.(m[:dvHeatingProduction]["Boiler", q, ts] for ts in p.time_steps) for q in p.heating_loads) / KWH_PER_MMBTU, digits=5)
r["annual_thermal_production_mmbtu"] = round(sum(r["thermal_production_series_mmbtu_per_hour"]), digits=3)
round.(sum(value.(m[:dvHeatingProduction]["Boiler", q, ts] for ts in p.time_steps) for q in p.heating_loads) ./ KWH_PER_MMBTU, digits=5)
r["annual_thermal_production_mmbtu"] = round(sum(r["thermal_production_series_mmbtu_per_hour"]), digits=3)

if !isempty(p.s.storage.types.hot)
@expression(m, NewBoilerToHotTESKW[ts in p.time_steps],
Expand Down
4 changes: 2 additions & 2 deletions src/results/existing_boiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ function add_existing_boiler_results(m::JuMP.AbstractModel, p::REoptInputs, d::D
r["annual_fuel_consumption_mmbtu"] = round(sum(r["fuel_consumption_series_mmbtu_per_hour"]), digits=5)

r["thermal_production_series_mmbtu_per_hour"] =
round.(sum(value.(m[:dvHeatingProduction]["ExistingBoiler", q, ts] for q in p.heating_loads) for ts in p.time_steps) ./ KWH_PER_MMBTU, digits=5)
r["annual_thermal_production_mmbtu"] = round(sum(r["thermal_production_series_mmbtu_per_hour"]), digits=5)
round.(sum(value.(m[:dvHeatingProduction]["ExistingBoiler", q, ts] for ts in p.time_steps) for q in p.heating_loads) ./ KWH_PER_MMBTU, digits=5)
r["annual_thermal_production_mmbtu"] = round(sum(r["thermal_production_series_mmbtu_per_hour"]), digits=5)

if !isempty(p.s.storage.types.hot)
@expression(m, BoilerToHotTESKW[ts in p.time_steps],
Expand Down
Loading