Linearization of non-linear program

linear programminglinearizationnonlinear optimization

have a linear program that represents a time series of actions (the variables are ordered). The objective function is MIN. For every variable, I have the constraint $Xi \leq \max(\text{value})$.

I want the constraint to represent the real world more precisely, so I need to change that constrain as follows:

if $\sum(X1,…,Xi-1) > someValue$ then $Xi \leq maxValue1$, else $Xi \leq maxValue2$.

Is there a way to make it linear?

Thanks

Best Answer

You have $x_j \le M$ for all $j$. You can enforce the logical implication $$\sum_{j=1}^{i-1} x_j > b_0 \implies x_i \le b_1$$ by introducing binary decision variable $y_i$ and imposing linear constraints \begin{align} \sum_{j=1}^{i-1} x_j - b_0 &\le ((i-1)M - b_0) y_i \tag1\label1\\ x_i - b_1 &\le (M-b_1)(1-y_i) \tag2\label2 \end{align} Constraint \eqref{1} enforces $$\sum_{j=1}^{i-1} x_j > b_0 \implies y_i = 1,$$ and constraint \eqref{2} enforces $$y_i = 1 \implies x_i \le b_1.$$

Related Question