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!