Skip to content

Commit

Permalink
Update epanet.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Mar 28, 2024
1 parent 126883c commit 3dea1aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def isList(var):
class epanet:
""" EPyt main functions class """

def __init__(self, *argv, version=2.2, loadfile=False, msx=False):
def __init__(self, *argv, version=2.2, ph=False, loadfile=False, msx=False):
# Constants
# Demand model types. DDA #0 Demand driven analysis,
# PDA #1 Pressure driven analysis.
Expand Down Expand Up @@ -626,7 +626,8 @@ def __init__(self, *argv, version=2.2, loadfile=False, msx=False):
self.LibEPANETpath = self.api.LibEPANETpath
self.LibEPANET = self.api.LibEPANET
print(f'Input File {self.netName} loaded successfully.\n')
else:

if ph:
self.createProject()

# Global plot settings
Expand Down Expand Up @@ -12836,7 +12837,7 @@ def __init__(self, version=2.2, msx=False):
self._lib = cdll.LoadLibrary(self.LibEPANET)
self.LibEPANETpath = os.path.dirname(self.LibEPANET)

if float(version) >= 2.2 and 'win' in str(platform.architecture()) and not msx:
if float(version) >= 2.2 and not msx:
self._ph = c_uint64()
else:
self._ph = None
Expand Down

0 comments on commit 3dea1aa

Please sign in to comment.