Changeset 373 for branches/alta/mystic-0.2a1/test_constraints_zimmermann.py
- Timestamp:
- 08/04/10 16:07:50 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.2a1/test_constraints_zimmermann.py
r369 r373 16 16 Mystic Results: 17 17 --------------- 18 Note that more precise results could be obtained by adjusting termination, 19 since VTR's default is tol=0.005, which is pretty rough. 20 18 21 Differential Evolution, penalty 19 22 soln= [6.9934815592274999, 2.0016578755677443] … … 207 210 from differential_evolution import DifferentialEvolutionSolver 208 211 from mystic.termination import VTR 212 from mystic.termination import CandidateRelativeTolerance as CRT 209 213 from mystic.strategy import Rand1Bin 210 214 solver = DifferentialEvolutionSolver(ndim, npop) 211 215 solver.SetRandomInitialPoints(lb, ub) 212 216 solver.enable_signal_handler() 213 term = VTR() 217 #term = VTR() 218 term = CRT() # more precise 214 219 solver.Solve(costfunc, term, constraints=constraints_string, \ 215 220 constraints_method='penalty', strategy=Rand1Bin) … … 484 489 from scipy_optimize import NelderMeadSimplexSolver 485 490 from mystic.termination import VTR 491 from mystic.termination import CandidateRelativeTolerance as CRT 486 492 solver = NelderMeadSimplexSolver(ndim) 487 493 488 494 solver.SetRandomInitialPoints(lb, ub) 489 495 solver.enable_signal_handler() 490 term = VTR() 496 #term = VTR() 497 term = CRT() 491 498 solver.Solve(costfunc, term, constraints=constraints_string, \ 492 499 constraints_method='auglag')
Note: See TracChangeset
for help on using the changeset viewer.