Example: Controlling Properties of Solutions with Filters |
INDEX PREVIOUS NEXT |
The model in Example: Simple Facility Location Problem has two categories of variables. The x
variables specifying the facilities to open are of a higher decision level than the y
variables deciding how the goods are shipped from facilities to regions. Suppose, for example, that you want to populate the solution pool with solutions that differ by which facilities are opened, without specifying any specific criteria for the shipping decisions. The replacement strategy (shown in Example: Diverse Solutions through Replacement Parameter) does not allow you to specify a customized diversity measure that takes into account only a subset of the variables. However, this diversity measure expressed only 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 facilities open be the reference; that is, the reference value for x1
is 1 (one), for x2
is 1 (one), for x3
is 0 (zero), for x4
is 0 (zero). Then use a diversity filter to stipulate that any solution added to the solution pool must differ from the reference by decisions to open or close at least two other facilities. The following filter file enforces this diversity by giving each x variable a weight 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 into account in the diversification.
NAME location DIVFILTER f1 2 inf x1 1.0 1 x2 1.0 1 x3 1.0 0 x4 1.0 0 ENDATA |
Range filters also enforce additional constraints. Suppose, for example, that you want to limit transportation costs to less than fixed costs. The following range filter enforces this restriction by expressing the linear constraint:
-infinity <= 1.0 * transport - 1.0 * fixed <=0
NAME location RNGFILTER f2 -inf 0 transport 1.0 fixed -1.0 ENDATA |
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |