It sounds like you are aware of the bug(s), and now "just" have to figure out how to fix it (them). Nevertheless, see https://groups.google.com/forum/#!topic/yalmip/FgZpfvKZ4MI for some bugs discovered while calling SNOPT from YALMIP. Perhaps these are die to the bug(s) you already know about.
As for why SNOPT declares apparent infeasibility in the 3 SOCPs in yalmiptest('snopt') when other solvers (claim to) solve them?
I see that snsolve now determines n = number of variables based on x0, which makes sense.
I hope I need a new MEX file (otherwise the bugs haven't been fixed). I will report back whether all the bug manifestations I know of have been fixed once I get the new MEX file.
There appears to be at least one bug left, and happened with empty A and b.
[x,fval,exitflag,lambda]=snsolve(@(X)rosenbrockwrapper_m(X,1e2),[-1.2;1],[1 1],[300],[],[],[-1e2;-1e2],[1e2;1e2])
executes without error.
[x,fval,exitflag,lambda]=snsolve(@(X)rosenbrockwrapper_m(X,1e2),[-1.2;1],[],[],[],[],[-1e2;-1e2],[1e2;1e2])
Error using snoptmex
A has incorrect column dimension 0. Should be length 1
Error in snsolve (line 122)
[x,F,exitflag,xmul,Fmul] = snoptmex( solveopt, x0, ...
function [f,g] = rosenbrockwrapper_m(X,m)
f = objective_function_rosenbrock_m(X,m);
g = objective_gradient_rosenbrock_m(X,m);
end
function out = objective_function_rosenbrock_m(X,m)
out = m*(X(2)-X(1)^2)^2+(1-X(1))^2;
function [gradient] = objective_gradient_rosenbrock_m(X,m)
diff_X1=-4*m*(X(2)-X(1)^2)*X(1)-2+2*X(1);
diff_X2=2*m*(X(2)-X(1)^2);
gradient=[diff_X1; diff_X2];
end
Also, yalmiptest('snopt') incorrectly reports infeasibility for the 3 SOCPs in yalmiptest. Per YALMIP developer Johan (who was not sure whether bug is on YALMIP end or on SNOPT end) on June 15 (prior to new build on June 16), in https://groups.google.com/forum/#!topic/yalmip/FgZpfvKZ4MI
snopt doesn't like the quadratic form of the socp constraints (which yalmip uses as callbacks when nonlinear solver is used)
sdpvar x t
optimize(cone([1-x;x],t),t,sdpsettings('solver','fmincon'))
optimize([t >=0, x^2 + (1-x)^2 <= t^2],t,sdpsettings('solver','fmincon'))
optimize([t >=0, x^2 + (1-x)^2 <= t^2],t,sdpsettings('solver','snopt'))
considering the current bugs, I cannot judge if this is due to algorithmic reasons in snopt, bugs in snopt, or bugs in yalmip (which reuses the same callback machinery for fmincon and snopt)