mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Solver: Mage: Minor change.
This commit is contained in:
1 parent
96bac8ee1f
commit
3585b29b03
1 file changed
+11
-1
+11
-1
@@ -466,6 +466,9 @@ class Mage(CommandLineSolver):
|
||||
id = 1
|
||||
for reach in reachs:
|
||||
cond = study.river.initial_conditions.get(reach)
|
||||
if cond.is_deleted():
|
||||
continue
|
||||
|
||||
data = cond.data
|
||||
if len(data) == 0:
|
||||
continue
|
||||
@@ -474,6 +477,9 @@ class Mage(CommandLineSolver):
|
||||
|
||||
id_sec = 1
|
||||
for d in data:
|
||||
if d.is_deleted():
|
||||
continue
|
||||
|
||||
IR = f"{id}"
|
||||
IS = f"{id_sec}"
|
||||
discharge = f"{d['discharge']:>10.5f}"
|
||||
@@ -490,6 +496,7 @@ class Mage(CommandLineSolver):
|
||||
|
||||
if has_ini:
|
||||
files.append(f"{name}.INI")
|
||||
|
||||
return files
|
||||
|
||||
def _export_CAS(self, study, repertory, qlog, name="0"):
|
||||
@@ -506,7 +513,7 @@ class Mage(CommandLineSolver):
|
||||
files.append(f"{name}.CAS")
|
||||
|
||||
for reservoir in reservoirs:
|
||||
if reservoir.node is None:
|
||||
if reservoir.node is None or reservoir.is_deleted():
|
||||
continue
|
||||
|
||||
reservoir.sort()
|
||||
@@ -561,6 +568,9 @@ class Mage(CommandLineSolver):
|
||||
if hs.input_section is None:
|
||||
continue
|
||||
|
||||
if hs.is_deleted():
|
||||
continue
|
||||
|
||||
f.write(
|
||||
'* ouvrage au pk ' +
|
||||
f"{float(hs.input_section.rk):>12.1f}" + ' ' +
|
||||
|
||||
Reference in new issue
Block a user