How to deal with a fraction of binary decision variables
Awaiting user inputDear whom it may concern,
I am writing this to request some help in modelling my formulation. My formulation contains a set of binary (x, z) , integer variables (y). My concern is that the formulation contains a set of constraints engaging a fraction of integer decision variables (y) as follows:

The variables y can be 0 but it would make the second constraint above undefined. I also tried to reformulate this as proposed in https://support.gurobi.com/hc/en-us/articles/360053259371-How-do-I-divide-by-a-variable-in-Gurobi-
However, the proposed way would require to have a lower bound > 0 on the variables which would not work in my case.
I was wondering what could be a way to reformulate this without imposing the >0 lower bound?...
Thanks for your time..
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Dear Simon,
the reason for the lower bound being set to \( x^L > 0 \) in the case you mention is to avoid \( x \) assuming the value of \( 0 \).
If you also need to include the case of negative values of \( x \), you may want to use indicator constraints (see here and here). They will allow you to model two cases: one for \( x > 0 \) and the other for \( x < 0 \). If you need more guidance, let me know.
Best regards,
Jonasz0
Post is closed for comments.
Comments
2 comments