Closed stumarcus314 closed 8 years ago
Good Question!
The default options for all OptimTraj problems are set in getDefaultOptions.m. Right now, they always select the default FMINCON solver, which is interior-point
. This is intentional.
Let's look at the FMINCON page on algorithm selection. There are four algorithms. Of these algorithms, sqp
and active-set
are not good for trajectory optimization, as they are only for small and medium scale problems. Trajectory optimization creates large sparse problems. Of the remaining two algorithms, the trust-region-reflective
requires a gradient, and only works for some constraints. Thus, it cannot handle all problems coming from OptimTraj. The final solver, interior-point
, handles all problems, and thus is the most desirable choice.
I have been able to use the fmincon algorithms: 'interior-point', 'sqp', 'active-set' . But the 'trust-region-reflective' algorithm produces this error:
Running OptimTraj, iteration 1 -> Transcription via Hermite-Simpson method, nSegment = 6
Error using fmincon (line 446) Option Algorithm = 'trust-region-reflective' but this algorithm does not solve problems with the constraints you have specified. Run a different algorithm by setting the Algorithm option. For information on applicable algorithms, see Choosing the Algorithm in the documentation.
Error in directCollocation (line 95) [zSoln, objVal,exitFlag,output] = fmincon(P);
Error in hermiteSimpson (line 77) soln = directCollocation(problem);
Error in optimTraj (line 182) soln(iter) = hermiteSimpson(P);
Error in invoke_OptimTraj (line 170) soln = optimTraj(problem);