forum.alglib.net http://forum.alglib.net/ |
|
BLEIC optimizer hanging http://forum.alglib.net/viewtopic.php?f=2&t=1011 |
Page 1 of 1 |
Author: | mayerwin [ Thu Sep 26, 2013 5:24 am ] |
Post subject: | BLEIC optimizer hanging |
Hello, I am using the BLEIC optimizer in C# (.NET 4.5) of ALGLIB 3.8.0 as follows: Code: alglib.minbleicstate state; alglib.minbleicreport rep; var epsg = 0.0000001; var epsf = 0.0; var epsx = 0.0; var maxits = 0; alglib.minbleiccreate(x, out state); alglib.minbleicsetbc(state, bndl, bndu); alglib.minbleicsetlc(state, c, ct); alglib.minbleicsetcond(state, epsg, epsf, epsx, maxits); alglib.minbleicoptimize(state, OptimizationFunction, null, null); alglib.minbleicresults(state, out x, out rep); The constraints are all linear and the gradients are the same at each iteration. It generally works great, but alglib.minbleicoptimize randomly hangs (I have no other choice but to forcibly close the program, upon restarting it may or may not work), with exactly the same input data. Is there any random element in the algorithm that could cause this? Should I use a different stopping criterion? Thanks, Erwin |
Author: | Sergey.Bochkanov [ Thu Sep 26, 2013 7:09 am ] |
Post subject: | Re: BLEIC optimizer hanging |
Hello! BLEIC is completely deterministic algorithm, so it should either always fail or always succeed (assuming that input data were exactly same, including initial point). Can you post full source here so I will be able to debug it? Or send it to my e-mail, if it contains sensitive data? |
Author: | mayerwin [ Fri Sep 27, 2013 3:40 am ] |
Post subject: | Re: BLEIC optimizer hanging |
Thanks for your quick reply. I am trying to extract a standalone source that can actually reproduce the issue consistently, but in the meantime I can see if I pause execution that the stack is (for example): Code: alglibnet2.dll!alglib.sactivesets.sascorrection(alglib.sactivesets.sactiveset state, double[] x, ref double penalty) Unknown alglibnet2.dll!alglib.minbleic.minbleiciteration(alglib.minbleic.minbleicstate state) Unknown alglibnet2.dll!alglib.minbleiciteration(alglib.minbleicstate state) Unknown alglibnet2.dll!alglib.minbleicoptimize(alglib.minbleicstate state, alglib.ndimensional_grad grad, alglib.ndimensional_rep rep, object obj) Unknown penalty 3.94390658666252E-17 double When I enable stepping into external code I can see the algorithm is iterating. Is there a pdb file available so that I could try debugging it myself first and see clearly what is wrong? With the eps* parameters I supplied, is it possible that the algorithm could not converge? But as you say if it was the case it should always have a deterministic outcome (never converging or always converging). |
Author: | Sergey.Bochkanov [ Fri Sep 27, 2013 11:49 am ] |
Post subject: | Re: BLEIC optimizer hanging |
Hello! 0. Can you tell me how many variables and how many general linear constraints you have? 1. Sadly, your information about stack status reveals nothing. Call sequence seems to be normal for the algorithm. 2. You may find ALGLIB sources in /src folder of ALGLIB archive. If you attach them to your project instead of using ALGLIB assembly, you will be able to debug algorithm yourself. 3. Can you turn on optimizer reports with alglib.minbleicsetxrep() and pass ndimensional_rep delegate to minbleicoptimize? It will allow us to observe optimization process and to see how optimizer progresses towards solution? It would be helpful to distinguish situation when algorithm performs a lot of small steps from situation when it is unable to perform even one step |
Author: | mayerwin [ Wed Oct 09, 2013 1:49 pm ] |
Post subject: | Re: BLEIC optimizer hanging |
Thanks Sergey for our efficient email follow-up on this topic. To those who may be interested in the conclusion: after sending minimalist code to reproduce the issue, Sergey confirmed the presence of a minor bug due to the coefficients being used in my model, and fixed it for the upcoming release 3.8.1. |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |