I have a linear program that represent a time series of actions (the variables are ordered). The objective function is MIN. For every variable I have the constraint Xi <= max_value.
I want the constraint to represent the real world more precisely, so I need to change that constrain as follow:
if sum(X1,...,Xi-1) > some_value then Xi <= max_value_1, else Xi <= max_value_2.
Is there a way to make it linear? If not, is there a ready made solver (like ortools) for this?
Thanks