Class NonNegativityConstraintOptimProblem
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.problem.NonNegativityConstraintOptimProblem
-
- All Implemented Interfaces:
ConstrainedOptimProblem
,OptimProblem
public class NonNegativityConstraintOptimProblem extends Object implements ConstrainedOptimProblem
This is a constrained optimization problem for a function which has all non-negative variables. \[ \min_x f(x) \] s.t.,x ≥ 0
-
-
Constructor Summary
Constructors Constructor Description NonNegativityConstraintOptimProblem(RealScalarFunction f)
Construct a constrained optimization problem with only non-negative variables.
-
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) ≤ 0
-
-
-
Constructor Detail
-
NonNegativityConstraintOptimProblem
public NonNegativityConstraintOptimProblem(RealScalarFunction f)
Construct a constrained optimization problem with only non-negative variables.- Parameters:
f
- the objective function
-
-
Method Detail
-
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
-
dimension
public int dimension()
Description copied from interface:OptimProblem
Get the number of variables.- Specified by:
dimension
in interfaceOptimProblem
- Returns:
- the number of variables.
-
f
public RealScalarFunction f()
Description copied from interface:OptimProblem
Get the objective function.- Specified by:
f
in interfaceOptimProblem
- Returns:
- the objective function
-
-