Questions about Gurobi's solution
回答済みI ran the very simple problem below in an interactive shell (it's an excerpt from a larger problem). I expected the result to be infeasible, but it yielded a solution, and when I ran it with presolve=0, the result was infeasible.
What could be the problem?
Any help would be appreciated.
Thank you.
===========
Maximize
C0
Subject To
budget_sum: C0 <= 17065
budget_media_sum: C0 = 17065
revenue_sum: C5 >= 2.23116e+05
Bounds
15358.5 <= C0 <= 18771.5
General Constraints
revenue_PWLConstr: C5 = PWL ( C0 ) : (15358.5, 26482.68874)
(18771.5, 62763.75945)
End
==========
-
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.224095So 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 -
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 -
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 -
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
サインインしてコメントを残してください。
コメント
4件のコメント