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

v. 0.46.0 #387

Merged
merged 215 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
215 commits
Select commit Hold shift + click to select a range
ba78084
techs setup for separate heat loads
zolanaj Oct 12, 2023
b71ed4a
add booleans for supplying individual heating loads
zolanaj Oct 12, 2023
57fb574
ren can_supply_dhw can_serve_dhw to match GHP (same for space heating)
zolanaj Oct 12, 2023
7a6a53e
setup heating loads set
zolanaj Oct 12, 2023
78bf9a2
separate creation of Heating, Cooling Thermal Prod variables
zolanaj Aug 31, 2023
97c28aa
ren dvThermalProductionYIntercept dvHeatingProductionYIntercept
zolanaj Sep 1, 2023
963647a
rename dvThermalProduction to dvHeatingProduction, dvCoolingProduction
zolanaj Sep 1, 2023
4c22f6f
refactor ElectricHeater input cop <-- heating_cop
zolanaj Sep 1, 2023
2477f2f
Merge branch 'develop' into add-electric-heater
zolanaj Sep 1, 2023
0a441ee
Merge branch 'refactor-thermalprod-dv' into separate-heat-loads
zolanaj Oct 13, 2023
cd90619
update Techs members for new tech sets serving heating loads
zolanaj Oct 13, 2023
78ff2e1
generalize dvHeatingProduction, dvProductionToWaste
zolanaj Oct 13, 2023
7eb0f45
generalize heating production in tech constraints, results
zolanaj Oct 13, 2023
6f1c6c9
fix syntax bugs in heating load separation
zolanaj Oct 13, 2023
af7853a
add boiler results for separate heat loads
zolanaj Oct 19, 2023
326c182
add more results
zolanaj Oct 20, 2023
76a5942
New Boiler results for DHW, space heating load
zolanaj Oct 24, 2023
1b3e44d
update dvThermalProductionToWaste results
zolanaj Oct 24, 2023
9b76e19
update heating production decision variable generation
zolanaj Oct 25, 2023
39a45b9
add empty arrays for MPCScenario to account for new tech sets
zolanaj Oct 25, 2023
6ac2c7a
update variable declaration and results for dvHeatingProduction
zolanaj Oct 25, 2023
9f93775
update electric heater thermal production time series
zolanaj Oct 25, 2023
d24fa24
separate structs for Hot, Cold TES
zolanaj Oct 25, 2023
8829236
add structure for heating loads served by tes
zolanaj Oct 25, 2023
b35afa9
Merge branch 'develop' into separate-heat-loads
zolanaj Oct 26, 2023
b4d539f
unique variables for heat charged, discharged to/from storage
zolanaj Nov 1, 2023
2e9d0ab
update ThermalStorage to HotThermalStorage, ColdThermalStorage in sto…
zolanaj Nov 1, 2023
998dd87
fix population of heating_loads_served_by_tes
zolanaj Nov 1, 2023
dde22e0
generalize thermal to steam turbine by heating load
zolanaj Nov 1, 2023
0c0aa77
Merge branch 'develop' into add-process-heat-load
zolanaj Nov 3, 2023
7e6ae3b
use dvHeatToStorage in heating tech results
zolanaj Nov 3, 2023
dc0f6ab
Update heating_cooling_loads.jl
zolanaj Nov 3, 2023
472fbc9
Merge branch 'develop' into add-process-heat-load
zolanaj Nov 6, 2023
fd87734
add more checks and time_steps_per_hour to ProcessHeatLoad
zolanaj Nov 6, 2023
d6679f5
add ProcessHeatLoad to Scenario object
zolanaj Nov 6, 2023
dffd3a4
add process heat to loads set, add techs served set
zolanaj Nov 7, 2023
40eb422
add electric heater size constraint
zolanaj Nov 7, 2023
6e819b4
add process heat results, expressions for heat by quality
zolanaj Nov 7, 2023
6705b4f
Add quality-specific heat results for SteamTurbine
zolanaj Nov 8, 2023
f2d26da
refactoring heat flow expressions for consistency
zolanaj Nov 8, 2023
d31ddb6
fix CHP production to waste, bau inputs
zolanaj Nov 8, 2023
32a8e6d
Merge branch 'develop' into add-process-heat-load
zolanaj Nov 8, 2023
edbb449
add electric heater size constraint
zolanaj Nov 7, 2023
2bb3c4b
refactor electric heater to storage constraint
zolanaj Nov 10, 2023
063228d
generalize boiler and electric heater constraints
zolanaj Nov 10, 2023
cef8dc3
Merge branch 'electric-heater' into add-process-heat-load
zolanaj Nov 29, 2023
6876279
Merge branch 'develop' into add-process-heat-load
zolanaj Nov 29, 2023
e5742b8
Fixes to new boiler to load results - all and space heating
zolanaj Nov 30, 2023
d438257
Add loads served attributes to steam turbine
zolanaj Dec 1, 2023
4ded048
update results expressions and constraints for steam turbine heat flows
zolanaj Dec 1, 2023
c7a60fb
bug fix in hot thermal storage constraints
zolanaj Dec 6, 2023
15789f3
add empty heating_loads to MPC inputs
zolanaj Dec 6, 2023
fabb387
use space heating DV's only for flexible HVAC model
zolanaj Dec 7, 2023
4601d0f
Merge branch 'electric-heater' into add-process-heat-load
zolanaj Dec 7, 2023
eaa3a14
Merge branch 'develop' into add-process-heat-load
zolanaj Dec 28, 2023
68e9501
update Hot thermal storage tracking in results
zolanaj Jan 11, 2024
2f17f60
add constraint reconciling dvDischargeFromStorage and dvHeatFromStorage
zolanaj Jan 11, 2024
aebbaf7
add member absorption_chillers_using_heating_load to REoptInputs
zolanaj Jan 12, 2024
e90b33c
incorporate heat absorption chiller subsets into heating load balance
zolanaj Jan 17, 2024
3de5267
add attribute heating_load_input to AbsorptionChiller
zolanaj Jan 17, 2024
0e45864
add heating load input for AbsorptionChiller in heat load balance test
zolanaj Jan 17, 2024
a2de8ac
set up GHP within heating and cooling techs
zolanaj Jan 18, 2024
764757f
enforce binary heating and cooling constraints in each hour to popula…
zolanaj Jan 18, 2024
05bd4fd
rm ghp-specific production from heating and cooling dv's
zolanaj Jan 18, 2024
d35fcfe
refactor GHP constraints according to 1 vs. multiple options
zolanaj Jan 25, 2024
2a4dcd6
add ghp techs set
zolanaj Jan 25, 2024
4b9a5e7
exclude ghp from size constraints
zolanaj Jan 25, 2024
7a6abbc
exclude ghp from COP-based electrical consumption in load balancing
zolanaj Jan 25, 2024
508154d
exclude GHP from renewable fraction calculation
zolanaj Jan 25, 2024
9160096
Allow for non-chp heating techs to send to waste heat
zolanaj Jan 25, 2024
82f17ed
add can_serve_shw and can_serve_space_heating to test jsons
zolanaj Jan 26, 2024
dcdaf1e
fix population of absorption_chillers_using_heating_load
zolanaj Jan 26, 2024
197e2f5
populate heat-load-specific tech sets in BAU scenario inputs
zolanaj Jan 31, 2024
7f133c2
label heat load balance constraints
zolanaj Jan 31, 2024
af2beaf
update GHP constraints by heat load
zolanaj Jan 31, 2024
8a0d6f9
make absorption_chillers_using_heating_load vals empty in BAU Inputs
zolanaj Feb 15, 2024
61ffee6
make results expression ElectricHeaterToHotTESKW indexed on time steps
zolanaj Feb 27, 2024
84c65ac
add waste heat to thermal steam supply constraint
zolanaj Feb 27, 2024
9f52b65
add thermal steam supply constraint when storage is present
zolanaj Feb 27, 2024
a406cc5
do not allow steam turbine to produce waste heat
zolanaj Feb 27, 2024
399784c
update test values and tolerances for CHP Sizing
zolanaj Feb 27, 2024
c6008b9
Merge remote-tracking branch 'origin/develop' into add-process-heat-load
zolanaj Feb 28, 2024
f2b54b7
Merge remote-tracking branch 'origin/develop' into add-process-heat-load
zolanaj Mar 1, 2024
cbdbc53
fix hot thermal storage reference in steam turbine constraints
zolanaj Mar 4, 2024
e318a9d
rm debugging print statements
zolanaj Mar 5, 2024
0a4a9e5
thermal storage docs fix
zolanaj Mar 5, 2024
893ec24
Update CHANGELOG.md
zolanaj Mar 5, 2024
d68eabf
add constraints enforcing heat load compatibility
zolanaj Mar 11, 2024
75d8616
add process heat to storage compatibility constraints
zolanaj Mar 11, 2024
5284ad5
throw error if no heating techs can serve a nonzero heating load
zolanaj Mar 11, 2024
2abfeaa
add testset Disaggregated Heating Loads
zolanaj Mar 11, 2024
75f4613
Update electric_heater.json
zolanaj Mar 11, 2024
042e1fe
Exclude GHP from tech compatibility constraints (handled separately)
zolanaj Mar 11, 2024
ed5fe6a
add docs for ProcessHeatLoad, ElectricHeater
zolanaj Mar 12, 2024
fa05fcd
Merge branch 'develop' into add-process-heat-load
zolanaj Mar 12, 2024
ef749ad
fix process heat service checks in results, TES constraint
zolanaj Mar 21, 2024
5b52502
update max heat load to include process heat
zolanaj Mar 22, 2024
dbf9f55
Merge branch 'develop' into add-process-heat-load
zolanaj Mar 22, 2024
16e6200
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 2, 2024
7cfcc06
add call to solar dataset query
adfarth Apr 9, 2024
203390a
add warnings
adfarth Apr 15, 2024
6e28b6f
Merge branch 'develop' into solar-data
adfarth Apr 15, 2024
ecb571b
fix var names
adfarth Apr 15, 2024
c3e3292
add tests and change warning tolerance
adfarth Apr 15, 2024
c808987
Update runtests.jl
adfarth Apr 15, 2024
5dcb83a
update distance threshold for nsrdb and warning
adfarth Apr 15, 2024
d2ffbeb
Add (new) Boiler fuel emissions factors
Bill-Becker Apr 17, 2024
45eda3b
Add ExistingBoiler.retire_in_optimal input
Bill-Becker Mar 1, 2024
aae9d58
Add constraint to force zero ExistingBoiler thermal production
Bill-Becker Mar 1, 2024
7692f33
Add conditional constraint to force zero ExistingBoiler production fo…
Bill-Becker Mar 1, 2024
574b36a
Check for ExistingBoiler first when CHP is electric only
Bill-Becker Mar 1, 2024
70f842f
Fix BAU emissions calc with boiler heating load
Bill-Becker Mar 17, 2024
08d4d1c
Fix "next-line" ignore of subtracting grid export emissions reduction…
Bill-Becker Mar 29, 2024
802eb36
add process heat load to steam turbine size calc
zolanaj Apr 17, 2024
fd65e2d
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 17, 2024
14abae0
replace heat_loads_mmbtu_per_hour with fuel_loads_mmbtu_per_hour in p…
zolanaj Apr 17, 2024
6f94b24
include default existing boiler efficiency when creating ProcessHeatLoad
zolanaj Apr 17, 2024
679c7b5
add quality-specific hot TES-to-load results
zolanaj Apr 17, 2024
dd4fe5c
fix kwh_per_gal reference in hot storage results
zolanaj Apr 18, 2024
30962cd
update no_existing_boiler_production for disaggregated heating loads
zolanaj Apr 18, 2024
e2376b2
ren heat_loads_mmbtu_per_hour fuel_loads_mmbtu_per_hour
zolanaj Apr 18, 2024
fe7c7a6
add more detail to warnings and errors for process heat load input
zolanaj Apr 18, 2024
401e401
throw warning if emissions reduction is included with no BAU option
zolanaj Apr 18, 2024
ef9121a
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 18, 2024
3e1977d
Merge branch 'develop' into solar-data
adfarth Apr 19, 2024
da9d254
fix tracking of Boiler Fuel O&M Costs
zolanaj Apr 19, 2024
899202d
check emptiness of sets for heating tech constraints
zolanaj Apr 19, 2024
d8e7f6c
Add process heat load test set
zolanaj Apr 19, 2024
2f1ab42
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 19, 2024
5964658
Move assignment of TotalBoilerPerUnitProdOMCosts to if/else block
zolanaj Apr 20, 2024
fe4dd35
add process heat for BAU emissions calculation
zolanaj Apr 20, 2024
767be77
fix calculation of annual_mmbtu heat load in ProcessHeatLoad
zolanaj Apr 20, 2024
54a2c4e
add emissions reduction test to process heat load testset
zolanaj Apr 20, 2024
4468ebe
update process heat load inputs annual_mmbtu tests
zolanaj Apr 21, 2024
6a9747a
Merge branch 'develop' into solar-data
adfarth Apr 21, 2024
b6d8927
update EASIUR years
adfarth Apr 22, 2024
c0890d8
fix hot storage checks for generating heat-load-specific results
zolanaj Apr 22, 2024
8554a7d
ren dvThermalProductionYIntercept dvHeatingProductionYIntercept
zolanaj Apr 22, 2024
4499ba6
fix bug in Process Heat Load test
zolanaj Apr 22, 2024
015225f
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 22, 2024
13e1290
Use input boiler efficiency for process heat fuel->thermal
Bill-Becker Apr 23, 2024
d4c4016
Temporarily disable ubuntu tests because always timing out
Bill-Becker Apr 23, 2024
0d6d8da
Fix when efficiency when no ProcessHeat
Bill-Becker Apr 23, 2024
474145d
update Minimize Unserved Load Tests for speed
zolanaj Apr 24, 2024
3b7dd49
Update outage.json
zolanaj Apr 24, 2024
ed2e34a
update additional minimize unserved load test
zolanaj Apr 24, 2024
f685523
Merge branch 'develop' into simplify-tests
zolanaj Apr 24, 2024
1d6c088
Temporarily disable ubuntu tests because always timing out
Bill-Becker Apr 23, 2024
b9f87e9
simplify emissions + RE testset
zolanaj Apr 24, 2024
b703384
rm "Imported Xpress Test Suite" testset marker (but keep tests)
zolanaj Apr 24, 2024
1b70783
Revert "rm "Imported Xpress Test Suite" testset marker (but keep tests)"
zolanaj Apr 24, 2024
6b0b1d7
Debug GHP fractional sizing
lixiangk1 Apr 25, 2024
6d08397
Update CHANGELOG.md
zolanaj Apr 25, 2024
37133a7
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 25, 2024
2bf4faf
Merge branch 'develop' into solar-data
zolanaj Apr 25, 2024
237f84b
throw error if bad coordinates are given to call_solar_dataset_api
zolanaj Apr 30, 2024
7d8e419
rm redundant condition in ternary
zolanaj Apr 30, 2024
cf927e9
create an if/else block to track warnings from solar dataset API call
zolanaj Apr 30, 2024
781250e
update text to 20 miles
adfarth Apr 30, 2024
50c8d4b
rm minimize unserved load comment
zolanaj Apr 30, 2024
e68ac12
move test edits to .json files
zolanaj Apr 30, 2024
6747804
simplify run_reopt() calls in minimize unserved load tests
zolanaj Apr 30, 2024
296bbd6
more specific test value for outage test
zolanaj Apr 30, 2024
ffcc062
Update CHANGELOG.md
zolanaj Apr 30, 2024
f99d7e7
Merge pull request #378 from NREL/simplify-tests
zolanaj Apr 30, 2024
d6aa887
Merge branch 'develop' into add-process-heat-load
zolanaj Apr 30, 2024
53aba20
Merge branch 'develop' into solar-data
adfarth Apr 30, 2024
c200cab
Merge branch 'develop' into update-easiur
adfarth Apr 30, 2024
e0d323f
Merge pull request #356 from NREL/add-process-heat-load
zolanaj Apr 30, 2024
b26b245
Merge branch 'develop' into update-easiur
adfarth May 1, 2024
0e74dba
Merge branch 'develop' into solar-data
adfarth May 1, 2024
7f8d544
revise max interconnect for big-M net metering constraint constraint
zolanaj May 2, 2024
c67f68c
add net metering tests
zolanaj May 2, 2024
8f61e69
document new big-M
zolanaj May 2, 2024
acbc558
update max load big-M
zolanaj May 2, 2024
5f9af28
Update CHANGELOG.md
zolanaj May 2, 2024
6b1adf0
include p.hours_per_time_step in bound for interconnect
zolanaj May 2, 2024
5f0f9f8
minor docstrings update
zolanaj May 2, 2024
248ef4c
add warning if wholesale max benefit is obtained
zolanaj May 3, 2024
04b8144
Merge pull request #373 from NREL/solar-data
adfarth May 3, 2024
08505d6
Merge branch 'develop' into improve-net-metering-bigM
adfarth May 3, 2024
8f58348
Merge branch 'develop' into update-easiur
adfarth May 3, 2024
5d890d3
update test value
adfarth May 6, 2024
b840c2a
Merge pull request #383 from NREL/improve-net-metering-bigM
zolanaj May 6, 2024
5770239
Update CHANGELOG.md
zolanaj May 6, 2024
eda2268
Update Project.toml
zolanaj May 6, 2024
71c8121
Merge branch 'develop' into ghp-fractional-sizing
lixiangk1 May 7, 2024
6d1373d
Add process heating load results
zolanaj May 7, 2024
04b9b37
Add process heating load results
zolanaj May 7, 2024
d1ed9aa
Merge branch 'add_process_heat_load_results' of https://github.com/NR…
zolanaj May 7, 2024
22fb498
update process heat results, docstrings
zolanaj May 7, 2024
85a2c1a
update heating load results docstrings
zolanaj May 7, 2024
4e1b861
ren process_heat_boiler_fuel__load_series_mmbtu_per_hour process_heat…
zolanaj May 7, 2024
fc7f654
Merge pull request #379 from NREL/ghp-fractional-sizing
lixiangk1 May 7, 2024
a2c4d52
Merge branch 'develop' into add_process_heat_load_results
zolanaj May 7, 2024
ece9cd9
Update CHANGELOG.md
zolanaj May 7, 2024
d1d7d5e
Merge pull request #388 from NREL/zolanaj-patch-1
zolanaj May 7, 2024
889950d
Merge branch 'develop' into process-heat-load-results
zolanaj May 7, 2024
76723e3
Update CHANGELOG.md
zolanaj May 7, 2024
6aae423
Update CHANGELOG.md
zolanaj May 7, 2024
787c304
Merge branch 'develop' into update-easiur
adfarth May 7, 2024
5fe045d
clarify test post name
hdunham May 7, 2024
0aa935d
add tiered TOU demand test
hdunham May 7, 2024
6b083c8
fix reshape that assumes row major instead of column major
hdunham May 7, 2024
69171d7
fix 1 vs 0 indexing bug
hdunham May 7, 2024
5841a9b
add missing tier index when using tou_demand_rates
hdunham May 7, 2024
4764107
Merge branch 'develop' into tou-demand-reshape-bug
hdunham May 7, 2024
2a39f91
Update CHANGELOG.md
hdunham May 7, 2024
3c6db71
Merge pull request #389 from NREL/process-heat-load-results
zolanaj May 7, 2024
43ecd4e
Merge branch 'develop' into tou-demand-reshape-bug
zolanaj May 7, 2024
8efd7d7
Update CHANGELOG.md
zolanaj May 7, 2024
1e3aba2
Merge branch 'develop' into update-easiur
hdunham May 7, 2024
bc047ce
Merge pull request #390 from NREL/tou-demand-reshape-bug
zolanaj May 7, 2024
f82c891
Merge pull request #376 from NREL/update-easiur
hdunham May 7, 2024
6c39421
fix changelog merge
hdunham May 7, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
matrix:
julia-version: ['1.8']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest, macOS-11]
# os: [ubuntu-latest, windows-latest, macOS-11]
os: [windows-latest, macOS-11]

