Skip to main content

Lagrangian Relaxation

Answered

Comments

4 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Asefeh,

    I will omit some indices to simplicity. Due to the constraint

    \[\sum_k X^k \leq Y\]

    the term \(\sum_k X^k - Y\) is always nonpositive \(\leq 0\). To my understanding the penalty term should read

    \[\sum \lambda \left ( Y - \sum_k X^k \right) \]

    Best regards, 
    Jaromił

    0
  • Asefeh Hassani Goodarzi
    Gurobi-versary
    First Comment
    First Question

    Hi Joramil,

    Thanks for replying to my question. The term Y is nonpositive ≤0, but just in feasible solutions. Since I relaxed this Constraint, the infeasible solution also could be generated, in which ∑k Xk−Y is positive ≥0. This violation should be added to the objective function as a penalty. I hope I was clear.

    Thanks again,

    Asefeh

     

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Asefeh,

    Thank you for clarifying. The Lagrangian relaxation does not work if you allow for negative terms in the term you want to penalize. This is because the solver will always exploit this fact making the model unbounded.

    For your particular relaxed constraint, you have to bound your variables such that only the infeasible ones are allowed, i.e., only variables for which \(\sum X - Y \geq 0\).

    Best regards, 
    Jaromił

    0
  • Asefeh Hassani Goodarzi
    Gurobi-versary
    First Comment
    First Question

    Hi Jaromił,

    I will try it. Thanks again for your recommendation and solution to this issue. 

    Regards,

    Asefeh

    0

Please sign in to leave a comment.