Class ADMMQPConvergenceChecker
java.lang.Object
org.hipparchus.optim.nonlinear.vector.constrained.ADMMQPConvergenceChecker
- All Implemented Interfaces:
ConvergenceChecker<LagrangeSolution>
,OptimizationData
public class ADMMQPConvergenceChecker
extends Object
implements ConvergenceChecker<LagrangeSolution>, OptimizationData
Convergence Checker for ADMM QP Optimizer.
- Since:
- 3.1
-
Method Summary
Modifier and TypeMethodDescriptionboolean
converged
(double rp, double rd, double maxPrimal, double maxDual) Evaluate convergence.boolean
converged
(int i, LagrangeSolution previous, LagrangeSolution current) Check if the optimization algorithm has converged.double
maxDual
(RealVector x, RealVector y) Compute dual vectors max.double
maxPrimal
(RealVector x, RealVector z) Compute primal vectors max.double
residualDual
(RealVector x, RealVector y) Compute dual residual.double
Compute primal residual.
-
Method Details
-
converged
Check if the optimization algorithm has converged.- Specified by:
converged
in interfaceConvergenceChecker<LagrangeSolution>
- Parameters:
i
- Current iteration.previous
- Best point in the previous iteration.current
- Best point in the current iteration.- Returns:
true
if the algorithm is considered to have converged.
-
converged
public boolean converged(double rp, double rd, double maxPrimal, double maxDual) Evaluate convergence.- Parameters:
rp
- primal residualrd
- dual residualmaxPrimal
- primal vectors maxmaxDual
- dual vectors max- Returns:
- true of convergence has been reached
-
residualPrime
Compute primal residual.- Parameters:
x
- primal problem solutionz
- auxiliary variable- Returns:
- primal residual
-
residualDual
Compute dual residual.- Parameters:
x
- primal problem solutiony
- dual problem solution- Returns:
- dual residual
-
maxPrimal
Compute primal vectors max.- Parameters:
x
- primal problem solutionz
- auxiliary variable- Returns:
- primal vectors max
-
maxDual
Compute dual vectors max.- Parameters:
x
- primal problem solutiony
- dual problem solution- Returns:
- dual vectors max
-