Skip to main content

Modeling issue of dealing with fractions of variables and computation issues of solving the model

Answered

Comments

1 comment

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    You say that you allow \(y\) to attain the value \(0\), i.e., you theoretically allow for the term \(\frac{1}{0}\). If I understand your formulation correctly, if \(y=0\), then \(\mu\) can attain any value, also \(0\), which is fine if your problem allows for it.

    Does your integer variable have finite bounds \(y \in \{0,\dots,y^U\}\)? If not, then you definitely should define a tight variable bound for your integer variable \(y\). Note that just setting the bound to some big value will most likely not help. Please note that because of the division, your model is nonlinear and finite variable bounds are required to construct relaxations of these models.

    Your binary variable \(\lambda\) equals \(0\) if \(y = 0\). You could use indicator constraints to formulate

    \[\begin{align*}
    \lambda &= 0 \rightarrow \mu = 0\\
    \lambda &= 1 \rightarrow z = 1\\
    z &= \mu \cdot y
    \end{align*}\]

    and then use \(\mu\) in your sum as you already do.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.