forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 11:34 pm

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: BLEIC optimizer hanging
PostPosted: Thu Sep 26, 2013 5:24 am 
Offline

Joined: Thu Sep 26, 2013 5:12 am
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: BLEIC optimizer hanging
PostPosted: Thu Sep 26, 2013 7:09 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
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?


Top
 Profile  
 
 Post subject: Re: BLEIC optimizer hanging
PostPosted: Fri Sep 27, 2013 3:40 am 
Offline

Joined: Thu Sep 26, 2013 5:12 am
Posts: 3
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).


Top
 Profile  
 
 Post subject: Re: BLEIC optimizer hanging
PostPosted: Fri Sep 27, 2013 11:49 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
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


Top
 Profile  
 
 Post subject: Re: BLEIC optimizer hanging
PostPosted: Wed Oct 09, 2013 1:49 pm 
Offline

Joined: Thu Sep 26, 2013 5:12 am
Posts: 3
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group