Ignore:
Timestamp:
01/07/13 23:23:35 (3 years ago)
Author:
mmckerns
Message:

fix: updated sumt penalty restarts for changes to solver internals;
fix: don't use self.generations in the solver step method;
scipy_optimize.fmin now is single-step iterable;
_setSimplexWithinRangeBoundary gets x0 directly from self.population

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/decorate/restarts.py

    r631 r638  
    3737        # 'Clear' some of the attributes of the solver 
    3838        solver.population = [[0.0 for i in range(solver.nDim)] for j in range(solver.nPop)] 
    39         solver.generations = 0 
    40         solver.bestEnergy = 0.0 
    41         solver.bestSolution = [0.0] * solver.nDim 
     39       #solver.generations = 0 
     40        solver.bestEnergy = None 
     41        solver.bestSolution = None 
    4242        solver.trialSolution = [0.0] * solver.nDim 
    43         solver._init_popEnergy  = inf 
    4443        solver.popEnergy = [solver._init_popEnergy] * solver.nPop 
    4544       #solver.energy_history = [] 
     
    119118    # Return the last solver, which contains all of the important information 
    120119    # First modify the solver to include total data. 
    121     solver.generations = total_iterations 
    122     solver.energy_history = total_energy_history 
     120   #solver.generations = total_iterations 
     121   #solver.energy_history = total_energy_history 
    123122 
    124123    #XXX solver.bestEnergy is not exactly cost(solver.bestSolution), 
Note: See TracChangeset for help on using the changeset viewer.