Infeasible constraints but optimal solution found Topic is solved

Solver related questions
Post Reply
GrayLee
User
User
Posts: 8
Joined: 2 years ago

Infeasible constraints but optimal solution found

Post by GrayLee »

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
DC power flow.zip
(36.4 KiB) Downloaded 200 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Infeasible constraints but optimal solution found

Post by bussieck »

Hi, when I run the model I do get as you describe

Code: Select all

               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:

Code: Select all

**** REPORT SUMMARY :        0     NONOPT
                             0 INFEASIBLE
                             0  UNBOUNDED
                            47  PROJECTED
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

-Michael
eda
User
User
Posts: 10
Joined: 7 years ago
Location: Copenhagen
Contact:

Re: Infeasible constraints but optimal solution found

Post by eda »

If the model is near infeasible then different optimizers may come to different conclusions.

In order to see if Mosek might be wrong about its conclusion, then it is a good idea to post the log output.
Erling @ mosek.com
Post Reply