public interface Problem
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any underlying resources used by this problem.
|
void |
evaluate(Solution solution)
Evaluates the solution, updating the solution's objectives in place.
|
java.lang.String |
getName()
Returns the user-friendly name for this problem.
|
int |
getNumberOfConstraints()
Returns the number of constraints defined by this problem.
|
int |
getNumberOfObjectives()
Returns the number of objectives defined by this problem.
|
int |
getNumberOfVariables()
Returns the number of decision variables defined by this problem.
|
default boolean |
isType(java.lang.Class<? extends Variable> type)
Returns
true if all decision variables used by this solution are the given type. |
Solution |
newSolution()
Returns a new solution for this problem.
|
java.lang.String getName()
int getNumberOfVariables()
int getNumberOfObjectives()
int getNumberOfConstraints()
void evaluate(Solution solution)
solution
- the solution to be evaluatedSolution newSolution()
void close()
close
in interface java.lang.AutoCloseable
default boolean isType(java.lang.Class<? extends Variable> type)
true
if all decision variables used by this solution are the given type.
This also considers if the given types are compatible. For example, BinaryIntegerVariable
is compatible with BinaryVariable
.type
- the type of decision variabletrue
if all decision variables are the given type; false
otherwise.Copyright 2009-2024 David Hadka and other contributors. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage.