Previous Page: CPXgetobjFirst PageNext Page: CPXgetobjsen

CPXgetobjname


Description

The routine CPXgetobjname() is used to access the name of the objective row of a CPLEX LP problem object.

Return Value

The routine returns a 0 on success, and a nonzero if an error occurs. The value CPXERR_NEGATIVE_SURPLUS indicates that insufficient space was available in the buf array to hold the objective name.

Synopsis

int CPXgetobjname (CPXENVptr env,
                   CPXLPptr lp,
                   char *buf,
                   int bufspace,
                   int *surplus_p);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

char *buf
A pointer to a buffer of size bufspace. May be NULL if bufspace is 0.

int bufspace
An integer indicating the length of the array buf. bufspace may be 0.

int *surplus_p
A pointer to an integer that will contain the difference between bufspace and the amount of memory required to store the objective row name. A non-negative value of *surplus_p indicates that the length of the array buf was sufficient. A negative value indicates that the length of the array was insufficient and that the routine could not complete its task. In this case, CPXgetobjname() returns the value CPXERR_NEGATIVE_SURPLUS, and the negative value of the variable *surplus_p indicates the amount of insufficient space in the array buf.

If the value of bufspace is 0, then the negative of the value of *surplus_p returned indicates the total number of characters needed for the array buf.

Example

status = CPXgetobjname (env, lp, cur_objname, lenname,
                        &surplus);
Previous Page: CPXgetobjFirst PageNext Page: CPXgetobjsen