Better implementation of TimeTermination


Issue here is that we check for time limit after every iteration. So if each iteration takes 59 mins and if we give time limit as 60 minutes then after first iteration program will find that it has more time and it will start the second iteration. Which will complete after 118 mins.

Here can we calculate the time taken for each iteration and before start of next iteration we can calculate approximate end time of next iteration, and if difference between it and termination limit is large we can terminate without starting that iteration.

Oh 59min for an iteration. An iteration is supposed to be calculated “fast”. What kind of problem do you have?

The problem I’m trying to solve is complex one with more than 2500 nodes and many constraints.

59 mins is just an example that I’m giving to explain the situation.

Ok. Thanks. You can always setup your own PrematureTerminationCriterion. Just implement this interface and design your own criterion. It should be relatively easy if you have a look at the implementation of the current TimeTermination.


Working on it.