jMetal / jMetalPy

A framework for single/multi-objective optimization with metaheuristics
https://jmetal.github.io/jMetalPy/index.html
MIT License
498 stars 150 forks source link

Add solution generator and evaluator for SA #67

Closed YevheniiSemendiak closed 4 years ago

YevheniiSemendiak commented 4 years ago

Since, current implementation of SA does not support different types of solution generators and evaluators, I would like to enhance it.

Please, take a look and I looking forward for your review!

ajnebro commented 4 years ago

Thanks for the pull request.

In principle, a SA only evaluates a single solution at each step, so it is not clear the advantages of using an evaluator since it will lead to an unnecessary overhead.

Please, could you justify adding the evaluator?

YevheniiSemendiak commented 4 years ago

Thanks for review!

The idea was to keep the instantiation signature and flexibility of all SO algorithms more or less similar.

Personally, I am not planning to use non-default evaluator in SA, but others could find the advantage in performing evaluation in separate process or even in different machine using Spark / Dask evaluator.

If it's not the case, I will remove it.

YevheniiSemendiak commented 4 years ago

If the parameter of evaluator is not welcome, I will remove it. But at least I found the advantage in usage of solution generator.

benhid commented 4 years ago

Hello! Thank you for the PR.

As @ajnebro pointed out, the SA algorithm evaluates one solution at a time, hence there is no need to use other evaluator beyond the default one, at least in principle.

What do you think? I would remove the evaluator but keep the generator.

YevheniiSemendiak commented 4 years ago

@benhid, the evaluator was removed, thank you for clarification!

benhid commented 4 years ago

Thank you!! :)