![]() |
Sleipnir C++ API
|
#include </home/runner/work/Sleipnir/Sleipnir/include/sleipnir/optimization/solver/util/problem_scaling.hpp>
Public Types | |
| using | DenseVector = Eigen::Vector< Scalar, Eigen::Dynamic > |
| Type alias for dense vector. | |
| using | SparseMatrix = Eigen::SparseMatrix< Scalar > |
| Type alias for sparse matrix. | |
| using | SparseVector = Eigen::SparseVector< Scalar > |
| Type alias for sparse vector. | |
Public Member Functions | |
| ProblemScaling ()=default | |
| Constructs identity problem scaling. | |
| ProblemScaling (Scalar f, const DenseVector &c_e, const DenseVector &c_i) | |
| ProblemScaling (const DenseVector &g) | |
| ProblemScaling (const DenseVector &g, const SparseMatrix &A_e) | |
| ProblemScaling (const DenseVector &g, const SparseMatrix &A_e, const SparseMatrix &A_i) | |
| bool | is_identity () const |
Public Attributes | |
| Scalar | f = Scalar(1) |
| Cost scaling factor d_f. | |
| DenseVector | c_e |
| Equality constraint scaling factors d_cₑ. | |
| DenseVector | c_i |
| Inequality constraint scaling factors d_cᵢ. | |
Automatic problem scaling factors.
| Scalar | Scalar type. |
|
inline |
Constructs problem scaling from explicit factors.
| f | Cost scaling factor d_f. |
| c_e | Equality constraint scaling factors d_cₑ. |
| c_i | Inequality constraint scaling factors d_cᵢ. |
|
inlineexplicit |
Computes Newton problem scaling.
Scales the cost so the largest gradient component at the starting point is at most gₘₐₓ:
d_f = min(1, gₘₐₓ / ‖∇f(x₀)‖_∞)
See §3.8 Automatic Scaling of the Problem Statement in [2].
| g | Cost gradient ∇f, evaluated at the starting point. |
|
inline |
Computes SQP problem scaling.
Scales the cost and each equality constraint so the largest gradient component at the starting point is at most gₘₐₓ:
d_f = min(1, gₘₐₓ / ‖∇f(x₀)‖_∞) d_cₑ[j] = min(1, gₘₐₓ / ‖∇cₑⱼ(x₀)‖_∞)
See §3.8 Automatic Scaling of the Problem Statement in [2].
| g | Cost gradient ∇f, evaluated at the starting point. |
| A_e | Equality constraint Jacobian Aₑ, evaluated at the starting point. |
|
inline |
Computes interior-point problem scaling.
Scales the cost and each constraint so the largest gradient component at the starting point is at most gₘₐₓ:
d_f = min(1, gₘₐₓ / ‖∇f(x₀)‖_∞) d_c[j] = min(1, gₘₐₓ / ‖∇cⱼ(x₀)‖_∞)
See §3.8 Automatic Scaling of the Problem Statement in [2].
|
inline |
Whether the problem scaling is identity.