diff --git a/data_energy/techno_invests/carbonstoragetechno.csv b/data_energy/techno_invests/carbonstoragetechno.csv index 970d4508..31dc690c 100644 --- a/data_energy/techno_invests/carbonstoragetechno.csv +++ b/data_energy/techno_invests/carbonstoragetechno.csv @@ -2,3 +2,4 @@ years,invest 2020,0.013 2021,0.009 2022,0.004 +2023,0.004 diff --git a/data_energy/techno_invests/direct_air_capture_directaircapturetechno.csv b/data_energy/techno_invests/direct_air_capture_directaircapturetechno.csv index a2557fdf..e9a91384 100644 --- a/data_energy/techno_invests/direct_air_capture_directaircapturetechno.csv +++ b/data_energy/techno_invests/direct_air_capture_directaircapturetechno.csv @@ -2,8 +2,8 @@ years,past years,invest 2017,-3,1.3581333333333335e-05 2018,-2,1.3581333333333335e-05 2019,-1,0.0040248 -2019,-1,0.0040248 2020,-1,0 2021,-1,0.0040248 2022,-1,1.0 +2023,-1,0.0218 2024,-1,0.0218 diff --git a/data_energy/techno_invests/flue_gas_capture_fluegastechno.csv b/data_energy/techno_invests/flue_gas_capture_fluegastechno.csv index aa1e2de9..ba0b1274 100644 --- a/data_energy/techno_invests/flue_gas_capture_fluegastechno.csv +++ b/data_energy/techno_invests/flue_gas_capture_fluegastechno.csv @@ -1,3 +1,4 @@ years,past years,invest 2019,-1,0.2 +2020,-1,0.0 2023,-1,0.0 diff --git a/energy_models/core/energy_mix/energy_mix.py b/energy_models/core/energy_mix/energy_mix.py index 7d12e6f4..81099ebe 100644 --- a/energy_models/core/energy_mix/energy_mix.py +++ b/energy_models/core/energy_mix/energy_mix.py @@ -138,7 +138,7 @@ def __init__(self, name): Constructor ''' super(EnergyMix, self).__init__(name) - + self.period_tol_power_non_use_capital_constraint = None self.non_use_capital_constraint_df = None self.target_production_constraint = None self.co2_emitted_by_energy = None @@ -242,7 +242,7 @@ def configure_parameters(self, inputs_dict): self.heat_losses_percentage = inputs_dict['heat_losses_percentage'] self.tol_constraint_non_use_capital_energy = inputs_dict['tol_constraint_non_use_capital_energy'] self.ref_constraint_non_use_capital_energy = inputs_dict['ref_constraint_non_use_capital_energy'] - + self.period_tol_power_non_use_capital_constraint = inputs_dict['period_tol_power_non_use_capital_constraint'] if self.subelements_list is not None: for energy in self.subelements_list: if f'{energy}.losses_percentage' in inputs_dict: @@ -1038,7 +1038,7 @@ def compute_non_use_energy_capital_constraint(self): We add also a period tolerance, so """ ratio_non_use_capital = self.energy_capital[GlossaryEnergy.NonUseCapital].values / self.energy_capital[GlossaryEnergy.Capital].values - period_tolerance = np.linspace(0, 1, len(self.years)) ** 2 + period_tolerance = np.linspace(0, 1, len(self.years)) ** self.period_tol_power_non_use_capital_constraint constraint = (ratio_non_use_capital - self.tol_constraint_non_use_capital_energy) / self.ref_constraint_non_use_capital_energy * period_tolerance self.non_use_capital_constraint_df = pd.DataFrame({ @@ -1054,7 +1054,7 @@ def d_non_use_capital_constraint_d_capital(self): capital = self.energy_capital[GlossaryEnergy.Capital].values non_use_capital = self.energy_capital[GlossaryEnergy.NonUseCapital].values - period_tolerance = np.linspace(0, 1, len(self.years)) ** 2 + period_tolerance = np.linspace(0, 1, len(self.years)) ** self.period_tol_power_non_use_capital_constraint d_non_use_capital = np.diag(period_tolerance / capital / self.ref_constraint_non_use_capital_energy / 1e3) d_capital = np.diag(- non_use_capital * period_tolerance / (capital ** 2) / self.ref_constraint_non_use_capital_energy / 1e3) return d_non_use_capital, d_capital diff --git a/energy_models/core/energy_mix/energy_mix_disc.py b/energy_models/core/energy_mix/energy_mix_disc.py index ccbb1e56..4d57d3f2 100644 --- a/energy_models/core/energy_mix/energy_mix_disc.py +++ b/energy_models/core/energy_mix/energy_mix_disc.py @@ -150,8 +150,9 @@ class Energy_Mix_Discipline(SoSWrapp): 'liquid_hydrogen_constraint_ref': {'type': 'float', 'default': 1000., 'unit': 'Twh', 'user_level': 2, 'visibility': SoSWrapp.SHARED_VISIBILITY, 'namespace': GlossaryEnergy.NS_REFERENCE}, - 'ref_constraint_non_use_capital_energy': {'type': 'float', 'default': 0.30, 'unit': '0.30 means after 35 % of capital not used the constraint will explode'}, - 'tol_constraint_non_use_capital_energy': {'type': 'float', 'default': 0.05, 'unit': '0.05 means constraint does not penalize lagrangian when non use capital is less than 5%'}, + 'ref_constraint_non_use_capital_energy': {'type': 'float', 'default': 0.30, 'unit':'-','description': '0.30 means after 35 % of capital not used the constraint will explode'}, + 'tol_constraint_non_use_capital_energy': {'type': 'float', 'default': 0.05, 'unit':'-','description': '0.05 means constraint does not penalize lagrangian when non use capital is less than 5%'}, + 'period_tol_power_non_use_capital_constraint': {'type': 'float', 'default': 1.0, 'unit':'-','description': '0.05 means constraint does not penalize lagrangian when non use capital is less than 5%'}, 'syngas_prod_ref': {'type': 'float', 'default': 10000., 'unit': 'TWh', 'user_level': 2, 'visibility': SoSWrapp.SHARED_VISIBILITY, 'namespace': GlossaryEnergy.NS_REFERENCE}, 'syngas_prod_constraint_limit': {'type': 'float', 'default': 10000., 'unit': 'TWh', 'user_level': 2, diff --git a/energy_models/core/techno_type/disciplines/carbon_capture_techno_disc.py b/energy_models/core/techno_type/disciplines/carbon_capture_techno_disc.py index e881440a..40c564f7 100644 --- a/energy_models/core/techno_type/disciplines/carbon_capture_techno_disc.py +++ b/energy_models/core/techno_type/disciplines/carbon_capture_techno_disc.py @@ -214,6 +214,11 @@ def get_post_processing_list(self, filters=None): if new_chart is not None: instanciated_charts.append(new_chart) + if 'Non-Use Capital' in charts: + new_chart = self.get_chart_non_use_capital() + if new_chart is not None: + instanciated_charts.append(new_chart) + return instanciated_charts def get_chart_detailed_price_in_dollar_tCO2(self): diff --git a/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_all_years.pkl b/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_all_years.pkl index ca93d4bb..73b4ceab 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_all_years.pkl and b/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_all_years.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_poles.pkl b/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_poles.pkl index ded9fa93..ded14c28 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_poles.pkl and b/energy_models/tests/jacobian_pkls/jacobian_investments_profile_builder_disc_poles.pkl differ