mardi 18 septembre 2018

Is it possible to skip an iteration step if it takes too long?

Good evening everyone, I am using c++ I have a minimization program and I am trying to find the global minimum. So I iterate through several initial points and let the minimization take place and find the closest minimum. Then i choose the minimum of those, which ensures it is the global minimum. However, it can happen that the program falls into an infinite loop. So I was wondering, Is there a chance to have this logic in c++?

for(set of initial positions)

minimize(f)

 if (minimization takes more than 0.1 seconds)

   skip this step and move to the next initial position

I dont have much hope , but maybe some magical way exists

Thanks for your help!

Aucun commentaire:

Enregistrer un commentaire