Skip to main content

Non-Dcp-constraint

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff Gurobi Staff
    This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?.
  • Juan Orozco
    • Gurobi Staff Gurobi Staff

    If x>0, a dirty way would be to approximate 1/x with model.addGenConstrPWL() (provide tight bounds for x and ensure the breakpoints generate a good-enough approximation), then model.addGenConstrMin(), and finally defining the functional constraint using model.addConstr().

    Of course, this approach would create several auxiliary variables and constraints internally, so you need to test whether the solver performance is acceptable under this approach.

    1

Post is closed for comments.