diff --git a/docs/whatsnew/v0-6-0.rst b/docs/whatsnew/v0-6-0.rst index 5b95cd94b..6808ba412 100644 --- a/docs/whatsnew/v0-6-0.rst +++ b/docs/whatsnew/v0-6-0.rst @@ -11,7 +11,7 @@ API changes initial storage level is defined, the costs just offset the objective value without changing anything else. * The parameters `GenericStorage.nominal_storage_capacity` and - `Flow.nominal_capacity` are now both called `nominal_calacity`. + `Flow.nominal_capacity` are now both called `nominal_capacity`. New features ############ diff --git a/examples/tuple_as_labels/tuple_as_label.py b/examples/tuple_as_labels/tuple_as_label.py index 3a6a49b25..d72bd8d24 100644 --- a/examples/tuple_as_labels/tuple_as_label.py +++ b/examples/tuple_as_labels/tuple_as_label.py @@ -240,10 +240,10 @@ def main(): nominal_capacity=nominal_capacity, label=Label("storage", "electricity", "battery"), inputs={ - bel: flows.Flow(nominal_capacity=nominal_storage_capacity / 6) + bel: flows.Flow(nominal_capacity=nominal_capacity / 6) }, outputs={ - bel: flows.Flow(nominal_capacity=nominal_storage_capacity / 6) + bel: flows.Flow(nominal_capacity=nominal_capacity / 6) }, loss_rate=0.00, initial_storage_level=None, diff --git a/src/oemof/solph/components/_generic_storage.py b/src/oemof/solph/components/_generic_storage.py index 43bd06946..ca8d323d9 100644 --- a/src/oemof/solph/components/_generic_storage.py +++ b/src/oemof/solph/components/_generic_storage.py @@ -218,7 +218,7 @@ def __init__( if nominal_storage_capacity is not None: msg = ( "For backward compatibility," - " the option nominal_storage_capacity overwrites the option" + + " the option nominal_storage_capacity overwrites the option" + " nominal_capacity." + " Both options cannot be set at the same time." ) diff --git a/src/oemof/solph/flows/_flow.py b/src/oemof/solph/flows/_flow.py index 30f0dd61e..3ebb9051e 100644 --- a/src/oemof/solph/flows/_flow.py +++ b/src/oemof/solph/flows/_flow.py @@ -183,8 +183,8 @@ def __init__( if nominal_value is not None: msg = ( "For backward compatibility," - " the option nominal_value overwrites the option" - " nominal_capacity." + + " the option nominal_value overwrites the option" + + " nominal_capacity." + " Both options cannot be set at the same time." ) if nominal_capacity is not None: diff --git a/tests/test_flows/test_simple_flow.py b/tests/test_flows/test_simple_flow.py index e5c74ed91..6612b77dc 100644 --- a/tests/test_flows/test_simple_flow.py +++ b/tests/test_flows/test_simple_flow.py @@ -59,7 +59,7 @@ def test_full_load_time_min(): # --- BEGIN: The following code can be removed for versions >= v0.7 --- def test_nominal_capacity_warning(): - with pytest.warns(FutureWarning, match="nominal_capacity"): + with pytest.warns(FutureWarning, match="nominal_value"): _ = solph.flows.Flow(nominal_value=2) diff --git a/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py b/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py index e64ee1fe4..89cbf2b61 100644 --- a/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py +++ b/tests/test_scripts/test_solph/test_storage_investment/test_storage_investment.py @@ -125,7 +125,7 @@ def test_optimise_storage_size( label="pp_gas", inputs={bgas: solph.flows.Flow()}, outputs={ - bel: solph.flows.Flow(nominal_capacity=10e10, variable_costs=50) + bel: solph.flows.Flow(nominal_capacity=1e11, variable_costs=50) }, conversion_factors={bel: 0.58}, ) diff --git a/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py b/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py index 0f9f4c514..49a4a5dd4 100644 --- a/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py +++ b/tests/test_scripts/test_solph/test_variable_chp/test_variable_chp.py @@ -130,7 +130,7 @@ def test_variable_chp(filename="variable_chp.csv", solver="cbc"): energysystem.add( solph.components.Converter( label=("fixed_chp", "gas"), - inputs={bgas: solph.flows.Flow(nominal_capacity=10e10)}, + inputs={bgas: solph.flows.Flow(nominal_capacity=1e11)}, outputs={bel2: solph.flows.Flow(), bth2: solph.flows.Flow()}, conversion_factors={bel2: 0.3, bth2: 0.5}, ) @@ -140,7 +140,7 @@ def test_variable_chp(filename="variable_chp.csv", solver="cbc"): energysystem.add( solph.components.ExtractionTurbineCHP( label=("variable_chp", "gas"), - inputs={bgas: solph.flows.Flow(nominal_capacity=10e10)}, + inputs={bgas: solph.flows.Flow(nominal_capacity=1e11)}, outputs={bel: solph.flows.Flow(), bth: solph.flows.Flow()}, conversion_factors={bel: 0.3, bth: 0.5}, conversion_factor_full_condensation={bel: 0.5},