Menu

#45 Defining new algorithm in MOEA

Any Version
open
D. Hadka
None
5
2015-08-07
2015-06-15
Anonymous
No

Hi , I am a new user of MOEA, can any one help me to define my own new algorithm and use it with the MOEA Framework.

Thank you

Discussion

  • Anonymous

    Anonymous - 2015-06-15

    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.

     
    • Anonymous

      Anonymous - 2015-06-18

      Thank you very much for your valued feedback. I will try one of the ways you have suggested.

       
  • Anonymous

    Anonymous - 2015-07-14

    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
  • Anonymous

    Anonymous - 2015-07-15

    Modify the src/org/moeaframework/algorithm/StandardAlgorithms.java class (see how the other algorithms are constructed in this file for an example).

     
  • Anonymous

    Anonymous - 2015-08-07

    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

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.