Filter files
Describes filter files for the solution pool.
You can store filters in a file, known as a filter file,
distinguished by the file extension .flt . The same
filter file can contain several filters, including both diversity
filters and range filters. For documentation of the format of a filter
file, see FLT file format: filter files for the solution pool in
the CPLEX File Formats Reference Manual.
To create filters, use your favorite text editor to create a file formatted according to the specifications in FLT file format: filter files for the solution pool.
To install filters declared in a filter file, use one of these methods, routines, or commands:
-
In Concert Technology, use the methods:
-
IloCplex::readFilters -
IloCplex.readFilters -
Cplex.ReadFilters
-
-
In the Callable Library (C API), use the routine
CPXreadcopysolnpoolfiltersto add diversity or range filters. -
In the Interactive Optimizer, use the
readcommand to import a filter file.
To write existing filters to a formatted file (for example, for re-use later), use these methods, routines, or commands:
-
In Concert Technology, use the methods:
-
writeFilters in the C++ API;
-
writeFilters in the Java API;
-
Cplex.WriteFiltersin the .NET API.
-
-
In the Callable Library (C API), use the routine
CPXfltwrite. -
In the Interactive Optimizer, use the
writecommand with the file type optionfltto create a filter file of the filters currently associated with the solution pool. For example, the following command creates a file namedfilename.fltcontaining the filters associated with the solution pool:write filename flt