This commit is contained in:
Theophile Terraz committed 2024-10-31 14:02:38 +01:00
commit 4f69553bd3
11 files changed
+292 -81

No files matched your search

+36 -15
View File
@@ -599,29 +599,50 @@ class Mage(CommandLineSolver):
if qlog is not None:
qlog.put("Export VAR file")
with mage_file_open(os.path.join(repertory, f"{name}.VAR"), "w+") as f:
files.append(f"{name}.VAR")
nb_cv = 0
for hs in hydraulic_structures:
if hs.input_reach is None:
continue
for hs in hydraulic_structures:
if hs.input_reach is None:
continue
if not hs.input_reach.is_enable():
continue
if not hs.input_reach.is_enable():
continue
if not hs.enabled:
continue
for bhs in hs.basic_structures:
for bhs in hs.basic_structures:
if bhs.enabled:
logger.info(bhs._type)
if bhs._type != "CV":
if bhs._type == "CV":
nb_cv += 1
if nb_cv != 0:
with mage_file_open(os.path.join(
repertory, f"{name}.VAR"), "w+") as f:
files.append(f"{name}.VAR")
for hs in hydraulic_structures:
if hs.input_reach is None:
continue
name = bhs.name
if name == "":
name = f"HS_{bhs.id:>3}".replace(" ", "0")
if not hs.input_reach.is_enable():
continue
f.write(
f"${name} clapet"
)
if not hs.enabled:
continue
for bhs in hs.basic_structures:
logger.info(bhs._type)
if bhs._type != "CV":
continue
name = bhs.name
if name == "":
name = f"HS_{bhs.id:>3}".replace(" ", "0")
f.write(
f"${name} clapet"
)
return files
def _export_DEV(self, study, repertory, qlog, name="0"):