NO FRAMES

CPXgetnumcols

int CPXPUBLIC CPXgetnumcols(CPXCENVptr env, CPXCLPptr lp)
Definition file: cplex.h
Include files: cplex.h

The routine CPXgetnumcols is used to access the number of columns in the constraint matrix, or equivalently, the number of variables in the CPLEX problem object.

Example

 cur_numcols = CPXgetnumcols (env, lp);
 

See also the example lpex1.c in the ILOG CPLEX User's Manual and in the standard distribution.

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

Example

 cur_numcols = CPXgetnumcols (env, lp);
 

See also the example lpex1.c in the ILOG CPLEX User's Manual and in the standard distribution.

Returns:

If the problem object or environment does not exist, CPXgetnumcols returns the value 0 (zero); otherwise, it returns the number of columns (variables).