The Callable Library routine CPXopenCPLEX()
returns a pointer to a ILOG CPLEX environment. In case of failure, it returns a NULL
pointer. The parameter *status_p
(that is, one of its arguments) is set to 0 if the routine is successful; in case of failure, that parameter is set to a nonzero value that indicates the reason for the failure. Each failure value is unique and documented in the ILOG CPLEX Reference Manual.
The Callable Library routine CPXcreateprob()
returns a pointer to a ILOG CPLEX problem object and sets its parameter *status_p to 0 (zero)
to indicate success. In case of failure, it returns a NULL
pointer and sets *status_p
to a nonzero value indicating the reason for the failure.
Some query routines in the Callable Library return a nonzero value when they are successful. For example, CPXgetnumcols()
returns the number of columns in the constraint matrix (that is, the number of variables in the problem object). However, most query routines return 0
(zero) indicating success of the query and entail one or more parameters (such as a buffer or character string) to contain the results of the query. For example, CPXgetrowname()
returns the name of a row in its name
parameter.