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

Automatically detect diagonal / sparse parameters #1

Open
AndreasHempel opened this issue Oct 28, 2016 · 5 comments
Open

Automatically detect diagonal / sparse parameters #1

AndreasHempel opened this issue Oct 28, 2016 · 5 comments
Assignees

Comments

@AndreasHempel
Copy link
Contributor

FORCES Pro has support for specially structured sparse parameters (see the FORCES documentation for details). It would be great if Y2F could identify this structure and take advantage of it when generating the solver.

@GianUlli GianUlli self-assigned this Oct 28, 2016
@GianUlli
Copy link
Contributor

That's a good idea. At least diagonal parameters for the quadratic cost should be easy to implement using the current data structures.

@GianUlli
Copy link
Contributor

GianUlli commented Nov 7, 2016

Y2F now supports diagonal parameters. It automatically checks if a parametric Hessian (quadratic cost) of a stage is diagonal, and uses diagonal FORCES parameters if possible. (see a8def66)

Regarding general sparse parameters: It is not clear, when exactly sparse parameters should be used. We would need to introduce some kind of measure of sparsity. Depending on this measure, a parameter would be added as a full parameter or as a sparse parameter. Another option would be to let the user decide using a setting.

@adomahidi
Copy link
Member

That's great! I think we should also exploit sparsity in the polytonic constraints (A*x <= b) if say the density is below a threshold d, with d=0.3 or similar being the default option (which can be overridden by the user, d=0.0 would switch off sparsity and d=1.0 would always enforce sparsity)

@AndreasHempel
Copy link
Contributor Author

AndreasHempel commented Nov 8, 2016

I see three different situations in which sparse inequalities can arise:

  • The user specifies a constraint A*x <= b and knows A will be sparse. In this case the user also has to provide the sparsity pattern.
  • The sparsity pattern emerges from the decomposition Y2F performs in which case the sparsity pattern is known to Y2F.
  • A combination of the two cases.

@GianUlli
Copy link
Contributor

GianUlli commented Dec 22, 2016

Sparse polytopic were added with commit 77d0df8. The bound for the sparsity of a matrix was fixed at 20%, i.e. matrices with more than 80% zeros are regarded as sparse. This bound should be adjusted after we have more experience with the type of problems getting solved by Y2F. Making the bound a setting for users might also be a good a idea.

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

No branches or pull requests

3 participants