There is a decision variable \(x \ge 0\) and a given parameter \(\text{MIN}\). The quantity \(mk\) is calculated as \(mk = \text{MIN} - x\).

I want to distinguish cases as far as the sign of \(mk\) is concerned. I have defined a binary decision variable that is \(1\) when \(mk \ge 0\) and \(0\) otherwise.

I have the following constraint \(y \le \text{A} + b \cdot mk\). \(\text{A}\) is a parameter/constant.

How can I linearize it?

Thanks in advance,


asked 24 Nov '11, 08:13

standrul's gravatar image

accept rate: 0%

edited 10 Jul '12, 05:03

fbahr's gravatar image

fbahr ♦

Is b a decision variable? How does it fit with the rest?

(24 Nov '11, 08:16) Thiago Serra

Sorry! Yes b is the binary decision var I defined that is 1 when mk>=0 and 0 otherwise.

(24 Nov '11, 08:21) standrul

Assuming you have an upper bound \(U\) on \(x\):

\(y \le A+mk-(1-b) \times (MIN-U)\) and \(y \le A+b \times MIN\)


answered 25 Nov '11, 17:15

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

edited 10 Jul '12, 05:04

fbahr's gravatar image

fbahr ♦

From AIMMS' Modeling Guide, chapter on "Integer Programming Tricks":

> 7.3 Either-or constraints and 7.4 Conditional constraints.


answered 24 Nov '11, 09:50

fbahr's gravatar image

fbahr ♦
accept rate: 13%

edited 10 Jul '12, 05:05

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: 24 Nov '11, 08:13

Seen: 6,363 times

Last updated: 10 Jul '12, 05:05

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