Skip to main content

Convex combination of constraints that makes the problem infeasible

Answered

Comments

7 comments

  • Jonasz Staszek
    Community Moderator Community Moderator
    Gurobi-versary
    Thought Leader
    First Question

    Hi Xuan,

    IIS - as per its definition - is a minimal system of constraints which together cause infeasibility. They are "equally important" - if you remove any of them, the system (but not necessarily the entire model) will be feasible.

    I am not aware of the functionality you are after in Gurobi. Perhaps someone from Gurobi team can confirm this?

    Additionally, maybe this article will be of interest to you.

    Best regards
    Jonasz

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Xuan,

    You can think of lambda_{i} as a nonnegative weight vector that sums up to one which, if the constraints are combined according to it, will make the constraint system infeasible (>0). 

    [...] but it does not give me such a vector which helps identify which constraint is more important in terms of causing infeasibility. I wonder if Gurobi has this function?

    Gurobi does not have a feature which computes such \(\lambda\) for nonlinear (constrained) models.

    As Jonasz pointed out, Gurobi can compute an IIS, which is a subset of constraints causing infeasibility. It might be possible to compute a convex combination of constraint in an IIS to get a single infeasible constraints. However, this is not something currently available in Gurobi.

    Best regards, 
    Jaromił

    1
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Xuan,

    Jaromił and I had a discussion and there is possibly a way forward if your constraints are linear.

    It would involve creating a LP with those constraints identified in the IIS, leaving the default objective of 0, solving via simplex to produce infeasibility (you may need to turn presolve off so that the simplex is run) and then retrieving the Model.FarkasDual to get a vector whose length is equal to the number of constraints.  I think if you normalize it to a unit vector you may get what you are after.  But this all relies in your initial constraints being linear.  Is this the case?

    - Riley

    1
  • Xuan Lin
    Curious
    Gurobi-versary
    Conversationalist

    Hi Riley,

    Thanks for the discussion and reply! Yes, the original QP problem has linear constraints and a quadratic objective function. I am trying the method you suggested. It might be the case that a uniform weight assigned to each constraint in IIS is sufficient - I need to have further test.

     

    If there is any further updates, I will post it here. Thank you!

     

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Thanks Xuan, we'll be keen to hear if it works for you!

    0
  • Xuan Lin
    Curious
    Gurobi-versary
    Conversationalist

    Hi,

    I have a follow-up question: When Gurobi compute Farkas dual for linear programming problem with mixed equality and inequality constraints, does it find a Farkas dual that satisfies the conditions presented in slide 5-5 here: http://www.seas.ucla.edu/~vandenbe/ee236a/lectures/alternatives.pdf?
    I understand that Farkas dual is not unique. So maybe Gurobi just find a Farkas dual that satisfies the inequality condition lamda^{T}*A*x <= lambda^{T}*b as shown in your documentation (https://www.gurobi.com/documentation/9.1/refman/farkasdual.html#attr:FarkasDual), and turn the equality constraints into inequalities, so the equality condition A^{T}z + C^{T}y = 0 in the slides is not necessarily satisfied?
    My objective function is 0 and I already set InfUnbdInfo to 1.

    Thank you!

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Xuan,

    For an equality, only one of the directions \(\leq, \geq\) is responsible for the infeasibility. Thus, depending on the sign of the Farkas Dual value \(\lambda\), you can determine which direction of an equality constraint has been used to determine an infeasible combination of inequalities. This \(\lambda\) will satisfy the equality condition. Let's have a look at the following infeasible model

    \[\begin{align*}
    \min_{x,y}\,& 0\\
    \text{s.t.}\, & x + 2\cdot y = 6\\
                     & x + y = 0.1
     & x,y \geq 0
    \end{align*}\]
    The FarkasDual computed by Gurobi is \(\lambda^T = (-1, 2)\). This fulfills the definition we state in the docs because

    \[\begin{align*}
    \lambda^T A x = x + 0\cdot y \leq -5.8 = \lambda^T b
    \end{align*}\]
    which is trivially infeasible, given that both variables are non-negative. This exactly fulfills the definition on slide 5-3.

    The definition you refer to on slide 5-5 is also fulfilled. Note that on your slides, the Farkas Lemma on slide 5-2 is defined for \(Ax = b\) but slides 5-1 and 5-5 use \(Ax \leq b\) which may lead to confusion. This is because Gurobi uses \(Ax = b\) and then the certificate has to fulfill \(A^T z + C^T y \geq 0\), \(b^T z + d^T y < 0\) which it fulfilled as you can see above.

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.