From 91df4c54e93e6ac95597dd2a0c976b76b3038f52 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Thu, 26 Jan 2023 18:48:15 -0500 Subject: [PATCH] Fix dimensionality of bounds for uses of SchafferFunctionN1. --- doc/optimizers.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/optimizers.md b/doc/optimizers.md index a34195145..e1b039676 100644 --- a/doc/optimizers.md +++ b/doc/optimizers.md @@ -1892,8 +1892,8 @@ Attributes of the optimizer may also be changed via the member methods ```c++ SchafferFunctionN1 SCH; -arma::vec lowerBound("-10 -10"); -arma::vec upperBound("10 10"); +arma::vec lowerBound("-10"); +arma::vec upperBound("10"); DefaultMOEAD opt(300, 300, 1.0, 0.9, 20, 20, 0.5, 2, 1E-10, lowerBound, upperBound); typedef decltype(SCH.objectiveA) ObjectiveTypeA; typedef decltype(SCH.objectiveB) ObjectiveTypeB; @@ -1954,8 +1954,8 @@ Attributes of the optimizer may also be changed via the member methods ```c++ SchafferFunctionN1 SCH; -arma::vec lowerBound("-1000 -1000"); -arma::vec upperBound("1000 1000"); +arma::vec lowerBound("-1000"); +arma::vec upperBound("1000"); NSGA2 opt(20, 5000, 0.5, 0.5, 1e-3, 1e-6, lowerBound, upperBound); typedef decltype(SCH.objectiveA) ObjectiveTypeA; @@ -1967,7 +1967,7 @@ std::tuple objectives = SCH.GetObjectives(); // obj will contain the minimum sum of objectiveA and objectiveB found on the best front. double obj = opt.Optimize(objectives, coords); // Now obtain the best front. -arma::cube bestFront = opt.Front(); +arma::cube bestFront = opt.ParetoFront(); ```