Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nontrivial parameter constraints #2147

Closed
fernexda opened this issue Jan 23, 2024 · 2 comments
Closed

Nontrivial parameter constraints #2147

fernexda opened this issue Jan 23, 2024 · 2 comments
Labels
question Further information is requested

Comments

@fernexda
Copy link

Hello,
I'm currently working on optimizing a curve, parametrized by Fourier series, to achieve a certain objective. The curve is defined by $$\alpha = A_0 + \sum\limits_{n=1}^4 A_n \sin(\frac{2\pi}{T}nt + \phi_n),$$ so I'm really trying to optimize the fourrier coefficients $A_n$ and $\phi_n$.

This curve corresponds to an actual motion performed by a motor, and its max amplitude is constrained. The motor can not exceed this amplitude, or it might result in damage of the setup. So practically, for each generated set of parameters (=Fourier coefficients), I should verify the min and max values of the corresponding curve, and reject the point if these extrema exceed the limit.
Is there a way to achieve this? I've seen that nonlinear constraints are not possible, and I've seen a few workarounds being suggested, but I don't see how they would apply in this case.

Any help will be greatly appreciated!

@mgarrard mgarrard added the question Further information is requested label Jan 23, 2024
@mgarrard
Copy link
Contributor

mgarrard commented Jan 23, 2024

Hi, @fernexda thanks for reaching out! Unfortunately, we currently do not support non-linear parameter constraints, and it isn't on our immediate roadmap. #769 has a pretty lengthy discussion of this, incl. pointers to other issues as well a draft PR (#794) that can allow this - but this is very much preliminary work and can potentially cause unwanted behavior when interacting with the transforms we do of the parameters - if you want to try this out USE AT YOUR OWN RISK.

Alternatively, you could try to reparameterize your constraints -- but i'd have to think more deeply about how to go about that.

@mgarrard
Copy link
Contributor

Supporting non-linear constraints is already on the wishlist here: #566 (comment), closing to avoid duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants