Skip to main content

Using "addGenConstrPow" but model is infeasible

Answered

Comments

3 comments

  • Jaromił Najman
    • Gurobi Staff

    Hi Jack,

    The issue is caused by the default value of the FuncMaxVal parameter which is 1e+6. This limits the bounds on variables participating in general constraints, but \(220^4 > 10^6\). Thus, your model is declared as infeasible.

    To avoid this, you have to set the parameter to a larger value, e.g.,

    model.setParam("FuncMaxVal",10e+20)

    Please note that working with such large values is not recommended. So, if you want to extend your model and indeed work with the value of \(\texttt{x_pow4}\) in an extension of your model, then this might very likely lead to numerical issues.

    Best regards, 
    Jaromił

    0
  • Jack Kaz
    • Gurobi-versary
    • First Comment
    • First Question

    Hi Jaromil,

    thank you very much for your advice!

    Unfortunately, we have this big values in thermodynamics when working with absolute temperatures.. Is there a suggestion to reduce the possibility of numerical issues? I was thinking of a way to limit the value range of the function.. or is it done when defining upper and lower bounds to the variables?

    0
  • Jaromił Najman
    • Gurobi Staff

    Hi Jack,

    Unfortunately, we have this big values in thermodynamics when working with absolute temperatures.. Is there a suggestion to reduce the possibility of numerical issues? I was thinking of a way to limit the value range of the function.. or is it done when defining upper and lower bounds to the variables?

    I understand. You could re-scale the orders of magnitude, e.g., say that 1 unit for some variable equals 1000 degrees instead of 1. This would already scale the values by 4 orders of magnitude. For more detailed tips, please have a look at our Guidelines for Numerical Issues.

    0

Please sign in to leave a comment.