Hello, Mr. Johan Löfberg
I'm a fresh man on this tool YAMIP. When I set the optimal gap in the sdpsettings(). I find I can only set the parameters "gurobi.MIPGapAbs", but no "gurobi.MIPGap". In fact, both parameters "gurobi.MIPGapAbs" and "gurobi.MIPGap" can be found in sdpsetting function if I choose the solver to be gurobi.
This is a small demo that illustrates the error.
clear;
sdpvar x y;
Constraints =[(-1<=x<=4):'Boundary'];
Constraints =[Constraints,...
(y==x):'Objecitve function'];
options = sdpsettings('solver', 'gurobi', ...
'gurobi.MIPGap',0.05); % No problem !
options = sdpsettings('solver', 'gurobi', ...
'verbose',0,...
'gurobi.MIPGap',0.05);% Error using strmatch_octavesafe : Too many input arguments.
optimize(Constraints,y,options);
solution = value(x);
I check the syntax where it reports bug. Actually, the function strmatch_octavesafe() only accepts 2 input variables.
function idx = strmatch_octavesafe(S, A)
idx = find(strncmp(S, A, numel(S)));
% idx = find(strcmpi(S, A));
end
But in sdpsettings(), it calls the function with the following two ways,
j = strmatch_octavesafe(lowArg,names);
or, k = strmatch_octavesafe(lowArg,names,'exact');
Do you have some better ways to fix this problem?
YALMIP-master\YALMIP-master\extras\strmatch_octavesafe.m
Best regards,
CC