Ignore:
Timestamp:
08/04/10 16:07:50 (6 years ago)
Author:
altafang
Message:

Fixing minor things, adjusting termination conditions on tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alta/mystic-0.2a1/mystic_test_suite.py

    r369 r373  
    11#!/usr/bin/python 
    2 """a test suite for Mystic solvers and constraints.""" 
     2"""A test suite for Mystic solvers and constraints. 
     3Note: VTR termination with default tolerance shouldn't work for functions  
     4whose value at the minimum is negative! 
     5Also, the two differential evolution solvers are global, while the other solvers 
     6are local optimizers.""" 
    37# should report clock-time, # of iterations, and # of function evaluations 
    48 
     
    213217        import numpy 
    214218        from mystic.tools import random_seed 
    215        #random_seed(123) 
     219        #random_seed(123) 
    216220        esow = Sow() 
    217221        ssow = Sow()  
     
    401405        import numpy 
    402406        from mystic.tools import random_seed 
    403        #random_seed(123) 
     407        #random_seed(123) 
    404408        esow = Sow() 
    405409        ssow = Sow()  
     
    584588        self.maxiter = 10000 
    585589        self.nplaces = 0 # Precision of answer  
    586                          #XXX Perhaps need something more lenient, as there are many 
    587                          # failures here. 
    588590 
    589591    def _run_solver(self, **kwds): 
     
    591593        import numpy 
    592594        from mystic.tools import random_seed 
    593        #random_seed(123) 
     595        random_seed(123) 
    594596        esow = Sow() 
    595597        ssow = Sow()  
     
    30103012 
    30113013class TestPaviani(unittest.TestCase): 
    3012     """Paviani's function, or TP110 of Schittkowski's test problems.""" 
     3014    """Paviani's function, or TP110 of Schittkowski's test problems. 
     3015F(min) is negative, so VTR default can fail.""" 
    30133016 
    30143017    def setUp(self): 
     
    32173220    # Comment out suites in the list below to test specific test cost functions only 
    32183221    # (Testing all the problems will take some time) 
    3219     allsuites = unittest.TestSuite([suite1, suite2, suite3, suite4, suite5, \ 
    3220                                     suite6, suite7, suite8, suite9, suite10, \ 
    3221                                     suite11, suite12, suite13, suite14,\ 
    3222                                     suite15, suite16, suite17]) 
    3223     #allsuites = unittest.TestSuite([suite1]) 
     3222    #allsuites = unittest.TestSuite([suite1, suite2, suite3, suite4, suite5, \ 
     3223    #                                suite6, suite7, suite8, suite9, suite10, \ 
     3224    #                                suite11, suite12, suite13, suite14,\ 
     3225    #                                suite15, suite16, suite17]) 
     3226    allsuites = unittest.TestSuite([suite4]) 
    32243227    unittest.TextTestRunner(verbosity=2).run(allsuites) 
Note: See TracChangeset for help on using the changeset viewer.