mirror of https://gitlab.com/pamhyr/pamhyr2
Solver adists done
parent
b171eb7d32
commit
29b5c97345
Binary file not shown.
|
|
@ -159,6 +159,10 @@ class AdisTS(CommandLineSolver):
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
def output_param(self):
|
||||||
|
name = ""
|
||||||
|
return f"{name}"
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Adis-TS in low coupling mode #
|
# Adis-TS in low coupling mode #
|
||||||
################################
|
################################
|
||||||
|
|
@ -171,7 +175,6 @@ class AdisTSlc(AdisTS):
|
||||||
super(AdisTSlc, self).__init__(name)
|
super(AdisTSlc, self).__init__(name)
|
||||||
|
|
||||||
self._type = "adistslc"
|
self._type = "adistslc"
|
||||||
print("cmd solver adistslc : ", self._cmd_solver)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def default_parameters(cls):
|
def default_parameters(cls):
|
||||||
|
|
|
||||||
|
|
@ -196,11 +196,17 @@ class CommandLineSolver(AbstractSolver):
|
||||||
The executable and list of arguments
|
The executable and list of arguments
|
||||||
"""
|
"""
|
||||||
cmd = cmd.replace("@install_dir", self._install_dir())
|
cmd = cmd.replace("@install_dir", self._install_dir())
|
||||||
|
print("format command installDir :", self._install_dir())
|
||||||
cmd = cmd.replace("@path", "\"" + path + "\"")
|
cmd = cmd.replace("@path", "\"" + path + "\"")
|
||||||
|
print("format command path :", path)
|
||||||
cmd = cmd.replace("@input", self.input_param().replace(" ", "_"))
|
cmd = cmd.replace("@input", self.input_param().replace(" ", "_"))
|
||||||
|
print("format command input :", self.input_param().replace(" ", "_"))
|
||||||
cmd = cmd.replace("@output", self.output_param())
|
cmd = cmd.replace("@output", self.output_param())
|
||||||
|
print("format command output :", self.output_param())
|
||||||
cmd = cmd.replace("@dir", self._process.workingDirectory())
|
cmd = cmd.replace("@dir", self._process.workingDirectory())
|
||||||
|
print("format command dir :", self._process.workingDirectory())
|
||||||
cmd = cmd.replace("@args", " ".join(self.cmd_args(study)))
|
cmd = cmd.replace("@args", " ".join(self.cmd_args(study)))
|
||||||
|
print("format command args :", " ".join(self.cmd_args(study)))
|
||||||
|
|
||||||
logger.debug(f"! {cmd}")
|
logger.debug(f"! {cmd}")
|
||||||
|
|
||||||
|
|
@ -237,6 +243,8 @@ class CommandLineSolver(AbstractSolver):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
cmd = self._cmd_solver
|
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)
|
exe, args = self._format_command(study, cmd, self._path_solver)
|
||||||
print("parsed cmd solver exe : ", exe)
|
print("parsed cmd solver exe : ", exe)
|
||||||
print("parsed cmd solver args : ", args)
|
print("parsed cmd solver args : ", args)
|
||||||
|
|
|
||||||
|
|
@ -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._type == "adistslc", self.conf.solvers))
|
||||||
solver = next(filter(lambda x: x.name == "AdisTS-LC", 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)
|
self.run_solver(solver)
|
||||||
|
|
||||||
def run_solver(self, solver):
|
def run_solver(self, solver):
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ class Config(SQL):
|
||||||
self.filename = Config.filename()
|
self.filename = Config.filename()
|
||||||
self.set_default_value()
|
self.set_default_value()
|
||||||
|
|
||||||
|
|
||||||
logging.info(f"Configuration file : {self.filename}")
|
logging.info(f"Configuration file : {self.filename}")
|
||||||
|
|
||||||
super(Config, self).__init__(filename=self.filename)
|
super(Config, self).__init__(filename=self.filename)
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Reference in New Issue