Skip to content

Commit

Permalink
use np.any in heat_consumer_component.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohmeier authored Nov 7, 2024
1 parent b36f558 commit c8b834d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pandapipes/component_models/heat_consumer_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def create_pit_branch_entries(cls, net, branch_pit):
treturn = net[cls.table_name()].treturn_k.values
hc_pit[~np.isnan(treturn), TOUTINIT] = treturn[~np.isnan(treturn)]
mask_q0 = hc_pit[:, QEXT] == 0 & np.isnan(hc_pit[:, MDOTINIT])
hc_pit[mask_q0, ACTIVE] = False
if any(mask_q0):
if np.any(mask_q0):
hc_pit[mask_q0, ACTIVE] = False
logger.warning(r'qext_w is equals to zero for heat consumers with index %s. '
r'Therefore, the defined temperature control cannot be maintained.' \
%net[cls.table_name()].index[mask_q0])
Expand Down

0 comments on commit c8b834d

Please sign in to comment.