Why does Multistart give a output same as the initial guess value?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to find use MultisStart to optimise a function 'optimization_func' I created. I want to find the corresponding parameters [ X(1) to x(5) ] when 'optimization_func' reach the global minimum.
When I run the code (see below), the output parameters (xms) is exactly the same as the initial guess value (X0) I put in. There is no error message. The iterative display is shown in the photo below. Could you let me know the possible error I have in my code? This code works when I switch to globalsearch. I am sure the initial guess value (X0) do not give a global minimum.
Here is my code
%% Fitting Procedures Settings & Initiation %%
LB = [1.9 5e14 5e14 8e10 0.01]; % Lower bound for ... respectively
UB = [100 5e15 5e15 3e11 0.1]; % Upper bound for ... respectively
X0 = [20 1e15 1e15 1e11 0.08];
%% fitting
opts = optimoptions('fmincon', 'Algorithm', 'interior-point');
problem = createOptimProblem('fmincon','objective', ...
@(x)optimization_func(x(1), x(2), x(3), x(4), x(5)),'x0',X0,'lb',LB,'ub',UB,'options',opts);
ms = MultiStart;
ms = MultiStart(ms,'UseParallel',true,'Display','iter');
tic;
[xms,~,~,~,solsms] = run(ms,problem,10);
toc
Thank you so much!!!!
0 comentarios
Respuestas (2)
Matt J
el 6 de Jul. de 2020
Editada: Matt J
el 6 de Jul. de 2020
I am sure the initial guess value (X0) do not give a global minimum.
What have you done to verify that? Have you tested optimization_func to see if it gives values consistent with your expectations?
Based on the "Local f(x)" output that you've displayed, the value of your optimization_func appears to be zero everywhere across a very broad region - broad enough to cover all of your search points. So of course the solver has no reason to look beyond the initial points to find an optimum.
Alan Weiss
el 6 de Jul. de 2020
There is a good chance that things would do better if you would scale your problem. Some of your bounds are of order 1e15, some of order 1e-2. This is not good. Change your objective function to accept values of order 1 or so, and internally multiply particular values by 1e15 or whatever you need.
It is also clear from the display you show that the local solver believes that the value of the gradient is exactly zero at each point that it tried (you can see that the first-order optimality is exactly 0). Therefore the solver takes no steps at all.
Alan Weiss
MATLAB mathematical toolbox documentation
2 comentarios
Alan Weiss
el 7 de Jul. de 2020
Oh, the problem is in parallel only? I am not an expert in the issues related to parallel computing, but there are some cautions in the documentation that might be relevant:
Alan Weiss
MATLAB mathematical toolbox documentation
Ver también
Categorías
Más información sobre Global or Multiple Starting Point Search 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!