Changeset 173


Ignore:
Timestamp:
08/07/09 11:45:32 (7 years ago)
Author:
altafang
Message:

Temporarily restoring disp and callback as parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/alta/mystic-0.1a2/mystic/snobfit_solver.py

    r171 r173  
    131131        self.fac = 0.0 
    132132        self.fglob = 0 
     133        self.disp = False 
     134        self.callback = None 
    133135 
    134136        # Initialize some variables depending on input 
     
    136138        if kwds.has_key('fac'): self.fac = kwds['fac'] 
    137139        if kwds.has_key('fglob'): self.fglob = kwds['fglob'] 
     140        if kwds.has_key('disp'): self.disp = kwds['disp'] 
     141        if kwds.has_key('callback'): self.callback = kwds['callback'] 
    138142 
    139143        #------------------------------------------------------------- 
     
    152156        #------------------------------------------------------------- 
    153157 
     158        # to be fixed 
    154159        self.func = func 
    155160 
     
    210215 
    211216             # update function call counter 
    212              #ncall += self.nPop 
     217             #ncall += self.nPop    # <-- original snobfit function call counter 
    213218 
    214219             # best of the new function values 
     
    26722677            solver = SnobfitSoftSolver(len(x0)) 
    26732678 
    2674     solver.disp = disp 
    2675     solver.callback = callback 
    2676  
    26772679    # Problem?: SetStrictRanges must be called before SetInitialPoints 
    26782680    # In fact, _strictMin and _strictMax must always be set. Perhaps 
     
    26842686    solver.Solve(func,termination=SnobfitTermination(rtol, ftol, nstop),\ 
    26852687                 EvaluationMonitor=evalmon,StepMonitor=stepmon,\ 
    2686                  ExtraArgs=args,\ 
     2688                 ExtraArgs=args,disp=disp, callback=callback,\ 
    26872689                 p=p, fac=fac, fglob=fglob,constraint=constraint)  
    26882690    solution = solver.Solution() 
Note: See TracChangeset for help on using the changeset viewer.