Constraints for expressions enable the user to set complex conditions imposed on controlling variable values. A condition is a complex one if it meets one or several criteria:
Several controlling variables are used in it.
Any coefficient is set for controlling variable.
For example, x1 - x2 ≥ 25 or 100 ≤ 4x3 ≤ 254, where x1 is a controlling variable with the 1 coefficient, x2 is a controlling variable with the -1 coefficient, and 4x3 is a controlling variable with the 4 coefficient. To set simple conditions, use the Constraints for Variables page in the linear optimization block editing wizard.
To set up complex constraints of controlling variables, use the Constraints for Expressions page in the linear optimization block editing wizard:
Set upper, lower constraint limits and controlling variable coefficients as well. Lower limit is a minimum allowed value of controlling variable, upper limit is a maximum allowed value of controlling variable. Coefficient is the element that is used to take into account impact of conditions change on criterion function calculation. The following can be set for each controlling variable: coefficient, only lower limit, only upper limit, both limits or no constraints.
For example, the constraint x1 1 - x2 ≥ 25 is set using upper limit and the 1 coefficient for the controlling variable x1 and -1 for the controlling variable x2. The constraint 100 ≤ 4x3 ≤ 254 requires to set both limits and the 4 coefficient for controlling variable.
To use complex constraints of controlling variables:
Add a constraint. To do this, click the Add button. The constraint is added to table.
Rename the constraint. To do this, click the Rename button and enter a new constraint name. The meaningful name will help identify the constraint among others in constraints dimension. The constraints dimension is created automatically from all constraints created on this page of the linear optimization block editing wizard.
Enter values of constraint limits in the table.
Set coefficients for the variables used in the constraint. To do this:
Click the Open Source and Set Coefficients button. The data source is created automatically and opened in the Analytical Queries (OLAP) tool. A data table is created as follows: rows contain all dimensions of controlling variables with the selection determined on criterion function setup, and the constraints dimension; columns contain no dimensions.
Enter values of coefficients for controlling variables used in the constraint to the table.
Go to the Data ribbon tab and click the Save Changes button. It is requested to confirm the operation.
Close the Analytical Queries (OLAP) tool. It is prompted to save the report. Click the Cancel button.
As a result, the controlling variables constraint is set.
To view the criterion function, click the Show Function External View button.
See also: