예제 #1
0
파일: pathampl.py 프로젝트: vova292/pyomo
 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
예제 #2
0
파일: pathampl.py 프로젝트: Pyomo/pyomo
 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
예제 #3
0
 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)
예제 #4
0
파일: pathampl.py 프로젝트: vova292/pyomo
 def create_command_line(self, executable, problem_files):
     self.options.solver = 'pathampl'
     return ASL.create_command_line(self, executable, problem_files)
예제 #5
0
파일: pathampl.py 프로젝트: Pyomo/pyomo
 def create_command_line(self, executable, problem_files):
     self.options.solver = 'pathampl'
     return ASL.create_command_line(self, executable, problem_files)