diff --git a/energy_models/core/techno_type/techno_disc.py b/energy_models/core/techno_type/techno_disc.py index b6ed91d5..96948e5c 100644 --- a/energy_models/core/techno_type/techno_disc.py +++ b/energy_models/core/techno_type/techno_disc.py @@ -247,7 +247,8 @@ def update_default_values(self): if 'initial_production' in self.get_data_in() and GlossaryEnergy.YearStart in self.get_data_in(): year_start = self.get_sosdisc_inputs(GlossaryEnergy.YearStart) - if year_start is not None: + initial_production = self.get_sosdisc_inputs('initial_production') + if year_start is not None and initial_production is None: initial_production, _ = DatabaseWitnessEnergy.get_techno_prod(self.techno_name, year=year_start - 1) self.update_default_value('initial_production', 'in', initial_production) diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS.pkl index a438b9e1..486de628 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS.pkl index 3b36046c..ec9464cc 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_bis.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_bis.pkl index 1d81b9ba..fd9130b9 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_bis.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_bis.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_negative.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_negative.pkl index 3228dd89..b138eaec 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_negative.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_RWGS_and_WGS_negative.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_WGS.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_WGS.pkl index a67c5cf1..f7525bf5 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_WGS.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_WGS.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_ratio_available_cc.pkl b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_ratio_available_cc.pkl index 1d8ad17d..599c4dbf 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_ratio_available_cc.pkl and b/energy_models/tests/jacobian_pkls/jacobian_liquid_fuel_fischer_tropsch_ratio_available_cc.pkl differ diff --git a/energy_models/tests/jacobian_pkls/jacobian_syngas_ReversedWaterGasShift.pkl b/energy_models/tests/jacobian_pkls/jacobian_syngas_ReversedWaterGasShift.pkl index 3f1ee8b5..b4426cae 100644 Binary files a/energy_models/tests/jacobian_pkls/jacobian_syngas_ReversedWaterGasShift.pkl and b/energy_models/tests/jacobian_pkls/jacobian_syngas_ReversedWaterGasShift.pkl differ diff --git a/energy_models/tests/to_fix/CalciumLoopingDiscipline.py b/energy_models/tests/to_fix/CalciumLoopingDiscipline.py index 5e95a2f9..4eee6d1f 100644 --- a/energy_models/tests/to_fix/CalciumLoopingDiscipline.py +++ b/energy_models/tests/to_fix/CalciumLoopingDiscipline.py @@ -1,4 +1,18 @@ +''' +Copyright 2024 Capgemini +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' import pickle from os.path import dirname diff --git a/energy_models/tests/to_fix/MonoEthanolAmineDiscipline.py b/energy_models/tests/to_fix/MonoEthanolAmineDiscipline.py index 7fc4d99d..c022ed88 100644 --- a/energy_models/tests/to_fix/MonoEthanolAmineDiscipline.py +++ b/energy_models/tests/to_fix/MonoEthanolAmineDiscipline.py @@ -1,4 +1,18 @@ +''' +Copyright 2024 Capgemini +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' import pickle from os.path import dirname diff --git a/energy_models/tests/to_fix/PiperazineProcessDiscipline.py b/energy_models/tests/to_fix/PiperazineProcessDiscipline.py index 6ef956ad..5e7af477 100644 --- a/energy_models/tests/to_fix/PiperazineProcessDiscipline.py +++ b/energy_models/tests/to_fix/PiperazineProcessDiscipline.py @@ -1,4 +1,18 @@ +''' +Copyright 2024 Capgemini +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +''' import pickle from os.path import dirname