mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug SIN output
This commit is contained in:
1 parent
c253ad832d
commit
d1c8e3e4f5
1 file changed
+18
-3
+18
-3
@@ -440,6 +440,21 @@ class Mage(CommandLineSolver):
|
||||
def _export_SIN(self, study, repertory, qlog, name="0"):
|
||||
files = []
|
||||
|
||||
sin_dict = {
|
||||
"ND":"*",
|
||||
"S1":"D",
|
||||
"S2":"T",
|
||||
"S3":"T",
|
||||
"OR":"D",
|
||||
"OC":"B",
|
||||
"OV":"F",
|
||||
"V1":"V",
|
||||
"V2":"W",
|
||||
"BO":"A",
|
||||
"UD":"X",
|
||||
"PO":"P",
|
||||
}
|
||||
|
||||
hydraulic_structures = study.river.hydraulic_structures.lst
|
||||
if len(hydraulic_structures) == 0:
|
||||
return files
|
||||
@@ -451,8 +466,8 @@ class Mage(CommandLineSolver):
|
||||
files.append(f"{name}.SIN")
|
||||
|
||||
for hs in hydraulic_structures:
|
||||
if hs.reach.is_enable:
|
||||
reach_id = study.river.get_edge_id(hs.reach)
|
||||
if hs.input_reach.is_enable:
|
||||
reach_id = study.river.get_edge_id(hs.input_reach)
|
||||
params = [
|
||||
p.value for p in hs.basic_hydraulic_structure.param
|
||||
]
|
||||
@@ -463,7 +478,7 @@ class Mage(CommandLineSolver):
|
||||
]
|
||||
)
|
||||
f.write(
|
||||
f"{hs.basic_hydraulic_structure.type} " +
|
||||
f"{sin_dict[hs.basic_hydraulic_structure.type]} " +
|
||||
f"{reach_id} {hs.kp:>12.3f} {params} " +
|
||||
"{hs.name}\n"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user