Pi values (Lagrange multipliers) in flow constraints in Gurobi
Awaiting user inputHello everyone,
I’m working on code to solve an Optimal Power Flow (OPF) problem in Gurobi. When extracting the Pi values (Lagrange multipliers) corresponding to the flow constraints for parallel lines, I’ve noticed that only one of the parallel lines receives a non-zero value, while the other is assigned a value of 0. Theoretically, both values should be the same, as these lines represent the same flow constraint.
Does anyone know why this might be happening? Is this expected behavior in Gurobi’s solution, or should something be modified in the model to ensure both values are identical?
I appreciate any guidance or experience you can share. Thank you!
-
Hi Andrés,
This is expected. A model can have parallel constraints but only one of these can be included in the basis, otherwise the basis would be singular. Any constraint that is not in the basis will have a dual variable of 0.
Recall that if the optimal objective value is f(x) then dual variables pi will satisfy b^T pi = f(x). If you were to increase the value of dual value for one of the parallel constraints you would need to decrease the value of the dual variable for another parallel constraint to maintain this relationship, but then the dual values lose their meaning as shadow prices (and there's no way to actually ask Gurobi to do this).
However I have to address the elephant in the room. Why are you wanting parallel constraints in the model?
- Riley
0
Please sign in to leave a comment.
Comments
1 comment