Skip to main content

Maximizing convex function

Answered

Comments

3 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi,

    Does that mean gurobipy replaces the objective function with a piecewise linear function? 

    No, Gurobi only uses piecewise-linear approximations if you use the addGenConstr methods.

    For nonconvex models, Gurobi uses the spatial B&B approach.

    In your particular case, the model is so easy, that Gurobi is able to solve it in its presolve step. Note that usually (if the model is not so simple), you have to set the parameter NonConvex=2 in order to solve nonconvex models.

    Best regards, 
    Jaromił

    1
  • Hussein Sharadga
    Gurobi-versary
    Investigator
    Conversationalist

    Thank you so much! Jaromił Najman 

    I am working on a large-scale problem and wanted to know if all constraints are linear or convex with a nonconvex objective function that gurobipy can solve it in affordable computing time.

     

    Best,

    Hussein

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Hussein,

    I am working on a large-scale problem and wanted to know if all constraints are linear or convex with a nonconvex objective function that gurobipy can solve it in affordable computing time.

    This cannot be stated a priori. The only way to find out is to actually construct the model and try to solve it.

    Best regards, 
    Jaromił

    1

Please sign in to leave a comment.