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

Feature question: linear constraints #18

Open
donboyd5 opened this issue Jul 22, 2023 · 5 comments
Open

Feature question: linear constraints #18

donboyd5 opened this issue Jul 22, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@donboyd5
Copy link

Hi. Thanks again for this great package.

I am wondering whether you have any plans to implement linear constraints in SPGBox. How to do it is way beyond anything I know, but as I understand it, I think this is possible with spectral projection gradient methods. For example, the R package BB apparently allows it --see this, p.13.

Many thanks.

Don

@lmiq
Copy link
Member

lmiq commented Jul 22, 2023

Actually I have a plan to support general non-linear constraints, but it is not something I plan to do in any near future. I'm not sure either if that makes sense within this package or if it will be another independent implementation with this one as a dependency.

@lmiq lmiq added the enhancement New feature or request label Jul 22, 2023
@pjssilva
Copy link
Collaborator

This is only my two cents. But I am not aware of someone using spectral methods to deal with general nonlinear constraints successfully. I know that Mario (Martínez) and Ernesto (Birgin) tried to use a spectral method in an Augmented Lagrangian framework, and it did not perform well. It was worse than Quacan, the method they use to solve the subproblems of the augmented Lagrangian in their Algencan implementation. As a matter of fact, if you want to use Algencan in Julia you can use the NLPModelsAlgencan.jl package (https://github.com/pjssilva/NLPModelsAlgencan.jl). There is also the very good Ipopt solver that has a package to use it in Julia.

@donboyd5
Copy link
Author

Great to hear that! It will make the package (or independent implementation) even better.

@pjssilva
Copy link
Collaborator

Ops... I forgot to mention. An intermediate alternative is to make the method receive the projection onto the feasible set as a function, instead of hard-coding a specific set (a box). This is an easy change to make Leandro, and then the user that wants to deal with different constraints should be responsible to give the function that implements the projection. We can give some pre-defined projections like Box, Ball, Simplex (I have a good method for that). Unfortunately, projection onto a general polyhedron is not that easy. It is easy to implement (using a general quadratic programming solver), but the projection can be quite expensive and this would slow down the method.

@lmiq
Copy link
Member

lmiq commented Jul 22, 2023

Indeed, in fact JMM passed me a routine with the AL-SPG implementation, and that is what I was planning to port here. But I don't know how well it performs.

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

No branches or pull requests

3 participants