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

Constrained Optimization (especially lower+upper bounds) #137

Open
JulianCologne opened this issue Sep 27, 2021 · 6 comments
Open

Constrained Optimization (especially lower+upper bounds) #137

JulianCologne opened this issue Sep 27, 2021 · 6 comments

Comments

@JulianCologne
Copy link

JulianCologne commented Sep 27, 2021

Hello,
Coming from Python (scipy.optimize.minimize) and MATLAB (fmincon), I can't find a way to specify bounds (and other constraints), which to me are very essential parts of an optimization problem.

Python / Scipy:

res = minimize(opti_fun, x0, bounds=mybounds, constraints=myconstraints)

Matlab:

res = fmincon(opti_fun, x0, A, b, Aeq, beq, lowerbound, upperbound)

Looking through the documentation, I could not find that this is implemented. (With the exception of some manual bounds in the simulatedannealing.rs example).
Is this something that is being worked on? Or is it planned? Or is it too complicated / time consuming at the moment? Or did I just miss something here?
I would love to have constrained optimization (at least with bounds) in Rust!

@stefan-k
Copy link
Member

stefan-k commented Sep 27, 2021

Unfortunately there is no constrained optimization yet (apart from, as you noted, SA, and possibly PSO). It is definitely planned; however due to other responsibilities I'm afraid I can't give you a timeline as to when this will happen.

@JulianCologne
Copy link
Author

Thanks for the reply.
Looking forward to the implementation! =)

@sahilosaro
Copy link

Any update on this?

@stefan-k
Copy link
Member

stefan-k commented Jun 7, 2022

Unfortunately not yet. I plan to have a look at it after the release of version 0.6.

@relf
Copy link
Contributor

relf commented Feb 3, 2023

FWIW, I would like to mention here that external solvers handle constraints. In both case, cost function returns a vector: the first component is the actual cost value, the remaining components are constraints values.

Notice that egobox-ego::EgorSolver adjusts x to make constraints negative while cobyla::CobylaSolver try to make them positive.

@Euraxluo
Copy link

Euraxluo commented Apr 8, 2024

I don't know what role this library will play in constraint optimization, solver caller?, don't be silly and do it in Python

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

5 participants