Class ProblemProvider

java.lang.Object
org.moeaframework.core.spi.ProblemProvider
Direct Known Subclasses:
BBOB2016Problems, CDTLZProblemProvider, RegisteredProblemProvider

public abstract class ProblemProvider extends Object
Defines a SPI for creating named optimization problems.

To create a custom ProblemProvider:

  1. Extend this class and implement the abstract methods.
  2. Create the file META-INF/services/org.moeaframework.core.spi.ProblemProvider with a line identifying the fully-qualified class name of the custom provider.
  3. Compile and bundle the .class file(s) along with the META-INF folder into a JAR.
  4. Include this JAR on the classpath.
Providers can also be registered directly with ProblemFactory.

As problems names are often used in file names, it is best to avoid characters which are not compatible with the file system. It is suggested that names match the following regular expression: ^[a-zA-Z0-9()\-,]+$.

  • Constructor Details

    • ProblemProvider

      public ProblemProvider()
      Constructs a problem provider.
  • Method Details

    • getDiagnosticToolProblems

      public Set<String> getDiagnosticToolProblems()
      Returns the problem names to appear in the diagnostic tool. For best results, only include problems with two objectives and have a defined reference set.
      Returns:
      the problem names to appear in the diagnostic tool
    • getProblem

      public abstract Problem getProblem(String name)
      Returns the problem with the specified name, or null if this provider does not support the problem.
      Parameters:
      name - the problem name
      Returns:
      the problem instance or null
      Throws:
      ProviderException - if the creation of the problem failed for any reason
    • getReferenceSet

      public abstract NondominatedPopulation getReferenceSet(String name)
      Returns the reference set for the specified problem, or null if this provider does not support the problem or no reference set is available.
      Parameters:
      name - the problem name
      Returns:
      the reference set or null
    • getEpsilons

      public Epsilons getEpsilons(String name)
      Returns the recommended or default ε values for the specified problem, or null if this provider does not support the problem or no defaults are provided.
      Parameters:
      name - the problem name
      Returns:
      the ε values for the specified problem or null