Previous Page: CPXgetcoefFirst PageNext Page: CPXgetcolname

CPXgetcolindex


Description

Given a column (variable) name, this routine searches for the index number of the associated column in an LP problem object.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

int CPXgetcolindex (CPXENVptr env,
                    CPXLPptr lp,
                    char *lname,
                    int *index_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 *lname
A column name to search for.

int *index_p
A pointer to an integer to hold the index number of the column with name lname. If the routine is successful, *index_p will contain the index number upon routine exit, otherwise *index_p is undefined.

Example

status = CPXgetcolindex (env, lp, "power43", &colindex);
Previous Page: CPXgetcoefFirst PageNext Page: CPXgetcolname