Changeset 172 for branches/UQ/MPITEST.py
- Timestamp:
- 08/07/09 11:28:29 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UQ/MPITEST.py
r157 r172 23 23 from pyina.differential_evolution import DifferentialEvolutionSolver2 24 24 from pyina.parallel_map2 import parallel_map 25 from mystic.termination import VTR25 from mystic.termination import CandidateRelativeTolerance as CRT 26 26 from mystic.strategy import Best1Exp 27 27 from mystic import getch, random_seed, VerboseSow, Sow … … 29 29 random_seed(123) 30 30 31 stepmon = VerboseSow() 31 #stepmon = VerboseSow(100) 32 stepmon = Sow() 32 33 evalmon = Sow() 33 34 … … 40 41 solver.SetEvaluationLimits(maxiter,maxfun) 41 42 42 solver.Solve(cost,termination=VTR(convergence_tol),strategy=Best1Exp, \ 43 tol = convergence_tol 44 solver.Solve(cost,termination=CRT(tol,tol),strategy=Best1Exp, \ 43 45 CrossProbability=crossover,ScalingFactor=percent_change, \ 44 46 StepMonitor=stepmon, EvaluationMonitor=evalmon) 45 47 48 #print solver.Solution() 46 49 diameter = -solver.bestEnergy / scale 47 50 func_evals = len(evalmon.y) … … 105 108 print " model: f(t) = x1*x2 + x3 + 2.0" 106 109 print " parameters: ['x1', 'x2', 'x3']" 110 #print " lower bounds: %s" % lower_bounds 111 #print " upper bounds: %s" % upper_bounds 107 112 print " ..." 108 113
Note: See TracChangeset
for help on using the changeset viewer.