Package org.moeaframework.problem.ZDT
Class ZDT4
java.lang.Object
org.moeaframework.problem.AbstractProblem
org.moeaframework.problem.ZDT.ZDT
org.moeaframework.problem.ZDT.ZDT4
- All Implemented Interfaces:
AutoCloseable,Named,Problem
The ZDT4 test problem.
-
Field Summary
Fields inherited from class org.moeaframework.problem.AbstractProblem
numberOfConstraints, numberOfObjectives, numberOfVariables -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidEvaluates the solution, updating the solution's objectives in place.Returns a new solution for this problem.Methods inherited from class org.moeaframework.problem.AbstractProblem
close, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables
-
Constructor Details
-
ZDT4
public ZDT4()Constructs a ZDT4 test problem with 10 decision variables. -
ZDT4
public ZDT4(int numberOfVariables) Constructs a ZDT4 test problem with the specified number of decision variables.- Parameters:
numberOfVariables- the number of decision variables
-
-
Method Details
-
evaluate
Description copied from interface:ProblemEvaluates the solution, updating the solution's objectives in place. Algorithms must explicitly call this method when appropriate to evaluate new solutions or reevaluate modified solutions.- Parameters:
solution- the solution to be evaluated
-
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.- Specified by:
newSolutionin interfaceProblem- Overrides:
newSolutionin classZDT- Returns:
- a new solution for this problem
-