Changeset 759


Ignore:
Timestamp:
10/04/14 18:03:39 (20 months ago)
Author:
mmckerns
Message:

rollback: apparently wrap_nested imposes constraints poorly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mystic/mystic/differential_evolution.py

    r758 r759  
    146146 
    147147from mystic.tools import wrap_function, unpair, isiterable 
    148 from mystic.tools import wrap_bounds, wrap_penalty, wrap_nested, reduced 
     148from mystic.tools import wrap_bounds, wrap_penalty, reduced 
    149149 
    150150from mystic.abstract_solver import AbstractSolver 
     
    388388                strategy(self, candidate) 
    389389            # apply constraints 
    390            #self.trialSolution[candidate][:] = self._constraints(self.trialSolution[candidate]) 
    391         # bind constraints to cost 
    392         concost = wrap_nested(cost, self._constraints) 
     390            self.trialSolution[candidate][:] = self._constraints(self.trialSolution[candidate]) 
     391        # bind constraints to cost #XXX: apparently imposes constraints poorly 
     392       #concost = wrap_nested(cost, self._constraints) 
    393393 
    394394        # apply penalty 
    395395       #trialEnergy = map(self._penalty, self.trialSolution)#,**self._mapconfig) 
    396396        # calculate cost 
    397         trialEnergy = self._map(concost, self.trialSolution, **self._mapconfig) 
     397        trialEnergy = self._map(cost, self.trialSolution, **self._mapconfig) 
    398398 
    399399        # each trialEnergy should be a scalar 
Note: See TracChangeset for help on using the changeset viewer.