Template Struct RuizEquilibration

Struct Documentation

template<typename T>
struct RuizEquilibration

Public Functions

inline explicit RuizEquilibration(isize dim_, isize n_eq_, isize n_in_, bool box_constraints, T epsilon_ = T(1e-3), i64 max_iter_ = 10, Symmetry sym_ = Symmetry::general, std::ostream *logger = nullptr)

Default constructor.

Parameters:
  • dim – primal variable dimension.

  • n_eq_constraints – number of equality and inequality constraints (n_in+n_constraints if box constraints are present, or n_in).

  • epsilon_ – accuracy required for stopping the ruiz equilibration algorithm.

  • max_iter_ – maximum number of ruiz equilibration iterations.

  • sym_ – symetry option format of quadratic cost matrix.

  • logger – parameter for printing or not intermediary results.

inline void print() const

Prints ruiz equilibrator scaling variables.

inline void scale_qp_in_place(QpViewBoxMut<T> qp, bool execute_preconditioner, bool preconditioning_for_infeasible_problems, const isize max_iter, const T epsilon, const HessianType &HessianType, const bool box_constraints, proxsuite::linalg::veg::dynstack::DynStackMut stack)

Scales the qp performing the ruiz equilibrator algorithm considering user options.

Parameters:
  • qp – qp to be scaled (in place).

  • execute_preconditioner – bool variable specifying whether the qp is scaled using current equilibrator scaling variables, or performing anew the algorithm.

  • settings – solver’s settings.

  • stack – stack variable used by the equilibrator.

inline void scale_primal_in_place(VectorViewMut<T> primal) const

Scales a primal variable in place.

Parameters:

primal – primal variable.

inline void scale_dual_in_place(VectorViewMut<T> dual) const

Scales a dual variable in place.

Parameters:

dual – dual variable (includes all equalities and inequalities constraints).

inline void scale_dual_in_place_eq(VectorViewMut<T> dual) const

Scales a dual equality constrained variable in place.

Parameters:

dual – dual variable (includes equalities constraints only).

inline void scale_dual_in_place_in(VectorViewMut<T> dual) const

Scales a dual inequality constrained variable in place.

Parameters:

dual – dual variable (includes inequalities constraints only).

inline void unscale_primal_in_place(VectorViewMut<T> primal) const

Unscales a primal variable in place.

Parameters:

primal – primal variable.

inline void unscale_dual_in_place(VectorViewMut<T> dual) const

Unscales a dual variable in place.

Parameters:

dual – dual variable (includes equalities constraints only).

inline void unscale_box_dual_in_place_in(VectorViewMut<T> dual) const

Unscales a dual variable in place for box inequality constraints.

Parameters:

dual – dual variable (includes equalities constraints only).

inline void scale_box_dual_in_place_in(VectorViewMut<T> dual) const

scales a dual variable in place for box inequality constraints.

Parameters:

dual – dual variable (includes equalities constraints only).

inline void unscale_dual_in_place_eq(VectorViewMut<T> dual) const

Unscales a dual equality constrained variable in place.

Parameters:

dual – dual variable (includes equalities constraints only).

inline void unscale_dual_in_place_in(VectorViewMut<T> dual) const

Unscales a dual inequality constrained variable in place.

Parameters:

dual – dual variable (includes inequalities constraints only).

inline void scale_primal_residual_in_place(VectorViewMut<T> primal) const

Scales a primal residual in place.

Parameters:

primal – primal residual (includes equality and inequality constraints)

inline void scale_primal_residual_in_place_eq(VectorViewMut<T> primal_eq) const

Scales a primal equality constraint residual in place.

Parameters:

primal – primal equality constraint residual.

inline void scale_primal_residual_in_place_in(VectorViewMut<T> primal_in) const

Scales a primal inequality constraint residual in place.

Parameters:

primal – primal inequality constraint residual.

inline void scale_box_primal_residual_in_place_in(VectorViewMut<T> primal_in) const

Scales a primal box inequality constraint residual in place.

Parameters:

primal – primal inequality constraint residual.

inline void scale_dual_residual_in_place(VectorViewMut<T> dual) const

Scales a dual residual in place.

Parameters:

dual – dual residual.

inline void unscale_primal_residual_in_place(VectorViewMut<T> primal) const

Unscales a primal residual in place.

Parameters:

primal – primal residual (includes equality and inequality constraints).

inline void unscale_box_primal_residual_in_place(VectorViewMut<T> primal) const

Unscales a primal equality constraint residual in place.

Parameters:

primal – primal equality constraint residual.

inline void unscale_primal_residual_in_place_eq(VectorViewMut<T> primal_eq) const

Unscales a primal equality constraint residual in place.

Parameters:

primal – primal equality constraint residual.

inline void unscale_primal_residual_in_place_in(VectorViewMut<T> primal_in) const

Unscales a primal inequality constraint residual in place.

Parameters:

primal – primal inequality constraint residual.

inline void unscale_box_primal_residual_in_place_in(VectorViewMut<T> primal_in) const

Unscales a primal inequality constraint residual in place.

Parameters:

primal – primal inequality constraint residual.

inline void unscale_dual_residual_in_place(VectorViewMut<T> dual) const

Unscales a dual residual in place.

Parameters:

dual – dual residual.

Public Members

Vec<T> delta
T c
isize dim
isize n_eq
isize n_in
T epsilon
i64 max_iter
Symmetry sym
std::ostream *logger_ptr = nullptr

Public Static Functions

static inline auto scale_qp_in_place_req(proxsuite::linalg::veg::Tag<T> tag, isize n, isize n_eq, isize n_in, bool box_constraints) -> proxsuite::linalg::veg::dynstack::StackReq

Determines memory requirements for executing the equilibrator.

Parameters:
  • tag – tag for specifying entry type.

  • n – dimension of the primal variable of the model.

  • n_eq – number of equality constraints.

  • n_in – number of inequality constraints.