Hello. There are two ways to define new algorithms: (1) Customize an existing algorithm with new operators; or (2) write the new algorithm from scratch.
1. Customize an Existing Algorithm
Take a look at some of the algorithms in the src/org/moeaframework/algorithm/ folder, such as NSGAII.java. The constructors for these algorithms include arguments for the selection and variation operators:
new NSGAII(problem,
new NondominatedSortingPopulation(),
new EpsilonBoxDominanceArchive(0.01),
new TournamentSelection(2, new ParetoDominanceComparator()),
new CompoundVariation(new SBX(1.0, 15.0), new PM(0.01, 20.0)),
new RandomInitialization(problem, 100));
By changing these arguments, you can alter the behavior of the underlying algorithm. This is particularly useful if you are investigating a new selection, mutation, or recombination operator.
2. Write a New Algorithm
It's perhaps best to learn by seeing how the other algorithms are implemented. For example, see src/org/moeaframework/algorithm/NSGAII.java. The majority of the work is done in the iterate() method, which defines one iteration (generation) of the algorithm.
The MOEA Framework comes with many classes implementing general MOEA features, such as Pareto dominance checks, many mutation and recombination operators, etc. It's a good practice to try and reuse these classes in your new algorithm whenever possible. If you can't find an existing class that does what you need, you can implement your own (for example, see the Selection and Variation interfaces).
Good luck! Feel free to post specific questions here.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need an individual correction method for my specific problem in NSGAII algorithm. So I created a new algorithm with Class named NSGAIImod and added the correction method inside iterate method as follows:
while (offspring.size() < populationSize) {
Solution[] parents = selection.select(variation.getArity(),
population);
Solution[] children = variation.evolve(parents);
// correction of individual
children = CorrectChildren(children);
offspring.addAll(children);
}
evaluateAll(offspring);
When I was calling modfied algorithm NSGAIImod from executor I am getting error:
org.moeaframework.core.spi.ProviderNotFoundException: no provider for NSGAIImod
Could you please dircet me how to add this algorithm to the provider?
Thank you.
Last edit: Anonymous 2015-07-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
Can any one provide me with a tutorial except those come with the framework for defining new problem with MOEA , as I didn't understand exactly how to know and determine how many variables to use.
Best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Hello. There are two ways to define new algorithms: (1) Customize an existing algorithm with new operators; or (2) write the new algorithm from scratch.
1. Customize an Existing Algorithm
Take a look at some of the algorithms in the src/org/moeaframework/algorithm/ folder, such as NSGAII.java. The constructors for these algorithms include arguments for the selection and variation operators:
By changing these arguments, you can alter the behavior of the underlying algorithm. This is particularly useful if you are investigating a new selection, mutation, or recombination operator.
2. Write a New Algorithm
It's perhaps best to learn by seeing how the other algorithms are implemented. For example, see src/org/moeaframework/algorithm/NSGAII.java. The majority of the work is done in the iterate() method, which defines one iteration (generation) of the algorithm.
The MOEA Framework comes with many classes implementing general MOEA features, such as Pareto dominance checks, many mutation and recombination operators, etc. It's a good practice to try and reuse these classes in your new algorithm whenever possible. If you can't find an existing class that does what you need, you can implement your own (for example, see the Selection and Variation interfaces).
Good luck! Feel free to post specific questions here.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Thank you very much for your valued feedback. I will try one of the ways you have suggested.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Hi,
I need an individual correction method for my specific problem in NSGAII algorithm. So I created a new algorithm with Class named NSGAIImod and added the correction method inside iterate method as follows:
When I was calling modfied algorithm NSGAIImod from executor I am getting error:
org.moeaframework.core.spi.ProviderNotFoundException: no provider for NSGAIImod
Could you please dircet me how to add this algorithm to the provider?
Thank you.
Last edit: Anonymous 2015-07-14
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Modify the src/org/moeaframework/algorithm/StandardAlgorithms.java class (see how the other algorithms are constructed in this file for an example).
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Hi
Can any one provide me with a tutorial except those come with the framework for defining new problem with MOEA , as I didn't understand exactly how to know and determine how many variables to use.
Best regards