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
|
id = 1
|
||||||
for reach in reachs:
|
for reach in reachs:
|
||||||
cond = study.river.initial_conditions.get(reach)
|
cond = study.river.initial_conditions.get(reach)
|
||||||
|
if cond.is_deleted():
|
||||||
|
continue
|
||||||
|
|
||||||
data = cond.data
|
data = cond.data
|
||||||
if len(data) == 0:
|
if len(data) == 0:
|
||||||
continue
|
continue
|
||||||
@@ -474,6 +477,9 @@ class Mage(CommandLineSolver):
|
|||||||
|
|
||||||
id_sec = 1
|
id_sec = 1
|
||||||
for d in data:
|
for d in data:
|
||||||
|
if d.is_deleted():
|
||||||
|
continue
|
||||||
|
|
||||||
IR = f"{id}"
|
IR = f"{id}"
|
||||||
IS = f"{id_sec}"
|
IS = f"{id_sec}"
|
||||||
discharge = f"{d['discharge']:>10.5f}"
|
discharge = f"{d['discharge']:>10.5f}"
|
||||||
@@ -490,6 +496,7 @@ class Mage(CommandLineSolver):
|
|||||||
|
|
||||||
if has_ini:
|
if has_ini:
|
||||||
files.append(f"{name}.INI")
|
files.append(f"{name}.INI")
|
||||||
|
|
||||||
return files
|
return files
|
||||||
|
|
||||||
def _export_CAS(self, study, repertory, qlog, name="0"):
|
def _export_CAS(self, study, repertory, qlog, name="0"):
|
||||||
@@ -506,7 +513,7 @@ class Mage(CommandLineSolver):
|
|||||||
files.append(f"{name}.CAS")
|
files.append(f"{name}.CAS")
|
||||||
|
|
||||||
for reservoir in reservoirs:
|
for reservoir in reservoirs:
|
||||||
if reservoir.node is None:
|
if reservoir.node is None or reservoir.is_deleted():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
reservoir.sort()
|
reservoir.sort()
|
||||||
@@ -561,6 +568,9 @@ class Mage(CommandLineSolver):
|
|||||||
if hs.input_section is None:
|
if hs.input_section is None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if hs.is_deleted():
|
||||||
|
continue
|
||||||
|
|
||||||
f.write(
|
f.write(
|
||||||
'* ouvrage au pk ' +
|
'* ouvrage au pk ' +
|
||||||
f"{float(hs.input_section.rk):>12.1f}" + ' ' +
|
f"{float(hs.input_section.rk):>12.1f}" + ' ' +
|
||||||
|
|||||||
Reference in new issue
Block a user