Ignore:
Timestamp:
Nov 20, 2009 5:27:31 PM (10 years ago)
Author:
wehart
Message:

Rework of the SolverResults? object, to provide for a more explicit
definition of solver results, and to support loading of
solver results from YAML-formated data.

Location:
coopr.opt/trunk/coopr/opt/tests
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/tests/base/soln_pprint2.txt

    r1244 r1918  
    1 ----------------------------------------------------------
    2 ------  Solution 1
    3 ----------------------------------------------------------
    4   gap: None
    5   status: unsure
    6   value: None
    7   Primal Variables
    8         No nonzero values
    9   Primal Variables
    10         No nonzero values
     1
     2Status: unknown
     3Variable: No nonzero values
     4
     5No nonzero values
     6
  • coopr.opt/trunk/coopr/opt/tests/base/test1.txt

    r1072 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name:
    9   num_constraints: 3
    10   num_objectives: 2
    11   num_variables: 3
    12   sense: unknown
    13   upper_bound: None
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   id: 0
    18   instanceName:
    19   message:
    20   serviceName:
    21   serviceURI:
    22   status: ok
    23   systime: 0.0
    24   usrtime: None
    25   num_solutions: 1
    26 ----------------------------------------------------------
    27 ------  Solution 1
    28 ----------------------------------------------------------
    29   gap: None
    30   message: None
    31   other: {}
    32   status: unsure
    33   status_description:
    34   Objectives
    35         -1      1.2
    36         -2      1.2
    37   Primal Variables
    38         0       1.2
    39         1       1.2
    40         3       1.2
    41   Dual Variables
    42         0       1.2
    43         1       1.2
    44         3       1.2
    45 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4
     5# ----------------------------------------------------------
     6#   Problem Information
     7# ----------------------------------------------------------
     8Problem:
     9- Name:
     10  Lower bound: -inf
     11  Upper bound: inf
     12  Number of objectives: 2
     13  Number of constraints: 3
     14  Number of variables: 3
     15  Sense: unknown
     16
     17# ----------------------------------------------------------
     18#   Solver Information
     19# ----------------------------------------------------------
     20Solver:
     21- Status: ok
     22  Message:
     23  Termination condition: unsure
     24  ServiceURI:
     25  ServiceName:
     26  InstanceName:
     27  Systime: 0.0
     28  Id: 0
     29
     30# ----------------------------------------------------------
     31#   Solution Information
     32# ----------------------------------------------------------
     33Solution:
     34- number of solutions: 1
     35  number of solutions displayed: 1
     36- Status: unsure
     37  Message: None
     38  Objective:
     39    f0:
     40      Id: -1
     41      Value: 1.2
     42    f1:
     43      Id: -2
     44      Value: 1.2
     45  Variable:
     46    x0:
     47      Id: 0
     48      Value: 1.2
     49    x1:
     50      Id: 1
     51      Value: 1.2
     52    x3:
     53      Id: 3
     54      Value: 1.2
     55  Constraint:
     56    x0:
     57      Id: 0
     58      Dual: 1.2
     59    x1:
     60      Id: 1
     61      Dual: 1.2
     62    x3:
     63      Id: 3
     64      Dual: 1.2
     65  Status description:
     66  Other: {}
  • coopr.opt/trunk/coopr/opt/tests/base/test1_soln.txt

    r1072 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: None
    10   num_objectives: None
    11   num_variables: None
    12   sense: unknown
    13   upper_bound: None
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   status: ok
    18   systime: None
    19   usrtime: None
    20   num_solutions: 1
    21 ----------------------------------------------------------
    22 ------  Solution 1
    23 ----------------------------------------------------------
    24   gap: None
    25   status: unsure
    26   value: None
    27 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4# ----------------------------------------------------------
     5#   Solution Information
     6# ----------------------------------------------------------
     7Solution:
     8- number of solutions: 1
     9  number of solutions displayed: 1
     10- Status: unknown
     11  Variable: No nonzero values
  • coopr.opt/trunk/coopr/opt/tests/base/test2_soln.txt

    r1248 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: None
    10   num_objectives: None
    11   num_variables: None
    12   sense: unknown
    13   upper_bound: None
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   status: ok
    18   systime: None
    19   usrtime: None
    20   num_solutions to display: 0
    21 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4# ----------------------------------------------------------
     5#   Solution Information
     6# ----------------------------------------------------------
     7Solution:
     8- number of solutions: 1
     9  number of solutions displayed: 1
     10- Status: unknown
     11  Variable: No nonzero values
  • coopr.opt/trunk/coopr/opt/tests/base/test3_soln.txt

    r1072 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: None
    10   num_objectives: None
    11   num_variables: None
    12   sense: unknown
    13   upper_bound: None
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   status: ok
    18   systime: None
    19   usrtime: None
    20   num_solutions: 1
    21 ----------------------------------------------------------
    22 ------  Solution 1
    23 ----------------------------------------------------------
    24   gap: None
    25   status: unsure
    26   value: None
    27   Primal Variables
    28         No nonzero values
    29 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4# ----------------------------------------------------------
     5#   Solution Information
     6# ----------------------------------------------------------
     7Solution:
     8- number of solutions: 1
     9  number of solutions displayed: 1
     10- Status: unknown
     11  Variable: No nonzero values
  • coopr.opt/trunk/coopr/opt/tests/base/test4_sol.txt

    r1794 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: 24
    10   num_objectives: 1
    11   num_variables: 32
    12   sense: unknown
    13   upper_bound: None
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   id: 0
    18   message: PICO Solver: final f = 88.200000
    19   status: ok
    20   systime: None
    21   usrtime: None
    22   num_solutions: 1
    23 ----------------------------------------------------------
    24 ------  Solution 1
    25 ----------------------------------------------------------
    26   gap: None
    27   message: PICO Solver: final f = 88.200000
    28   status: unsure
    29   value: None
    30   Primal Variables
    31         v4      46.6666666667
    32         v11     933.333333333
    33         v12     10000.0
    34         v13     10000.0
    35         v14     10000.0
    36         v15     10000.0
    37         v17     100.0
    38         v19     100.0
    39         v21     100.0
    40         v23     100.0
    41         v24     46.6666666667
    42         v25     53.3333333333
    43         v27     100.0
    44         v29     100.0
    45         v31     100.0
    46   Dual Variables
    47         c2      0.126
    48 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4
     5# ----------------------------------------------------------
     6#   Problem Information
     7# ----------------------------------------------------------
     8Problem:
     9- Lower bound: -inf
     10  Upper bound: inf
     11  Number of objectives: 1
     12  Number of constraints: 24
     13  Number of variables: 32
     14  Sense: unknown
     15
     16# ----------------------------------------------------------
     17#   Solver Information
     18# ----------------------------------------------------------
     19Solver:
     20- Status: ok
     21  Message: PICO Solver\x3a final f = 88.200000
     22  Termination condition: unsure
     23  Id: 0
     24
     25# ----------------------------------------------------------
     26#   Solution Information
     27# ----------------------------------------------------------
     28Solution:
     29- number of solutions: 1
     30  number of solutions displayed: 1
     31- Status: unknown
     32  Message: PICO Solver\x3a final f = 88.200000
     33  Variable:
     34    v4:
     35      Id: 4
     36      Value: 46.6666666667
     37    v11:
     38      Id: 11
     39      Value: 933.333333333
     40    v12:
     41      Id: 12
     42      Value: 10000.0
     43    v13:
     44      Id: 13
     45      Value: 10000.0
     46    v14:
     47      Id: 14
     48      Value: 10000.0
     49    v15:
     50      Id: 15
     51      Value: 10000.0
     52    v17:
     53      Id: 17
     54      Value: 100.0
     55    v19:
     56      Id: 19
     57      Value: 100.0
     58    v21:
     59      Id: 21
     60      Value: 100.0
     61    v23:
     62      Id: 23
     63      Value: 100.0
     64    v24:
     65      Id: 24
     66      Value: 46.6666666667
     67    v25:
     68      Id: 25
     69      Value: 53.3333333333
     70    v27:
     71      Id: 27
     72      Value: 100.0
     73    v29:
     74      Id: 29
     75      Value: 100.0
     76    v31:
     77      Id: 31
     78      Value: 100.0
     79  Constraint:
     80    c2:
     81      Id: 2
     82      Dual: 0.126
  • coopr.opt/trunk/coopr/opt/tests/base/test_os.py

    r1768 r1918  
    2121pyutilib.services.TempfileManager.tempdir = currdir
    2222
    23 class OptOSDebug(pyutilib.th.TestCase):
     23class Test(pyutilib.th.TestCase):
    2424
    2525    def setUp(self):
     
    134134        reader = coopr.opt.ReaderFactory("osrl")
    135135        soln = reader(currdir+"test1.OSrL.xml")
    136         soln.write(currdir+"test_os.txt")
     136        soln.write(filename=currdir+"test_os.txt")
    137137        #
    138138        # Compare with baseline
  • coopr.opt/trunk/coopr/opt/tests/base/test_sol.py

    r1768 r1918  
    2020
    2121
    22 class OptSolDebug(pyutilib.th.TestCase):
     22class Test(pyutilib.th.TestCase):
    2323
    2424    def setUp(self):
     
    3636        reader = coopr.opt.ReaderFactory("sol")
    3737        soln = reader(currdir+"test4_sol.sol")
    38         soln.write(currdir+"factory.txt")
     38        soln.write(filename=currdir+"factory.txt")
    3939        self.failUnlessFileEqualsBaseline(currdir+"factory.txt", currdir+"test4_sol.txt")
    4040       
  • coopr.opt/trunk/coopr/opt/tests/base/test_soln.py

    r1768 r1918  
    2020import xml
    2121
    22 class OptSolnDebug(pyutilib.th.TestCase):
     22class Test(pyutilib.th.TestCase):
    2323
    2424    def setUp(self):
    2525        pyutilib.services.TempfileManager.tempdir = currdir
    2626        self.results = coopr.opt.SolverResults()
    27         self.soln = self.results.solution.create()
    28 
    29     def tmp(self):
     27        self.soln = self.results.solution.add()
    3028        self.soln.variable[0]=0.0
    3129        self.soln.variable[1]=0.0
     
    5048        self.failUnlessFileEqualsBaseline(currdir+"write_solution2.txt", currdir+"test2_soln.txt")
    5149
    52     def test_delete_solution(self):
     50    def test_read_solution1(self):
     51        """ Read a SolverResults Object"""
     52        self.results = coopr.opt.SolverResults()
     53        self.results.read(filename=currdir+"test4_sol.txt")
     54        self.results.write(filename=currdir+"read_solution1.out")
     55        if not os.path.exists(currdir+"read_solution1.out"):
     56           self.fail("test_read_solution1 - failed to write read_solution1.out")
     57        self.failUnlessFileEqualsBaseline(currdir+"read_solution1.out", currdir+"test4_sol.txt")
     58
     59    #
     60    # deleting is not supported right now
     61    #
     62    def Xtest_delete_solution(self):
    5363        """ Delete a solution from a SolverResults object """
    5464        self.results.solution.delete(0)
     
    7181           pass
    7282
    73     def test_set_solution_attr_error(self):
     83    #
     84    # This is currently allowed, although soln.variable = True is equivalent to
     85    #   soln.variable.value = True
     86    #
     87    def Xtest_set_solution_attr_error(self):
    7488        """ Create an error with a solution suffix """
    7589        try:
    7690           self.soln.variable = True
    77            self.fail("Expected attribute error failure for 'var'")
     91           self.fail("Expected attribute error failure for 'variable'")
    7892        except AttributeError:
    7993           pass
     
    8195    def test_soln_pprint1(self):
    8296        """ Write a solution with only zero values, using the results 'write()' method """
    83         self.soln.variable.add(0,0.0)
    84         self.soln.variable.add(1,0.0)
    85         self.soln.variable.add(3,0.0)
     97        self.soln.variable[0]=0.0
     98        self.soln.variable[1]=0.0
     99        self.soln.variable[3]=0.0
    86100        self.results.write(filename=currdir+"soln_pprint.txt")
    87101        if not os.path.exists(currdir+"soln_pprint.txt"):
     
    91105    def test_soln_pprint2(self):
    92106        """ Write a solution with only zero values, using the Solution.pprint() method """
    93         self.soln.variable.add(0,0.0)
    94         self.soln.variable.add(1,0.0)
    95         self.soln.variable.add(3,0.0)
     107        self.soln.variable[0]=0.0
     108        self.soln.variable[1]=0.0
     109        self.soln.variable[3]=0.0
    96110        pyutilib.misc.setup_redirect(currdir+"soln_pprint2.out")
    97         self.soln.pprint()
    98         self.soln._variable.pprint()
     111        print self.soln
     112        print self.soln.variable
    99113        pyutilib.misc.reset_redirect()
    100114        self.failUnlessFileEqualsBaseline(currdir+"soln_pprint2.out", currdir+"soln_pprint2.txt")
     
    102116    def test_soln_suffix_iter(self):
    103117        """ Test a suffix iterator """
    104         self.soln.variable.add(0,0.0)
    105         self.soln.variable.add(1,0.1)
    106         self.soln.variable.add(3,0.3)
     118        self.soln.variable[0]=0.0
     119        self.soln.variable[1]=0.1
     120        self.soln.variable[3]=0.3
    107121        i=0
    108         for val in self.soln.variable:
     122        for key in self.soln.variable:
    109123          i=i+1
    110           self.failUnlessEqual(val[1], val[0]/10.0)
     124          self.failUnlessEqual(self.soln.variable[key].value, self.soln.variable[key].id/10.0)
    111125        self.failUnlessEqual(i,len(self.soln.variable))
    112126
    113127    def test_soln_suffix_getiter(self):
    114         self.soln.variable.add("x0",0.0)
    115         self.soln.variable.add(1,0.1)
    116         self.soln.variable.add("x3",0.3)
    117         #print "HERE", self.soln.variable._index.keys()
    118         self.failUnlessEqual(self.soln.variable["x3"],0.3)
    119         self.failUnlessEqual(self.soln.variable[1],0.1)
     128        self.soln.variable["x0"]=0.0
     129        self.soln.variable[1]=0.1
     130        self.soln.variable["x3"]=0.3
     131        self.failUnlessEqual(self.soln.variable["x3"].value,0.3)
     132        #print "HERE",self.soln.variable._names
     133        self.failUnlessEqual(self.soln.variable[1].value,0.1)
    120134
    121135    def test_soln_suffix_setattr(self):
    122         self.soln.variable.add("x(0)",0.0)
    123         self.soln.variable.add("x3",0.3)
    124         self.soln.variable.add("y[1,ab]",0.5)
     136        self.soln.variable["x(0)"] = 0.0
     137        self.soln.variable["x3"]=0.3
     138        self.soln.variable["x3"].slack=0.4
     139        self.soln.variable["y[1,ab]"]=0.5
     140        #self.soln.variable.z[0,'a']=2.0
     141        #print "HERE",self.soln.variable._names
     142        #print "HERE",self.soln.variable.__dict__.keys()
     143        #print "HERE",self.soln.variable.keys()
     144        #print "HERE",self.soln.variable.__getitem__('y[1,ab]')
     145        #print "HERE",repr(self.soln.variable.x)
     146        #print "HERE",repr(self.soln.variable.x[0])
     147        #print "HERE",repr(self.soln.variable.y)
     148        #print "HERE",repr(self.soln.variable.y[1,'ab'])
     149        #print "HERE",repr(self.soln.variable.z)
     150        #print "HERE",repr(self.soln.variable.z[0,'a'])
     151        #print "HERE",repr(self.soln.variable.foo('x(0)'))
    125152        #self.soln.pprint()
    126153        #print "HERE", self.soln.variable._index.keys()
    127154        self.failUnlessEqual(self.soln.variable.x.keys(),[0])
    128         self.failUnlessEqual(self.soln.variable.x[0],0.0)
    129         self.failUnlessEqual(self.soln.variable.x3,0.3)
     155        self.failUnlessEqual(self.soln.variable.x[0].value,0.0)
     156        self.failUnlessEqual(self.soln.variable.x3.value,0.3)
     157        self.failUnlessEqual(self.soln.variable.x3.slack,0.4)
    130158        self.failUnlessEqual(self.soln.variable.y.keys(),[(1,'ab')])
    131         self.failUnlessEqual(self.soln.variable.y[1,'ab'],0.5)
    132 
     159        self.failUnlessEqual(self.soln.variable.y[1,'ab'].value,0.5)
    133160
    134161
    135162if __name__ == "__main__":
    136    unittest.main()
     163    import pyutilib.misc
     164    #sys.settrace(pyutilib.misc.traceit)
     165    unittest.main()
  • coopr.opt/trunk/coopr/opt/tests/colin/test1_ps.txt

    r1254 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: 0
    10   num_objectives: 1
    11   num_variables: None
    12   sense: minimize
    13   upper_bound: 1.92623278941e-7
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   curr_iteration: 71
    18   final_delta: 8.24113785813e-6
    19   status: ok
    20   num_solutions: 1
    21 ----------------------------------------------------------
    22 ------  Solution 1
    23 ----------------------------------------------------------
    24   gap: None
    25   status: bestSoFar
    26   value: 1.92623278941e-7
    27   Primal Variables
    28         1       -1.92622619169e-7
    29         2       1.50000081226
    30         3       -1.99999209991
    31 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4
     5# ----------------------------------------------------------
     6#   Problem Information
     7# ----------------------------------------------------------
     8Problem:
     9- Lower bound: -inf
     10  Upper bound: 1.92623278941e-07
     11  Number of objectives: 1
     12  Number of constraints: 0
     13  Number of variables: 4
     14  Sense: minimize
     15
     16# ----------------------------------------------------------
     17#   Solver Information
     18# ----------------------------------------------------------
     19Solver:
     20- Status: ok
     21  Termination condition: minStepLength
     22  Termination message: 8.24113785813e-06 < 1e-05
     23  Number of iterations: 71
     24  Final step length: 8.24113785813e-06
     25
     26# ----------------------------------------------------------
     27#   Solution Information
     28# ----------------------------------------------------------
     29Solution:
     30- number of solutions: 1
     31  number of solutions displayed: 1
     32- Status: bestSoFar
     33  Objective:
     34    f:
     35      Id: 0
     36      Value: 1.92623278941e-07
     37  Variable:
     38    x1:
     39      Id: 1
     40      Value: -1.92622619169e-07
     41    x2:
     42      Id: 2
     43      Value: 1.50000081226
     44    x3:
     45      Id: 3
     46      Value: -1.99999209991
  • coopr.opt/trunk/coopr/opt/tests/colin/test2_ps.txt

    r1254 r1918  
    1 ==========================================================
    2 ---  Solver Results                                    ---
    3 ==========================================================
    4 ----------------------------------------------------------
    5 ------  Problem Information                         ------
    6 ----------------------------------------------------------
    7   lower_bound: None
    8   name: None
    9   num_constraints: 0
    10   num_objectives: 1
    11   num_variables: None
    12   sense: minimize
    13   upper_bound: 0.0708829578448
    14 ----------------------------------------------------------
    15 ------  Solver Information                          ------
    16 ----------------------------------------------------------
    17   curr_iteration: 9
    18   final_delta: 2.37037037037
    19   status: ok
    20   num_solutions: 1
    21 ----------------------------------------------------------
    22 ------  Solution 1
    23 ----------------------------------------------------------
    24   gap: None
    25   status: bestSoFar
    26   value: 0.0708829578448
    27   Primal Variables
    28         1       -0.0333333333333
    29         2       1.6
    30         3       -1.59259259259
    31 ----------------------------------------------------------
     1# ==========================================================
     2# = Solver Results                                         =
     3# ==========================================================
     4
     5# ----------------------------------------------------------
     6#   Problem Information
     7# ----------------------------------------------------------
     8Problem:
     9- Lower bound: -inf
     10  Upper bound: 0.0708829578448
     11  Number of objectives: 1
     12  Number of constraints: 0
     13  Number of variables: 4
     14  Sense: minimize
     15
     16# ----------------------------------------------------------
     17#   Solver Information
     18# ----------------------------------------------------------
     19Solver:
     20- Status: ok
     21  Termination condition: minFunctionValue
     22  Termination message: 0.0708829578448 < 0.1
     23  Number of iterations: 9
     24  Final step length: 2.37037037037
     25
     26# ----------------------------------------------------------
     27#   Solution Information
     28# ----------------------------------------------------------
     29Solution:
     30- number of solutions: 1
     31  number of solutions displayed: 1
     32- Status: bestSoFar
     33  Objective:
     34    f:
     35      Id: 0
     36      Value: 0.0708829578448
     37  Variable:
     38    x1:
     39      Id: 1
     40      Value: -0.0333333333333
     41    x2:
     42      Id: 2
     43      Value: 1.6
     44    x3:
     45      Id: 3
     46      Value: -1.59259259259
  • coopr.opt/trunk/coopr/opt/tests/colin/test_parallel.py

    r1794 r1918  
    131131        self.ps.reset()
    132132        results = self.ps.solve(logfile=currdir+"test_solve1.log")
    133         results.write(currdir+"test_solve1.txt",times=False)
     133        results.write(filename=currdir+"test_solve1.txt",times=False)
    134134        self.failUnlessFileEqualsBaseline(currdir+"test_solve1.txt", currdir+"test1_ps.txt")
    135135        if os.path.exists(currdir+"test_solve1.log"):
     
    144144        mngr = coopr.opt.parallel.SolverManagerFactory("serial")
    145145        results = mngr.solve(opt=self.ps, logfile=currdir+"test_solve2.log")
    146         results.write(currdir+"test_solve2.txt",times=False)
     146        results.write(filename=currdir+"test_solve2.txt",times=False)
    147147        self.failUnlessFileEqualsBaseline(currdir+"test_solve2.txt", currdir+"test1_ps.txt")
    148148        if os.path.exists(currdir+"test_solve2.log"):
     
    216216        mngr = SolverManager_DelayedSerial()
    217217        results = mngr.solve(opt=self.ps, logfile=currdir+"test_solve4.log")
    218         results.write(currdir+"test_solve4.txt",times=False)
     218        results.write(filename=currdir+"test_solve4.txt",times=False)
    219219        self.failUnlessFileEqualsBaseline(currdir+"test_solve4.txt", currdir+
    220220"test1_ps.txt")
  • coopr.opt/trunk/coopr/opt/tests/colin/test_ps.py

    r1768 r1918  
    5656        self.ps.reset()
    5757        results = self.ps.solve(logfile=currdir+"test_solve1.log")
    58         results.write(currdir+"test_solve1.txt",times=False)
     58        results.write(filename=currdir+"test_solve1.txt",times=False)
    5959        self.failUnlessFileEqualsBaseline(currdir+"test_solve1.txt", currdir+"test1_ps.txt")
    6060        if os.path.exists(currdir+"test_solve1.log"):
     
    6969        self.ps.min_function_value = 1e-1
    7070        results = self.ps.solve(logfile=currdir+"test_solve2.log")
    71         results.write(currdir+"test_solve2.txt",times=False)
     71        results.write(filename=currdir+"test_solve2.txt",times=False)
    7272        self.failUnlessFileEqualsBaseline(currdir+"test_solve2.txt", currdir+"test2_ps.txt")
    7373        if os.path.exists(currdir+"test_solve2.log"):
Note: See TracChangeset for help on using the changeset viewer.