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

A way to force at least one iteration #1004

Closed
PerformanceCoder opened this issue Sep 8, 2022 · 1 comment
Closed

A way to force at least one iteration #1004

PerformanceCoder opened this issue Sep 8, 2022 · 1 comment

Comments

@PerformanceCoder
Copy link

Hi!

Currently, I'm solving a series of optimization problems. To solve next optimization problem, the solution from previous problem is used as initial approximation. In some cases initial solution is already accurate enough for the next problem, therefore 0 optimization iterations is applied and the initial vector is not changed. This causes ladder-like patterns when plotting.

I understand that it is an expected behaviour: if approximation is already good, then there is no need to make it better. But is there a way to force optimizer calculate at least one iteration without checking the convergence metrics? Currently, I can optimize with a limit of 1 iteration and 0 tolerance, but maybe there is a better way to do it?

@pkofod
Copy link
Member

pkofod commented Sep 11, 2022

I would say that is probably the best way. It's stopping because it is converged according to your metric. The only way you can avoid that is to tighten the tolerances. So it seems like you found the solution yourself :)

@pkofod pkofod closed this as completed Sep 11, 2022
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