yalmip / YALMIP

MATLAB toolbox for optimization modeling
https://yalmip.github.io/
Other
464 stars 134 forks source link

Logical issues with implies statements #1201

Closed Electricman23 closed 1 year ago

Electricman23 commented 1 year ago

Hello, I would like to ask a logical question about implies: that is, when I use implies, can my conclusion be a time inequality relation. Here is my program: ''' for t=1:T %时间 st=[st,sum(f(:,t))==1, implies(f(1,t),[P_RZ(t)==0,P_Res(t)<=abs(P_Ravg-P_R(t))]); implies(f(2,t),[P_RZ(t)>0,P_Res(t)>=0]); implies(f(3,t),[P_RZ(t)<0,P_Res(t)<=0]); ]; end ''' The following is the error I reported after running the program. ’‘’ constraint/horzcat (line 11) One of the constraints evaluates to a FALSE LOGICAL variable. Your model is infeasible

error lxx1117 (line 244) implies(f(2,t),[P_RZ(t)>0,P_Res(t)>=0]); ‘’‘ Excuse me, is this a logic error caused by my original program being used incorrectly.