Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c95bb21
initial commit
Nov 13, 2024
98ec478
change names
Dec 10, 2024
4827d9f
Merge branch 'develop' into gridRE
Dec 10, 2024
20d9bfb
Update models.py
Dec 11, 2024
a478813
Update models.py
Dec 11, 2024
e04f71d
align with emissions updates
Dec 12, 2024
74bd9f6
GEA Regions 2023
Dec 12, 2024
da6abda
Update CHANGELOG.md
Dec 12, 2024
0f30a79
update EMISSIONS_DECREASE_DEFAULTS
Dec 12, 2024
bf8bdab
stay under 63 char limit
Dec 12, 2024
4c67ad5
align names
Dec 12, 2024
d0bc212
Merge branch 'develop' into gridRE
Jan 23, 2025
312aefc
Merge branch 'develop' into gridRE
Jan 24, 2025
8c3a606
temp point to feature branch
Jan 24, 2025
2f9edd6
migrations and name updates
Jan 24, 2025
d739c13
Update test_http_endpoints.py
Jan 25, 2025
67be826
Update test_http_endpoints.py
Jan 25, 2025
9435cc1
added min and max duration inputs for bess
atpham88 Jan 27, 2025
36d232e
Create 0077_electricstorageinputs_max_duration_hours_and_more.py
atpham88 Jan 27, 2025
cc42493
Merge pull request #627 from NREL/bess_duration_limit_3
atpham88 Jan 27, 2025
9fdfffb
Merge branch 'develop' into gridRE
Jan 27, 2025
5e25f43
Create 0078_merge_20250128_1541.py
Jan 28, 2025
eba4d40
updt julia_src Dockerfile and Manifest
Jan 30, 2025
d44e123
fix more inputs in ghp tests
Jan 31, 2025
e64adb3
Update CHANGELOG.md
hdunham Feb 3, 2025
fefcfd4
add to all_inputs_test.json and fix default
Feb 5, 2025
ecd9e7d
migrations and updated help text
Feb 5, 2025
2883d26
Revert "updt julia_src Dockerfile and Manifest"
Feb 7, 2025
a8a8fec
add new output and migrations
Feb 13, 2025
39cdf33
Update CHANGELOG.md
Feb 13, 2025
77521e9
Update Manifest.toml
Feb 19, 2025
61da203
Merge pull request #628 from NREL/gridrenew
Feb 26, 2025
3d93868
Update Manifest.toml
Feb 28, 2025
731dd9b
Update CHANGELOG.md
adfarth Feb 28, 2025
4594947
Merge branch 'master' into develop
adfarth Feb 28, 2025
1643e52
Update CHANGELOG.md
adfarth Feb 28, 2025
ed8cbeb
Update CHANGELOG.md
hdunham Mar 4, 2025
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
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,32 @@ Classify the change according to the following categories:
##### Removed
### Patches

## v3.12.0
### Major Updates
### Added
- Add inputs:
- **ElectricUtility.cambium_cef_metric** to utilize clean energy data from NREL's Cambium database
- **ElectricUtility.renewable_energy_fraction_series** to supply a custom grid clean or renewable energy scalar or series
- **Site.include_grid_renewable_fraction_in_RE_constraints** - to allow user to choose whether to include grid RE in min max constraints
- **ElectricStorage.optimize_soc_init_fraction** (defaults to false), which makes the optimization choose the inital SOC (equal to final SOC) instead of using soc_init_fraction. The initial SOC is also constrained to equal the final SOC, which eliminates the "free energy" issue. We currently do not fix SOC when soc_init_fraction is used because this has caused infeasibility.
- **ElectricStorage.min_duration_hours** and **ElectricStorage.max_duration_hours** for limitting electric storage's energy capacity relative to its power capacity
- Add the following outputs:
- **ElectricUtility.annual_renewable_electricity_supplied_kwh**
- **Site.onsite_and_grid_renewable_electricity_fraction_of_elec_load**
- **Site.onsite_and_grid_renewable_energy_fraction_of_total_load**
- **ElectricLoad.annual_electric_load_with_thermal_conversions_kwh**
### Changed
- Change name of the following inputs:
- **ElectricUtility.cambium_metric_col** changed to **ElectricUtility.cambium_co2_metric**, to distinguish between the CO2 and clean energy fraction metrics
- Change name of the following outputs:
- **ElectricUtility.cambium_emissions_region** changed to **ElectricUtility.cambium_region**
- **Site.annual_renewable_electricity_kwh** changed to **Site.annual_onsite_renewable_electricity_kwh**
- **Site.renewable_electricity_fraction** changed to **Site.onsite_renewable_electricity_fraction_of_elec_load**
- **Site.total_renewable_energy_fraction** changed to **Site.onsite_renewable_energy_fraction_of_total_load**
- Change v3 endpoint `cambium_emissions_profile` to `cambium_profile`
- Change to using REopt.jl v0.51.0, which includes updates to the Cambium, AVERT, and eGRID data used