steps:
- uses: actions/checkout@v2
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,43 @@ Classify the change according to the following categories:
### Deprecated
### Removed

## v. 0.46.0
### Added
- In `src/core/absorption_chiller.jl` struct, added field **heating_load_input** to the AbsorptionChiller struct
- Added new variables **dvHeatToStorage** and **dvHeatFromStorage** which are indexed on `p.heating_loads` and added reconciliation constraints so that **dvProductionToStorage** and **dvDischargeFromStorage** maintain their relationship to state of charge for Hot thermal energy storage.
- In `src/constraints/thermal_tech_constraints.jl`, added function **no_existing_boiler_production** which prevents ExistingBoiler from producing heat in optimized (non-BAU) scenarios
- for all heating techs and CHP, added fields **can_serve_space_heating**, **can_serve_dhw**, and **can_serve_process_heat** in core structs and added new results fields **thermal_to_dhw_load_series_mmbtu_per_hour**, **thermal_to_space_heating_load_series_mmbtu_per_hour**, and **thermal_to_process_heat_load_series_mmbtu_per_hour**
- In `src/core/techs.jl`, added new sets **ghp_techs**, **cooling_techs**, **techs_can_serve_space_heating**, **techs_can_serve_dhw**, and **techs_can_serve_process_heat**
- In `src/core/reopt_inputs.jl`, added new fields **heating_loads**, **heating_loads_kw**, **heating_loads_served_by_tes**, and **absorption_chillers_using_heating_load** to the REoptInputs and BAUInputs structs. in the math, new set `p.heating_loads` has index q (to represent "qualities" of heat).
- In `src/core/heating_cooling_loads.jl`, added new struct **ProcessHeatLoad**
- In `src/core/scenario.jl`, added new field **process_heat_load**
- In `src/mpc/inputs.jl`, added new field **heating_loads**
- In `src/core/existing_boiler.jl`, added field **retire_in_optimal** to the ExistingBoiler struct
- Info to user including name of PV and/or temperature datasource used and distance from site location to datasource location
- Warning to user if data is not from NSRDB or if data is more than 200 miles away
- In `results/heating_cooling_load.jl`, added new fields **process_heat_thermal_load_series_mmbtu_per_hour**, **process_heat_boiler_fuel_load_series_mmbtu_per_hour**, **annual_calculated_process_heat_thermal_load_mmbtu**, and **annual_calculated_process_heat_boiler_fuel_load_mmbtu** to HeatingLoad results, with sum heating loads now including process heat
### Changed
- Change the way we determine which dataset to utilize in the PVWatts API call. Previously, we utilized defined lat-long bounds to determine if "nsrdb" or "intl" data should be used in PVWatts call. Now, we call the Solar Dataset Query API (v2) (https://developer.nrel.gov/docs/solar/data-query/v2/) to determine the dataset to use, and include "tmy3" as an option, as this is currently the best-available data for many locations in Alaska.
- Refactored **dvThermalProduction** to be separated in **dvCoolingProduction** and **dvHeatingProduction** with **dvHeatingProduction** now indexed on `p.heating_loads`
- Refactored heating load balance constraints so that a separate flow balance is reconciled for each heating load in `p.heating_loads`
- Renamed **dvThermalProductionYIntercept** to **dvHeatingProductionYIntercept**
- Divided **ThermalStorage** into **HotThermalStorage** and **ColdThermalStorage** as the former now has attributes related to the compatible heat loads as input or output.
- Changed technologies included **dvProductionToWaste** to all heating techs. NOTE: this variable is forced to zero to allow steam turbine tests to pass, but I believe that waste heat should be allowed for the turbine. A TODO is in place to review this commit (a406cc5df6e4a27b56c92815c35d04815904e495).
- Changed test values and tolerances for CHP Sizing test.
- Updated test sets "Emissions and Renewable Energy Percent" and "Minimize Unserved Load" to decrease computing time.
- Test for tiered TOU demand rates in `test/runtests.jl`
- Updated `pop_year` and `income_year` used in call to EASIUR data (`get_EASIUR2005`) each to 2024, from 2020.
- Updated usd conversion used for EASIUR health cost calcs from USD_2010_to_2020 = 1.246 to USD_2010_to_2024 = 1.432
### Fixed
- Added a constraint in `src/constraints/steam_turbine_constraints.jl` that allows for heat loads to reconcile when thermal storage is paired with a SteamTurbine.
- Fixed a bug in which net-metering system size limits could be exceeded while still obtaining the net-metering benefit due to a large "big-M".
- Fixed a reshape call in function `parse_urdb_tou_demand` that incorrectly assumed row major instead of column major ordering
- Fixed a loop range in function `parse_urdb_tou_demand` that incorrectly started at 0 instead of 1
- Added the missing tier index when accessing `p.s.electric_tariff.tou_demand_rates` in function `add_elec_utility_expressions`

## v0.45.0
### Fixed
- Fixed bug in call to `GhpGhx.jl` when sizing hybrid GHP using the fractional sizing method
- Added `export_rate_beyond_net_metering_limit` to list of inputs to be converted to type Real, to avoid MethodError if type is vector of Any.
- Fix blended CRB processing when one or more load types have zero annual energy
- When calculating CHP fuel intercept and slope, use 1 for the HHV because CHP fuel measured in units of kWh, instead of using non-existent **CHP.fuel_higher_heating_value_kwh_per_gal**
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "REopt"
uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
authors = ["Nick Laws", "Hallie Dunham <[email protected]>", "Bill Becker <[email protected]>", "Bhavesh Rathod <[email protected]>", "Alex Zolan <[email protected]>", "Amanda Farthing <[email protected]>"]
version = "0.45.0"
version = "0.46.0"

[deps]
ArchGDAL = "c9ce4bd3-c3d5-55b8-8973-c0e20141b8c3"
Expand Down
6 changes: 4 additions & 2 deletions data/absorption_chiller/absorption_chiller_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
20.0,
18.0
],
"cop_thermal": 0.74
"cop_thermal": 0.74,
"heating_load_input": "DomesticHotWater"
},
"steam":{
"installed_cost_per_ton": [
Expand Down Expand Up @@ -78,6 +79,7 @@
23.0,
20.0
],
"cop_thermal":1.42
"cop_thermal":1.42,
"heating_load_input": "DomesticHotWater"
}
}
10 changes: 10 additions & 0 deletions docs/src/reopt/inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ REopt.DomesticHotWaterLoad
REopt.SpaceHeatingLoad
```

## ProcessHeatLoad
```@docs
REopt.ProcessHeatLoad
```

## FlexibleHVAC
```@docs
REopt.FlexibleHVAC
Expand All @@ -166,3 +171,8 @@ REopt.GHP
```@docs
REopt.SteamTurbine
```

