Changeset 82 for tests/test_rosenbrock.py
- Timestamp:
- 01/26/09 16:12:08 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/test_rosenbrock.py
r5 r82 13 13 from mystic.differential_evolution import DifferentialEvolutionSolver 14 14 from mystic.detools import Best1Exp, Rand1Exp, Best2Bin, ChangeOverGeneration, VTR 15 from mystic.nelder_mead import fmin, rosen 15 from mystic.scipy_optimize_fmin import __rosen as rosen 16 from mystic.scipy_optimize_fmin import NelderMeadSimplexSolver as fmin 17 from mystic.nmtools import IterationRelativeError as IRE 16 18 from mystic import Sow 17 19 … … 45 47 esow= Sow() 46 48 ssow= Sow() 47 sol = fmin(rosen, [random.random() for j in range(ND)], full_output=1, retall=1, EvaluationMonitor=esow, SimplexMonitor=ssow) 48 print sol[0] 49 xinit = [random.random() for j in range(ND)] 50 51 solver = fmin(len(xinit)) 52 solver.SetInitialPoints(xinit) 53 killme = IRE(1e-4,1e-4) 54 solver.Solve(rosen, killme, EvaluationMonitor = esow, StepMonitor = ssow) 55 sol = solver.Solution() 56 print sol 49 57 50 58 print len(esow.x)
Note: See TracChangeset
for help on using the changeset viewer.