NO FRAMES

CPXgetbestobjval

int CPXPUBLIC CPXgetbestobjval(CPXCENVptr env, CPXCLPptr lp, double * objval_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXgetbestobjval accesses the currently best known bound on the optimal solution value of the problem at the time the invoking callback is called by an instance of IloCplex while solving a MIP. When a model has been solved to optimality, this value matches the optimal solution value. Otherwise, this value is computed for a minimization (maximization) problem as the minimum (maximum) objective function value of all remaining unexplored nodes.

Example

 status = CPXgetbestobjval (env, lp, &objval);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

objval_p

A pointer to the location where the best node objective value is returned. If the branch & cut tree has been exhausted, the best node value is set to a large number.

Returns:

The routine returns zero on success and nonzero if an error occurs.