Class ReferenceSetMerger

java.lang.Object
org.moeaframework.util.CommandLineUtility
org.moeaframework.analysis.tools.ReferenceSetMerger

public class ReferenceSetMerger extends CommandLineUtility
Utility for merging two or more populations identified by unique sources and determining the contribution of each source to the combined non-dominated population. A command line interface is also provided.
  • Constructor Details

    • ReferenceSetMerger

      public ReferenceSetMerger()
      Class constructor for merging populations and determining which contributed to the resulting non-dominated population.
    • ReferenceSetMerger

      public ReferenceSetMerger(NondominatedPopulation combinedPopulation)
      Class constructor for merging population and determining which contributed to the resulting non-dominated population.
      Parameters:
      combinedPopulation - an (empty) population for maintaining non-dominated solutions
  • Method Details

    • add

      public void add(String source, Population population)
      Adds the population from the specified source.
      Parameters:
      source - the source of the population
      population - the population
      Throws:
      IllegalArgumentException - if a population has been added previously with the specified source
    • getCombinedPopulation

      public NondominatedPopulation getCombinedPopulation()
      Returns the combined non-dominated population.
      Returns:
      the combined non-dominated population
    • getSources

      public Set<String> getSources()
      Returns the sources that have been added to the combined non-dominated population.
      Returns:
      the sources that have been added to the combined non-dominated population
    • getPopulation

      public Population getPopulation(String source)
      Returns the original population associated with the specified source.
      Parameters:
      source - the source
      Returns:
      the original population associated with the specified source
    • getContributionFrom

      public Population getContributionFrom(String source)
      Returns the solutions in the combined non-dominated population originating from the specified source.
      Parameters:
      source - the source whose solutions in the combined non-dominated population are returned
      Returns:
      the solutions in the combined non-dominated population originating from the specified source
    • getOptions

      public org.apache.commons.cli.Options getOptions()
      Description copied from class: CommandLineUtility
      Returns the options made available by this command line utility. The base implementation automatically provides the -h,--help option. Implementations overriding this method and begin with a call to super.getOptions().
      Overrides:
      getOptions in class CommandLineUtility
      Returns:
      the options made available by this command line utility
    • run

      public void run(org.apache.commons.cli.CommandLine commandLine) throws Exception
      Description copied from class: CommandLineUtility
      Runs this command line utility with the specified command line arguments.
      Specified by:
      run in class CommandLineUtility
      Parameters:
      commandLine - the command line arguments
      Throws:
      Exception - if any exception occurred while running this command
    • main

      public static void main(String[] args) throws Exception
      Starts the command line utility for merging two or more sets.
      Parameters:
      args - the command line arguments
      Throws:
      Exception - if an error occurred