Changeset 172 for branches/UQ/MPITEST.py


Ignore:
Timestamp:
08/07/09 11:28:29 (7 years ago)
Author:
mmckerns
Message:

bugfix in termination condition choice for UQ & parameter sensitivity
added explicit parameter sensitivity case (TEST2b.py)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UQ/MPITEST.py

    r157 r172  
    2323  from pyina.differential_evolution import DifferentialEvolutionSolver2 
    2424  from pyina.parallel_map2 import parallel_map 
    25   from mystic.termination import VTR 
     25  from mystic.termination import CandidateRelativeTolerance as CRT 
    2626  from mystic.strategy import Best1Exp 
    2727  from mystic import getch, random_seed, VerboseSow, Sow 
     
    2929  random_seed(123) 
    3030 
    31   stepmon = VerboseSow() 
     31 #stepmon = VerboseSow(100) 
     32  stepmon = Sow() 
    3233  evalmon = Sow() 
    3334 
     
    4041  solver.SetEvaluationLimits(maxiter,maxfun) 
    4142 
    42   solver.Solve(cost,termination=VTR(convergence_tol),strategy=Best1Exp, \ 
     43  tol = convergence_tol 
     44  solver.Solve(cost,termination=CRT(tol,tol),strategy=Best1Exp, \ 
    4345               CrossProbability=crossover,ScalingFactor=percent_change, \ 
    4446               StepMonitor=stepmon, EvaluationMonitor=evalmon) 
    4547 
     48 #print solver.Solution() 
    4649  diameter = -solver.bestEnergy / scale 
    4750  func_evals = len(evalmon.y) 
     
    105108    print " model: f(t) = x1*x2 + x3 + 2.0" 
    106109    print " parameters: ['x1', 'x2', 'x3']" 
     110   #print " lower bounds: %s" % lower_bounds 
     111   #print " upper bounds: %s" % upper_bounds 
    107112    print " ..." 
    108113 
Note: See TracChangeset for help on using the changeset viewer.