Class ProblemFactory

All Implemented Interfaces:
Iterable<ProblemProvider>

public class ProblemFactory extends AbstractFactory<ProblemProvider>
Factory for creating optimization problem instances and their corresponding reference sets, if known. Problems are referenced by name. For example, getProblem("DTLZ2_2") will create an instance of the 2-objective DTLZ2 problem. See ProblemProvider for details on adding new providers.

Obligatory Link

This class is thread safe.

  • Constructor Details

    • ProblemFactory

      public ProblemFactory()
      Constructs a new problem factory.
  • Method Details

    • getInstance

      public static ProblemFactory getInstance()
      Returns the default problem factory.
      Returns:
      the default problem factory
    • setInstance

      public static void setInstance(ProblemFactory instance)
      Sets the default problem factory.
      Parameters:
      instance - the default problem factory
    • getProblem

      public Problem getProblem(String name)
      Searches through all discovered ProblemProvider instances, returning an instance of the problem with the registered name. This method must throw an ProviderNotFoundException if no matching problem is found.
      Parameters:
      name - the name identifying the problem
      Returns:
      an instance of the problem with the registered name
      Throws:
      ProviderNotFoundException - if no provider for the problem is available
    • getReferenceSet

      public NondominatedPopulation getReferenceSet(String name)
      Searches through all discovered ProblemProvider instances, returning the reference set of the problem with the registered name. Returns null if no reference set is available for the specified problem.
      Parameters:
      name - the name identifying the problem
      Returns:
      the reference set of the problem with the registered name; or null if no reference set is available
    • getAllRegisteredProblems

      public Set<String> getAllRegisteredProblems()
      Returns the names of all problems that have been registered by the providers. Note that this does not include a comprehensive list of all problems that can be constructed, only those that have been registered explicitly with a name.
      Returns:
      all registered problem names
    • getAllDiagnosticToolProblems

      public Set<String> getAllDiagnosticToolProblems()
      Returns the names of all problems that have been registered to display in the diagnostic tool.
      Returns:
      all diagnostic tool problem names