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.

asked 20 Feb '18, 05:58

fadiz's gravatar image

accept rate: 0%

edited 01 Mar '18, 13:41

fbahr's gravatar image

fbahr ♦

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?

(20 Feb '18, 09:36) Naveen Divak...

Both x and y are greater than or equal to zero.

a, and b are also non-negative inputs

(22 Feb '18, 04:45) fadiz

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\).


answered 21 Feb '18, 16:59

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

edited 21 Feb '18, 17:02

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]


if c[i] > M and x[i] ≥ c[i] - M

z[i] = M - c[i]

elseif c[i] > M and 0 ≤ x[i] ≤ c[i] - M

z[i] = x[i]


z[i] = 0


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 '18, 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 '18, 19:55) Paul Rubin ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 20 Feb '18, 05:58

Seen: 956 times

Last updated: 04 Mar '18, 19:55

OR-Exchange! Your site for questions, answers, and announcements about operations research.