Class BoxOptimProblem
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.problem.BoxOptimProblem
-
- All Implemented Interfaces:
ConstrainedOptimProblem,OptimProblem
public class BoxOptimProblem extends Object implements ConstrainedOptimProblem
A box constrained optimization problem, for which a solution must be within fixed bounds.
-
-
Constructor Summary
Constructors Constructor Description BoxOptimProblem(RealScalarFunction f, Vector lower, Vector upper)Constructs an optimization problem with box constraints.BoxOptimProblem(RealScalarFunction f, BoxConstraints box)Constructs an optimization problem with box constraints.BoxOptimProblem(BoxOptimProblem that)Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdimension()Get the number of variables.RealScalarFunctionf()Get the objective function.EqualityConstraintsgetEqualityConstraints()Gets the equality constraints, hi(x) = 0LessThanConstraintsgetLessThanConstraints()Gets the less-than-or-equal-to constraints, gi(x) ≤ 0VectorlowerBound()Gets the lower bounds.VectorupperBound()Gets the upper bounds.
-
-
-
Constructor Detail
-
BoxOptimProblem
public BoxOptimProblem(RealScalarFunction f, BoxConstraints box)
Constructs an optimization problem with box constraints.- Parameters:
f- the objective function to be minimizedbox- the box constraints
-
BoxOptimProblem
public BoxOptimProblem(RealScalarFunction f, Vector lower, Vector upper)
Constructs an optimization problem with box constraints.- Parameters:
f- the objective function to be minimizedlower- the lower bound valuesupper- the upper bound values
-
BoxOptimProblem
public BoxOptimProblem(BoxOptimProblem that)
Copy constructor.- Parameters:
that- a BoxOptimProblem
-
-
Method Detail
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblemGet the objective function.- Specified by:
fin interfaceOptimProblem- Returns:
- the objective function
-
dimension
public int dimension()
Description copied from interface:OptimProblemGet the number of variables.- Specified by:
dimensionin interfaceOptimProblem- Returns:
- the number of variables.
-
getLessThanConstraints
public LessThanConstraints getLessThanConstraints()
Description copied from interface:ConstrainedOptimProblemGets the less-than-or-equal-to constraints, gi(x) ≤ 0- Specified by:
getLessThanConstraintsin interfaceConstrainedOptimProblem- Returns:
- the less-than-or-equal-to constraints
-
getEqualityConstraints
public EqualityConstraints getEqualityConstraints()
Description copied from interface:ConstrainedOptimProblemGets the equality constraints, hi(x) = 0- Specified by:
getEqualityConstraintsin interfaceConstrainedOptimProblem- Returns:
- the equality constraints
-
lowerBound
public Vector lowerBound()
Gets the lower bounds.- Returns:
- the lower bounds
-
upperBound
public Vector upperBound()
Gets the upper bounds.- Returns:
- the upper bounds
-
-