52 namespace MoochoPack {
70 IterQuantityAccess<VectorMutable>
75 if ( Gf_iq.updated_k(0) && nu_iq.updated_k(0) && Ypy_iq.updated_k(0) && c_iq.updated_k(0) ) {
78 dot_Gf_Ypy =
dot( Gf_iq.get_k(0), Ypy_iq.get_k(0) ),
79 dot_nu_Ypy =
dot( nu_iq.get_k(0), Ypy_iq.get_k(0) ),
80 nrm_c = c_iq.get_k(0).norm_1(),
82 *min_mu = ::fabs( dot_Gf_Ypy + dot_nu_Ypy ) / ( nrm_c + small_num );
89 std::ostream&
out,
const std::string& L )
const
92 << L <<
"if Gf_k, nu_k, Ypy_k and c_k are updated then\n"
93 << L <<
" min_mu = abs((Gf_k+nu_k)'*Ypy_k) / ( norm(c_k,1) + small_num )\n"
94 << L <<
" update_mu = true\n"
96 << L <<
" update_mu = false\n"
bool min_mu(NLPAlgoState &s, value_type *min_mu) const
MeritFunc_PenaltyParamUpdateMultFree_AddedStep(value_type small_mu=1e-6, value_type mult_factor=1e-4, value_type kkt_near_sol=1.0)
Reduced space SQP state encapsulation interface.
void print_min_mu_step(std::ostream &out, const std::string &leading_str) const
value_type dot(const Vector &v_rhs1, const Vector &v_rhs2)
result = v_rhs1' * v_rhs2
AbstractLinAlgPack::value_type value_type
Updates the penalty parameter for a merit function as: mu_k = max( mu_km1, min_mu )...