Initial values for fmincon

3 visualizaciones (últimos 30 días)
Ayesha Maroof
Ayesha Maroof el 21 de Dic. de 2018
Editada: Matt J el 26 de Dic. de 2018
I am trying to get the minimum value of a function using fmincon function but I have no guesses about the initial values.So what values should I provide at x0 so that it can be converged to minimum value? i am initiallly giving some values and also getting hessian matrix which is showing some positive and some negative numbers which is a proof that the obtained value is not minimum of function.
  4 comentarios
Ayesha Maroof
Ayesha Maroof el 21 de Dic. de 2018
ok thank you let me look at it.Right now i am getting this :
"Local minimum found that satisfies the constraints.
Optimization completed because the objective function is non-decreasing in
feasible directions, to within the default value of the function tolerance,
and constraints are satisfied to within the default value of the constraint tolerance."
Though it says the local minimum found but Hessian matrix which i am getting is having both positive and negative values.I want all values to be positive so that it proves that the obtained function has been minimized
hessian =
0.8272 -0.1404 -0.0622 0.7519 -1.6917 -0.3578 2.0148 -0.0462 -0.0961
-0.1404 0.0367 -0.0430 -0.1227 0.2787 0.0611 -0.3385 -0.0045 0.0089
-0.0622 -0.0430 0.2765 0.0881 -0.1224 0.0669 0.3099 0.0407 0.0354
0.7519 -0.1227 0.0881 2.2642 -3.9153 -0.7057 4.5789 0.2219 0.2032
-1.6917 0.2787 -0.1224 -3.9153 7.2666 1.3976 -8.6220 -0.0511 0.0025
-0.3578 0.0611 0.0669 -0.7057 1.3976 1.3033 -1.8609 0.0115 -0.0557
2.0148 -0.3385 0.3099 4.5789 -8.6220 -1.8609 11.6125 -0.0301 0.0617
-0.0462 -0.0045 0.0407 0.2219 -0.0511 0.0115 -0.0301 0.3722 0.3274
-0.0961 0.0089 0.0354 0.2032 0.0025 -0.0557 0.0617 0.3274 0.4120
Alan Weiss
Alan Weiss el 26 de Dic. de 2018
Just because some values are negative doesn't mean that the resulting Hessian isn't positive semidefinite. In fact, when I asked MATLAB to calculate the eigenvaljes of your matrix, it gave me
vals = eig(A)
vals =
0.0000
0.0034
0.0490
0.2203
0.4015
0.7076
0.9154
1.0405
21.0335
See, all positive.
HOWEVER, in general the returned values of the Hessian are NOT RELIABLE. See fmincon Hessian.
Alan Weiss
MATLAB mathematical toolbox documentation

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Solver Outputs and Iterative Display en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by