Solver: Mage: HS: Minor change.

scenarios
Pierre-Antoine 2026-06-05 17:01:22 +02:00
parent b3c6f1031b
commit e19c3229bd
1 changed files with 10 additions and 13 deletions

View File

@ -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(