Changeset 173
- Timestamp:
- 08/07/09 11:45:32 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alta/mystic-0.1a2/mystic/snobfit_solver.py
r171 r173 131 131 self.fac = 0.0 132 132 self.fglob = 0 133 self.disp = False 134 self.callback = None 133 135 134 136 # Initialize some variables depending on input … … 136 138 if kwds.has_key('fac'): self.fac = kwds['fac'] 137 139 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'] 138 142 139 143 #------------------------------------------------------------- … … 152 156 #------------------------------------------------------------- 153 157 158 # to be fixed 154 159 self.func = func 155 160 … … 210 215 211 216 # update function call counter 212 #ncall += self.nPop 217 #ncall += self.nPop # <-- original snobfit function call counter 213 218 214 219 # best of the new function values … … 2672 2677 solver = SnobfitSoftSolver(len(x0)) 2673 2678 2674 solver.disp = disp2675 solver.callback = callback2676 2677 2679 # Problem?: SetStrictRanges must be called before SetInitialPoints 2678 2680 # In fact, _strictMin and _strictMax must always be set. Perhaps … … 2684 2686 solver.Solve(func,termination=SnobfitTermination(rtol, ftol, nstop),\ 2685 2687 EvaluationMonitor=evalmon,StepMonitor=stepmon,\ 2686 ExtraArgs=args, \2688 ExtraArgs=args,disp=disp, callback=callback,\ 2687 2689 p=p, fac=fac, fglob=fglob,constraint=constraint) 2688 2690 solution = solver.Solution()
Note: See TracChangeset
for help on using the changeset viewer.