Page 1 of 1

Optimization can't be stopped

Posted: Wed Feb 17, 2016 10:20 pm
by sjwang4
Hi,

In my simulation, I set the optimizer iteration as 1000, but the optimization can't be stopped even when the step count reached 2000.
I am very confused about this problem? anyone can give me some suggestion?

here is my code:

Optimizer opt(sys, SimTK::LBFGSB);
opt.setConvergenceTolerance(0.05);
opt.useNumericalGradient(true);
opt.setMaxIterations(1000);
opt.setLimitedMemoryHistory(500);

Also, I set the lower_bound as -1, the upper_bound as 2, is it ok?
Thanks!

Re: Optimization can't be stopped

Posted: Thu Feb 18, 2016 4:26 pm
by sjwang4
is there a function could force quit the optimization when the evaluation number reached 1000?

I tried stopMaxFunEvals (int) , it not works.

Thanks!

Re: Optimization can't be stopped

Posted: Fri Feb 26, 2016 11:03 am
by jimmy
There may be some examples of this in the Simbody code. These optimizations are getting done via Simbody, so that would be the place to look.

Re: Optimization can't be stopped

Posted: Fri Mar 18, 2016 5:12 am
by kohli
I've stopped the optimize process a number of times in the past, without adverse effects. However, I did have a backup available in case of problems.