Subset Constraint
Limit how many variables can be active (non-fixed) at the same time.
A subset constraint controls how many of a group of variables are "in play" for each experiment. Each variable is either active (the optimizer chooses its value) or fixed (set to a specific value you define). The constraint limits how many can be fixed simultaneously.
How It Works
Select a group of numerical variables.
For each variable, define a fixed value — the value it takes when it is not active.
Choose an operator and a number to control how many variables can be fixed.
Operators
Operator | Meaning | Example |
Equal | Exactly N variables must be fixed | Exactly 3 fixed |
Less than or equal | At most N variables can be fixed | At most 4 fixed |
Greater than or equal | At least N variables must be fixed | At least 2 fixed |
Between | Number of fixed variables must be in a range | Between 2 and 4 fixed |
Examples
Catalyst screening — Use at most 3 at once
Variables: 6 catalyst loading variables (each 0–10 wt%)
Fixed value for each: 0 (meaning "not used")
Operator: Greater than or equal
Number of fixed parameters: 3
At least 3 catalysts are fixed at 0, so at most 3 can be active in any experiment. This is useful for combinatorial screening where you cannot test all materials simultaneously.
Binary mixture — Exactly 2 components
Variables: 5 solvent fraction variables (each 0–100%)
Fixed value for each: 0
Operator: Equal
Number of fixed parameters: 3
Exactly 3 solvents are fixed at 0, so exactly 2 are active — forming a binary mixture every time.
When to Use It
Combinatorial screening where you can only test a subset of materials at once.
Sparse formulations where only a few ingredients should be present.
Equipment limits that cap the number of simultaneous inputs.
Good to Know
Subset constraints only work with numerical variables.
The fixed value is the value a variable takes when it is not selected (typically 0).
Think of it as: the optimizer picks which variables to activate, then optimizes their values.
Combine with a Linear Constraint to enforce that active variables sum to a total (e.g. mixture fractions = 100%).
