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