Package org.moeaframework.core.spi
Class RegisteredProblemProvider
java.lang.Object
org.moeaframework.core.spi.ProblemProvider
org.moeaframework.core.spi.RegisteredProblemProvider
- Direct Known Subclasses:
CEC2009ProblemProvider,DTLZProblemProvider,LSMOPProblemProvider,LZProblemProvider,MaFProblemProvider,MiscProblemProvider,SingleObjectiveProblemProvider,WFGProblemProvider,ZCATProblemProvider,ZDTProblemProvider
Problem provider that lets callers register problems by name. Names are case-insensitive.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the problem names to appear in the diagnostic tool.getEpsilons(String name) Returns the recommended or default ε values for the specified problem, ornullif this provider does not support the problem or no defaults are provided.getProblem(String name) Returns the problem with the specified name, ornullif this provider does not support the problem.getReferenceSet(String name) Returns the reference set for the specified problem, ornullif this provider does not support the problem or no reference set is available.getReferenceSetPath(String name) Returns the file path or resource name to load the reference set for the specified problem, ornullif this provider has no reference set defined for the problem.Returns all problems that have been registered with this provider.protected final voidRegisters a new problem with this provider.protected final voidRegisters the given problem with the diagnostic tool.protected final voidRegisters all of the given problems with the diagnostic tool.protected final voidregisterEpsilons(String name, Epsilons epsilons) Registers the ε values for the given problem, used as the defaults when constructing an algorithm, archive, or other object that uses ε-based dominance.
-
Constructor Details
-
RegisteredProblemProvider
public RegisteredProblemProvider()Creates a new, empty problem provider.
-
-
Method Details
-
register
Registers a new problem with this provider.- Parameters:
name- the problem nameconstructor- the function that creates a new instance of the problemreferenceSet- the path of the file containing the reference set
-
registerEpsilons
Registers the ε values for the given problem, used as the defaults when constructing an algorithm, archive, or other object that uses ε-based dominance.- Parameters:
name- the problem nameepsilons- the ε values
-
registerDiagnosticToolProblem
Registers the given problem with the diagnostic tool.- Parameters:
name- the problem name
-
registerDiagnosticToolProblems
Registers all of the given problems with the diagnostic tool.- Parameters:
names- the problem names
-
getRegisteredProblems
Returns all problems that have been registered with this provider. Note that this does not necessarily include all problems that can be instantiated by the provider, only those that have been explicitly registered.- Returns:
- the problem names
-
getDiagnosticToolProblems
Description copied from class:ProblemProviderReturns the problem names to appear in the diagnostic tool. For best results, only include problems with two objectives and have a defined reference set.- Overrides:
getDiagnosticToolProblemsin classProblemProvider- Returns:
- the problem names to appear in the diagnostic tool
-
getProblem
Description copied from class:ProblemProviderReturns the problem with the specified name, ornullif this provider does not support the problem.- Specified by:
getProblemin classProblemProvider- Parameters:
name- the problem name- Returns:
- the problem instance or
null
-
getReferenceSetPath
Returns the file path or resource name to load the reference set for the specified problem, ornullif this provider has no reference set defined for the problem.- Parameters:
name- the problem name- Returns:
- the reference set path, resource name, or
null
-
getReferenceSet
Description copied from class:ProblemProviderReturns the reference set for the specified problem, ornullif this provider does not support the problem or no reference set is available.- Specified by:
getReferenceSetin classProblemProvider- Parameters:
name- the problem name- Returns:
- the reference set or
null
-
getEpsilons
Description copied from class:ProblemProviderReturns the recommended or default ε values for the specified problem, ornullif this provider does not support the problem or no defaults are provided.- Overrides:
getEpsilonsin classProblemProvider- Parameters:
name- the problem name- Returns:
- the ε values for the specified problem or
null
-