You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is to dicsuss the required changes in order to be able to add Facades so that user can build complex component from "basic" oemof components and add them to the network
Option A ("AtomicNode")
inputs and outputs attributes are stripped from the class Node, Node as known in v0.5 is renamed after AtomicNode and SubNetwork is added
This would require 2 (easy) releases in oemof.network and 1 in oemof.solph
Pros
Cons
might be confusing that what used to be Node is now AtomicNode and Node is still there but just higher in the hierarchy
2 releases in oemof.network which might
might break older version of oemof as network version is not upperbound
Option B ("AbstractNode")
Pros
less releases to make to perform the change
Cons
Using "Abstract" in the naming
I will use the naming from variante A to draft pseudo code classes below
oemof.network
classNode(Entity):
passclassAtomicNode(Node):
#attributesself.inputsself.outputsclassSubNetwork(Node):
self. node_list#AtomicNodes listdefadd_subnode(self, node: AtomicNode):
"""add an AtomicNode into the subnetwork"""
oemof.solph
classFacade(SubNetwork):
#attributesself.labelself.facade_typedefbuild_subnetwork(self):
"""Instanciate and add AtomicNode instance to the sub network"""classDSO(Facade):
def__init__(self,name, el_bus):
super().__init__(*args,name=name)
self.facade_type="dso"self.el_bus=el_busdefbuild_subnetwork(self):
bus_f=Bus()
feedin=Converter(
inputs={self.el_bus: Flow()},
outputs={bus_f: Flow()},
)
sink=Sink(inputs={bus_f: Flow()})
self.add_subnode(sink, bus_f, feedin)
bus_c=Bus()
consumption=Converter(
inputs={bus_c: Flow()}, outputs={self.el_bus: Flow()}
)
source=Source(outputs={bus_c: Flow()})
self.add_subnode(source, bus_c, consumption)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Follow up from the discussion which happened at 2025-02 oemof-meeting
The goal is to dicsuss the required changes in order to be able to add Facades so that user can build complex component from "basic" oemof components and add them to the network
Option A ("AtomicNode")
inputs
andoutputs
attributes are stripped from the classNode
,Node
as known in v0.5 is renamed afterAtomicNode
andSubNetwork
is addedThis would require 2 (easy) releases in oemof.network and 1 in oemof.solph
Pros
Cons
Option B ("AbstractNode")
Pros
Cons
I will use the naming from variante A to draft pseudo code classes below
oemof.network
oemof.solph
The text was updated successfully, but these errors were encountered: