Skip to main content

Dual bound not increasing - callbacks with binary variables

Answered

Comments

1 comment

  • Erik Halseth
    • Gurobi Staff Gurobi Staff

    Hello Caio,

    Thank you for reaching out to the community forum. We appreciate your contribution.

    To respond to your comments around your observations during optimization, have you first considered reformulating your original equations for simplification?

    One such approach is in the following. Noting that your equations result in g when (X=1, Y=1) or otherwise, f, we can convert to a quadratic scenario in which:


    Z >= fXY

    Z >= gX(1-Y)

    We could do better than this if we introduce the constraint Y_1 + Y_2 = X (X =1 if Y_1 or Y_2 is 1) that results in:

    Z >= Y_1*f + Y_2*g

    Y_1 + Y_2 = X

    So that ultimately results in one quadratic constraint. Please also experiment with PreQLinearize on top of this new formulation when optimizing so that Gurobi has an opportunity to do a more efficient reformulation. Regarding PreQLinearize, please have a look at this.

    Please let us know your feedback.

     

    Warm thanks,

    Erik H.

    0

Please sign in to leave a comment.