Hello, now I have a problem, in which \(x\) is the binary variable, constant \(a \ge 0\), \(f(x)\) is a function of \(x\). How to represent the following relationship: If \(a \le f(x)\), then \(x=0\). Do you have some ideas for the constraint above? Many thanks for that, it seems a bottleneck in my current problem. I want to fix it. Thank you. 
One way to model this, is \( a \geq f(x) + \varepsilon  (1x)M \). Sensible values for \( \varepsilon \) and \( M \) depend on your problem formulation though. Note that when this constraint does not admit a conic representation (due to f(x)), you are solving a mixed integer nonlinear programming problem. These problems are generally challenging. answered 10 Mar '15, 11:00 optimizer That is pretty good. I really appreciate that. When a<= f(x), this constraint requires x=0 exactly; while if a > f(x), it doesn't influence the value of x. In my problem, f(x) is a linear function of x. Thank you very much. Have a good day.
(10 Mar '15, 11:06)
LinYuan

You might be able to apply what I wrote in Indicator Implies Relation to the contrapositive of your constraint (\(x = 1 \implies a \gt f(x)\)), with the usual necessity to relax the strict inequality a bit (or introduce an \(\epsilon\) gap as in what @optimizer wrote). answered 10 Mar '15, 15:48 Paul Rubin ♦♦ That is exactly what I want. According to the link, I find many related topics in your blog. Many thanks for the kind materials. They really help me a lot for my future research. For this problem, can we simply set ϵ=0 ?
(10 Mar '15, 21:31)
LinYuan
Yes, because \(x\) binary implies \(f(x)\) takes only two possible values ... which also makes the constraint somewhat trivial. Let \(f_0 = f(0)\) and \(f_1 = f(1)\). Presumably you can compute these before solving the model. If \(f_1 \ge a\) then \(x\) must be 0. If \(f_1 \lt a \le f_0\), the constraint is vacuous (it basically says \(x = 0 \implies x = 0\)). If both values of \(f\) are less than \(a\), the constraint can never come into play.
(11 Mar '15, 10:46)
Paul Rubin ♦♦
