Skip to content

Commit

Permalink
Merge pull request #31 from andreArtelt/main
Browse files Browse the repository at this point in the history
Bugfix for 'splitPipe' method
  • Loading branch information
Mariosmsk authored Jan 30, 2024
2 parents b582314 + 537f240 commit a11a773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9760,12 +9760,12 @@ def splitPipe(self, pipeID, newPipeID, newNodeID):
midElev = (self.getNodeElevations(leftNodeIndex) + self.getNodeElevations(rightNodeIndex)) / 2
self.setNodeJunctionData(newNodeIndex, midElev, 0, '')
self.setNodeEmitterCoeff(newNodeIndex, self.getNodeEmitterCoeff(leftNodeIndex))
if self.getQualityCode()[0] > 0:
if self.getQualityCode() > 0:
midInitQual = (self.getNodeInitialQuality(leftNodeIndex) + self.getNodeInitialQuality(rightNodeIndex)) / 2
self.setNodeInitialQuality(newNodeIndex, midInitQual)
self.setNodeSourceQuality(newNodeIndex, self.getNodeSourceQuality(leftNodeIndex)[0])
self.setNodeSourcePatternIndex(newNodeIndex, self.getNodeSourcePatternIndex(leftNodeIndex))
if self.getNodeSourceTypeIndex(leftNodeIndex) != 0:
if self.getNodeSourceTypeIndex(leftNodeIndex)[0] != 0:
self.setNodeSourceType(newNodeIndex, self.getNodeSourceTypeIndex(leftNodeIndex))

# Access link properties
Expand Down

0 comments on commit a11a773

Please sign in to comment.