Yalmip LMI Constraints Error
Ältere Kommentare anzeigen
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 Kommentare
Johan Löfberg
am 27 Jan. 2013
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
am 28 Jan. 2013
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.
Antworten (1)
YING
am 29 Jan. 2013
Kategorien
Mehr zu LMI Solvers finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!