Reference to non-existent field 'computeIIS'.

2 ビュー (過去 30 日間)
Azam Boskabadi
Azam Boskabadi 2019 年 2 月 6 日
編集済み: Walter Roberson 2019 年 2 月 6 日
Hi, Im trying to code a big Mixed Integer Problem by calling Gurobi from Matlab. It seems that the problem is infeasible, so I tried to use computeIIS as it is shown here:
but I get the following error when I run my code:
Reference to non-existent field 'computeIIS'.
The Function that calls Gurobi in Matlab is as follows:
function mip1_P_F()
load('mip1_P.mat');
model.A = sparse(A);
model.obj = Obj;
model.rhs = B ;
model.sense = Signs;
model.lb = LB;
model.ub = UB;
model.vtype = VT;
model.modelsense = 'max';
model.varnames = names;
gurobi_write(model, 'mip1_P.lp');
params.outputflag = 0;
result = gurobi(model, params);
disp(result);
model.computeIIS();
for v=1:length(names)
fprintf('%s %d\n', names{v}, result.x(v));
end
fprintf('Obj: %e\n', result.objval);
end
Im not sure what is wrong, Ill appreciate your help!!!
  1 件のコメント
Walter Roberson
Walter Roberson 2019 年 2 月 6 日
編集済み: Walter Roberson 2019 年 2 月 6 日
Does model exist within that mat file that you are loading ? You should avoid poofing variables into existence as MATLAB is permitted to assume at parse time that the structure assignment to model have nothing to do with the load.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by