I'm running Matlab 2016a w/ Gurobi and Intlinprog as my MIP solvers and your most recent version of YALMIP. When I run with Gurobi, it solves fine. However, when I run with intlinprog, I find the following error.
clear all;close all;yalmip clear;clc
x1 = sdpvar(1,1);
x2 = sdpvar(1,1);
Constraints = [];
Constraints = [Constraints, x1<=5, x2<=6];
Objective = x1+x2;
solvesdp(Constraints,-Objective,sdpsettings('solver','intlinprog'))
ans =
yalmiptime: NaN
solvertime: NaN
info: 'Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using intlinprog…'
problem: 9
Matlab has made improvements to their intlinprog solver in 2016a and 2016b versions (I've been in contact with them on another issue). When I type 'help intlinprog', I get the following which indicates they may have changed their input file format to the Gurobi input matlab format. (See below). not sure if this helps.
Please advise, and, thanks very much for all your help.
help intlinprog
intlinprog A mixed integer linear programming example using the
Gurobi MATLAB interface
This example is based on the intlinprog interface defined in the
MATLAB Optimization Toolbox. The Optimization Toolbox
is a registered trademark of The MathWorks, Inc.
x = intlinprog(f,intcon,A,b) solves the problem:
minimize f'*x
subject to A*x <= b
x(j) integer, when j is in the vector
intcon of integer constraints
x = intlinprog(f,intcon,A,b,Aeq,beq) solves the problem:
minimize f'*x
subject to A*x <= b,
Aeq*x == beq
x(j) integer, where j is in the vector
intcon of integer constraints
x = intlinprog(f,intcon,A,b,Aeq,beq,lb,ub) solves the problem:
minimize f'*x
subject to A*x <= b,
Aeq*x == beq,
lb <= x <= ub.
x(j) integer, where j is in the vector
intcon of integer constraints
You can set lb(j) = -inf, if x(j) has no lower bound,
and ub(j) = inf, if x(j) has no upper bound.
[x, fval] = intlinprog(f, intcon, A, b) returns the objective value
at the solution. That is, fval = f'*x.
[x, fval, exitflag] = intlinprog(f, intcon, A, b) returns an exitflag
containing the status of the optimization. The values for
exitflag and corresponding status codes are:
2 - Solver stopped prematurely. Integer feasible point found.
1 - Optimal solution found.
0 - Solver stopped prematurely. No integer feasible point found.
-2 - No feasible point found.
-3 - Problem is unbounded.