Here T is the time which is equal to T=24 hours. How can I write the difference as an inequality? i mean
for example for for 6 o’clock P(6)-P(5)<10
diff is not supported for CVX variables or expressions. Also, CVX interprets
<=, so use
<=, perhaps modified as shown below;
P(2:T) - P(1:T-1) <= 10 - small_positive_number
is a vectorized way of specifying 23 constraints.
If there’s some special logic for 24:00 clock, and circular wrapping or whatever, I’ll let you deal with that.