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

Iteration callback for early stopping #227

Open
gkronber opened this issue Jul 22, 2022 · 1 comment
Open

Iteration callback for early stopping #227

gkronber opened this issue Jul 22, 2022 · 1 comment

Comments

@gkronber
Copy link

Specifications

  • OS: Windows
  • SCS Version: 3.2.1
  • Compiler: Microsoft C++

Description

It would be nice to be able to stop SCS early. One way to implement this could be be passing a function pointer in the ScsSettings that is called on each iteration. This would also allow to report the progress back to the caller. Right now SCS writes directly to SCS and there is no way for the caller to monitor optimization progress.

@bodono
Copy link
Member

bodono commented Jul 25, 2022

Yes, that would be a nice feature to have. It would be relatively straightforward to add support for a callback function that takes the relevant data structs and returns a boolean for whether or not to stop, which would allow custom stopping criteria. I'm pretty swamped at the moment but I would be happy to accept a PR for this.

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

2 participants