jmetal.util.parallel
Class MultithreadedEvaluator

java.lang.Object
  extended by jmetal.util.parallel.MultithreadedEvaluator
All Implemented Interfaces:
IParallelEvaluator

public class MultithreadedEvaluator
extends java.lang.Object
implements IParallelEvaluator

Author:
Antonio J. Nebro Class for evaluating solutions in parallel using threads

Constructor Summary
MultithreadedEvaluator(int threads)
          Constructor
 
Method Summary
 void addSolutionForEvaluation(Solution solution)
          Adds a solution to be evaluated to a list of tasks
 java.util.List<Solution> parallelEvaluation()
          Evaluates a list of solutions
 void startEvaluator(Problem problem)
          Constructor
 void stopEvaluator()
          Shutdown the executor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultithreadedEvaluator

public MultithreadedEvaluator(int threads)
Constructor

Parameters:
threads -
Method Detail

startEvaluator

public void startEvaluator(Problem problem)
Constructor

Specified by:
startEvaluator in interface IParallelEvaluator
Parameters:
problem - problem to solve

addSolutionForEvaluation

public void addSolutionForEvaluation(Solution solution)
Adds a solution to be evaluated to a list of tasks

Specified by:
addSolutionForEvaluation in interface IParallelEvaluator
Parameters:
solution - Solution to be evaluated

parallelEvaluation

public java.util.List<Solution> parallelEvaluation()
Evaluates a list of solutions

Specified by:
parallelEvaluation in interface IParallelEvaluator
Returns:
A list with the evaluated solutions

stopEvaluator

public void stopEvaluator()
Shutdown the executor

Specified by:
stopEvaluator in interface IParallelEvaluator