Check solve and model status after solve
Model attribute .solvestat
is set to 1 if the solver returned normally. Higher values indicate a problem, e.g. time limit exceeded, and in this case .modelstat
should be checked to see what kind of solution was reached. In some cases it might be desirable to raise an error – and thus exit the solve loop.