Annotations for Python API users
CPLEX supports annotations for Benders decomposition in the Python API.
These classes support annotations in the Python API of CPLEX:
AnnotationObjectTypeAnnotationInterface
There are also methods for adding, accessing, and modifying annotations of a model.
Cplex.long_annotations.addadds a new annotation to a model.Cplex.long_annotations.deletedeletes the annotation from an element of a model.Cplex.long_annotations.get_namesreturns the names of a set of annotations.Cplex.long_annotations.get_numreturns the number of annotations of a model.Cplex.long_annotations.get_typesreturns the type of a set of annotations.Cplex.long_annotations.get_default_valuesreturns the default value of a set of annotations.Cplex.long_annotations.set_valuessets annotations for a specified object type.Cplex.long_annotations.get_valuesreturns the annotations for a specified object type.Cplex.double_annotations.addadds a new annotation to a model.Cplex.double_annotations.deletedeletes the annotation from an element of a model.Cplex.double_annotations.get_namesreturns the names of a set of annotations.Cplex.double_annotations.get_numreturns the number of annotations of a model.Cplex.double_annotations.get_typesreturns the type of a set of annotations.Cplex.double_annotations.get_default_valuesreturns the default value of a set of annotations.Cplex.double_annotations.set_valuessets annotations for a specified object type.Cplex.double_annotations.get_valuesreturns the annotations for a specified object type.Cplex.read_annotationsreads annotations from a file.Cplex.write_annotationswrites annotations to a file.Cplex.write_benders_annotationwrites to a file any annotations that CPLEX automatically generated.
For detailed documentation and examples of methods in these classes, see the entries for these
classes in the reference manual of the Python API of CPLEX, and see also doc strings in
<Install_dir>/cplex/python/3.7/<your_platform>/cplex/_internal/_anno.py
or
<Install_dir>/cplex/python/3.8/<your_platform>/cplex/_internal/_anno.py,
where <your_platform> is a platform-specific directory, such as
x64_win64.