12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

●●IloCplex.writeFilters in the Java API;Cplex.WriteFilters in the .NET API.◆◆In the Callable Library (C API), use the routine CPXfltwrite.In the Interactive Optimizer, use the write command with the file type option flt tocreate 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 filtersassociated with the solution pool: write filename fltExample: Controlling Properties of Solutions with FiltersThe model in Example: Simple Facility Location Problem on page 302 has two categories ofvariables. The x variables specifying the facilities to open are of a higher decision level thanthe y variables deciding how the goods are shipped from facilities to regions. Suppose, forexample, that you want to populate the solution pool with solutions that differ by whichfacilities are opened, without specifying any specific criteria for the shipping decisions. Thereplacement strategy (shown in Example: Diverse Solutions through ReplacementParameter on page 323) does not allow you to specify a customized diversity measure thattakes into account only a subset of the variables. However, this diversity measure expressedonly over the x variables can be enforced through a diversity filter.Suppose further that facilities 1 and 2 are open. Let a solution keeping those two facilitiesopen be the reference; that is, the reference value for x1 is 1 (one), for x2 is 1 (one), for x3 is0 (zero), for x4 is 0 (zero). Then use a diversity filter to stipulate that any solution added tothe solution pool must differ from the reference by decisions to open or close at least twoother facilities. The following filter file enforces this diversity by giving each x variable aweight of 1.0 and specifying a minimum diversity of 2 and unlimited maximum diversity(that is, infinity). The y variables are not specified in the filter; hence, they are not taken intoaccount in the diversification.NAME locationDIVFILTER f1 2 infx1 1.0 1x2 1.0 1x3 1.0 0x4 1.0 0ENDATARange filters also enforce additional constraints. Suppose, for example, that you want tolimit transportation costs to less than fixed costs. The following range filter enforces thisrestriction by expressing the linear constraint:-infinity

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!