I have an ifthenelse condition in one of my constraints and I read online that Big M formulation can actually convert the constraint into a linear one. So, I'd like to ask you guys if my formulation of the constraint is correct or wrong.
Now the Big M formulation of the above constraint is as follows:
Please let me know if this is correct or wrong. Also, I tried using an indicator constraint but I'm having some trouble with it as it always points me to the solution 0.0 Thank You asked 11 Jun '14, 10:26 crypto 
I assume all variables are booleans. The second constraint is correct. For the first one, 4 instead of 5 would do it with a smaller big M. However, I would rather write the set of constraints instead: \[ \begin{align} x_{ns} & \ge x_S\\ x_{ns} & \ge x_P\\ x_{ns} & \ge x_M\\ x_{ns} & \ge x_I \end{align} \] Yes, all variables are binary and also the constraint you've mentioned could be written but in the objective, what I do is sum up all x_ns' over the number of nodes. So, for every node I'd have only one x_ns. If I follow your formulation, I'm not sure how I can do that. Also do I need both the constraints in my formulation or only one of them would do?
(11 Jun '14, 10:47)
crypto
What prevents you to replicate these set of constraints at every node ? I do not understand the relation with the objective function.
(11 Jun '14, 12:48)
David
Sorry for the confusion there but when I tried your formulation it provided me the same result the big M formulation provided. Thanks a lot for the answer and I just wanted to implement it using an indicator constraint because the idea sounded cooler but it had a few problems of its own. I'm working on that one as well. So, thanks to your answer I now have three ways to implement the same constraint. Many thanks David
(12 Jun '14, 03:12)
crypto
It is a must that any alternative solutions lead to the same optimal solution on small case, otherwise one of the formulation is wrong ! However, some formulations might be better than the other ones, and you will measure it when you do branch & cut. Roughly, you may close the gap much more faster with some formulations rather than others.
(12 Jun '14, 05:31)
David
