diff --git a/.gitignore b/.gitignore index 1f1b00e718cbf2e4cdc7cbf65b1df544f90dce1b..9ea9f7f574262820e004327d18511d9ec16f651a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ *.class tmp +mage8 +adists *.tar *.tar.* diff --git a/src/Solver/AdisTS.py b/src/Solver/AdisTS.py index 1a69cdbd8f8ab15b365789ca056faf19053b8d27..5219c85114fee676819f3d7e47ebd91df556f090 100644 --- a/src/Solver/AdisTS.py +++ b/src/Solver/AdisTS.py @@ -20,6 +20,8 @@ import os import logging import numpy as np +import shutil + from tools import ( trace, timer, logger_exception, timestamp_to_old_pamhyr_date, @@ -131,6 +133,12 @@ class AdisTS(CommandLineSolver): self._export_REP_additional_lines(study, f) + path_mage_net = os.path.join(os.path.abspath(os.path.join(repertory, os.pardir)), f"default-mage/net") + path_adists_net = os.path.join(repertory, "net") + + if os.path.exists(path_mage_net): + shutil.copytree(path_mage_net, path_adists_net, dirs_exist_ok=True) + @timer def export(self, study, repertory, qlog=None): self._study = study diff --git a/src/Solver/CommandLine.py b/src/Solver/CommandLine.py index 5a2343a70aca8494c56fe4838d4ed49a79e3b082..5f706d1a2772b25e6f10f82bd512bb7c574aaf78 100644 --- a/src/Solver/CommandLine.py +++ b/src/Solver/CommandLine.py @@ -196,17 +196,11 @@ class CommandLineSolver(AbstractSolver): The executable and list of arguments """ cmd = cmd.replace("@install_dir", self._install_dir()) - print("format command installDir :", self._install_dir()) cmd = cmd.replace("@path", "\"" + path + "\"") - print("format command path :", path) cmd = cmd.replace("@input", self.input_param().replace(" ", "_")) - print("format command input :", self.input_param().replace(" ", "_")) cmd = cmd.replace("@output", self.output_param()) - print("format command output :", self.output_param()) cmd = cmd.replace("@dir", self._process.workingDirectory()) - print("format command dir :", self._process.workingDirectory()) cmd = cmd.replace("@args", " ".join(self.cmd_args(study))) - print("format command args :", " ".join(self.cmd_args(study))) logger.debug(f"! {cmd}") @@ -243,11 +237,7 @@ class CommandLineSolver(AbstractSolver): return True cmd = self._cmd_solver - print("run solver commandline cmd : ", cmd) - print("path solver : ", self._path_solver) exe, args = self._format_command(study, cmd, self._path_solver) - print("parsed cmd solver exe : ", exe) - print("parsed cmd solver args : ", args) if not os.path.exists(exe): error = f"[ERROR] Path {exe} do not exists" @@ -318,11 +308,6 @@ class CommandLineSolver(AbstractSolver): self._output.put(res) def run(self, study, process=None, output_queue=None): - print("Run debug") - print("---------") - print("cmd input : ", self._cmd_input) - print("cmd solver : ", self._cmd_solver) - print("cmd output : ", self._cmd_output) self._study = study # Replace old values if needed diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py index 558131cb80744a1a3ba90029b7907e5cfa7b7b53..d36f5e59c7cf50f161d4d8fd50cbb2344d1a093c 100644 --- a/src/View/MainWindow.py +++ b/src/View/MainWindow.py @@ -1261,8 +1261,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): if self._study is None: return - #solver = next(filter(lambda x: x._type == "adistslc", self.conf.solvers)) - solver = next(filter(lambda x: x.name == "AdisTS-LC", self.conf.solvers)) + solver = next(filter(lambda x: x._type == "adistslc", self.conf.solvers)) + #solver = next(filter(lambda x: x.name == "AdisTS-LC", self.conf.solvers)) + print(solver._type) self.run_solver(solver) def run_solver(self, solver): diff --git a/src/View/RunSolver/Window.py b/src/View/RunSolver/Window.py index 6f9bf5e6eec875e3531bf53a505e9f06e2145e1e..270d565f0a85bedf1283b1dbb66f4c669af4694c 100644 --- a/src/View/RunSolver/Window.py +++ b/src/View/RunSolver/Window.py @@ -79,7 +79,9 @@ class SelectSolverWindow(PamhyrDialog): self.select_last_solver() def setup_combobox(self): - solvers = self._config.solvers + #solvers = self._config.solvers + #solvers mage + solvers = list(filter(lambda x: "adists" not in x._type, self._config.solvers)) solvers_name = list( map( self._format_solver_name,