def __init__(self, **kwds): # # Call base constructor # kwds["type"] = "path" ASL.__init__(self, **kwds) self._metasolver = False # # Define solver capabilities, which default to 'None' # self._capabilities = Bunch() self._capabilities.linear = True
def __init__(self, **kwds): # # Call base constructor # kwds["type"] = "path" ASL.__init__(self, **kwds) self._metasolver = False # # Define solver capabilities, which default to 'None' # self._capabilities = pyutilib.misc.Options() self._capabilities.linear = True
def _postsolve(self): stub = os.path.splitext(self._soln_file)[0] # There is a type file created by the solver to give the variable types # this is needed to read the trajectory data, and we want to include it # with other tmp files typ_file = stub + ".typ" TempfileManager.add_tempfile(typ_file) # If the vars_stub option was specified, copy the col and typ files to # the working directory. These files are needed to get the names and # types of variables and to make sense of trajectory data. if self._ts_vars_stub is not None: try: shutil.copyfile(f"{stub}.col", f"{self._ts_vars_stub}.col") except: pass try: shutil.copyfile(f"{stub}.typ", f"{self._ts_vars_stub}.typ") except: pass return ASL._postsolve(self)
def create_command_line(self, executable, problem_files): self.options.solver = 'pathampl' return ASL.create_command_line(self, executable, problem_files)