Skip to main content

Presolve for Non-Convex Quadratic Optimization

Answered

Comments

4 comments

  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Hi Samira,

    However, there is one term in the bilinear expression for which I don't have pre-determined bounds. I'm curious if Gurobi's presolve can provide reasonable (though not necessarily tight) bounds for these variables. My understanding is that presolve primarily works for MILP and LP problems not for Non-Convex Quadratic Optimization problems, but I wanted to confirm this with you.

    Gurobi's presolve algorithm also applies to (nonconvex) quadratic models. Gurobi will try to determine and tighten bounds for all variables participating in nonlinear terms. However, it is sometimes impossible to deduce meaningful bounds for all variables. Thus, it is most often best to provide bounds as a user.

    In your particular case, would it be possible to set some realistic bounds for your variable? For example [-1e6, 1e6] or tighter?

    Best regards, 
    Jaromił

    0
  • Samira Fallah
    • Gurobi-versary
    • Conversationalist
    • First Question

    Thanks for the quick response.

    To answer this:
    In your particular case, would it be possible to set some realistic bounds for your variable? For example [-1e6, 1e6] or tighter?

    Establishing bounds can be extremely difficult due to numerical challenges. Even if lower bounds are assigned and prove effective for one specific case, they might not be suitable as reliable lower bounds for other instances.

    Even when using presolve, it's important to set some bounds on variables beforehand, as otherwise, they would default to zero, which is not desired. Setting this bound becomes critical due to numerical challenges. One approach I can consider is setting the bounds to the minimum value that Gurobi can handle, and then enabling aggressive mode in presolve to obtain a tighter bound, minimize numerical issues, and observe the outcome.






    0
  • Jaromił Najman
    • Gurobi Staff Gurobi Staff

    Even when using presolve, it's important to set some bounds on variables beforehand, as otherwise, they would default to zero, which is not desired. Setting this bound becomes critical due to numerical challenges. One approach I can consider is setting the bounds to the minimum value that Gurobi can handle, and then enabling aggressive mode in presolve to obtain a tighter bound, minimize numerical issues, and observe the outcome.

    Setting bounds manually to a very big value (absolute-wise) is not recommended. If you cannot deduce bounds for your variables then it is best to just set these to \(\texttt{+- GRB.INFINITY}\). Please note that already for bounds with \(|bound| > 10^9\) it can be better to just not provide such bounds at all.

    I think it is best to experiment with set bounds and always bound as many variables as possible (unless the bounds are very big/small).

    0
  • Samira Fallah
    • Gurobi-versary
    • Conversationalist
    • First Question

    I appreciate your assistance. Therefore, my plan is to assign a lower bound of -GRB.INFINITY and enable Gurobi's aggressive presolve mode by setting model.Params.Presolve = 2, assuming that Gurobi can establish practical boundaries for them.

    Best,
    Samira

    0

Please sign in to leave a comment.