I have a question about the setting of the maximum iterations. For the same problem, when I set the max_iter=5000, the status return maximum iterations reached and the optimum solution is not optimal. But I wonder whether the optimization converges to the given precision. So I increse the max_iter to 15,000, but I got primal infeasiable and the solution seems wrong with very big values.
In the first test the solver has just reported that it hit the iteration limit. When that happens, we make a final check to see if the current iterate is either optimal or if an infeasibility certificate has been found (within the tolerances set). In your case, the solver could do neither, so it has just reported its final iterate and set the status to ‘max iterations reached’. We don’t promise anything about the quality of the iterate or the solvability of the problem in that case.
In the second test, the solver has checked for an infeasibility certificate and found one after 14575 iterations, so it stopped immediately and reported the problem as infeasible.
In the latter case, the solution is not ‘wrong’ because there is no solution, and you should not attach much significance to the primal variable that is returned. The solver also reports an infeasibility certificate, but that is a separate variable in the output.