Ignore:
Timestamp:
Jul 29, 2005 3:11:41 PM (14 years ago)
Author:
andreasw
Message:
  • revised handling of "acceptable level of accuracy" (now in ConvCheck?)
  • fixed uncaught evaluation error exceptions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/Algorithm/IpAdaptiveMuUpdate.cpp

    r414 r416  
    5757      "This option allows to specify a lower bound on the adaptively chosen "
    5858      "barrier parameter.  By default, it is set to "
    59       "0.1*min(\"tol\",\"compl_inf_tol\"), which should be a very reasonable "
    60       "value.");
     59      "min(\"tol\",\"compl_inf_tol\")/(\"barrier_tol_factor\"+1), which "
     60      "should be a very reasonable value.");
    6161    roptions->AddLowerBoundedNumberOption(
    6262      "adaptive_mu_safeguard_factor",
     
    143143      "in QualityFunctionMuOracle]");
    144144
    145     // ToDo move the last two options here to QualityFunctionMuOracle?
    146     roptions->AddStringOption4(
    147       "adaptive_mu_kkt_centrality",
    148       "Determines whether a penalty term for centrality is added to KKT error.",
    149       "none",
    150       "none", "no penalty term is added",
    151       "log", "complementarity * the log of the centrality measure",
    152       "reciprocal", "complementarity * the reciprocal of the centrality measure",
    153       "cubed-reciprocal", "complementarity * the reciprocal of the centrality measure cubed",
    154       "This determines whether a term penalizing deviation from centrality "
    155       "with respect to complementarity is added to the KKT "
    156       "error measure used in the globalization atrategies.  The "
    157       "complementarity measure here is the xi in the Loqo update rule. "
    158       "(This originated from including such a term in the quality "
    159       "function for the QualityFunctionMuOracle and needs to be used "
    160       "here for consistency.)");
    161 
    162     roptions->AddStringOption2(
    163       "adaptive_mu_kkt_balancing_term",
    164       "Determines whether a balancing term for centrality is added to KKT error.",
    165       "none",
    166       "none", "no balancing term is added",
    167       "cubic", "Max(0,Max(dual_ing,primal_inf)-compl)^3",
    168       "This determines whether a term penalizing stuations there the "
    169       "complementality is much smaller than dual and primal "
    170       "infeasibilities is added to the KKT error measure used in the "
    171       "globalization strategies. (This originated from including such "
    172       "a term in the quality function for the QualityFunctionMuOracle "
    173       "and needs to be used here for consistency.)");
    174 
    175145  }
    176146
     
    179149  {
    180150    options.GetNumericValue("mu_max", mu_max_, prefix);
    181     if (!options.GetNumericValue("mu_min", mu_min_, prefix)) {
    182       mu_min_ = 0.1*Min(IpData().tol(), IpData().compl_inf_tol());
    183     }
    184151    options.GetNumericValue("tau_min", tau_min_, prefix);
    185152    options.GetNumericValue("adaptive_mu_safeguard_factor", adaptive_mu_safeguard_factor_, prefix);
     
    218185    options.GetEnumValue("quality_function_balancing_term", enum_int, prefix);
    219186    adaptive_mu_kkt_balancing_term_ = QualityFunctionMuOracle::BalancingTermEnum(enum_int);
     187    options.GetNumericValue("compl_inf_tol", compl_inf_tol_, prefix);
     188    if (!options.GetNumericValue("mu_min", mu_min_, prefix)) {
     189      // Defer computation of the default until the scaling of the NLP
     190      // is known
     191      mu_min_ = -1.;
     192    }
    220193
    221194    init_dual_inf_ = -1.;
     
    240213  void AdaptiveMuUpdate::UpdateBarrierParameter()
    241214  {
     215    DBG_START_METH("AdaptiveMuUpdate::UpdateBarrierParameter",
     216                   dbg_verbosity);
     217
     218    // if min_mu_ has not been given, we now set the default (can't do
     219    // that earlier, because during call of InitializeImpl, the
     220    // scaling in the NLP is not yet determined
     221    if (mu_min_ < 0.) {
     222      mu_min_ = Min(IpData().tol(),
     223                    IpNLP().NLP_scaling()->apply_obj_scaling(compl_inf_tol_))/
     224                (barrier_tol_factor_+1.);
     225    }
     226
    242227    // if there are not bounds, we always return the minimum MU value
    243228    if (!check_if_no_bounds_) {
     
    282267          // ToDo combine this code with MonotoneMuUpdate
    283268          Number tol = IpData().tol();
    284           Number compl_inf_tol = IpData().compl_inf_tol();
     269          Number compl_inf_tol =
     270            IpNLP().NLP_scaling()->apply_obj_scaling(compl_inf_tol_);
    285271
    286272          Number new_mu = Min( mu_linear_decrease_factor_*mu,
    287273                               pow(mu, mu_superlinear_decrease_power_) );
    288           new_mu = Max(new_mu, Min(compl_inf_tol, tol)/10.);
     274          DBG_PRINT((1,"new_mu = %e, compl_inf_tol = %e tol = %e\n", new_mu, compl_inf_tol, tol));
     275          new_mu = Max(new_mu,
     276                       Min(compl_inf_tol, tol)/(barrier_tol_factor_+1.));
    289277          if (tiny_step_flag && new_mu == mu) {
    290278            THROW_EXCEPTION(TINY_STEP_DETECTED,
     
    688676  AdaptiveMuUpdate::lower_mu_safeguard()
    689677  {
     678    DBG_START_METH("AdaptiveMuUpdate::lower_mu_safeguard",
     679                   dbg_verbosity);
    690680    if (adaptive_mu_safeguard_factor_ == 0.)
    691681      return 0.;
     
    713703      Max(adaptive_mu_safeguard_factor_ * (dual_inf/init_dual_inf_),
    714704          adaptive_mu_safeguard_factor_ * (primal_inf/init_primal_inf_));
     705    DBG_PRINT((1,"dual_inf=%e init_dual_inf_=%e primal_inf=%e init_primal_inf_=%e\n", dual_inf, init_dual_inf_, primal_inf, init_primal_inf_));
    715706
    716707    if (adaptive_mu_globalization_==KKT_ERROR) {
Note: See TracChangeset for help on using the changeset viewer.