CPXXmultiobjgetindex and CPXmultiobjgetindex

The routine CPXXmultiobjgetindex/CPXmultiobjgetindex searches for the index number of the specified objective in a CPLEX problem object.

int   CPXXmultiobjgetindex( CPXCENVptr env, CPXCLPptr lp, char const * name, CPXDIM * index_p)

int   CPXmultiobjgetindex( CPXCENVptr env, CPXCLPptr lp, char const * name, int * index_p)

Description

The routine CPXXmultiobjgetindex/CPXmultiobjgetindex searches for the index number of the specified objective in a CPLEX problem object.

Arguments

env
A pointer to the CPLEX environment as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX problem object as returned by CPXXcreateprob/CPXcreateprob.
name
The objective name to search for.
index_p
A pointer to an integer to hold the index number of the objective with name name. If the routine is successful, *index_p contains the index number; otherwise, *index_p is undefined.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


        status = CPXmultiobjgetindex (env, lp, "objective89", &objindex);