mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug enable hydraulic structures
This commit is contained in:
1 parent
fd1b2b1041
commit
d871bbfc3b
4 files changed
+38
-31
No files matched your search
+21
-17
@@ -495,6 +495,9 @@ class Mage(CommandLineSolver):
|
||||
if not hs.input_reach.is_enable():
|
||||
continue
|
||||
|
||||
if not hs.enabled:
|
||||
continue
|
||||
|
||||
if hs.input_kp is None:
|
||||
continue
|
||||
|
||||
@@ -510,25 +513,26 @@ class Mage(CommandLineSolver):
|
||||
|
||||
def _export_SIN_bhs(self, study, sin_dict, hs, f):
|
||||
for bhs in hs.basic_structures:
|
||||
reach_id = study.river.get_edge_id(hs.input_reach) + 1
|
||||
param_str = ' '.join(
|
||||
[
|
||||
f'{p:>10.3f}'
|
||||
for p in self._export_SIN_parameters(bhs)
|
||||
]
|
||||
)
|
||||
if bhs.enabled:
|
||||
reach_id = study.river.get_edge_id(hs.input_reach) + 1
|
||||
param_str = ' '.join(
|
||||
[
|
||||
f'{p:>10.3f}'
|
||||
for p in self._export_SIN_parameters(bhs)
|
||||
]
|
||||
)
|
||||
|
||||
name = bhs.name
|
||||
if name == "":
|
||||
name = f"HS_{bhs.id:>3}".replace(" ", "0")
|
||||
else:
|
||||
name = name.replace(" ", "_")
|
||||
name = bhs.name
|
||||
if name == "":
|
||||
name = f"HS_{bhs.id:>3}".replace(" ", "0")
|
||||
else:
|
||||
name = name.replace(" ", "_")
|
||||
|
||||
f.write(
|
||||
f"{sin_dict[bhs._type]} " +
|
||||
f"{reach_id} {float(hs.input_kp):>12.3f} " +
|
||||
f"{param_str} {name}\n"
|
||||
)
|
||||
f.write(
|
||||
f"{sin_dict[bhs._type]} " +
|
||||
f"{reach_id} {float(hs.input_kp):>12.3f} " +
|
||||
f"{param_str} {name}\n"
|
||||
)
|
||||
|
||||
def _export_SIN_parameters(self, bhs):
|
||||
res = [9999.999] * 5
|
||||
|
||||
Reference in new issue
Block a user