From d8d18135fb9254934830441a5b3fcbb9b6b4f213 Mon Sep 17 00:00:00 2001 From: adfarth Date: Thu, 20 Mar 2025 09:44:26 -0600 Subject: [PATCH 1/7] add new inputs --- reoptjl/models.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/reoptjl/models.py b/reoptjl/models.py index 47d088f7a..c222d20f6 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -786,6 +786,24 @@ class FinancialInputs(BaseModel, models.Model): default=0.0, help_text=("Only applicable when off_grid_flag is true. These per year costs are considered tax deductible for owner.") ) + min_initial_capital_costs_before_incentives = models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(1e12) + ], + blank=True, + null=True, + help_text=("Minimum up-front capital cost for all technologies, excluding replacement costs and incentives.") + ) + max_initial_capital_costs_before_incentives = models.FloatField( + validators=[ + MinValueValidator(0), + MaxValueValidator(1e12) + ], + blank=True, + null=True, + help_text=("Maximum up-front capital cost for all technologies, excluding replacement costs and incentives.") + ) CO2_cost_per_tonne = models.FloatField( validators=[ MinValueValidator(0), From bad79cc91faace2633cac4d09ef764e1a0c77e06 Mon Sep 17 00:00:00 2001 From: adfarth Date: Tue, 15 Apr 2025 15:46:08 -0600 Subject: [PATCH 2/7] changelog and all_inputs test --- CHANGELOG.md | 7 ++++++- reoptjl/test/posts/all_inputs_test.json | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d2b8ec87..73c856100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,9 +26,14 @@ Classify the change according to the following categories: ##### Removed ### Patches +## add-capex-constraint +### Minor Updates +#### Added +- Add **Financial** inputs **min_initial_capital_costs_before_incentives** and **max_initial_capital_costs_before_incentives** + ## v3.12.0 ### Major Updates -### Added +#### 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 diff --git a/reoptjl/test/posts/all_inputs_test.json b/reoptjl/test/posts/all_inputs_test.json index 6811af43c..78fa2a4a2 100644 --- a/reoptjl/test/posts/all_inputs_test.json +++ b/reoptjl/test/posts/all_inputs_test.json @@ -26,7 +26,9 @@ "PM25_onsite_fuelburn_cost_per_tonne": null, "NOx_cost_escalation_rate_fraction": null, "SO2_cost_escalation_rate_fraction": null, - "PM25_cost_escalation_rate_fraction": null + "PM25_cost_escalation_rate_fraction": null, + "min_initial_capital_costs_before_incentives": null, + "max_initial_capital_costs_before_incentives": null }, "ElectricLoad": { "annual_kwh": 190000.0, From 54f1fbc689321d7d0efdedefc0f4a7096b10674d Mon Sep 17 00:00:00 2001 From: adfarth Date: Wed, 7 May 2025 22:44:21 -0600 Subject: [PATCH 3/7] point to develop --- julia_src/Manifest.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index fc3e1581e..059884dd5 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -922,7 +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 = "9946abe774e30d82f786e68296ad1fdf8bb7dba4" +git-tree-sha1 = "1592ea6abdb85725cd5504f4808575caea89727c" +repo-rev = "develop" +repo-url = "https://github.com/NREL/REopt.jl.git" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" version = "0.51.1" From 43740b3f954be988cec55ec937eb446823484527 Mon Sep 17 00:00:00 2001 From: adfarth Date: Wed, 7 May 2025 22:50:07 -0600 Subject: [PATCH 4/7] Create 0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py --- ...apital_costs_before_incentives_and_more.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py diff --git a/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py b/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py new file mode 100644 index 000000000..340656305 --- /dev/null +++ b/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 4.0.7 on 2025-05-08 04:49 + +import django.core.validators +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0084_merge_20250424_1814'), + ] + + operations = [ + migrations.AddField( + model_name='financialinputs', + name='max_initial_capital_costs_before_incentives', + field=models.FloatField(blank=True, help_text='Maximum up-front capital cost for all technologies, excluding replacement costs and incentives.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), + ), + migrations.AddField( + model_name='financialinputs', + name='min_initial_capital_costs_before_incentives', + field=models.FloatField(blank=True, help_text='Minimum up-front capital cost for all technologies, excluding replacement costs and incentives.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), + ), + ] From 4dd75106f757610855abe6dd7d74d1fb57493165 Mon Sep 17 00:00:00 2001 From: adfarth Date: Thu, 8 May 2025 12:52:50 -0600 Subject: [PATCH 5/7] add chp output --- CHANGELOG.md | 1 + .../0086_chpoutputs_initial_capital_costs.py | 18 ++++++++++++++++++ reoptjl/models.py | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 reoptjl/migrations/0086_chpoutputs_initial_capital_costs.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 2637342fd..497d194a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Classify the change according to the following categories: ### Minor Updates #### Added - Add **Financial** inputs **min_initial_capital_costs_before_incentives** and **max_initial_capital_costs_before_incentives** +- Add **CHP** output **initial_capital_costs** ## v3.12.3 ### Minor Updates diff --git a/reoptjl/migrations/0086_chpoutputs_initial_capital_costs.py b/reoptjl/migrations/0086_chpoutputs_initial_capital_costs.py new file mode 100644 index 000000000..5107d9a19 --- /dev/null +++ b/reoptjl/migrations/0086_chpoutputs_initial_capital_costs.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.7 on 2025-05-08 18:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('reoptjl', '0085_financialinputs_max_initial_capital_costs_before_incentives_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='chpoutputs', + name='initial_capital_costs', + field=models.FloatField(blank=True, help_text='Initial capital costs of the CHP system, before incentives [\\$]', null=True), + ), + ] diff --git a/reoptjl/models.py b/reoptjl/models.py index 48a758e22..94ef91791 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -4746,6 +4746,10 @@ class CHPOutputs(BaseModel, models.Model): models.FloatField(null=True, blank=True), default = list, ) + initial_capital_costs = models.FloatField( + null=True, blank=True, + help_text="Initial capital costs of the CHP system, before incentives [\$]" + ) def clean(): pass From f66cab9c9b8ddd48d7446e17e0c778ea7f17733a Mon Sep 17 00:00:00 2001 From: Zolan Date: Fri, 9 May 2025 15:31:46 -0600 Subject: [PATCH 6/7] update help text to include units for min, max capital costs --- ...ts_max_initial_capital_costs_before_incentives_and_more.py | 4 ++-- reoptjl/models.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py b/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py index 340656305..5a02b6559 100644 --- a/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py +++ b/reoptjl/migrations/0085_financialinputs_max_initial_capital_costs_before_incentives_and_more.py @@ -14,11 +14,11 @@ class Migration(migrations.Migration): migrations.AddField( model_name='financialinputs', name='max_initial_capital_costs_before_incentives', - field=models.FloatField(blank=True, help_text='Maximum up-front capital cost for all technologies, excluding replacement costs and incentives.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), + field=models.FloatField(blank=True, help_text='Maximum up-front capital cost for all technologies, excluding replacement costs and incentives [\$].', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), ), migrations.AddField( model_name='financialinputs', name='min_initial_capital_costs_before_incentives', - field=models.FloatField(blank=True, help_text='Minimum up-front capital cost for all technologies, excluding replacement costs and incentives.', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), + field=models.FloatField(blank=True, help_text='Minimum up-front capital cost for all technologies, excluding replacement costs and incentives [\$].', null=True, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1000000000000.0)]), ), ] diff --git a/reoptjl/models.py b/reoptjl/models.py index 94ef91791..184df44a4 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -793,7 +793,7 @@ class FinancialInputs(BaseModel, models.Model): ], blank=True, null=True, - help_text=("Minimum up-front capital cost for all technologies, excluding replacement costs and incentives.") + help_text=("Minimum up-front capital cost for all technologies, excluding replacement costs and incentives [\$].") ) max_initial_capital_costs_before_incentives = models.FloatField( validators=[ @@ -802,7 +802,7 @@ class FinancialInputs(BaseModel, models.Model): ], blank=True, null=True, - help_text=("Maximum up-front capital cost for all technologies, excluding replacement costs and incentives.") + help_text=("Maximum up-front capital cost for all technologies, excluding replacement costs and incentives [\$].") ) CO2_cost_per_tonne = models.FloatField( validators=[ From 5b1c315df90f600c69717f505cd7a63157d0a4b8 Mon Sep 17 00:00:00 2001 From: adfarth Date: Fri, 9 May 2025 15:51:25 -0600 Subject: [PATCH 7/7] updt to REopt052 --- julia_src/Manifest.toml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/julia_src/Manifest.toml b/julia_src/Manifest.toml index 059884dd5..03d5186ee 100644 --- a/julia_src/Manifest.toml +++ b/julia_src/Manifest.toml @@ -922,11 +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 = "1592ea6abdb85725cd5504f4808575caea89727c" -repo-rev = "develop" -repo-url = "https://github.com/NREL/REopt.jl.git" +git-tree-sha1 = "0790dface6f78d2cadae8020470a4e73ee531f93" uuid = "d36ad4e8-d74a-4f7a-ace1-eaea049febf6" -version = "0.51.1" +version = "0.52.0" [[deps.Random]] deps = ["SHA"]