Class ReachedLimitBestKnownException

All Implemented Interfaces:
Serializable, InstanceIterator, OptimalInstanceIterator

Resource limit reached on an optimization problem with the best known solution thus far.
solver.limitTime(1000);
try {
  solver.find();
} catch (ReachedLimitBestKnownException rle) {
  // This is an optimization problem and 1000ms has passed.
  // Although the solver did not complete, it returned the best known
  // (but possibly non-optimal) instance after 1000ms. This instance is
  // stored in the rle exception.
  while (rle.find()) {
    System.out.println("Approximate solutions: " + rle.instance());
  }
} catch (ReachedLimitException rle) {
  // 1000ms has passed.
}
Author:
jimmy
See Also: