Changeset 373 for branches/alta/mystic-0.2a1/mystic_test_suite.py
- Timestamp:
- 08/04/10 16:07:50 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.2a1/mystic_test_suite.py
r369 r373 1 1 #!/usr/bin/python 2 """a test suite for Mystic solvers and constraints.""" 2 """A test suite for Mystic solvers and constraints. 3 Note: VTR termination with default tolerance shouldn't work for functions 4 whose value at the minimum is negative! 5 Also, the two differential evolution solvers are global, while the other solvers 6 are local optimizers.""" 3 7 # should report clock-time, # of iterations, and # of function evaluations 4 8 … … 213 217 import numpy 214 218 from mystic.tools import random_seed 215 #random_seed(123)219 #random_seed(123) 216 220 esow = Sow() 217 221 ssow = Sow() … … 401 405 import numpy 402 406 from mystic.tools import random_seed 403 #random_seed(123)407 #random_seed(123) 404 408 esow = Sow() 405 409 ssow = Sow() … … 584 588 self.maxiter = 10000 585 589 self.nplaces = 0 # Precision of answer 586 #XXX Perhaps need something more lenient, as there are many587 # failures here.588 590 589 591 def _run_solver(self, **kwds): … … 591 593 import numpy 592 594 from mystic.tools import random_seed 593 #random_seed(123)595 random_seed(123) 594 596 esow = Sow() 595 597 ssow = Sow() … … 3010 3012 3011 3013 class 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. 3015 F(min) is negative, so VTR default can fail.""" 3013 3016 3014 3017 def setUp(self): … … 3217 3220 # Comment out suites in the list below to test specific test cost functions only 3218 3221 # (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]) 3224 3227 unittest.TextTestRunner(verbosity=2).run(allsuites)
Note: See TracChangeset
for help on using the changeset viewer.