minimized 0.1.7
Differential evolution for multidimensional minimization.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
Minimized
Library for (multi)dimensional minimization written in D. Currently limited to an implementation of adaptive differential evolution as explained in:
Brest, J., S. Greiner, B. Boskovic, M. Mernik, and V. Zumer. ‘Self-Adapting Control Parameters in Differential Evolution: A Comparative Study on Numerical Benchmark Problems’. IEEE Transactions on Evolutionary Computation 10, no. 6 (December 2006): 646–57. doi:10.1109/TEVC.2006.872133.
import minimized;
void main()
{
// Function to minimize
auto fn = ( double[] xs ) {
auto p = [ 1.0, 2.0, 10, 20, 30 ];
return p[2] * (xs[0] - p[0]) * (xs[0] - p[0]) +
p[3] * (xs[1] - p[1]) * (xs[1] - p[1]) + p[4];
};
// Function which will create random initial sets of parameters
auto initFunction = ()
{
return [ uniform( 0.0, 10.0 ), uniform( 0.0, 10.0 )];
};
auto de = new DifferentialEvolution!(double[])();
de.temperatureFunction = fn;
de.randomIndividual = initFunction;
auto min = de.minimize;
assert( equal!approxEqual( min, [ 1, 2 ] ) );
}
- 0.1.7 released 9 years ago
- BlackEdder/minimized
- Apache v2.0
- Copyright © 2015, Edwin van Leeuwen
- Authors:
- Dependencies:
- none
- Versions:
-
0.1.7 2015-Jun-11 0.1.6 2015-May-19 0.1.5 2015-May-19 0.1.4 2015-May-19 0.1.3 2015-May-19 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
208 downloads total
-
- Score:
- 0.8
- Short URL:
- minimized.dub.pm