Пример #1
0
  /**
   * The method which starts the optimization.
   *
   * @return optimization result with the best solution found and execution statistics
   */
  public OptimizationResult run() {
    optimizationResult = new OptimizationResult();
    current_it = 0;
    optimizationResult.start();
    execute();
    optimizationResult.finish();

    return optimizationResult;
  }
Пример #2
0
 /**
  * Method used in subclasses to notify the completion of an iteration of the algorithm.
  *
  * @param currentSolution solution found at iteration
  * @return true if the algorithm should continue to execute
  */
 public boolean endIteration(Solution currentSolution) {
   if (optimizationResult != null) {
     optimizationResult.endIteration(currentSolution);
   }
   current_it++;
   return current_it < max_it;
 }