## v3.11.0
### Minor Updates
##### Changed
Expand Down
99 changes: 46 additions & 53 deletions julia_src/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@ version = "1.5.0"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.Accessors]]
deps = ["CompositionsBase", "ConstructionBase", "InverseFunctions", "LinearAlgebra", "MacroTools", "Markdown"]
git-tree-sha1 = "96bed9b1b57cf750cca50c311a197e306816a1cc"
deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "MacroTools"]
git-tree-sha1 = "3b86719127f50670efe356bc11073d84b4ed7a5d"
uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
version = "0.1.39"
version = "0.1.42"

[deps.Accessors.extensions]
AccessorsAxisKeysExt = "AxisKeys"
AccessorsDatesExt = "Dates"
AccessorsIntervalSetsExt = "IntervalSets"
AccessorsStaticArraysExt = "StaticArrays"
AccessorsStructArraysExt = "StructArrays"
AccessorsTestExt = "Test"
AccessorsUnitfulExt = "Unitful"
AxisKeysExt = "AxisKeys"
IntervalSetsExt = "IntervalSets"
LinearAlgebraExt = "LinearAlgebra"
StaticArraysExt = "StaticArrays"
StructArraysExt = "StructArrays"
TestExt = "Test"
UnitfulExt = "Unitful"

[deps.Accessors.weakdeps]
AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down Expand Up @@ -90,9 +89,9 @@ version = "0.7.3"

