Why does Multistart give a output same as the initial guess value?

2 ビュー (過去 30 日間)
Shuai Nie
Shuai Nie 2020 年 7 月 6 日
コメント済み: Alan Weiss 2020 年 7 月 7 日
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!!!!

回答 (2 件)

Matt J
Matt J 2020 年 7 月 6 日
編集済み: Matt J 2020 年 7 月 6 日
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.
  1 件のコメント
Shuai Nie
Shuai Nie 2020 年 7 月 7 日
Hi Matt,
Thanks for your reply, I have tested my 'ptimization_func' fuction. I tried to set the initial guess value as input, and the output of 'ptimization_func' is 1e6 which is definetly not the global minimum. I tried to replaced the MultiStart by GlobalSearch, it can find a set of parameters that gives a output = 0.35. Do you have anyidea why solver do not work?
Thanks in advance!

サインインしてコメントする。


Alan Weiss
Alan Weiss 2020 年 7 月 6 日
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 件のコメント
Shuai Nie
Shuai Nie 2020 年 7 月 7 日
編集済み: Shuai Nie 2020 年 7 月 7 日
Hi Alan,
Thanks for your reply.
I have tired to normalise my parameters, but it still shows the same results.
I have tested my 'ptimization_func' fuction. I tried to set the initial guess value as input, and the output of 'ptimization_func' is 1e6 which is definetly not the global minimum. I tried to replaced the MultiStart by GlobalSearch, it can find a set of parameters that gives a output = 0.35.
I tried to use MultiStart ('UseParallel', 'false'), it works!!! But it is very time consuming, so I want to use 'parallel multiStart' ! Do you have any idea why solver do not work when I enable 'UseParallel'?
Thanks in advance!
Alan Weiss
Alan Weiss 2020 年 7 月 7 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGlobal or Multiple Starting Point Search についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by