mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Solver: Mage: HS: Minor change.
This commit is contained in:
1 parent
b3c6f1031b
commit
e19c3229bd
1 file changed
+10
-13
+10
-13
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user