Changeset 82 for tests/sam_zimmermann.py
- Timestamp:
- 01/26/09 16:12:08 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/sam_zimmermann.py
r81 r82 12 12 import sam 13 13 from test_zimmermann import * 14 from mystic.nelder_mead import fmin 14 from mystic.scipy_optimize_fmin import NelderMeadSimplexSolver as fmin 15 from mystic.nmtools import IterationRelativeError as IRE 15 16 from mystic import getch, Sow 16 17 … … 39 40 def run_once(): 40 41 simplex = Sow() 41 sol = fmin(CostFunction, [random.uniform(0,7), random.uniform(0,7)], retall = True, StepMonitor = simplex) 42 42 solver = fmin(2) 43 solver.SetRandomInitialPoints([0,0],[7,7]) 44 killme = IRE(1e-4,1e-4) 45 solver.Solve(CostFunction, termination=killme, StepMonitor = simplex) 46 sol = solver.Solution() 47 43 48 for x in simplex.x: 44 49 sam.putarray('x',x)
Note: See TracChangeset
for help on using the changeset viewer.