## ElectricHeater
```@docs
REopt.ElectricHeater
```
21 changes: 11 additions & 10 deletions src/constraints/chp_constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,37 @@ function add_chp_thermal_production_constraints(m, p; _n="")
thermal_prod_slope = (thermal_prod_full_load - thermal_prod_half_load) / (1.0 - 0.5) # [kWt/kWe]
thermal_prod_intercept = thermal_prod_full_load - thermal_prod_slope * 1.0 # [kWt/kWe_rated

# Conditionally add dvThermalProductionYIntercept if coefficient p.s.chpThermalProdIntercept is greater than ~zero

# Conditionally add dvHeatingProductionYIntercept if coefficient p.s.chpThermalProdIntercept is greater than ~zero
if abs(thermal_prod_intercept) > 1.0E-7
dv = "dvThermalProductionYIntercept"*_n
dv = "dvHeatingProductionYIntercept"*_n
m[Symbol(dv)] = @variable(m, [p.techs.chp, p.time_steps], base_name=dv)

#Constraint (2a-1): Upper Bounds on Thermal Production Y-Intercept
@constraint(m, CHPYInt2a1Con[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts] <= thermal_prod_intercept * m[Symbol("dvSize"*_n)][t]
m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts] <= thermal_prod_intercept * m[Symbol("dvSize"*_n)][t]
)
# Constraint (2a-2): Upper Bounds on Thermal Production Y-Intercept
@constraint(m, CHPYInt2a2Con[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts] <= thermal_prod_intercept * p.s.chp.max_kw
m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts] <= thermal_prod_intercept * p.s.chp.max_kw
* m[Symbol("binCHPIsOnInTS"*_n)][t,ts]
)
#Constraint (2b): Lower Bounds on Thermal Production Y-Intercept
@constraint(m, CHPYInt2bCon[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts] >= thermal_prod_intercept * m[Symbol("dvSize"*_n)][t]
m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts] >= thermal_prod_intercept * m[Symbol("dvSize"*_n)][t]
- thermal_prod_intercept * p.s.chp.max_kw * (1 - m[Symbol("binCHPIsOnInTS"*_n)][t,ts])
)
# Constraint (2c): Thermal Production of CHP
# Note: p.HotWaterAmbientFactor[t,ts] * p.HotWaterThermalFactor[t,ts] removed from this but present in math
@constraint(m, CHPThermalProductionCon[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvThermalProduction"*_n)][t,ts] ==
sum(m[Symbol("dvHeatingProduction"*_n)][t,q,ts] for q in p.heating_loads) ==
thermal_prod_slope * p.production_factor[t,ts] * m[Symbol("dvRatedProduction"*_n)][t,ts]
+ m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts] +
+ m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts] +
m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts]
)
else
@constraint(m, CHPThermalProductionConLinear[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvThermalProduction"*_n)][t,ts] ==
sum(m[Symbol("dvHeatingProduction"*_n)][t,q,ts] for q in p.heating_loads) ==
thermal_prod_slope * p.production_factor[t,ts] * m[Symbol("dvRatedProduction"*_n)][t,ts] +
m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts]
)
Expand All @@ -99,7 +100,7 @@ function add_chp_supplementary_firing_constraints(m, p; _n="")
# Constrain upper limit of dvSupplementaryThermalProduction, using auxiliary variable for (size * useSupplementaryFiring)
@constraint(m, CHPSupplementaryFireCon[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts] <=
(p.s.chp.supplementary_firing_max_steam_ratio - 1.0) * p.production_factor[t,ts] * (thermal_prod_slope * m[Symbol("dvSupplementaryFiringSize"*_n)][t] + m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts])
(p.s.chp.supplementary_firing_max_steam_ratio - 1.0) * p.production_factor[t,ts] * (thermal_prod_slope * m[Symbol("dvSupplementaryFiringSize"*_n)][t] + m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts])
)
if solver_is_compatible_with_indicator_constraints(p.s.settings.solver_name)
# Constrain lower limit of 0 if CHP tech is off
Expand All @@ -110,7 +111,7 @@ function add_chp_supplementary_firing_constraints(m, p; _n="")
#There's no upper bound specified for the CHP supplementary firing, so assume the entire heat load as a reasonable maximum that wouldn't be exceeded (but might not be the best possible value).
max_supplementary_firing_size = maximum(p.s.dhw_load.loads_kw .+ p.s.space_heating_load.loads_kw)
@constraint(m, NoCHPSupplementaryFireOffCon[t in p.techs.chp, ts in p.time_steps],
m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts] <= (p.s.chp.supplementary_firing_max_steam_ratio - 1.0) * p.production_factor[t,ts] * (thermal_prod_slope * max_supplementary_firing_size + m[Symbol("dvThermalProductionYIntercept"*_n)][t,ts])
m[Symbol("dvSupplementaryThermalProduction"*_n)][t,ts] <= (p.s.chp.supplementary_firing_max_steam_ratio - 1.0) * p.production_factor[t,ts] * (thermal_prod_slope * max_supplementary_firing_size + m[Symbol("dvHeatingProductionYIntercept"*_n)][t,ts])
)
end
end
Expand Down
17 changes: 15 additions & 2 deletions src/constraints/electric_utility_constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,21 @@ function add_export_constraints(m, p; _n="")
!binNEM => {sum(m[Symbol("dvSize"*_n)][t] for t in NEM_techs) <= p.s.electric_utility.interconnection_limit_kw}
)
else
#leverage max system sizes for interconnect limit size, alternate is max monthly fully-electrified load in kWh
#assume electric heater with COP of 1 for conversion of heat to electricity
max_interconnection_size = minimum([
p.s.electric_utility.interconnection_limit_kw,
sum(p.max_sizes[t] for t in NEM_techs),
p.hours_per_time_step * maximum([sum((
p.s.electric_load.loads_kw[ts] +
p.s.cooling_load.loads_kw_thermal[ts]/p.cop["ExistingChiller"] +
(p.s.space_heating_load.loads_kw[ts] + p.s.dhw_load.loads_kw[ts] + p.s.process_heat_load.loads_kw[ts])
) for ts in p.s.electric_tariff.time_steps_monthly[m]) for m in p.months
])
])

