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
|
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"):
|
def _export_SIN(self, study, repertory, qlog, name="0"):
|
||||||
files = []
|
files = []
|
||||||
|
|
||||||
|
|
@ -571,19 +580,7 @@ class Mage(CommandLineSolver):
|
||||||
files.append(f"{name}.SIN")
|
files.append(f"{name}.SIN")
|
||||||
|
|
||||||
for hs in hydraulic_structures:
|
for hs in hydraulic_structures:
|
||||||
if hs.input_reach is None:
|
if self.skip_hs(hs):
|
||||||
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():
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
f.write(
|
f.write(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue