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!