NO FRAMES

CPXgetprobname

int CPXPUBLIC CPXgetprobname(CPXCENVptr env, CPXCLPptr lp, char * buf_str, int bufspace, int * surplus_p)
Definition file: cplex.h
Include files: cplex.h

The routine CPXgetprobname is used to access the name of the problem set via the call to CPXcreateprob.

Note
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_str.

Example

 status = CPXgetprobname (env, lp, cur_probname, lenname,
                          &surplus);
 

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

buf_str

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

bufspace

An integer indicating the length of the array buf_str. May be 0.

surplus_p

A pointer to an integer to contain the difference between bufspace and the amount of memory required to store the problem name. A nonnegative value of *surplus_p indicates that the length of the array buf_str 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, CPXgetprobname 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_str.

Returns:

The routine returns zero on success and nonzero if an error occurs. The value CPXERR_NEGATIVE_SURPLUS indicates that insufficient space was available in the buf_str array to hold the problem name.