diff --git a/energy_models/core/investments/disciplines/independent_invest_disc.py b/energy_models/core/investments/disciplines/independent_invest_disc.py index 35e55a9a..e8ed5c93 100644 --- a/energy_models/core/investments/disciplines/independent_invest_disc.py +++ b/energy_models/core/investments/disciplines/independent_invest_disc.py @@ -294,6 +294,16 @@ def pimp_string(val: str): new_chart_energy = TwoAxesInstanciatedChart(GlossaryEnergy.Years, 'Invest [G$]', chart_name=chart_name, stacked_bar=True) + + # max budget constraint charts + max_budget_df = self.get_sosdisc_inputs(GlossaryEnergy.MaxBudgetValue) + max_budget = max_budget_df[GlossaryEnergy.MaxBudgetValue].values + years = max_budget_df[GlossaryEnergy.Years].values + if max_budget.max() > 0: + serie_max_budget = InstanciatedSeries(list(years), list(max_budget), GlossaryEnergy.MaxBudgetValue, + 'dash_lines') + new_chart_energy.add_series(serie_max_budget) + energy_list = self.get_sosdisc_inputs(GlossaryEnergy.energy_list) ccs_list = self.get_sosdisc_inputs(GlossaryEnergy.ccs_list) @@ -373,23 +383,6 @@ def pimp_string(val: str): instanciated_charts.insert(1, new_chart_energy_ratio) - #max budget constraint charts - max_budget_df = self.get_sosdisc_inputs(GlossaryEnergy.MaxBudgetValue) - max_budget = max_budget_df[GlossaryEnergy.MaxBudgetValue].values - years = max_budget_df[GlossaryEnergy.Years].values - if max_budget.max() > 0 : - - chart_max_budget = TwoAxesInstanciatedChart(GlossaryEnergy.Years, GlossaryEnergy.MaxBudgetDf['unit'], - chart_name=GlossaryEnergy.MaxBudgetConstraintValue, stacked_bar=True) - - serie_max_budget = InstanciatedSeries(list(years), list(max_budget), GlossaryEnergy.MaxBudgetValue, 'dash_lines') - chart_max_budget.add_series(serie_max_budget) - - energy_invests = self.get_sosdisc_outputs(GlossaryEnergy.EnergyInvestmentsWoTaxValue)[GlossaryEnergy.EnergyInvestmentsWoTaxValue].values * 1000 - serie_invests = InstanciatedSeries(list(years), list(energy_invests), "Invests", - 'bar') - chart_max_budget.add_series(serie_invests) - instanciated_charts.insert(1, chart_max_budget) return instanciated_charts diff --git a/energy_models/sos_processes/energy/MDA/energy_mix_optim_sub_process/usecase.py b/energy_models/sos_processes/energy/MDA/energy_mix_optim_sub_process/usecase.py index a95b402e..6854a9be 100644 --- a/energy_models/sos_processes/energy/MDA/energy_mix_optim_sub_process/usecase.py +++ b/energy_models/sos_processes/energy/MDA/energy_mix_optim_sub_process/usecase.py @@ -405,10 +405,10 @@ def make_dspace_utilisation_ratio(self) -> pd.DataFrame: def make_func_df(self): func_df = pd.DataFrame({ - "variable": [GlossaryEnergy.CO2EmissionsObjectiveValue, GlossaryEnergy.CO2EmissionsObjectiveValue, GlossaryEnergy.TargetProductionConstraintValue, GlossaryEnergy.MaxBudgetConstraintValue,], + "variable": [GlossaryEnergy.ObjectiveEnergyNonUseCapital, GlossaryEnergy.CO2EmissionsObjectiveValue, GlossaryEnergy.TargetProductionConstraintValue, GlossaryEnergy.MaxBudgetConstraintValue,], "parent": ["objectives", "objectives", "constraints", "constraints"], "ftype": [FunctionManagerDisc.OBJECTIVE, FunctionManagerDisc.OBJECTIVE, FunctionManagerDisc.INEQ_CONSTRAINT, FunctionManagerDisc.INEQ_CONSTRAINT], - "weight": [1.0, .0, .0, 100.0,], + "weight": [1.0, 1.0, .0, 100.0,], FunctionManagerDisc.AGGR_TYPE: [FunctionManager.AGGR_TYPE_SUM, FunctionManager.AGGR_TYPE_SUM, FunctionManager.INEQ_NEGATIVE_WHEN_SATIFIED_AND_SQUARE_IT, FunctionManager.INEQ_NEGATIVE_WHEN_SATIFIED_AND_SQUARE_IT,], "namespace": [GlossaryEnergy.NS_FUNCTIONS] * 4 }) diff --git a/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno.pkl b/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno.pkl index 0b395731..f3ade6ed 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno.pkl and b/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno_construction_delay_0.pkl b/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno_construction_delay_0.pkl index 5468066c..c2d58c0b 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno_construction_delay_0.pkl and b/energy_models/tests/jacobian_pkls/jacobian_CleanEnergySimpleTechno_CleanEnergySimpleTechno_construction_delay_0.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno.pkl b/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno.pkl index ec4923d6..f47e6b53 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno.pkl and b/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno_construction_delay_0.pkl b/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno_construction_delay_0.pkl index ec4923d6..f47e6b53 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno_construction_delay_0.pkl and b/energy_models/tests/jacobian_pkls/jacobian_FossilSimpleTechno_FossilSimpleTechno_construction_delay_0.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_dac_direct_air_capture.DirectAirCaptureTechno.pkl b/energy_models/tests/jacobian_pkls/jacobian_dac_direct_air_capture.DirectAirCaptureTechno.pkl index 5d3e892b..57ff080a 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_dac_direct_air_capture.DirectAirCaptureTechno.pkl and b/energy_models/tests/jacobian_pkls/jacobian_dac_direct_air_capture.DirectAirCaptureTechno.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_coal_gen.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_coal_gen.pkl index 8640eb5b..57d4f283 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_coal_gen.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_coal_gen.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_geothermal_high_heat_zz.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_geothermal_high_heat_zz.pkl index 4e2fca1f..8a65f581 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_geothermal_high_heat_zz.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_geothermal_high_heat_zz.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_nuclear.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_nuclear.pkl index 318e183c..214a7403 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_nuclear.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_nuclear.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_oil_gen.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_oil_gen.pkl index 03c44705..72f1569f 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_oil_gen.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_oil_gen.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_pv.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_pv.pkl index 22bdf67d..f83edc8f 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_pv.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_pv.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_thermal.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_thermal.pkl index d7cfee69..f04719a0 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_thermal.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_solar_thermal.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_off_shore.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_off_shore.pkl index 40a56ff6..6ba36fdb 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_off_shore.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_off_shore.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_on_shore.pkl b/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_on_shore.pkl index f835efdd..dd4519c7 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_on_shore.pkl and b/energy_models/tests/jacobian_pkls/jacobian_electricity_wind_on_shore.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_ratio_FossilGas.pkl b/energy_models/tests/jacobian_pkls/jacobian_ratio_FossilGas.pkl index 9b8ae73d..1323fd39 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_ratio_FossilGas.pkl and b/energy_models/tests/jacobian_pkls/jacobian_ratio_FossilGas.pkl differ