Relax tank read limitation
This commit is contained in:
@@ -145,10 +145,13 @@ def delete_tank(name: str, cs: ChangeSet) -> ChangeSet:
|
|||||||
|
|
||||||
|
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
# [EPANET2][IN][OUT]
|
# [EPANET2]
|
||||||
|
# [IN]
|
||||||
# id elev initlevel minlevel maxlevel diam (minvol vcurve overflow) ;desc
|
# id elev initlevel minlevel maxlevel diam (minvol vcurve overflow) ;desc
|
||||||
# xxx
|
# xxx
|
||||||
# * YES
|
# * YES
|
||||||
|
# [OUT]
|
||||||
|
# id elev initlevel minlevel maxlevel diam minvol (vcurve overflow) ;desc
|
||||||
#--------------------------------------------------------------
|
#--------------------------------------------------------------
|
||||||
class InpTank:
|
class InpTank:
|
||||||
def __init__(self, line: str) -> None:
|
def __init__(self, line: str) -> None:
|
||||||
@@ -164,7 +167,7 @@ class InpTank:
|
|||||||
self.min_level = float(tokens[3])
|
self.min_level = float(tokens[3])
|
||||||
self.max_level = float(tokens[4])
|
self.max_level = float(tokens[4])
|
||||||
self.diameter = float(tokens[5])
|
self.diameter = float(tokens[5])
|
||||||
self.min_vol = float(tokens[6])
|
self.min_vol = float(tokens[6]) if num_without_desc >= 7 else 0.0
|
||||||
self.vol_curve = str(tokens[7]) if num_without_desc >= 8 and tokens[7] != '*' else None
|
self.vol_curve = str(tokens[7]) if num_without_desc >= 8 and tokens[7] != '*' else None
|
||||||
self.overflow = str(tokens[8].upper()) if num_without_desc >= 9 else None
|
self.overflow = str(tokens[8].upper()) if num_without_desc >= 9 else None
|
||||||
self.desc = str(tokens[-1]) if has_desc else None
|
self.desc = str(tokens[-1]) if has_desc else None
|
||||||
|
|||||||
Reference in New Issue
Block a user