Changeset 759
- Timestamp:
- 10/04/14 18:03:39 (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mystic/mystic/differential_evolution.py
r758 r759 146 146 147 147 from mystic.tools import wrap_function, unpair, isiterable 148 from mystic.tools import wrap_bounds, wrap_penalty, wrap_nested,reduced148 from mystic.tools import wrap_bounds, wrap_penalty, reduced 149 149 150 150 from mystic.abstract_solver import AbstractSolver … … 388 388 strategy(self, candidate) 389 389 # apply constraints 390 #self.trialSolution[candidate][:] = self._constraints(self.trialSolution[candidate])391 # bind constraints to cost 392 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) 393 393 394 394 # apply penalty 395 395 #trialEnergy = map(self._penalty, self.trialSolution)#,**self._mapconfig) 396 396 # calculate cost 397 trialEnergy = self._map(co ncost, self.trialSolution, **self._mapconfig)397 trialEnergy = self._map(cost, self.trialSolution, **self._mapconfig) 398 398 399 399 # each trialEnergy should be a scalar
Note: See TracChangeset
for help on using the changeset viewer.