Step 5: Define decision variables
The decision variables in your optimization model are calculated individually, then combined to create the optimal solution to your model’s objective function, within the constraints that you’ve defined.
For each decision variable, you’ll need to provide:
A name for the decision variable.
The name of the data source that the decision variable is created from. You can only use one data source for each decision variable.
The columns from the data source that are used as the indices for the decision variable. They work like a primary key.
The domain for the decision variable, which is the set of its possible values. Choose from:
NonNegativeReals
- continuous real numbers greater than zeroNonNegativeIntegers
- integer numbers greater than zeroBinary
- only 0 and 1 are permitted results
Important
The more integer and binary decision variables your model has, the longer it takes to solve. Too many integer and binary decision variables can make the model impossible to solve in a reasonable amount of time, rendering it unusable.
You can opt for a result in continuous units (for example, kilograms) even if the material is handled in discrete units (for example, five-kilogram boxes). Use a post-processing step in a KPI or calculated attribute to round the result up, down, or to the nearest stock-keeping unit or integer number. You can base this on the rounding factor in the material master data.
Here’s how to define decision variables in the Optimization Engine UI:
Go to the section Variables on the Optimization Engine page.
Click Add Variables to add a new variable.
Enter a name for the variable.
Enter the name of the data source that the decision variable is created from.
Select the domain for the decision variable from the dropdown.
Click Add Columns Mapping To Datasource and enter the name of a column from the data source. Repeat this for each of the columns. You can duplicate and edit a column name by clicking the context menu (the three vertical dots) for the column. You can also delete a column from the context menu.
You can edit a decision variable by clicking the pen icon next to its name, or delete it by clicking the trash icon.
Next step: Step 6: Define constraints