Skip to main content

Questions about Gurobi's solution

Answered

Comments

5 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Riley Clement
    • Gurobi Staff

    Hi Ahhyun,

    The value of C0 is fixed in your model:

     budget_media_sum: C0 = 17065

    The value of C5 will therefore fixed by the PWL constraint:

    revenue_PWLConstr: C5 = PWL ( C0 ) : (15358.5, 26482.68874) 
      (18771.5, 62763.75945)

    You can calculate this (eg with Python):

    >> x1=15358.5
    >> y1=26482.68874
    >> x2=18771.5
    >> y2=62763.75945
    >> x = 17065
    >> (x-x1)/(x2-x1)*(y2-y1)+y1
    44623.224095

    So if C0 = 17065 then C5 = 44623.224095.  But you also have a constraint

    revenue_sum: C5 >= 223116

    and this is not compatible with the calculated value of C5.  So, the model you have presented is infeasible.  Perhaps there is a mistake in your data or your model if you were expecting it to be feasible.

    - Riley

     

     

    0
  • Ahhyun Kim
    • Gurobi-versary
    • First Comment
    • First Question

    Thank you for your kind response.


    You are correct that the problem with the attached LP file is INFEASIBLE.
    My question is that when I solve this lp file in interactive shell, feasible comes out.
    I have attached the gurobi result below.
    Sorry for the inconvenience, but I would appreciate if you could take another look.

    Thank you.

    0
  • Riley Clement
    • Gurobi Staff

    Hi Ahhyun,

    This may be a bug.  I suspect this issue only arises if the model, minus general constraints, can be solved entirely by presolve (which is certainly the case here).

    As a workaround, please use the ConstrVio attribute to check the violation in addition to Status, and in the meantime we'll work on resolving the issue.

    Edit: there should be no difference between the interactive shell and using an LP file, and I don't observe one.  The only difference I see is when presolve=0.  In this case we do not run the normal presolve routine but we do convert general constraints into linear constraints, which is then why we do not encounter the (assumed) bug.

    - Riley

     

    0
  • Riley Clement
    • Gurobi Staff

    Hi Ahhyun,

    I can confirm it is a bug, and will be fixed in our upcoming release V12 which will be published later this year.  Thanks for bringing it to our attention!

    - Riley

    0

Post is closed for comments.