メインコンテンツへスキップ

Why Does a Bilinear Term Get Infinite Upper Bound After Presolve?

回答済み

コメント

4件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi Perapat,

    Did you get an answer to this question?  I recall seeing you ask it (or a very similar question) on another one of your posts that I think may have now been deleted?

    - Riley

    0
  • Perapat Prugsamas
    • First Question
    • First Comment

    Hello Riley,

    I haven't received the answer to the question yet. I only post it once in this forum.

    - Perapat

    0
  • Riley Clement
    • Gurobi Staff

    Hi Perapat,

    This constraint:

    model.addConstr(r == x * y)

    will be handled by our quadratic constraint code.  An upper bound for r will be added provided it is not too large.  If you set the upper bounds for x and y to be 100, for example, you will see it is given an upper bound.  When the upper bound is so large that it might cause numerical issues for our solver then we will not add it.

    This constraint:

    model.addConstr(u == x * y * t)
    

    will be handled by our nonlinear constraint code.  If you had instead used u == r*t then u will also have not been given a bound in your example.  Currently the nonlinear code adds a bound.  This may change in the future - this nonlinear API is still relatively new.

    In general it is a very good idea to keep bounds small on variables which are inputs to nonlinear constraints (which includes quadratic constraints).  This may require scaling the variable by choosing a different unit for whatever quantity it represents.

    - Riley

    0
  • Riley Clement
    • Gurobi Staff

    Apologies Perapat for the confusion around asking an earlier question.  It looks like you and Huan Nguyen are working on the same assignment and asking very similar questions.

    https://support.gurobi.com/hc/en-us/community/posts/46065096664337

    Maybe it is useful for you to collaborate.

    - Riley

     

     

    0

サインインしてコメントを残してください。