CPXXmultiobjgetname and CPXmultiobjgetname
Accesses the name of the specified objective of a CPLEX problem object.
int CPXXmultiobjgetname( CPXCENVptr env, CPXCLPptr lp, CPXDIM objind, char * buf_str, CPXSIZE bufspace, CPXSIZE * surplus_p)
int CPXmultiobjgetname( CPXCENVptr env, CPXCLPptr lp, int objind, char * buf_str, int bufspace, int * surplus_p)
Description
The routine
CPXXmultiobjgetname/CPXmultiobjgetname
accesses the name of the specified objective of a CPLEX
problem object.
CPXERR_NEGATIVE_SURPLUS, then
the value in *surplus_p
is negative and specifies the difference between the memory
provided and the memory required (in bytes).
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. - objind
- The index of the objective whose name should be returned.
- buf_str
-
A pointer to a buffer of size
bufspacewhere the name of the objective should be returned. May be NULL ifbufspaceis 0 (zero). - bufspace
-
An integer specifying the length of the array
buf_str. May be 0 (zero). - surplus_p
-
A pointer to an integer to contain the difference
between
bufspaceand the amount of memory required to store the name of the specified objective. A nonnegative value ofsurplus_pspecifies that the length of the arraybuf_strwas sufficient. A negative value specifies that the length of the array was insufficient and that the routine could not complete its task. In this case,CPXXmultiobjgetname/CPXmultiobjgetnamereturns the valueCPXERR_NEGATIVE_SURPLUS, and the negative value ofsurplus_pspecifies an upper limit on the amount of insufficient space in the arraybuf_str.
Return
The routine returns 0 (zero) if successful and nonzero if
an error occurs. The value
CPXERR_NEGATIVE_SURPLUS specifies that
insufficient space was available in the array
buf_str to hold the name.
Example
status = CPXmultiobjgetname (env, lp, objindex, buf_str,
bufspace, &surplus);