CPXXmultiobjgetobjval and CPXmultiobjgetobjval
The routine
CPXXmultiobjgetobjval/CPXmultiobjgetobjval
accesses the value of objective with index n after multiobjective
optimization.
int CPXXmultiobjgetobjval( CPXCENVptr env, CPXCLPptr lp, CPXDIM n, double * objval_p)
int CPXmultiobjgetobjval( CPXCENVptr env, CPXCLPptr lp, int n, double * objval_p)
Description
The routine
CPXXmultiobjgetobjval/CPXmultiobjgetobjval
returns the value of the specified objective in
*objval_p after multiobjective optimization
terminates, provided there is a solution.
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. - n
- The index of the objective whose value should be returned.
- objval_p
- A pointer to a double number in which the evaluated objective value should be returned.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs. Potential errors include: objective index out of range;objval_p being
NULL; or no solution available"the
objective index is out of range or no solution exists.
Example
status = CPXmultiobjgetobjval (env, lp, n, objval_p);