CPXXgetsolnpoolobjval and CPXgetsolnpoolobjval

The routine CPXXgetsolnpoolobjval/CPXgetsolnpoolobjval accesses the objective value for a solution in the solution pool.

int  CPXXgetsolnpoolobjval( CPXCENVptr env, CPXCLPptr lp, int soln, double * objval_p )

int  CPXgetsolnpoolobjval( CPXCENVptr env, CPXCLPptr lp, int soln, double * objval_p )

Description

The routine CPXXgetsolnpoolobjval/CPXgetsolnpoolobjval accesses the objective value for a solution in the solution pool.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
soln
An integer specifying the index of the solution pool member for which to return the objective value. A value of -1 specifies that the incumbent should be used instead of a solution pool member.
objval_p
A pointer to a variable of type double where the objective value is stored.

Return

The routine returns 0 (zero) if successful and nonzero if the specified solution does not exist.

Example


 status = CPXgetsolnpoolobjval (env, lp, 0, &objval);

See also the example populate.c in the CPLEX User's Manual and in the standard distribution.