# Linearize min-max condition

 0 Hi, I have the following condition: $$x$$ and $$y$$ are continuous variables and $$\text{C}$$ is a constant. If $$\text{C} - 0.7x > 0$$ then $$y = \min(\text{C},1.3x)$$ else $$y = 0$$. In other words $$y = \min(\text{C}, 1.3x, \max(0, \text{M} \cdot \text{C} - 0.7x))$$ And the objective is to maximize $$y$$. Is it possible to model this as a set of linear constraints without using a binary variable? I want to stay in the LP regime and not create an MIP. Thanks! asked 13 Mar '15, 07:14 Rajeev N 131●2●9 accept rate: 0% fbahr ♦ 4.6k●7●16 It is important to say that y and in particular x are not restricted in sign, right? Otherwise always y < 0.7x. I don't think that this "either or" resp. "if then" can be formulated without a binary variable. (13 Mar '15, 07:31) Marco Luebbecke ♦ Yes, I forgot to add that y>0. Otherwise it is possible (13 Mar '15, 07:37) Rajeev N

One Answer:
 0 Here's my solution using a binary variable delta - maximize y s.t. C-0.7x >= M(delta -1) y <= delta*C y <= 1.3x But I want to get rid of delta as it is slowing down my solver. Thanks! answered 13 Mar '15, 07:33 Rajeev N 131●2●9 accept rate: 0% :-) then use a different solver; linear constraints alone will not help you here. Is this part of a larger linear program? (13 Mar '15, 07:37) Marco Luebbecke ♦ :-) No, this is the complete formulation. I want this to converge in less than a minute with about 1000 x variables and y variables each, but of course, this is not getting there :-) (13 Mar '15, 07:44) Rajeev N Are you trying to solve 1000 independent problems as one big problem? (13 Mar '15, 08:03) Rob Pratt Forgot to add one more constraint - x = a1z1 + a2z2 + a3*z3 where a1, a2, a3 are constants and z1, z2, z3 are decision variables. So these are not really 1000 independent problems (16 Mar '15, 07:10) Rajeev N
Your answer
 toggle preview community wiki

### Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• link:[text](http://url.com/ "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

Tags:

Asked: 13 Mar '15, 07:14

Seen: 2,814 times

Last updated: 16 Mar '15, 07:10

### Related questions

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