How can I convert this Min function (bold highlihted) in objective problem into simple mathematical equation: Min a[i]*(x[i]-y[i]) + b[i] min(x[i],M-c[i]) s.t. c[i]-x[i]+y[i]≤M Here x[i] and y[i] are decision variables. |
Replace \(\min(x_i, M-c_i)\) with a new variable \(z_i\). Also add a binary variable \(w_i\). Assuming that \(b_i>0\), constrain \(z_i\) as follows: \begin{align*} z_{i} & \ge x_{i}-Kw_{i}\\ z_{i} & \ge M-c_{i}-L(1-w_{i}) \end{align*} where \(K\) is a valid upper bound for \(x_i - M + c_i\) when \(M - c_i < x_i\) and \(L\) is a valid upper bound for \(M - c_i - x_i\) when \(M - c_i > x_i\). This forces \(z_i\) to be either \(x_i\) or \(M - c_i\); the assumption that \(b_i > 0\) combined with the fact that the overall objective is minimization ensures that the solver will pick whichever choice is smaller (i.e., the minimum). If \(b_i < 0\), you don't need the binary variable \(w_i\). Just constrain \(z_i\) to be less than or equal to both \(x_i\) and \(M - c_i\). Thanks Paul for such valuable information. What if I have conditional variable such as z[i]: Min a[i]*(x[i]-y[i]) + b[i] z[i] where
where x[i] and y[i] are non-negative variables and a[i], b[i], c[i] and M are positive inputs. Can it be converted into linear constraints?
(22 Feb, 09:13)
fadiz
So in the first case you want z[i] to be negative, in the second case you want z[i] to be nonnegative, and if M - c[i] >= 0 you want z[i] to be zero?
(04 Mar, 19:55)
Paul Rubin ♦♦
|
What are the bounds on the decision variables x and y? are they greater than or equal to zero?
Are a, and b greater than or equal to zero too?
Both x and y are greater than or equal to zero.
a, and b are also non-negative inputs