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
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
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개)
카테고리
도움말 센터 및 File Exchange에서 LMI Solvers에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!