Skip to main content

Which algorithm does Gurobi use to solve the model.addGenConstrPow()?

Answered

Comments

2 comments

  • Maliheh Aramon
    • Gurobi Staff Gurobi Staff

    Hi Luis, 

    Gurobi internally approximates the general function constraints including the power function as piecewise linear functions. In other words, Gurobi approximates these non-linear functions into linear MIP formulations and it then proceeds with its regular branch-and-cut approach to solve the approximated MIP formulation. 

    The piecewise linear approximation of general constraints involve a cost-vs-accuracy tradeoff. Using more points adds more pieces resulting in smaller errors. However, it increases the computational time. Gurobi includes parameters such as FuncPieces, FuncPieceLength, FuncPieceError to control the tradeoff. You can read more about them in the documentation of general constraints referred above.

    Best regards,

    Maliheh

    0
  • Luis Moncayo
    • Gurobi-versary
    • First Question
    • First Comment

    Dear Maliheh,

    Thank you very much; I appreciate your comment. That's exactly what I needed.

    Regards, :) 

    Luis 

    0

Please sign in to leave a comment.