[[deps.Blosc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Lz4_jll", "Zlib_jll", "Zstd_jll"]
git-tree-sha1 = "c5acdf7065862659dd4245494c40c90a66308651"
git-tree-sha1 = "ef12cdd1c7fb7e1dfd6fa8fd60d4db6bc61d2f23"
uuid = "0b7ba130-8d10-5ba8-a3d6-c5182647fed9"
version = "1.21.6+1"
version = "1.21.6+2"

[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand Down Expand Up @@ -235,9 +234,9 @@ version = "0.1.0"

[[deps.CoolProp_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "f0f70a17d132d2ab5bf2b61993db36ac1099f6c7"
git-tree-sha1 = "61b41db28afff106497638ae6807949f30d9e61e"
uuid = "3351c21f-4feb-5f29-afb9-f4fcb0e27549"
version = "6.6.0+0"
version = "6.7.0+0"

[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
Expand Down Expand Up @@ -319,14 +318,14 @@ version = "0.1.11"

[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "f42a5b1e20e009a43c3646635ed81a9fcaccb287"
git-tree-sha1 = "d55dffd9ae73ff72f1c0482454dcf2ec6c6c4a63"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.6.4+2"
version = "2.6.5+0"

[[deps.Extents]]
git-tree-sha1 = "81023caa0021a41712685887db1fc03db26f41f5"
git-tree-sha1 = "063512a13dbe9c40d999c439268539aa552d1ae6"
uuid = "411431e0-e8b7-467b-b5e0-f676ba4f2910"
version = "0.1.4"
version = "0.1.5"

[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
Expand All @@ -340,9 +339,9 @@ weakdeps = ["HTTP"]

[[deps.FilePathsBase]]
deps = ["Compat", "Dates"]
git-tree-sha1 = "7878ff7172a8e6beedd1dea14bd27c3c6340d361"
git-tree-sha1 = "2ec417fc319faa2d768621085cc1feebbdee686b"
uuid = "48062228-2e41-5def-b9a4-89aafe57970f"
version = "0.9.22"
version = "0.9.23"
weakdeps = ["Mmap", "Test"]

[deps.FilePathsBase.extensions]
Expand Down Expand Up @@ -398,15 +397,15 @@ uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d"
version = "6.2.1+6"

[[deps.GeoFormatTypes]]
git-tree-sha1 = "59107c179a586f0fe667024c5eb7033e81333271"
git-tree-sha1 = "8e233d5167e63d708d41f87597433f59a0f213fe"
uuid = "68eda718-8dee-11e9-39e7-89f7f65f511f"
version = "0.4.2"
version = "0.4.4"

[[deps.GeoInterface]]
deps = ["DataAPI", "Extents", "GeoFormatTypes"]
git-tree-sha1 = "f4ee66b6b1872a4ca53303fbb51d158af1bf88d4"
git-tree-sha1 = "294e99f19869d0b0cb71aef92f19d03649d028d5"
uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
version = "1.4.0"
version = "1.4.1"

[[deps.GeoInterfaceRecipes]]
deps = ["GeoInterface", "RecipesBase"]
Expand Down Expand Up @@ -446,10 +445,10 @@ version = "0.17.2"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"

[[deps.HDF5_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"]
git-tree-sha1 = "38c8874692d48d5440d5752d6c74b0c6b0b60739"
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"]
git-tree-sha1 = "87bd95f99219dc3b86d4ee11a9a7bfa6075000a9"
uuid = "0234f1f7-429e-5d53-9886-15a909be8d59"
version = "1.14.2+1"
version = "1.14.5+0"

[[deps.HTTP]]
deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
Expand Down Expand Up @@ -482,9 +481,9 @@ uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534"
version = "0.9.4"

[[deps.InlineStrings]]
git-tree-sha1 = "45521d31238e87ee9f9732561bfee12d4eebd52d"
git-tree-sha1 = "6a9fde685a7ac1eb3495f8e812c5a7c3711c2d5e"
uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
version = "1.4.2"
version = "1.4.3"

[deps.InlineStrings.extensions]
ArrowTypesExt = "ArrowTypes"
Expand Down Expand Up @@ -587,12 +586,6 @@ git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434"
uuid = "88015f11-f218-50d7-93a8-a6af411a945d"
version = "3.0.0+1"

[[deps.LLVMOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "78211fb6cbc872f77cad3fc0b6cf647d923f4929"
uuid = "1d63c593-3942-5779-bab2-d838dc0a180e"
version = "18.1.7+0"

[[deps.LRUCache]]
git-tree-sha1 = "b3cc6698599b10e652832c2f23db3cab99d51b59"
uuid = "8ac3fa9e-de4c-5943-b1dc-09c6b5f20637"
Expand Down Expand Up @@ -687,9 +680,9 @@ version = "1.1.0"

[[deps.Lz4_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "dbd00758ab9d8f454b2feadb6071eb50af62c824"
git-tree-sha1 = "191686b1ac1ea9c89fc52e996ad15d1d241d1e33"
uuid = "5ced341a-0733-55b8-9ab6-a4889d929147"
version = "1.10.0+2"
version = "1.10.1+0"

[[deps.METIS_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand All @@ -711,9 +704,9 @@ version = "0.1.11"

[[deps.MPItrampoline_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"]
git-tree-sha1 = "4e6c1eb421039b0d26e0fd483fa87651da0f3f57"
git-tree-sha1 = "97aac4a518b6f01851f8821272780e1ba56fe90d"
uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748"
version = "5.5.1+1"
version = "5.5.2+0"

[[deps.MUMPS_seq_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "METIS_jll", "libblastrampoline_jll"]
Expand Down Expand Up @@ -929,9 +922,9 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.REopt]]
deps = ["ArchGDAL", "CSV", "CoolProp", "DataFrames", "Dates", "DelimitedFiles", "HTTP", "JLD", "JSON", "JuMP", "LinDistFlow", "LinearAlgebra", "Logging", "MathOptInterface", "Requires", "Roots", "Statistics", "TestEnv"]
git-tree-sha1 = "324394f21cb7e2db3d9e7ebde19c4e83c5a64e0f"
git-tree-sha1 = "24f902b6f67ed1d4389d21b5d42f820036b182b4"
uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6"
version = "0.50.0"
version = "0.51.0"

[[deps.Random]]
deps = ["SHA"]
Expand Down Expand Up @@ -967,9 +960,9 @@ version = "1.3.0"

[[deps.Roots]]
deps = ["Accessors", "CommonSolve", "Printf"]
git-tree-sha1 = "8e3694d669323cdfb560e344dc872b984de23b71"
git-tree-sha1 = "e52cf0872526c7a0b3e1af9c58a69b90e19b022e"
uuid = "f2b01f46-fcfa-551c-844a-d8ac1e96c665"
version = "2.2.2"
version = "2.2.5"

[deps.Roots.extensions]
RootsChainRulesCoreExt = "ChainRulesCore"
Expand Down Expand Up @@ -1083,9 +1076,9 @@ version = "1.10.0"

[[deps.StringManipulation]]
deps = ["PrecompileTools"]
git-tree-sha1 = "a6b1675a536c5ad1a60e5a5153e1fee12eb146e3"
git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023"
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
version = "0.4.0"
version = "0.4.1"

[[deps.SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "libblastrampoline_jll"]
Expand Down Expand Up @@ -1149,9 +1142,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[deps.Unitful]]
deps = ["Dates", "LinearAlgebra", "Random"]
git-tree-sha1 = "01915bfcd62be15329c9a07235447a89d588327c"
git-tree-sha1 = "c0667a8e676c53d390a09dc6870b3d8d6650e2bf"
uuid = "1986cc42-f94f-5a68-af5c-568840ba703d"
version = "1.21.1"
version = "1.22.0"
weakdeps = ["ConstructionBase", "InverseFunctions"]

[deps.Unitful.extensions]
Expand Down Expand Up @@ -1200,9 +1193,9 @@ version = "1.76.0+1"

[[deps.libaec_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "648c439c8643710976b4c8b30dccbbe6439fb4db"
git-tree-sha1 = "f5733a5a9047722470b95a81e1b172383971105c"
uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0"
version = "1.1.2+1"
version = "1.1.3+0"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -1217,9 +1210,9 @@ version = "100.700.100+0"

[[deps.libpng_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"]
git-tree-sha1 = "9c42636e3205e555e5785e902387be0061e7efc1"
git-tree-sha1 = "055a96774f383318750a1a5e10fd4151f04c29c5"
uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"
version = "1.6.44+1"
version = "1.6.46+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
11 changes: 6 additions & 5 deletions julia_src/http.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ function reopt(req::HTTP.Request)
]
inputs_with_defaults_from_avert_or_cambium = [
:emissions_factor_series_lb_CO2_per_kwh, :emissions_factor_series_lb_NOx_per_kwh,
:emissions_factor_series_lb_SO2_per_kwh, :emissions_factor_series_lb_PM25_per_kwh
:emissions_factor_series_lb_SO2_per_kwh, :emissions_factor_series_lb_PM25_per_kwh,
:renewable_energy_fraction_series
]
if haskey(d, "CHP")
inputs_with_defaults_from_chp = [
Expand Down Expand Up @@ -348,9 +349,9 @@ function avert_emissions_profile(req::HTTP.Request)
return HTTP.Response(200, JSON.json(data))
end

function cambium_emissions_profile(req::HTTP.Request)
function cambium_profile(req::HTTP.Request)
d = JSON.parse(String(req.body))
@info "Getting Cambium CO2 emissions profile..."
@info "Getting emissions or clean energy data from Cambium..."
data = Dict()
error_response = Dict()
try
Expand All @@ -360,7 +361,7 @@ function cambium_emissions_profile(req::HTTP.Request)
lifetime = typeof(d["lifetime"]) == String ? parse(Int, d["lifetime"]) : d["lifetime"]
load_year = typeof(d["load_year"]) == String ? parse(Int, d["load_year"]) : d["load_year"]

data = reoptjl.cambium_emissions_profile(;scenario= d["scenario"],
data = reoptjl.cambium_profile(;scenario= d["scenario"],
location_type = d["location_type"],
latitude=latitude,
longitude=longitude,
Expand Down Expand Up @@ -597,7 +598,7 @@ HTTP.register!(ROUTER, "POST", "/erp", erp)
HTTP.register!(ROUTER, "POST", "/ghpghx", ghpghx)
HTTP.register!(ROUTER, "GET", "/chp_defaults", chp_defaults)
HTTP.register!(ROUTER, "GET", "/avert_emissions_profile", avert_emissions_profile)
HTTP.register!(ROUTER, "GET", "/cambium_emissions_profile", cambium_emissions_profile)
HTTP.register!(ROUTER, "GET", "/cambium_profile", cambium_profile)
HTTP.register!(ROUTER, "GET", "/easiur_costs", easiur_costs)
HTTP.register!(ROUTER, "GET", "/simulated_load", simulated_load)
HTTP.register!(ROUTER, "GET", "/absorption_chiller_defaults", absorption_chiller_defaults)
Expand Down
4 changes: 2 additions & 2 deletions reoptjl/custom_table_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@
{
"label" : "Annual % Renewable Electricity (%)",
"key" : "annual_renewable_electricity",
"bau_value" : lambda df: safe_get(df, "outputs.Site.renewable_electricity_fraction_bau"),
"scenario_value": lambda df: safe_get(df, "outputs.Site.renewable_electricity_fraction")
"bau_value" : lambda df: safe_get(df, "outputs.Site.onsite_renewable_electricity_fraction_of_elec_load_bau"),
"scenario_value": lambda df: safe_get(df, "outputs.Site.onsite_renewable_electricity_fraction_of_elec_load")
},
{
"label" : "Annual CO2 Emissions (tonnes)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 4.0.7 on 2025-01-27 05:41

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('reoptjl', '0076_ashpspaceheaterinputs_force_dispatch_and_more'),
]

operations = [
migrations.AddField(
model_name='electricstorageinputs',
name='max_duration_hours',
field=models.FloatField(blank=True, default=100000.0, help_text='Maximum amount of time storage can discharge at its rated power capacity', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000.0)]),
),
migrations.AddField(
model_name='electricstorageinputs',
name='min_duration_hours',
field=models.FloatField(blank=True, default=0.0, help_text='Minimum amount of time storage can discharge at its rated power capacity', validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000.0)]),
),
]
Loading