Add EPANET3 format
This commit is contained in:
@@ -60,9 +60,12 @@ def set_emitter(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][IN][OUT]
|
||||||
# node Ke
|
# node Ke
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
|
# [EPA3][IN][OUT]
|
||||||
|
# node Ke (exponent pattern)
|
||||||
|
#--------------------------------------------------------------
|
||||||
class InpEmitter:
|
class InpEmitter:
|
||||||
def __init__(self, line: str) -> None:
|
def __init__(self, line: str) -> None:
|
||||||
tokens = line.split()
|
tokens = line.split()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ def set_quality(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# node initqual
|
# node initqual
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
class InpQuality:
|
class InpQuality:
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ def delete_source(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# node sourcetype quality (pattern)
|
# node sourcetype quality (pattern)
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
class InpSource:
|
class InpSource:
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ def set_tank_reaction(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# ORDER {BULK/WALL/TANK} value
|
# ORDER {BULK/WALL/TANK} value
|
||||||
# GLOBAL BULK coeff
|
# GLOBAL BULK coeff
|
||||||
# GLOBAL WALL coeff
|
# GLOBAL WALL coeff
|
||||||
|
|||||||
@@ -97,8 +97,9 @@ def delete_mixing(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# TankID MixModel FractVolume
|
# TankID MixModel FractVolume
|
||||||
|
# FractVolume if type == MIX2
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
class InpMixing:
|
class InpMixing:
|
||||||
def __init__(self, line: str) -> None:
|
def __init__(self, line: str) -> None:
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ def get_node_coord(name: str, id: str) -> dict[str, float]:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# id x y
|
# id x y
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# exception ! need merge to node change set !
|
# exception ! need merge to node change set !
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ def delete_tank(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2]
|
# [EPA2]
|
||||||
# [IN]
|
# [IN]
|
||||||
# id elev initlevel minlevel maxlevel diam (minvol vcurve overflow) ;desc
|
# id elev initlevel minlevel maxlevel diam (minvol vcurve overflow) ;desc
|
||||||
# xxx
|
# xxx
|
||||||
@@ -153,6 +153,9 @@ def delete_tank(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
# [OUT]
|
# [OUT]
|
||||||
# id elev initlevel minlevel maxlevel diam minvol (vcurve overflow) ;desc
|
# id elev initlevel minlevel maxlevel diam minvol (vcurve overflow) ;desc
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
|
# [EPA3]
|
||||||
|
# id elev initlevel minlevel maxlevel diam minvol (vcurve)
|
||||||
|
#--------------------------------------------------------------
|
||||||
class InpTank:
|
class InpTank:
|
||||||
def __init__(self, line: str) -> None:
|
def __init__(self, line: str) -> None:
|
||||||
tokens = line.split()
|
tokens = line.split()
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ def set_demand(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPA2][EPA3][IN][OUT]
|
||||||
# node base_demand (pattern) ;category
|
# node base_demand (pattern) ;category
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
class InpDemand:
|
class InpDemand:
|
||||||
|
|||||||
Reference in New Issue
Block a user