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

Using nonlinear constraints with boolean masks #2534

Open
Fa20 opened this issue Jun 21, 2024 · 5 comments
Open

Using nonlinear constraints with boolean masks #2534

Fa20 opened this issue Jun 21, 2024 · 5 comments

Comments

@Fa20
Copy link

Fa20 commented Jun 21, 2024

Hallo
How can I use
nonlinear constraints with boolean masks in AX?

@danielcohenlive
Copy link

Hi @Fa20 , thanks for your question. If by nonlinear constraints you mean something like a^2 + b < 1 or a^2 < b we don't support that yet. If you need it this can serve as a feature request though. Do you need these constraints for parameters or the outcomes in constrained optimization.

@Fa20
Copy link
Author

Fa20 commented Jun 25, 2024

@danielcohenlive thanks for your answer. I mean something like :(x1-2*x2>0)&(x2+0.5x1<0)

@danielcohenlive
Copy link

@Fa20 that's not supported. The constraints are in a python-like format, but they aren't actually executed as raw python under the hood. Can you describe what you're trying to do at a high level? Maybe there's another way to accomplish it. If not you're welcome to make a feature request.

@Fa20
Copy link
Author

Fa20 commented Jun 27, 2024

@danielcohenlive I 'm using this conditions to filter the the range of the prameters and one of the filter condition is : (x1-2*x2>0)&(x2+0.5x1<0) but I'm thinking to split it to two condition and add them to parameters_constrains ?

@Balandat
Copy link
Contributor

but I'm thinking to split it to two condition and add them to parameters_constrains ?

Yes, that's the right move here

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

No branches or pull requests

3 participants