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 CPXreadcopysolnpoolfilters to add diversity or range filters.

  • In the Interactive Optimizer, use the read command 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:

  • In the Callable Library (C API), use the routine CPXfltwrite .

  • In the Interactive Optimizer, use the write command with the file type option flt to create a filter file of the filters currently associated with the solution pool. For example, the following command creates a file named filename.flt containing the filters associated with the solution pool: write filename flt