KNITRO options support - ms_enable / knitro.opt

27 views
Skip to first unread message

SingingKim

unread,
Nov 5, 2019, 3:17:45 PM11/5/19
to YALMIP
Hi all, 

I have an issue to use some options for KNITRO with YALMIP.

The maximum iteration option can be applied as a solver-specific option (Knitro.maxit) and it works fine. 
options = sdpsettings('verbose',1,'solver','Knitro','Knitro.maxit',10000);

However, the multi-start option (Knitro.ms_enable) is not working properly and returns the following error:
options = sdpsettings('verbose',1,'solver','Knitro','Knitro.ms_enable',1);

Error using sdpsettings (line 305)
Unrecognized property name 'Knitro.ms_enable'.

Here is an example code that you can replicate the error:
x = sdpvar(10,1);

Constraints = [sum(x) <= 10, x(1) == 0, 0.5 <= x(2) <= 1.5];

for i = 1 : 7

  Constraints = [Constraints, x(i) + x(i+1) <= x(i+2) + x(i+3)];

end

Objective = x'*x+norm(x,1);

options = sdpsettings('verbose',1,'solver','Knitro','Knitro.maxit',10000);

options = sdpsettings(options,'Knitro.ms_enable',1);

% options = sdpsettings(options,'knitro.optionsfile','knitro.opt');

sol = optimize(Constraints,Objective,options);



2. I tried with 'knitro.optionfile' as well, but it gives me an error:

ERROR: The reverse communication API for Knitro has been deprecated.

       Please provide all necessary callbacks for evaluations.



Any advice would be appreciated.

Thanks!


testYAL.m
knitro.opt
Reply all
Reply to author
Forward
Message has been deleted
0 new messages