- Timestamp:
- 10/06/14 14:39:52 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/mystic/ensemble.py
r761 r762 85 85 # process and activate input settings 86 86 settings = self._process_inputs(kwds) 87 disp=0 87 disp = settings.get('disp', False) 88 echo = settings.get('callback', None) #XXX: every iteration every run 88 89 # for key in settings: 89 90 # exec "%s = settings['%s']" % (key,key) … … 141 142 142 143 # generate the local_optimize function 143 def local_optimize(solver, x0, rank=None, disp=verbose ):144 def local_optimize(solver, x0, rank=None, disp=verbose, callback=echo): 144 145 solver.id = rank 145 146 solver.SetInitialPoints(x0) … … 147 148 solver.SetStrictRanges(min=solver._strictMin, \ 148 149 max=solver._strictMax) # or lower,upper ? 149 solver.Solve(cost, disp=disp )150 solver.Solve(cost, disp=disp, callback=callback) 150 151 return solver 151 152 … … 249 250 # process and activate input settings 250 251 settings = self._process_inputs(kwds) 251 disp=0 252 disp = settings.get('disp', False) 253 echo = settings.get('callback', None) #XXX: every iteration every run 252 254 # for key in settings: 253 255 # exec "%s = settings['%s']" % (key,key) … … 298 300 299 301 # generate the local_optimize function 300 def local_optimize(solver, x0, rank=None, disp=verbose ):302 def local_optimize(solver, x0, rank=None, disp=verbose, callback=echo): 301 303 solver.id = rank 302 304 solver.SetInitialPoints(x0) … … 304 306 solver.SetStrictRanges(min=solver._strictMin, \ 305 307 max=solver._strictMax) # or lower,upper ? 306 solver.Solve(cost, disp=disp )308 solver.Solve(cost, disp=disp, callback=callback) 307 309 return solver 308 310 … … 467 469 468 470 # code below here pushes output to scipy.optimize.fmin interface 469 msg = solver.CheckTermination(disp= disp, info=True)471 msg = solver.CheckTermination(disp=False, info=True) 470 472 471 473 x = solver.bestSolution … … 598 600 599 601 # code below here pushes output to scipy.optimize.fmin interface 600 msg = solver.CheckTermination(disp= disp, info=True)602 msg = solver.CheckTermination(disp=False, info=True) 601 603 602 604 x = solver.bestSolution
Note: See TracChangeset
for help on using the changeset viewer.