I found following way to model a minimum constraint but in my case I need a non-zero minimum value. So in this figure, if any value of x_i is 0 then answer is 0 (assume x_i >=0) but I need non-zero value. Could you please help me to model this?

Trick to model minimum constraint.

  • $\begingroup$ thank you for your response, I tried setting that and then result is l_i itself. So that does not work. $\endgroup$ – Vinod Kumar Chauhan Mar 19 at 9:25
  • $\begingroup$ Possible Explanation: Suppose x_i takes values {2, 4, 0, 9}. The constraints in the picture sets the z >= minimum of x_i, => z >= 0. Now, if we put lower bound, i.e, suppose z>= 1 then both combined will give us z = 1 (for minimisation problem). But we need non-zero minimum value, i.e, 2. Isn't it like this? $\endgroup$ – Vinod Kumar Chauhan Mar 19 at 11:17
  • $\begingroup$ Suppose, I define: z > 0, and z == \sum_k x_k * y_k, /forall k, where y_k \in {0,1} and \sum_k y_k ==1. I think, this will solve my problem, although it will make the problem quadratic (which I can further linearise). Is it correct? $\endgroup$ – Vinod Kumar Chauhan Mar 19 at 12:12
  • 3
    $\begingroup$ Can you add a constraint "x_i=0 implies y_i=0"? That would do the trick, right? $\endgroup$ – Daniel Junglas Mar 19 at 12:13
  • 1
    $\begingroup$ Aah that works! I simply put "y_i <= x_i". Thank you! You can put the comment as answer, I will accept this. $\endgroup$ – Vinod Kumar Chauhan Mar 19 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.