Class ConstrainedOptimProblemImpl1
- java.lang.Object
-
- dev.nm.solver.multivariate.constrained.problem.ConstrainedOptimProblemImpl1
-
- All Implemented Interfaces:
ConstrainedOptimProblem
,OptimProblem
- Direct Known Subclasses:
SDPDualProblem
public class ConstrainedOptimProblemImpl1 extends Object implements ConstrainedOptimProblem
This implements a constrained optimization problem for a function f subject to equality and less-than-or-equal-to constraints. \[ \min_x f(x) \] s.t.,hi(x) = 0 gi(x) ≤ 0
-
-
Constructor Summary
Constructors Constructor Description ConstrainedOptimProblemImpl1(RealScalarFunction f, EqualityConstraints equal, LessThanConstraints less)
Constructs a constrained optimization problem.ConstrainedOptimProblemImpl1(ConstrainedOptimProblemImpl1 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) ≤ 0
-
-
-
Constructor Detail
-
ConstrainedOptimProblemImpl1
public ConstrainedOptimProblemImpl1(RealScalarFunction f, EqualityConstraints equal, LessThanConstraints less)
Constructs a constrained optimization problem.- Parameters:
f
- the objective function to be minimizedequal
- the collection of equality constraints; if the collection is empty, usenull
less
- the collection of less-than-or-equal-to constraints; if the collection is empty, usenull
-
ConstrainedOptimProblemImpl1
public ConstrainedOptimProblemImpl1(ConstrainedOptimProblemImpl1 that)
Copy constructor.- Parameters:
that
- aConstrainedOptimProblemImpl1
-
-
Method Detail
-
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
-
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
-
-