I have a time series list like this.
a = [1.1341, 1.13421, 1.13433, 1.13412, 1.13435, 1.13447, 1.13459, 1.13452, 1.13471, 1.1348, 1.13496,1.13474,1.13483,1.1349,1.13502,1.13515,1.13526,1.13512]
How to write constraints to mark after every 0.0005 change in this list using a LP/MIP (series is not sorted and order matters)
|a - a| = 0.00061 > 0.0005 and |a - a| = 0.00055 > 0.0005
a < a. If MIP can be formulated such that output = -1, it is most appreciated but just binary is also fine.
I am expecting something like the following. Output is the control variable in LP/MIP.
Is it possible to solve this just with constraints and without an objective function?
I want to solve this in CPLEX. Ideally I would like to formulate in regular LP/MIP but constraint programming is also fine.