Closed bchretien closed 10 years ago
Thanks, good for me! Note that we can probable factor tests even more but so far I still think this is good enough.
Also, we may want to integrate at some points set of parameters for all solvers just to relax the stopping criterion.
:+1: for solver parameters, although this is the usual problem with NLP solvers: how should I tweak my parameters? This is something that could be determined (or at least tested and evaluated) while doing solver benchmarking for RobOptim.
Well, for test case what we desire more is having a consistent behavior of all solvers, for instance they all satisfy equality constraints with a particular precision. It would make things more fair to have all the solver use the same constant. Then this constant could be propagated in relevant tests. Same things for stopping criteria for instance. This is what I was thinking of. Then, tuning to make the optimization faster is another problem.
cc @thomas-moulard
Several solvers (e.g. NLopt) can find the expected solution while giving a warning (e.g. the reason why the solver stopped). I thought that since all that matters is the result, I added support for
SOLVER_VALUE_WARNINGS
and factorized things a bit. Tolerances forf0
,x
andf
have to be set at the beginning of the test function.I also added
BOOST_CHECK_SMALL_OR_CLOSE
because I had a test failing when the solver returned1e-26
and0.
was expected. I based it on this SO question, but it is certainly improvable.