Global Search optimization error
Mostrar comentarios más antiguos
I am trying to run a global search optimization in order to minimize a function. When I run it, I receive the following error:
Warning: Matrix is singular, close to
singular or badly scaled. Results may
be inaccurate. RCOND = NaN.
> In qpsub>eqnsolv at 953
In qpsub at 157
In nlconst at 619
In fmincon at 837
In C:\Program Files\MATLAB\R2012b\toolbox\globaloptim\globaloptim\private\globalsearchnlp.p>i_runLocalSolver at 684
In C:\Program Files\MATLAB\R2012b\toolbox\globaloptim\globaloptim\private\globalsearchnlp.p>globalsearchnlp at 292
In GlobalSearch>GlobalSearch.run at 327
In opt_model_ms at 52
Do you have any idea why is this happening? My function is well defined. On the other hand it has 6 variables, which could be difficult for global search to find the minimum. I could also post the function here if you need more information?
1 comentario
Walter Roberson
el 23 de En. de 2013
Yes, please post your code.
Respuesta aceptada
Más respuestas (3)
Giorgos Papakonstantinou
el 23 de En. de 2013
Editada: Giorgos Papakonstantinou
el 3 de Feb. de 2013
0 votos
Alan Weiss
el 23 de En. de 2013
The warning indicates that you are using the fmincon active-set algorithm. The first thing I would try is to use the interior-point algorithm. Then the sqp algorithm. See the documentation for details.
opts = optimset('Algorithm','interior-point');
problem = createOptimProblem('fmincon','options',opts);
Obviously, you will have other things in your problem structure, I just wanted to show you how to include the options to change the algorithm.
Alan Weiss
MATLAB mathematical toolbox documentation
Giorgos Papakonstantinou
el 23 de En. de 2013
0 votos
2 comentarios
Matt J
el 23 de En. de 2013
Either could be the case, but there is no reason to doubt the solution just because it lies at the boundaries.
Alan Weiss
el 24 de En. de 2013
You could also try some of the suggestions in the documentation for how to check whether your answer is indeed an optimum.
If you feel that I have sufficiently answered your questions, please accept the appropriate answer.
Alan Weiss
MATLAB mathematical toolbox documentation
Categorías
Más información sobre Linear Least Squares en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!