mirror of https://gitlab.com/pamhyr/pamhyr2
Solver: Mage: HS: Minor change.
parent
b3c6f1031b
commit
e19c3229bd
|
|
@ -546,6 +546,15 @@ class Mage(CommandLineSolver):
|
|||
|
||||
return files
|
||||
|
||||
def skip_hs(self, hs):
|
||||
return (
|
||||
hs.input_reach is None
|
||||
or not hs.input_reach.is_enable()
|
||||
or not hs.enabled
|
||||
or hs.input_section is None
|
||||
or hs.is_deleted()
|
||||
)
|
||||
|
||||
def _export_SIN(self, study, repertory, qlog, name="0"):
|
||||
files = []
|
||||
|
||||
|
|
@ -571,19 +580,7 @@ class Mage(CommandLineSolver):
|
|||
files.append(f"{name}.SIN")
|
||||
|
||||
for hs in hydraulic_structures:
|
||||
if hs.input_reach is None:
|
||||
continue
|
||||
|
||||
if not hs.input_reach.is_enable():
|
||||
continue
|
||||
|
||||
if not hs.enabled:
|
||||
continue
|
||||
|
||||
if hs.input_section is None:
|
||||
continue
|
||||
|
||||
if hs.is_deleted():
|
||||
if self.skip_hs(hs):
|
||||
continue
|
||||
|
||||
f.write(
|
||||
|
|
|
|||
Loading…
Reference in New Issue