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
|
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(
|
||||||
|
|||||||
Reference in new issue
Block a user