Introduce the DRSC algorithm for constraint handling#367
Merged
Conversation
…g constrained points that sum to a constant value
… the default tolerance of the DRSC algorithm
…descriptions across the package
…straints, and tests of seeding of SumEquals sampling
…transformations cause the x-values to blow up outside the simplex
…red sum, but also that we don't violate our dimension bounds when we fix the sum. This can happen if the space is very unbalanced.
Collaborator
Author
|
Some questions I'd like input on:
|
dk-teknologisk-mon
requested review from
RuneChristensen-NN,
SRFU-NN and
sqbl
December 18, 2025 11:11
…sk-research/ProcessOptimizer into DRSC_constraint_handling
…th the DRSC algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements the Dirichlet Rescale Constraints (DRSC) algorithm from this paper. This algorithm generates random n-dimensional vectors with a fixed sum in a way that is many, many orders of magnitude faster than the present way we handle SumEquals constrains.
A bit of motivation, using a formulation example:
Running this code takes about 25 seconds on my laptop despite the internals only calling this function asking for 5 points:
Things become unsustainable if you get as far as providing data, because at that stage
opt._tell()will ask for a set of candidate points for acquisition where it will callsumequal_samplingfor 10,000 points. This would take about 8 hours to complete.With the new algorithm however:
This completes in about 13 seconds!
=======================
Some added benefits of the way I've implemented this:
strategy="cl_min"top opt.ask().x0*x1 <= 0.1, shown below with 1000 samples:Nonlinear constraints require the user to set up a function that returns a value <= 0 when it is satisfied, like this example:
closes #325 #256 #254