Controller and Evaluator should support parallel evaluation
A Free and Open Source Java Framework for Multiobjective Optimization
Brought to you by:
dhadka
Controller.java and Evaluator.java should be able to support parallel evaluation if the algorithm supports this.
One possible solution might be by packaging the problem in a DistributedProblem in Controller and Evaluator.
executor = Executors.newFixedThreadPool(numberOfThreads);
problem = new DistributedProblem(problem, executor);
However, I had good success by using the executor in Controller and Evaluator. And use a callback to update DiagnosticTool. This gives more control of the execution process e.g. determine populationSize, numberofThreads,...
Not sure if this aligns with the MOEA idea's or if it has other drawbacks. But just thought I share it here anyway. Find a drafty solution of Evaluator and Controller attached.
I think this is a great suggestion. I'll try to integrate this into the next release.
Hi David,
thanks for your response. Just as a little note, the previous attached solution does not support an encapsulation of the Problem into a TimingProblem (evaluator scenario). If you decide to go with a centralized executor solution it would be probably required to introduce a derivation of Executor (e.g TimingExecutor). I attempted a solution to use TimingProblem but found that the TimingProblem measures the total core runtime. Hence, the measured running time of the evaluation is longer than the execution time. This is probably not the desired behavior?