Changeset 82 for tests/sam_rosenbrock.py
- Timestamp:
- 01/26/09 16:12:08 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/sam_rosenbrock.py
r81 r82 12 12 import sam 13 13 from test_rosenbrock import * 14 from mystic.nelder_mead import fmin, Sow 15 from mystic import getch 14 from mystic.scipy_optimize_fmin import NelderMeadSimplexSolver as fmin 15 from mystic.nmtools import IterationRelativeError as IRE 16 from mystic import getch, Sow 16 17 17 18 def draw_contour(): … … 40 41 def run_once(x0,x1): 41 42 simplex = Sow() 42 sol = fmin(rosen, [x0, x1], retall = True, StepMonitor = simplex) 43 xinit = [x0, x1] 44 45 solver = fmin(len(xinit)) 46 solver.SetInitialPoints(xinit) 47 killme = IRE(1e-4,1e-4) 48 solver.Solve(rosen, termination=killme, StepMonitor = simplex) 49 sol = solver.Solution() 43 50 44 51 for x in simplex.x:
Note: See TracChangeset
for help on using the changeset viewer.