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?
S O L V E S U M M A R Y
MODEL m OBJECTIVE C_tot
TYPE LP DIRECTION MINIMIZE
SOLVER CPLEX FROM LINE 239
**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE 724.1415
The summary of the infeasiblilty status of rows and columns at the end of the solution report reads:
Searching for INFES in the solution section reveals nothing. So all is fine. There are INFES in the equation listing. They mark the infeasibilities of the input point not of the solution. Did you perhaps get confused by this? Read more about the various sections in the listing file here: https://www.gams.com/latest/docs/UG_GAMSOutput.html