Skip to main content

Constraints: Controlling the Search Space

Restrict the optimizer's search space with exclusion, conditional, linear, and subset constraints.

Constraints: Controlling the Search Space

By default, the optimizer can suggest any combination of variable values within the bounds you defined. Constraints let you restrict this search space — ruling out unsafe conditions, enforcing physical limits, or encoding domain knowledge.


Four Constraint Types

Type

What it does

Example

Exclusion

Block specific values or ranges for one variable

Exclude temperature 100–150 °C

Conditional Exclusion

Block values for one variable depending on another

If pH is 5–7, exclude temperature 50–100 °C

Linear

Enforce a mathematical relationship between variables

Component A + B + C = 100%

Subset

Limit how many variables can be active at once

At most 3 out of 6 catalysts can be used

Read the detail article for each type:


Which Constraint Do I Need?

Question 1: Is this about a single variable or a relationship between variables?

  • Single variable — Use Exclusion. Block specific values unconditionally.

  • Relationship — Go to Question 2.

Question 2: What kind of relationship?

  • "If X then exclude Y" — Use Conditional Exclusion. One variable's value restricts another.

  • Mathematical sum or budget — Use Linear Constraint. Variables must satisfy an equation.

  • Limit how many variables are used — Use Subset Constraint. Cap the number of active parameters.


Tips

  • You can add multiple constraints of any type to a single experiment.

  • Constraints work with both numerical and categorical variables (except Linear and Subset, which are numerical only).

  • Be careful not to over-constrain: if constraints eliminate too much of the search space, the optimizer may struggle to find valid suggestions.

  • Constraint names are optional but recommended — a descriptive name helps your team understand why the constraint exists.

Did this answer your question?