Package org.moeaframework.problem.single
Class Rosenbrock
java.lang.Object
org.moeaframework.problem.AbstractProblem
org.moeaframework.problem.single.Rosenbrock
- All Implemented Interfaces:
AutoCloseable
,Problem
The single-objective Rosenbrock problem with an optimum at
x = (1, 1)
with f(x) = 0
. While this
implements the two variable version, there does exist a generalized version to N
variables.
References:
- Rosenbrock, H.H. (1960). "An Automatic Method for Finding the Greatest or Least Value of a Function". The Computer Journal. 3 (3): 175–184. doi:10.1093/comjnl/3.3.175. ISSN 0010-4620.
-
Field Summary
Fields inherited from class org.moeaframework.problem.AbstractProblem
numberOfConstraints, numberOfObjectives, numberOfVariables
-
Constructor Summary
ConstructorDescriptionConstructs a new instance of the Rosenbrock problem with two decision variables.Rosenbrock
(int numberOfVariables) Constructs a new instance of the Rosenbrock problem. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Evaluates the solution, updating the solution's objectives in place.Returns the reference set, typically a single solution unless the problem has multiple local minima, for this single objective problem.Returns a new solution for this problem.Methods inherited from class org.moeaframework.problem.AbstractProblem
close, getName, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables
-
Constructor Details
-
Rosenbrock
public Rosenbrock()Constructs a new instance of the Rosenbrock problem with two decision variables. -
Rosenbrock
public Rosenbrock(int numberOfVariables) Constructs a new instance of the Rosenbrock problem.- Parameters:
numberOfVariables
- the number of decision variables
-
-
Method Details
-
evaluate
Description copied from interface:Problem
Evaluates 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:Problem
Returns 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
-
getReferenceSet
Returns the reference set, typically a single solution unless the problem has multiple local minima, for this single objective problem.- Returns:
- the reference set
-