Infeasible constraints but optimal solution found
Posted: Thu Dec 09, 2021 5:27 pm
Dear all,
I am working on a DC power flow program in the field of Electrical Engineering. I made a simple code which is attached. I encountered a very confusing problem when I debugged my code. You can see there are 1 objective function and 9 constraints in my model. When I debugged the code, I just leave the objective function and the constraints named as 'Node_balance', 'MG_balance' and 'Angle_Power1'. If you run the code, you will see the constraint 'Node_balance' is infeasible from the solution report. However, the model status is optimal, and the variables are optimized. I am very confused about why I get the optimal solution with infeasible constraints. I also tried another solver MOSEK, and I got the same contradictory result. Can you please tell me why it happens and how to avoid the infeasible constraints?
Thanking you in anticipation!
Best regards,
Hui Li
Email: li_hui0312@163.com
I am working on a DC power flow program in the field of Electrical Engineering. I made a simple code which is attached. I encountered a very confusing problem when I debugged my code. You can see there are 1 objective function and 9 constraints in my model. When I debugged the code, I just leave the objective function and the constraints named as 'Node_balance', 'MG_balance' and 'Angle_Power1'. If you run the code, you will see the constraint 'Node_balance' is infeasible from the solution report. However, the model status is optimal, and the variables are optimized. I am very confused about why I get the optimal solution with infeasible constraints. I also tried another solver MOSEK, and I got the same contradictory result. Can you please tell me why it happens and how to avoid the infeasible constraints?
Thanking you in anticipation!
Best regards,
Hui Li
Email: li_hui0312@163.com