Yalmip LMI Constraints Error

Hi Everyone, I am trying to using Yalmip to solve mixed an integer programming
P_=sdpvar(1,24); U_=intvar(1,24); X=[P_ U_];
obj=X*Gamma+X*Pi*X'+X*Psi*X'*Sigma'*X';
constraints=LB'<=X<=UB';
for t=26:48
Gap=min(min_up,t-25);
Vec=zeros(48,1); Vec(t-gap:t-1)=1;
constraints=constraints+((X*Vec/Gap)-floor(X*Vec/Gap)<=0);
end
opts=sdpsettings('solver','bnb','bnb.solver','fmincon');
solvesdp(constraints,obj,opts)
P(i,:)=double(P_); U(i,:)=double(U_);
where, Gamma, Pi, Psi, Sigma, min_up LB UB are all known, it was fine when I am using Yalmip_R20120806 and previous versions, but when I update to a newer version of Yalmip, it reports error:
Undefined function 'setupBounds' for input arguments of type 'lmi'.
Error in expandmodel (line 118) LUbounds = setupBounds(F,options,extendedvariables);
Error in compileinterfacedata (line 107) [F,failure,cause,operators] = expandmodel(F,h,options);
Error in solvesdp (line 241) [interfacedata,recoverdata,solver,diagnostic,F,Fremoved] = compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);
Error in Unit_Commitment (line 65) solvesdp(constraints,obj,opts)
Looks like after yalmip_R20120830, there is a new file named "setupBounds" inside the "extra" folder. Does anyone know what is wrong with my code?
Regards
Ying

댓글 수: 2

Johan Löfberg
Johan Löfberg 2013년 1월 27일
I created some random data, but could not reproduce the behavior. Do you really have the directory yalmip/extras in your path
Could you please supply typical data so that I can run the code to reproduce the issue. Alternatively, email me directly (or post the question again on the YALMIP specific Google groups forum)
Johan Löfberg
Johan Löfberg 2013년 1월 28일
BTW, your constraint involving the floor function is unnecessarily complex. A better model is
temp = intvar(1); constraints=[constraints, (X*Vec/Gap) == temp]
since when you are constraining z-floor(z)<=0, z has to be integer, since z-floor(z) is positive for any non-integer number.

댓글을 달려면 로그인하십시오.

답변 (1개)

YING
YING 2013년 1월 29일

0 개 추천

Dear Johan:
Thank you for your replying and sorry for this late response. I changed my constraints as:
temp = intvar(1); constraints=[constraints, (X*Vec/Gap) == temp]
and the error disappears!
I tried to solve it using “bmibnb” and it returns an error says:
Undefined function 'getcutflag' for input arguments of type 'lmi'.
Error in compileinterfacedata (line 510)
if any(getcutflag(F))
Error in solvesdp (line 241)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved] =
compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);
Error in Unit_Commitment (line 64)
solvesdp(constraints,obj,opts)
however, if I use previous version yalmip_r20120806, it could solve it using Mosek and Gurobi.
Regards
Ying

카테고리

제품

질문:

2013년 1월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by