Solver adists done

adists_num
Youcef AOUAD 2024-06-28 11:40:57 +02:00
parent b171eb7d32
commit 29b5c97345
6 changed files with 13 additions and 5 deletions

BIN
adists/adists Executable file

Binary file not shown.

View File

@ -159,6 +159,10 @@ class AdisTS(CommandLineSolver):
return results
def output_param(self):
name = ""
return f"{name}"
################################
# Adis-TS in low coupling mode #
################################
@ -171,7 +175,6 @@ class AdisTSlc(AdisTS):
super(AdisTSlc, self).__init__(name)
self._type = "adistslc"
print("cmd solver adistslc : ", self._cmd_solver)
@classmethod
def default_parameters(cls):

View File

@ -196,11 +196,17 @@ 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}")
@ -237,6 +243,8 @@ 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)

View File

@ -1263,10 +1263,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
#solver = next(filter(lambda x: x._type == "adistslc", self.conf.solvers))
solver = next(filter(lambda x: x.name == "AdisTS-LC", self.conf.solvers))
print("solvers list : ", self.conf.solvers)
print("run solver adists : ", solver._cmd_solver)
print("solver adistslc cmd from list : ", self.conf.solvers[1]._cmd_solver)
print("solver mage cmd from list : ", self.conf.solvers[0]._cmd_solver)
self.run_solver(solver)
def run_solver(self, solver):

View File

@ -41,6 +41,7 @@ class Config(SQL):
self.filename = Config.filename()
self.set_default_value()
logging.info(f"Configuration file : {self.filename}")
super(Config, self).__init__(filename=self.filename)