MOEAFramework / MOEAFramework

A Free and Open Source Java Framework for Multiobjective Optimization
http://moeaframework.org
Other
323 stars 128 forks source link

More like a Question #3

Closed Nozo closed 9 years ago

Nozo commented 9 years ago

Is there any way to use the Executor and attach an initialization (array of solutions) for the different algorithms?

Because if that`s possible it should be relatively easy to run executors in different threads and build a island parallelization by just initialize the algorithm via the executor with the result of the last evolutionary step.

I like the concept behind the Executor, Instrumenter and Analyzer and it would be great if I can use it in combination with an island parallelization.

At the moment I evaluate different frameworks for multi object optimization and that would be a great advantage of the MOEAFramwork!

dhadka commented 9 years ago

Unfortunately, in the current version, this can't be done. I think this would be a useful feature, but it unfortunately is not a quick fix as it requires rewriting the algorithm providers to accept an initial population. Until then, you'll need to manually create the algorithm using its constructor, which lets you specify the initialization method.

Nozo commented 9 years ago

Thx for the information! How is it possible to add multiple Operators to an algorithm ?! For example the Executor adds the SBX crossover operator and the PM mutation operator to the SPEA2 or the NSGA2 algorithm. If I now use the constructor to create a SPEA2 object I have only the possibility to the get 1 Operator via the Variation argument to the SPEA2 Object , how I can add multiple operators?

dhadka commented 9 years ago

The simplest way is to use the OperatorFactory, which lets you describe your variation operator using a string. For example, OperatorFactory.getInstance().getVariation("sbx+pm", new TypedProperties(), problem).

For more control, you can also manually create the operator. If you just need the standard crossover/mutation operator, use GAVariation. Use CompoundVariation to combine two or more operators.

Nozo commented 9 years ago

Thanks a lot! The CompoundVariation is exactly what I am looking for!

dhadka commented 9 years ago

Closing this ticket. Please open a new one if you have additional questions.