@constraint(m,
sum(m[Symbol("dvSize"*_n)][t] for t in NEM_techs) <= p.s.electric_utility.interconnection_limit_kw - (p.s.electric_utility.interconnection_limit_kw - p.s.electric_utility.net_metering_limit_kw)*binNEM
sum(m[Symbol("dvSize"*_n)][t] for t in NEM_techs) <= max_interconnection_size - (max_interconnection_size - p.s.electric_utility.net_metering_limit_kw)*binNEM
)
end

Expand Down Expand Up @@ -371,7 +384,7 @@ function add_elec_utility_expressions(m, p; _n="")

if !isempty(p.s.electric_tariff.tou_demand_rates)
m[Symbol("DemandTOUCharges"*_n)] = @expression(m,
p.pwf_e * sum( p.s.electric_tariff.tou_demand_rates[r] * m[Symbol("dvPeakDemandTOU"*_n)][r, tier]
p.pwf_e * sum( p.s.electric_tariff.tou_demand_rates[r, tier] * m[Symbol("dvPeakDemandTOU"*_n)][r, tier]
for r in p.ratchets, tier in 1:p.s.electric_tariff.n_tou_demand_tiers)
)
else
Expand Down
47 changes: 28 additions & 19 deletions src/constraints/emissions_constraints.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# REopt®, Copyright (c) Alliance for Sustainable Energy, LLC. See also https://github.com/NREL/REopt.jl/blob/master/LICENSE.

function add_emissions_constraints(m,p)
if !isnothing(p.s.site.CO2_emissions_reduction_min_fraction)
@constraint(m, MinEmissionsReductionCon,
m[:Lifecycle_Emissions_Lbs_CO2] <=
(1-p.s.site.CO2_emissions_reduction_min_fraction) * m[:Lifecycle_Emissions_Lbs_CO2_BAU]
)
end
if !isnothing(p.s.site.CO2_emissions_reduction_max_fraction)
@constraint(m, MaxEmissionsReductionCon,
m[:Lifecycle_Emissions_Lbs_CO2] >=
(1-p.s.site.CO2_emissions_reduction_max_fraction) * m[:Lifecycle_Emissions_Lbs_CO2_BAU]
)
if !isnothing(p.s.site.bau_emissions_lb_CO2_per_year)
if !isnothing(p.s.site.CO2_emissions_reduction_min_fraction)
@constraint(m, MinEmissionsReductionCon,
m[:Lifecycle_Emissions_Lbs_CO2] <=
(1-p.s.site.CO2_emissions_reduction_min_fraction) * m[:Lifecycle_Emissions_Lbs_CO2_BAU]
)
end
if !isnothing(p.s.site.CO2_emissions_reduction_max_fraction)
@constraint(m, MaxEmissionsReductionCon,
m[:Lifecycle_Emissions_Lbs_CO2] >=
(1-p.s.site.CO2_emissions_reduction_max_fraction) * m[:Lifecycle_Emissions_Lbs_CO2_BAU]
)
end
else
@warn "No emissions reduction constraints added, as BAU emissions have not been calculated."
end
end

Expand All @@ -32,14 +36,19 @@ function add_yr1_emissions_calcs(m,p)
yr1_emissions_offset_from_elec_exports_lbs_PM25 =
calc_yr1_emissions_offset_from_elec_exports(m, p)

m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_CO2] = m[:yr1_emissions_from_elec_grid_lbs_CO2] -
yr1_emissions_offset_from_elec_exports_lbs_CO2
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_NOx] = m[:yr1_emissions_from_elec_grid_lbs_NOx] -
yr1_emissions_offset_from_elec_exports_lbs_NOx
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_SO2] = m[:yr1_emissions_from_elec_grid_lbs_SO2] -
yr1_emissions_offset_from_elec_exports_lbs_SO2
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_PM25] = m[:yr1_emissions_from_elec_grid_lbs_PM25] -
yr1_emissions_offset_from_elec_exports_lbs_PM25
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_CO2] = (m[:yr1_emissions_from_elec_grid_lbs_CO2] -
yr1_emissions_offset_from_elec_exports_lbs_CO2)
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_NOx] = (m[:yr1_emissions_from_elec_grid_lbs_NOx] -
yr1_emissions_offset_from_elec_exports_lbs_NOx)
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_SO2] = (m[:yr1_emissions_from_elec_grid_lbs_SO2] -
yr1_emissions_offset_from_elec_exports_lbs_SO2)
m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_PM25] = (m[:yr1_emissions_from_elec_grid_lbs_PM25] -
yr1_emissions_offset_from_elec_exports_lbs_PM25)

m[:EmissionsYr1_Total_LbsCO2] = m[:yr1_emissions_onsite_fuel_lbs_CO2] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_CO2]
m[:EmissionsYr1_Total_LbsNOx] = m[:yr1_emissions_onsite_fuel_lbs_NOx] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_NOx]
m[:EmissionsYr1_Total_LbsSO2] = m[:yr1_emissions_onsite_fuel_lbs_SO2] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_SO2]
m[:EmissionsYr1_Total_LbsPM25] = m[:yr1_emissions_onsite_fuel_lbs_PM25] + m[:yr1_emissions_from_elec_grid_net_if_selected_lbs_PM25]
nothing
end

Expand Down
Loading
Loading