• 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ł

Hi Joramil,

Thanks for replying to my question. The term k Xk−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

• 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ł

Hi Jaromił,

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

Regards,

Asefeh