Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to solph v0.5.1 #123

Merged
merged 6 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ def read(*names, **kwargs):
install_requires=[
"datapackage==1.5.1",
"tableschema==1.7.4", # newer versions (v1.8.0 and up) fail!
# "oemof.solph==0.5.1",
"oemof.solph @ git+https://github.com/oemof/oemof-solph.git@dev",
"oemof.solph==0.5.1rc1",
"pandas>=0.22",
"paramiko",
"toml",
Expand Down
8 changes: 4 additions & 4 deletions src/oemof/tabular/facades.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
from oemof.solph.buses import Bus
from oemof.solph.buses.experimental import ElectricalBus
from oemof.solph.components import (
Converter,
ExtractionTurbineCHP,
GenericStorage,
Sink,
Source,
Transformer,
)
from oemof.solph.components.experimental import Link
from oemof.solph.flows import Flow
Expand Down Expand Up @@ -770,7 +770,7 @@ def build_solph_components(self):


@dataclass_facade
class BackpressureTurbine(Transformer, Facade):
class BackpressureTurbine(Converter, Facade):
r""" Combined Heat and Power (backpressure) unit with one input and
two outputs.

Expand Down Expand Up @@ -908,7 +908,7 @@ def build_solph_components(self):


@dataclass_facade
class Conversion(Transformer, Facade):
class Conversion(Converter, Facade):
r"""Conversion unit with one input and one output.

Parameters
Expand Down Expand Up @@ -1033,7 +1033,7 @@ def build_solph_components(self):


@dataclass_facade
class HeatPump(Transformer, Facade):
class HeatPump(Converter, Facade):
r"""HeatPump unit with two inputs and one output.

Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/oemof/tabular/facades/backpressure_turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

from oemof.solph._plumbing import sequence
from oemof.solph.buses import Bus
from oemof.solph.components import Transformer
from oemof.solph.components import Converter
from oemof.solph.flows import Flow

from oemof.tabular._facade import Facade, dataclass_facade


@dataclass_facade
class BackpressureTurbine(Transformer, Facade):
class BackpressureTurbine(Converter, Facade):
r""" Combined Heat and Power (backpressure) unit with one input and
two outputs.

Expand Down
4 changes: 2 additions & 2 deletions src/oemof/tabular/facades/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from oemof.solph._plumbing import sequence
from oemof.solph.buses import Bus
from oemof.solph.components import Transformer
from oemof.solph.components import Converter
from oemof.solph.flows import Flow

from oemof.tabular._facade import Facade, dataclass_facade


@dataclass_facade
class Conversion(Transformer, Facade):
class Conversion(Converter, Facade):
r"""Conversion unit with one input and one output.

Parameters
Expand Down
4 changes: 2 additions & 2 deletions src/oemof/tabular/facades/heatpump.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

from oemof.solph._plumbing import sequence
from oemof.solph.buses import Bus
from oemof.solph.components import Transformer
from oemof.solph.components import Converter
from oemof.solph.flows import Flow

from oemof.tabular._facade import Facade, dataclass_facade


@dataclass_facade
class HeatPump(Transformer, Facade):
class HeatPump(Converter, Facade):
r"""HeatPump unit with two inputs and one output.

Parameters
Expand Down
14 changes: 7 additions & 7 deletions tests/_files/lp_files/backpressure_investment_brown_field.lp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\* Source Pyomo model name=Model *\

min
min
objective:
+50 InvestmentFlowBlock_invest(backpressure_electricity_0)
+0.6 flow(fuel_backpressure_0_0)
Expand Down Expand Up @@ -45,32 +45,32 @@ c_e_BusBlock_balance(electricity_0_2)_:
+1 flow(backpressure_electricity_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_0)_:
+0.4 flow(fuel_backpressure_0_0)
-1 flow(backpressure_electricity_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_0)_:
+0.35 flow(fuel_backpressure_0_0)
-1 flow(backpressure_heat_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_1)_:
+0.4 flow(fuel_backpressure_0_1)
-1 flow(backpressure_electricity_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_1)_:
+0.35 flow(fuel_backpressure_0_1)
-1 flow(backpressure_heat_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_2)_:
+0.4 flow(fuel_backpressure_0_2)
-1 flow(backpressure_electricity_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_2)_:
+0.35 flow(fuel_backpressure_0_2)
-1 flow(backpressure_heat_0_2)
= 0
Expand Down
14 changes: 7 additions & 7 deletions tests/_files/lp_files/backpressure_investment_green_field.lp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\* Source Pyomo model name=Model *\

min
min
objective:
+50 InvestmentFlowBlock_invest(backpressure_electricity_0)
+0.6 flow(fuel_backpressure_0_0)
Expand Down Expand Up @@ -45,32 +45,32 @@ c_e_BusBlock_balance(electricity_0_2)_:
+1 flow(backpressure_electricity_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_0)_:
+0.4 flow(fuel_backpressure_0_0)
-1 flow(backpressure_electricity_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_0)_:
+0.35 flow(fuel_backpressure_0_0)
-1 flow(backpressure_heat_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_1)_:
+0.4 flow(fuel_backpressure_0_1)
-1 flow(backpressure_electricity_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_1)_:
+0.35 flow(fuel_backpressure_0_1)
-1 flow(backpressure_heat_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_2)_:
+0.4 flow(fuel_backpressure_0_2)
-1 flow(backpressure_electricity_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_2)_:
+0.35 flow(fuel_backpressure_0_2)
-1 flow(backpressure_heat_0_2)
= 0
Expand Down
8 changes: 4 additions & 4 deletions tests/_files/lp_files/conversion.lp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\* Source Pyomo model name=Model *\

min
min
objective:
+0 ONE_VAR_CONSTANT

Expand Down Expand Up @@ -30,17 +30,17 @@ c_e_BusBlock_balance(biomass_0_2)_:
+1 flow(biomass_biomass_plant_0_2)
= 0

c_e_TransformerBlock_relation(biomass_plant_biomass_heat_0_0)_:
c_e_ConverterBlock_relation(biomass_plant_biomass_heat_0_0)_:
-1 flow(biomass_plant_heat_0_0)
+0.4 flow(biomass_biomass_plant_0_0)
= 0

c_e_TransformerBlock_relation(biomass_plant_biomass_heat_0_1)_:
c_e_ConverterBlock_relation(biomass_plant_biomass_heat_0_1)_:
-1 flow(biomass_plant_heat_0_1)
+0.4 flow(biomass_biomass_plant_0_1)
= 0

c_e_TransformerBlock_relation(biomass_plant_biomass_heat_0_2)_:
c_e_ConverterBlock_relation(biomass_plant_biomass_heat_0_2)_:
-1 flow(biomass_plant_heat_0_2)
+0.4 flow(biomass_biomass_plant_0_2)
= 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\* Source Pyomo model name=Model *\

min
min
objective:
+393187.4631175658 ONE_VAR_CONSTANT
+561.5105784699618 InvestmentFlowBlock_invest(backpressure_electricity_0)
Expand Down Expand Up @@ -126,92 +126,92 @@ c_e_BusBlock_balance(electricity_2_8)_:
+1 flow(backpressure_electricity_2_8)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_0)_:
+0.4 flow(fuel_backpressure_0_0)
-1 flow(backpressure_electricity_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_0)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_0)_:
+0.35 flow(fuel_backpressure_0_0)
-1 flow(backpressure_heat_0_0)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_1)_:
+0.4 flow(fuel_backpressure_0_1)
-1 flow(backpressure_electricity_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_1)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_1)_:
+0.35 flow(fuel_backpressure_0_1)
-1 flow(backpressure_heat_0_1)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_0_2)_:
+0.4 flow(fuel_backpressure_0_2)
-1 flow(backpressure_electricity_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_0_2)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_0_2)_:
+0.35 flow(fuel_backpressure_0_2)
-1 flow(backpressure_heat_0_2)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_1_3)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_1_3)_:
+0.4 flow(fuel_backpressure_1_3)
-1 flow(backpressure_electricity_1_3)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_1_3)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_1_3)_:
+0.35 flow(fuel_backpressure_1_3)
-1 flow(backpressure_heat_1_3)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_1_4)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_1_4)_:
+0.4 flow(fuel_backpressure_1_4)
-1 flow(backpressure_electricity_1_4)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_1_4)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_1_4)_:
+0.35 flow(fuel_backpressure_1_4)
-1 flow(backpressure_heat_1_4)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_1_5)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_1_5)_:
+0.4 flow(fuel_backpressure_1_5)
-1 flow(backpressure_electricity_1_5)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_1_5)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_1_5)_:
+0.35 flow(fuel_backpressure_1_5)
-1 flow(backpressure_heat_1_5)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_2_6)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_2_6)_:
+0.4 flow(fuel_backpressure_2_6)
-1 flow(backpressure_electricity_2_6)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_2_6)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_2_6)_:
+0.35 flow(fuel_backpressure_2_6)
-1 flow(backpressure_heat_2_6)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_2_7)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_2_7)_:
+0.4 flow(fuel_backpressure_2_7)
-1 flow(backpressure_electricity_2_7)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_2_7)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_2_7)_:
+0.35 flow(fuel_backpressure_2_7)
-1 flow(backpressure_heat_2_7)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_electricity_2_8)_:
c_e_ConverterBlock_relation(backpressure_fuel_electricity_2_8)_:
+0.4 flow(fuel_backpressure_2_8)
-1 flow(backpressure_electricity_2_8)
= 0

c_e_TransformerBlock_relation(backpressure_fuel_heat_2_8)_:
c_e_ConverterBlock_relation(backpressure_fuel_heat_2_8)_:
+0.35 flow(fuel_backpressure_2_8)
-1 flow(backpressure_heat_2_8)
= 0
Expand Down
Loading