File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
examples/Constraints_Continuous Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ class ContinuousLinearConstraint(ContinuousConstraint):
59
59
60
60
While intrapoint constraints impose conditions on each individual point of a batch,
61
61
interpoint constraints do so **across** the points of the batch. That is, an
62
- interpoint constraint of the form ``x_1 + x_2 <= 1`` enforces that the sum of all
63
- ``x_1`` values plus the sum of all ``x_2 `` values in the batch must not exceed 1 .
62
+ interpoint constraint of the form ``x + y <= 1`` technically encodes
63
+ ``sum(x_i) + sum(y_i) <= 1`` for all points ``i `` in the batch.
64
64
"""
65
65
66
66
@coefficients .validator
Original file line number Diff line number Diff line change @@ -87,11 +87,12 @@ A more detailed example can be found
87
87
The constraints discussed in the previous paragraph belong to the class of so called
88
88
"intrapoint constraints". That is, they impose conditions on each individual point of a batch.
89
89
In contrast to this, interpoint constraints do so ** across** the points of the batch.
90
- That is, an interpoint constraint of the form `` x_1 + x_2 <= 1 `` enforces that the sum of all
91
- `` x_1 `` values plus the sum of all `` x_2 `` values in the batch must not exceed 1.
90
+ That is, an interpoint constraint of the form `` x + y <= 1 `` technically encodes
91
+ $$
92
+ \sum_{i\text{ in batch}}x_i + \sum_{i\text{ in batch}}y_i <= 1
93
+ $$
92
94
A possible relevant constraint might be that only 100ml of a given solvent are available for
93
- a full batch, but there is no limit for the amount of solvent to use for a single experiment
94
- within that batch.
95
+ a full batch.
95
96
96
97
They can be defined by using the ` interpoint ` keyword of the [ ` ContinuousLinearConstraint ` ] ( baybe.constraints.continuous.ContinuousLinearConstraint )
97
98
class.
Original file line number Diff line number Diff line change 3
3
# Example for optimizing a synthetic test functions in a continuous space with linear
4
4
# interpoint constraints.
5
5
# While intrapoint constraints impose conditions on each individual point of a batch,
6
- # interpoint constraints do so **across** the points of the batch. That is, an
7
- # interpoint constraint of the form ``x_1 + x_2 <= 1`` enforces that the sum of all
8
- # ``x_1`` values plus the sum of all ``x_2`` values in the batch must not exceed 1.
9
- # A possible relevant constraint might be that only 100ml of a given solvent are available for
10
- # a full batch, but there is no limit for the amount of solvent to use for a single experiment
11
- # within that batch.
6
+ # interpoint constraints do so **across** the points of the batch.
12
7
13
8
# This example is a variant of the example for linear constraints, and we thus refer
14
9
# to [`linear_constraints`](./linear_constraints.md) for more details and explanations.
You can’t perform that action at this time.
0 commit comments