Unrecognized field name "pi"; MATLAB
回答済みI want to retrieve the shadow prices of a small ILP, so I tried using pi but the same error keeps coming. What to do?
c = [2; 1];
n=2;
A=[3 2;3 1;1 2];
b=[80;50;60];
l=[0 0];
model.obj=c;
model.A= sparse(A);
model.rhs=b;
model.vtype=repmat('I',n,1);
model.lb=l;
model.modelsense='max';
results = gurobi(model);
dual=results.pi;
disp(dual)
0
-
Please note that the Pi attribute is only available for linear programs. We discuss this in the Knowledge Base article How do I retrieve the (dual) Pi value for a MIP problem?
0
サインインしてコメントを残してください。
コメント
1件のコメント