Changeset 1797


Ignore:
Timestamp:
Nov 3, 2009 3:02:44 PM (10 years ago)
Author:
wehart
Message:

Resolving testing issues. Needed to update some test baselines.

Note: this fix may have broken the behavior of the CBC NEOS plugin. I'll
have to confirm the behavior of that plugin.

Location:
trunk
Files:
7 edited

Legend:

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

    r1794 r1797  
    3737        self._valid_result_formats={}
    3838        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.log]
    39         self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.sol]
     39        self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.log]
     40        #self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.sol]
    4041        self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.log]
    4142
     
    9091                problem_filename_prefix = tmp[0]
    9192
    92         self.soln_file = problem_filename_prefix+".sol"
     93        if self.soln_file is None:
     94            self.soln_file = self.soln_file = pyutilib.services.TempfileManager.create_tempfile(suffix=fname+".soln")
     95        self.sol_file = problem_filename_prefix+".sol"
    9396
    9497        #
     
    244247
    245248    def process_other_data(self,results):
    246 
    247         # if the results format is SOL, then the results have already been read. otherwise,
    248         # parse the CBC-specific format.
    249         if self._results_format is ResultsFormat.sol:
    250            return
     249        if os.path.exists(self.sol_file):
     250            results_reader = ReaderFactory(ResultsFormat.sol)
     251            results = results_reader(self.sol_file, results, results.solution(0))
     252            return
    251253
    252254        solution = results.solution(0)
  • trunk/coopr/plugins/mip/PICO.py

    r1768 r1797  
    7272        elif self._results_format == ResultsFormat.sol:
    7373           self.results_file = self.log_file
    74            #self.results_file = self.tmpDir+os.sep+fname+".log"
     74        else:
     75           self.results_file = self.soln_file
    7576        # 
    7677        # Eventually, these formats will be added to PICO...
  • trunk/test/plugins/mip/test4_cplex.txt

    r1794 r1797  
    2727  value: 88.578
    2828  Primal Variables
    29         v4      46.8666666667
     29        x4      46.8666666667
    3030  Dual Variables
    3131        cons2   0.126
  • trunk/test/plugins/mip/test4_glpk.txt

    r1794 r1797  
    2727  value: 88.578
    2828  Primal Variables
    29         v4      46.8667
     29        x4      46.8667
    3030  Dual Variables
    31         c2      0.126
     31        cons2   0.126
    3232----------------------------------------------------------
  • trunk/test/plugins/mip/test_cbc.py

    r1768 r1797  
    8484        results.write(currdir+"test_solve3.txt",times=False)
    8585        self.failUnlessFileEqualsBaseline(currdir+"test_solve3.txt", currdir+"test2_cbc.txt")
    86         #os.remove(currdir+"test_solve3.log")
    87         #os.remove(currdir+"test2.soln")
     86        os.remove(currdir+"test_solve3.log")
     87        os.remove(currdir+"test2.soln")
    8888       
    8989    def test_solve4(self):
     
    106106        results.write(currdir+"test_options.txt",times=False)
    107107        self.failUnlessFileEqualsBaseline(currdir+"test_options.txt", currdir+  "test4_cbc.txt")
    108         #os.remove(currdir+"test4.sol")
    109         #os.remove(currdir+"test_solve4.log")
     108        os.remove(currdir+"test4.sol")
     109        os.remove(currdir+"test_solve4.log")
    110110
    111111    def Xtest_prod(self):
  • trunk/test/plugins/mip/test_cplex.py

    r1768 r1797  
    9393    def test_solve4(self):
    9494        """ Test CPLEX - test4.nl """
    95         if pico_convert_available:
     95        if pico_convert_available:
    9696            results = self.cplex.solve(currdir+"test4.nl", logfile=currdir+"test_solve4.log")
    9797            results.write(currdir+"test_solve4.txt",times=False)
  • trunk/test/plugins/mip/test_glpk.py

    r1794 r1797  
    9595        #if os.path.exists(currdir+"ipconvert.lp"):
    9696           #os.remove(currdir+"ipconvert.lp")
    97         #os.remove(currdir+"test4.soln")
     97        os.remove(currdir+"test4.soln")
    9898       
    9999    def Xtest_solve5(self):
Note: See TracChangeset for help on using the changeset viewer.