In the examples of both algorithms, the function SchafferFunctionN1 is used, but the lower and upper bounds have 2 variables instead of only one.
arma::vec lowerBound("-1000 -1000");
arma::vec upperBound("1000 1000");
The SchafferFunctionN1 only has one variable.
/**
The Schaffer function N.1 is defined by
\f[
f_1(x) = x^2
f_2(x) = (x-2)^2
\f]
The optimal solutions to this multi-objective function lie in the
range [0, 2].
@tparam arma::mat Type of matrix to optimize.
*/
This causes an error when trying to run the test code.
Problem location
https://ensmallen.org/docs.html#moead-de https://ensmallen.org/docs.html#nsga2
Description of problem
In the examples of both algorithms, the function SchafferFunctionN1 is used, but the lower and upper bounds have 2 variables instead of only one. arma::vec lowerBound("-1000 -1000"); arma::vec upperBound("1000 1000");
The SchafferFunctionN1 only has one variable. /**
This causes an error when trying to run the test code.