BoTorch supports two distinct types of constraints: Parameter constraints and outcome constraints.
Parameter constraints are constraints on the input space that restrict the
values of the generated candidates. That is, rather than just living inside
a bounding box defined by the
bounds argument to
optimize_acqf (or its
derivates), candidate points may be further constrained by linear (in)equality
constraints, specified by the
Parameter constraints are used e.g. when certain configurations are infeasible to implement, or would result in excessive costs. These constraints do not affect the model directly, only indirectly in the sense that all newly generated and later observed points will satisfy these constraints. In particular, you may have a model that is fit on points that do not satisfy a certain set of parameter constraints, but still generate candidates subject to those constraints.
In the context of Bayesian Optimization, outcome constraints usually mean
constraints on some (black-box) outcome that needs to be modeled, just like
the objective function is modeled by a surrogate model. Various approaches
for handling these types of constraints have been proposed, a popular one that
is also adopted by BoTorch (and available in the form of
is to use variant of expected improvement in which the improvement in the objective
is weighted by the probability of feasibility under the (modeled) outcome
constraint (, ).
See the Closed-Loop Optimization tutorial for an example of using outcome constraints in BoTorch.