MultiStart using lsqnonlin, failure when providing upper and lower limits

3 views (last 30 days)
I have a function that I am solving using MultiStart and the lsqnonlin solver. I have 11 variables in this function and I provided an initial guess for all of them. When I run the code without specifying the upper and lower bounds in the problem structure, the solver converges with a positive local exitflag. Yet, when I provide the bounds, the solver is unable to obtain a feasible solution and all start points fail. My code looks like this:
fun=@meow
x_guess=[219620,965820,0.7714,0.014,1e-18,1e-18,0.051,0.1106,41992,40,330]
% lb=[100000,800000,1e-18,1e-18,1e-18,1e-18,1e-18,1e-18,20000,25,280];
% ub=[300000,1100000,1,1,1,1,1,1,60000,60,400];
tpoints=CustomStartPointSet(x_guess);
opts = optimoptions('lsqnonlin','Algorithm','levenberg-marquardt',...
'Display','iter','FunctionTolerance',1e-15,'TolX',1e-15,'MaxFunctionEvaluations', 12000,'MaxIterations',600);
problem = createOptimProblem('lsqnonlin','x0',x_guess,...
'objective',fun,...'lb',lb,'ub',ub,...
'options',opts);
ms=MultiStart;
[x,fval,EXITFLAG,OUTPUT] = run(ms,problem,tpoints);
When solving without bounds I get the following:
First-Order Norm of
Iteration Func-count Residual optimality Lambda step
...
23 302 3.61414e-06 0.000142 0.1 4.03251e-06
24 315 3.6141e-06 9.19e-05 1 3.8897e-06
25 330 3.61409e-06 0.000112 1000 7.04289e-08
26 333 3.32871e-10
Local minimum possible.
lsqnonlin stopped because the relative size of the current step is less than
the value of the step size tolerance.
<stopping criteria details>
MultiStart completed the runs from all start points.
The local solver ran once and converged with a positive local solver exit flag.
512.1234
While with bounds, I get the following (using 50 instead of tpoints in the run function):
rhostar>1.25 %% related to the executable file
MultiStart encountered failures in the user provided functions.
All 50 local solver runs failed in a user supplied function.
138.6560
Is it safe to take the solution of the MultiStart without bounds? I have opted for MultiStart as fsolve, which I was using, could not converge with a positive exit flag.

Answers (0)

Community Treasure Hunt

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

Start Hunting!