CPXXgetlongannotationindex and CPXgetlongannotationindex

The routine CPXXgetlongannotationindex/CPXgetlongannotationindex retreives the index of the long valued annotation with the given name.

int  CPXXgetlongannotationindex( CPXCENVptr env, CPXCLPptr lp, char const * annotationname_str, CPXDIM * index_p )

int  CPXgetlongannotationindex( CPXCENVptr env, CPXCLPptr lp, char const * annotationname_str, CPXDIM * index_p )

Description

The routine CPXXgetlongannotationindex/CPXgetlongannotationindex retreives the index of the long valued annotation with the given name. An argument to CPXXgetlongannotationindex/CPXgetlongannotationindex defines the name of the long valued annotation to be queried. The index of the long valued annotation are returned via pointer arguments. If no such annotation is available a negative index is returned along with an error code.

For an example of this routine in use, see benders.c distributed with the product.

For more routines supporting annotations, see Annotating Models in the CPLEX Callable Library (C API) in the reference manual of the CPLEX Callable Library (C API).

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.
annotationname_str
A pointer to a character string containing the annotation name. The string must match the name specified in an earlier call of CPXXnewlongannotation and CPXnewlongannotation that created the annotation.
index_p
A pointer to an integer to hold the index of the queried annotation. (The queried annotation was created by an earlier call to CPXXnewlongannotation and CPXnewlongannotation.) If no such annotation is available, a negative index will be returned.

Return

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

Example


status = CPXgetlongannotationindex (env, lp, &annotationname, &index);