CPXXmultiobjgetobj and CPXmultiobjgetobj

The routine CPXXmultiobjgetobj/CPXmultiobjgetobj accesses the specified objective of a CPLEX problem object.

int   CPXXmultiobjgetobj( CPXCENVptr env, CPXCLPptr lp, CPXDIM  n, double * coeffs, CPXDIM begin, CPXDIM end, double * offset_p, double * weight_p, CPXDIM * priority_p, double * abstol_p, double * reltol_p)

int   CPXXmultiobjgetobj( CPXCENVptr env, CPXCLPptr lp, int  n, double * coeffs, int begin, int end, double * offset_p, double * weight_p, int * priority_p, double * abstol_p, double * reltol_p)

Description

The routine CPXXmultiobjgetobj/CPXmultiobjgetobj accesses the specified objective of a CPLEX problem object. The routine returns the objective in a similar manner as the CPXXgetobj/CPXgetobj function, but it also returns the attributes used in multiobjective optimization.

Arguments

env
A pointer to the CPLEX environment as returned by the CPXXopenCPLEX/CPXopenCPLEX routine.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
n
The index of the objective to be accessed.
coeffs
An array where the specified objective coefficients are to be returned. This array must be of length at least (end-begin+1). The coefficient of variable j for objective n is returned in coeffs[j-begin]. May be NULL if querying an empty range (i.e., if begin > end).
begin
An integer specifying the beginning of the range of objective function coefficients to be returned.
end
An integer specifying the end of the range of objective function coefficients to be returned.
offset_p
The constant term associated with the objective function.
weight_p
A pointer to a double in which the weight of the objective should be returned. May be NULL.
priority_p
A pointer to an integer in which the priority of the objective should be returned. May be NULL.
abstol_p
A pointer to a double in which the absolute tolerance of the objective should be returned. May be NULL.
reltol_p
A pointer to a double in which the relative tolerance of the objective should be returned. May be NULL.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


        status = CPXmultiobjgetobj (env, lp, n, coeffs, begin, end,
                                    &offset, &weight,
                                    &priority, &abstol, &reltol);