I attempted to optimize a linear perform with equality constraints utilizing Maximize and I observed that it returns an infeasible resolution with none warnings.
The issue is that this:
Which I formulated in Mathematica like so:
In[69]:= Maximize[{x1 + x2, x1 + x2 == 7, x1 + 4*x2 == 16, 3*x1 + 2*x2 == 18, x1 >= 0, x2 >= 0}, {x1, x2}]
Out[69]= {16, {x1 -> 16, x2 -> 0}}
Mathematica doesn’t warn concerning the resolution not being infeasible, regardless that it clearly violates the primary constraint.
Splitting the primary constraint into two $ge$ and $le$ constraints provides the proper reply:
In[71]:= Maximize[{x1 + x2, x1 + x2 <= 7, x1 + x2 >= 7, x1 + 4*x2 == 16, 3*x1 + 2*x2 == 18, x1 >= 0, x2 >= 0}, {x1, x2}]
Out[71]= {7, {x1 -> 4, x2 -> 3}}
What’s the issue right here?
I am utilizing Mathematica 12.0.Zero constructed on April 9, 2019.