I have an issue with an unbounded variable that I use in an "implies" condition. Here is a simplified version of my code:
tol=1;
num_blocks = 2;
num_intervals = 2;
Constraints1 = [];
a=sdpvar(1);
Bounds = [Bounds, 0 <= a <= 5];
for k=1:num_blocks
for i=1:num_intervals
Bounds = [Bounds,...
0 <= Left_term.Block(k).TimeInterval(i) <= 3000]; % Note that "Bounds" already contains some Bounds, more precisely it already
% contains bounds on "Left_term.Block(k).TimeInterval(i)". But since I get a warning for unbound variable
% after using "Left_term.Block(k).TimeInterval(i)" within an "implies" function in the next lines of code,
% I tried defining again explicit bounds on "Left_term.Block(k).TimeInterval(i)" right before
% using it in "implies". I still get the warning for unbound variable, as I explain later.
Constraints1 = [Constraints1,...
implies(3<=a+tol,...
Left_term.Block(k).TimeInterval(i) >= 5)];
constraints = [Bounds, Constraints1];
optimize(constraints)
end
end
Then I get this warning:
Warning: You have unbounded variables in an implication
leading to a lousy big-M relaxation.
Note that "Left_term.Block(k).TimeInterval(i)" is a "Linear scalar (real, 3 variables)" that I define previously in the code.
I know for sure that the problem with bounds is due to variable "Left_term.Block(k).TimeInterval(i)", because I have substituted it by a similarly defined variable "Right_term.Block(k).TimeInterval(i)" and the warning in "implies" disappears.
My only guess is that I have not properly defined the bounds on some of the 3 variables contained within "Left_term.Block(k).TimeInterval(i)". But, since I define explicit bounds on "Left_term.Block(k).TimeInterval(i)", I don't understand why this should be an issue.