Package org.moeaframework.problem.DTLZ
Class DTLZ
java.lang.Object
org.moeaframework.problem.AbstractProblem
org.moeaframework.problem.DTLZ.DTLZ
- All Implemented Interfaces:
AutoCloseable,Named,Problem
- Direct Known Subclasses:
DTLZ1,DTLZ2,DTLZ3,DTLZ4,DTLZ5,DTLZ6,DTLZ7,MaF1,MaF2,MaF3,MaF4,MaF5,MaF6
Implements methods shared by all problems in the DTLZ test suite. The DTLZ problems define a
g(X_M)
function, which controls the convergence or distance to the Pareto front, and the f_1(x), ..., f_M(x)
functions controlling the shape or position of solutions on the Pareto front.-
Field Summary
Fields inherited from class org.moeaframework.problem.AbstractProblem
numberOfConstraints, numberOfObjectives, numberOfVariables -
Constructor Summary
ConstructorsConstructorDescriptionDTLZ(int numberOfVariables, int numberOfObjectives) Constructs a new DTLZ problem instance with the specified number of variables and objectives. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleg1(double[] x) protected doubleg2(double[] x) protected SolutiongenerateAt(double optimalValue) Generates a random Pareto optimal solution given the optimal value for theKdecision variables used in the calculation ofg(X_M).getName()Returns the name of this problem.Returns a new solution for this problem.Methods inherited from class org.moeaframework.problem.AbstractProblem
close, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables
-
Constructor Details
-
DTLZ
public DTLZ(int numberOfVariables, int numberOfObjectives) Constructs a new DTLZ problem instance with the specified number of variables and objectives.- Parameters:
numberOfVariables- the number of variables for this problemnumberOfObjectives- the number of objectives for this problem
-
-
Method Details
-
getName
Description copied from interface:ProblemReturns the name of this problem. Whenever possible, this name should match the name recognized byProblemFactory.- Returns:
- the name of this problem
-
newSolution
Description copied from interface:ProblemReturns a new solution for this problem. Implementations must initialize the variables so that the valid range of values is defined, but typically leave the actual value at a default or undefined state.- Returns:
- a new solution for this problem
-
g1
protected double g1(double[] x) Computes theg(X_M)function used byDTLZ1andDTLZ3. Note that while the entire array of decision variables is provided to this method, only the lastk = D - M + 1variables are used in this calculation.- Parameters:
x- the array of decision variable values- Returns:
- the computed value of the
g(X_M)function
-
g2
protected double g2(double[] x) Computes theg(X_M)function used byDTLZ2,DTLZ4, andDTLZ5. Note that while the entire array of decision variables is provided to this method, only the lastk = D - M + 1variables are used in this calculation.- Parameters:
x- the array of decision variable values- Returns:
- the computed value of the
g(X_M)function
-
generateAt
Generates a random Pareto optimal solution given the optimal value for theKdecision variables used in the calculation ofg(X_M).- Parameters:
optimalValue- the decision variable value that produces an optimal value forg(X_M)- Returns:
- the solution
-