Edit Constraint - Basic Setup

Editing a constraint in an optimization scenario involves a number of options that, taken together, will define how the constraint works.  LityxIQ will take care of creating the mathematical code that describes the constraint before it executes the optimization scenario.

The Edit Constraint dialog has three tabs. 

All of the options available in each tab will be described in more detail below and other documents, but in short, these tabs are:

  • Basic Setup - this tab is used to give it a label, define the metric it relates to, and provide other details related to the bounds of the constraint.  These options are described in detail below in this document.
  • Basis for Constraint - this tab is used to describe over what subset of the problem/data the constraint applies.  By default, if you do not make any settings on this tab, the constraint will apply to the entire problem.  This tab is described further here: https://support.lityxiq.com/550334-Edit-Constraint---Defining-the-Basis.
  • Basis for Percent of Subtotal - this tab is an advanced tab that only becomes available when the Percentage Relative to Subtotal constraint type is set.  It will be explained more below.  This tab is described further in a separate document.
  • Constraint Description - this area of the dialog will always be shown, and dynamically updates to provide a textual description of how the selected options will be applied to create the constraint (or create multiple constraints).

Note: Either/Or constraints are a special type of constraint.  The options described in this document do not apply.  Please see the Either/Or section of https://support.lityxiq.com/524228-Types-of-Optimization-Constraints for an overview of options available for that constraint type.


Basic Setup Tab

Please refer to the above screenshot.

Label/Description - Enter a text label for the constraint.  It will be displayed on in the constraint list to help identify the constraint.  The text entered here will not play any role in the settings for the constraint.

Active - Check this box to make this constraint active (the default).  Uncheck it to inactivate the constraint.  An inactive constraint will be ignored when the optimization executes.

Metric - Choose the metric for which this constraint will be evaluated.  This is only available for a Standard Constraint, in which case you will see a list of all metrics defined in the scenario that are available for usage in constraints.  Levels Count and Either/Or constraints do not involve an optimization metric.

Type - Select the type for this constraint.  For a Standard Constraint, the options are explained below.  For Levels Count and Either/Or constraints, there are no options.

  • Value - A Value constraint is one that will constraint the actual value of the selected metric relative to another value, depending on the other options set.  For example, this applies if you want to constrain the overall budget to be under $500,000 because the constraint relates to the actual value of the budget metric.
  • Percentage Relative to the Total - Select this option if you want to constrain the metric as a percentage relative to the total value for that metric.  The definition of "Total" in this case is still relative to any basis restrictions set on the Basis for Constraint tab.
    • For example, if you want to ensure the percentage of budget allocated to Channel A is between 10 and 30 percent of the total, select this option, and enter "Between 10 and 30" in the options below.  If you had also set the basis for this constraint to involve, say, only Customer Segment X, then the values "10%" and "30%" relative to the "Total" will be evaluated only within Customer Segment X.
  • Percentage Relative to a Subtotal - Select this option if you want to constrain the metric as a percentage relative to the total value of a separately defined subgroup (defined on the Basis for Percent of Subtotal tab).
  • Value is Zero or Greater Than - This option is a powerful way to constrain the metric, useful in many situations.  It will constrain the metric in such a way that its resulting value in the optimization will either be exactly zero, or will be larger than a value provided in the options below.  
    • For example, suppose you have a channel (Channel A) that has a minimum spend requirement of $1000.  You can decide to not use the channel at all, but if you do use it, you need to allocate at least $1000.  In other words, you cannot spend say $450 in the channel.  In this example, you would use this "Value is Zero or Greater Than" option, and set the value 1000 in the option below.

Sign - Four arithmetic signs are generally available.  For a "Value is Zero or Greater Than" constraint, this option is not available.  In each case, you will enter the comparison value using options below.

  • Less than or equal to (<=)
  • Equal (=)
  • Greater than or equal to (>=)
  • Between - in this case, you will enter two values below.

Value Method - (this also applies to the Upper Bound Method option that will appear when using the Between sign).  You will have the following options:

  • Enter Value Manually - with this setting, a numeric entry box will be made available in which you will manually enter the comparison value for the metric.
  • A list of Data Elements defined in the scenario - all the other options you see in the list will be valid data elements defined on the main "Dataset & Settings" tab for the scenario.  This is a way to dynamically choose the constraining value based on data in the dataset.
    • For example, re-consider the example above related to a minimum spend requirement of $1000 in Channel A.  Now suppose that there are actually 26 channels (A - Z) which each have different minimum spend requirements.  You do have the option of manually creating 26 constraints, one related to each channel, and for each manually entering its unique minimum spend amount.  However, this option allows you to create a variable in the dataset in which you place those minimum spend amounts correctly for each channel.  Then add that variable as a Data Element in the scenario and select it from this list.
    • Notice that the above example is not only an easier way to enter all 26 constraints, but it also allows you to be completely dynamic regarding those minimum spend amounts.  For example, suppose those spend amounts vary from one month to the next depending on data provided by a vendor.  That data can be associated automatically with the dataset when it refreshes, and then whenever the optimization scenario executes, it will use the new minimum spend requirements information.

Manual Value - In the case of selecting the "Enter Value Manually" method under "Value Method", manually type in the comparison value.  This also applies to the Upper Bound Value entry box that appears when using the Between sign.