The termination status of the solver.
The direction of the problem, "min" or "max".
The primal bound of the solver.
The dual bound of the solver.
The best known primal bound of the problem.
The best known dual bound of the problem.
Whether the result failed, and the reason.
This function sets the fail value and reason based on the termination status and other parameters.
The bounds of the solver are checked against the best known bounds of the problem: a solver cannot have a primal bound that is better than the best known dual bound, nor a dual bound that is better than the best known primal bound.