27 if (first_iter || norm_e > θ * old_norm_e) {
34 for (
index_t i = 0; i < e.rows(); ++i) {
35 if (first_iter || std::abs(e(i)) > θ * std::abs(old_e(i))) {
37 std::fmax(Δ * std::abs(e(i)) / norm_e,
55 std::max(
real_t(1), std::abs(f0)) /
Nonlinear optimal control problem with finite horizon .
The main polymorphic minimization problem interface.
length_t get_m() const
[Required] Number of constraints.
real_t eval_f(crvec x) const
[Required] Function that evaluates the cost,
void eval_g(crvec x, rvec gx) const
[Required] Function that evaluates the constraints,
#define USING_ALPAQA_CONFIG(Conf)
#define ALPAQA_IF_QUADF(...)
#define ALPAQA_IF_LONGD(...)
#define ALPAQA_IF_FLOAT(...)
#define ALPAQA_EXPORT_EXTERN_TEMPLATE(...)
real_t initial_penalty_factor
Initial penalty parameter factor.
real_t min_penalty
Minimum penalty factor (used during initialization).
real_t dual_tolerance
Dual tolerance (constraint violation and complementarity).
typename Conf::real_t real_t
real_t max_penalty
Maximum penalty factor.
typename Conf::index_t index_t
real_t rel_penalty_increase_threshold
Error tolerance for penalty increase.
typename Conf::crvec crvec
bool single_penalty_factor
Use one penalty factor for all m constraints.
Parameters for the Augmented Lagrangian solver.
Double-precision double configuration.
Single-precision float configuration.
long double configuration.
static void initialize_penalty(const TypeErasedControlProblem< config_t > &p, const ALMParams< config_t > ¶ms, crvec x0, rvec Σ)
static void initialize_penalty(const TypeErasedProblem< config_t > &p, const ALMParams< config_t > ¶ms, crvec x0, rvec Σ)
static void update_penalty_weights(const ALMParams< config_t > ¶ms, real_t Δ, bool first_iter, rvec e, rvec old_e, real_t norm_e, real_t old_norm_e, crvec Σ_old, rvec Σ, bool monotone)