CPXXgetdblannotationindex and CPXgetdblannotationindex
The routine
CPXXgetdblannotationindex/CPXgetdblannotationindex
retreives the index of the double valued annotation with the given name.
int CPXXgetdblannotationindex( CPXCENVptr env, CPXCLPptr lp, char const * annotationname_str, CPXDIM * index_p )
int CPXgetdblannotationindex( CPXCENVptr env, CPXCLPptr lp, char const * annotationname_str, CPXDIM * index_p )
Description
The routine
CPXXgetdblannotationindex/CPXgetdblannotationindex
retreives the index of the double valued annotation with the given name.
An argument to
CPXXgetdblannotationindex/CPXgetdblannotationindex
defines the name of the double valued annotation to be queried. The index of the
double valued annotation are returned via pointer arguments. If no such
annotation is available a negative index is returned along with an error code.
This routine for annotations of type double resembles the similar routine
CPXXgetlongannotationindex and CPXgetlongannotationindex for annotations of
type long. The example benders.c distributed with the product
shows that routine for type long in use; follow the same steps with
the analogous double routines when you create annotations of type double.
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
CPXXnewdblannotation and CPXnewdblannotationthat 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
CPXXnewdblannotation and CPXnewdblannotation.) 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 = CPXgetdblannotationindex (env, lp, &annotationname, &index);