Skip to content

Commit

Permalink
temporary fix test for aixlib but further work needed in #733
Browse files Browse the repository at this point in the history
  • Loading branch information
DaJansenGit committed Oct 18, 2024
1 parent a3f392f commit 3f7d595
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions bim2sim/elements/hvac_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class HVACPort(Port):
re.IGNORECASE) # TODO: extend pattern
rl_pattern = re.compile('.*rücklauf.*', re.IGNORECASE)

# TODO #733 Clean port flow side setup
def __init__(
self, *args, groups: Set = None,
flow_direction: int = 0, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions bim2sim/export/modelica/standardlibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def get_port_name(self, port):
return 'port_a'
if port.verbose_flow_direction == 'SOURCE':
return 'port_b'
# TODO #733 find port if sourceandsink or sinkdansource
# if port.flow_direction == 0. # SOURCEANDSINK and SINKANDSOURCE
else:
return super().get_port_name(port)

Expand Down
18 changes: 18 additions & 0 deletions bim2sim/plugins/PluginAixLib/bim2sim_aixlib/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,3 +576,21 @@ def __init__(self, element):
value={'hTank': self.parameters['hTank'],
"dTank": self.parameters['dTank']})

# def get_port_name(self, port):
# TODO #733
# TODO function to determine ports. One Idea would be to use the
# geometric positions of ports to determine input and output.
# Top port with input: fluidportTop1
# Bottom port with input: fluidportBottom1
# Top port with output: fluidportTop2
# Bottom port with input: fluidportBottom2

# Additionally, the number of ports can be used to determine if its a
# direct loaded or indirect loaded storage:
# 4 ports -> direct,
# 6 or any other even number > 4 -> indirect load
# with n=n_ports /2 -4 -> number of heating coils
# Then again used height of port to determine port name
# top port of first heating coil: portHC1In
# bottom port of first heating coil: portHC1Out
# etc.
5 changes: 3 additions & 2 deletions bim2sim/plugins/PluginAixLib/test/integration/test_aixlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def test_vereinshaus1_aixlib(self):
project = self.create_project(ifc_names, 'aixlib')
answers = ('HVAC-HeatPump', 'HVAC-Storage', 'HVAC-Storage',
'2lU4kSSzH16v7KPrwcL7KZ', '0t2j$jKmf74PQpOI0ZmPCc',
# 1x expansion tank and 17x dead end
*(True,) * 18,
# TODO #733
# 1x expansion tank and 20x dead end
*(True,) * 21,
# boiler efficiency
0.9,
# boiler flow temperature
Expand Down
1 change: 1 addition & 0 deletions bim2sim/tasks/hvac/reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def set_flow_sides(graph: HvacGraph):
DecisionBunch: A collection of decisions may be yielded during the
task.
"""
# TODO #733
# TODO: needs testing!
# TODO: at least one master element required
accepted = []
Expand Down

0 comments on commit 3f7d595

Please sign in to comment.