The Basis for Constraint tab provides important options when defining a constraint. It determines the subset of the problem, also thought of as the subset of the data, to which the constraint will apply. For example, you may have a budget constraint that only applies to 3 of the 8 customer segments in the dataset. In that case, the budget upper bound you enter does not apply to the entire problem, but only to the subset of the problem related to those three segments.
A screenshot of the tab itself is shown below, followed by a detailed description of each option.
Based On - This select box always has one option labeled "Constraint Based on Dimensions" as well as one option for each Attribute you have defined for the scenario, as in the screenshot below. These options are explained more below.
- Constraint Based on Dimensions - select this to define the basis for this constraint based on the data in the variables that were selected as Dimensions for the problem. In many cases, the dimensionality of the problem is quite large. If so, this option will have limitations to its use because it will not be possible to select individual levels of the dimension (see the screenshot above with the notation "Too Many Levels").
- This option is often used to easily define global constraints that apply to the entire problem. This is the case in the screenshot above, with the Combined and All Levels boxes checked. For a new constraint, this is in fact the default setting.
- Constraint Based on Attribute XYZ - Each attribute defined in the scenario will be available to use as a basis for the constraint. The exact way it defines the basis is controlled by the additional options described below. When an attribute is selected, the box will re-populate based on that attribute's values in the dataset.
The Attribute Levels, Combined, and All Levels options work in concert with each other to complete the definition of the constraint basis.
Attribute Levels - This dropdown list will populate with all of the unique values/levels for the attribute that was selected. Manually check the levels for which this constraint should apply. The list is not available if the All Levels box is checked (in which case all levels are always considered as selected), or if there are too many levels of the attribute to allow for manual selection.
Combined - This box determines how the selected levels are treated in defining the constraint. The distinction is very important and is described below:
- Checked - if this box is checked, then the levels are considered as one combined group when the constraint is evaluated. In the screenshot above, Deciles 1, 2, and 3 are considered as one group over which the metric is evaluated.
- For example, if a budget constraint was set as Budget <= $500 with these settings, the constraint would be interpreted as "Budget must be less than or equal to $500 in total over these three deciles".
- Unchecked - if the Combined box is left unchecked, then each of the selected levels are evaluated separately with respect to the other settings.
- For example, suppose the Combined box was unchecked in the example above. The constraint would then be interpreted as "Budget must be less than or equal to $500 for Decile 1 AND for Decile 2 AND for Decile 3.
- Notice that this also becomes a method for easily entering many constraints at once. The example described here defines three separate constraints.
All Levels - Check this box to have the constraint apply to all levels of the attribute. If the data changes from one run to the next, All Levels will be re-evaluated relative to the dataset at the time of execution. Unchecking this box makes the levels selection box described above available.