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 int
dimension()
Get the number of variables.RealScalarFunction
f()
Get the objective function.EqualityConstraints
getEqualityConstraints()
Gets the equality constraints, hi(x) = 0LessThanConstraints
getLessThanConstraints()
Gets the less-than-or-equal-to constraints, gi(x) ≤ 0Vector
lowerBound()
Gets the lower bounds.Vector
upperBound()
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:OptimProblem
Get the objective function.- Specified by:
f
in interfaceOptimProblem
- Returns:
- the objective function
-
dimension
public int dimension()
Description copied from interface:OptimProblem
Get the number of variables.- Specified by:
dimension
in interfaceOptimProblem
- Returns:
- the number of variables.
-
getLessThanConstraints
public LessThanConstraints getLessThanConstraints()
Description copied from interface:ConstrainedOptimProblem
Gets the less-than-or-equal-to constraints, gi(x) ≤ 0- Specified by:
getLessThanConstraints
in interfaceConstrainedOptimProblem
- Returns:
- the less-than-or-equal-to constraints
-
getEqualityConstraints
public EqualityConstraints getEqualityConstraints()
Description copied from interface:ConstrainedOptimProblem
Gets the equality constraints, hi(x) = 0- Specified by:
getEqualityConstraints
in 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
-
-