Changeset 1474


Ignore:
Timestamp:
07/30/09 16:19:50 (5 years ago)
Author:
jwatson
Message:

CPLEX was not re-generating a temporary name for solution and log files at each invocation, rather re-using the first one it generated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coopr/plugins/mip/CPLEX.py

    r1473 r1474  
    5555        # The log file in CPLEX contains the solution trace, but the solver status can be found in the solution file. 
    5656        # 
    57         if self.log_file is None: 
    58             self.log_file = pyutilib.TempfileManager.create_tempfile(suffix = '.cplex.log') 
     57        self.log_file = pyutilib.TempfileManager.create_tempfile(suffix = '.cplex.log') 
    5958 
    6059        # 
     
    6261        # As indicated above, contains (in XML) both the solution and solver status. 
    6362        # 
    64         if self.soln_file is None: 
    65             self.soln_file = pyutilib.TempfileManager.create_tempfile(suffix = '.cplex.sol') 
     63        self.soln_file = pyutilib.TempfileManager.create_tempfile(suffix = '.cplex.sol') 
    6664 
    6765        # 
     
    8280        if self._timelimit is not None and self._timelimit > 0.0: 
    8381            cplex_script_file.write("set timelimit "+`self._timelimit`+"\n") 
    84         cplex_script_file.write("set mip tolerances mipgap 0.20"+"\n")             
    8582        for key in self.options: 
    8683                if isinstance(self.options[key],basestring) and ' ' in self.options[key]: 
     
    240237 
    241238    def remove_files(self): 
    242         return 
     239 
    243240        # the base class takes care of most cleanup 
    244241        ILMLicensedSystemCallSolver.remove_files(self) 
Note: See TracChangeset for help on using the changeset viewer.