Skip to main content

Confusion regarding the sum of log functions as the objective function

Answered

Comments

2 comments

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Zengyu,

    First, note that variables in Gurobi have a default lower bound of 0 unless specified otherwise.  This is a common source of unexpected infeasibility.

    The upper bound of eps_2 is 0.418 and log(x) for x <= 0.418 is negative.  Since your temp_2 variable has a lower bound of 0 you have an infeasible model.

    A couple of more things to note:

    * An ILP file is only supposed to contain information that contributes to the infeasibility.  The model is infeasible no matter what the value of the eps_2 lower bound, and so the bound is ignored which is why you see "-infinity <= eps_2"

    * The objective does not matter when a model is infeasible, so you should not expect to see your original objective in the ILP file

    * When writing out LP files, Gurobi will include any variable that does not appear in any linear constraint in the objective with a 0 coefficient, if it is not part of the objective already.  For reasons behind this please refer to this post.  You can just ignore these variables.

    - Riley

     

     

     

    0
  • Zengyu Liu

    Hi Riley,

    Thank you so much for your detailed explanation!
    Have a nice day!

    0

Please sign in to leave a comment.