Changeset 546


Ignore:
Timestamp:
Oct 20, 2005 6:40:15 PM (14 years ago)
Author:
andreasw
Message:
  • added missing svn:keyword for a few files
  • increased factor for theta reduction in restoration convergence check from 1e1 to 1e2
  • trigger restoration phase in expect_infeasible_problem mode if multipliers become larger than 1e8
  • revert to regular restoration phase if more than max_soft_resto_iters (new option) iterations are taken in soft restoration phase
  • made quality_function default for adaptive barrier strategy
  • added new print level to avoid one line of output per iteration
  • fixed TNLPAdapter, so that only some parts of the problem (objective, constraints, variables) are scaled if desired
Location:
branches/dev
Files:
19 edited

Legend:

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

    r542 r546  
    8888      "mu_oracle",
    8989      "Oracle for a new barrier parameter in the adaptive strategy.",
    90       "probing",
     90      "quality_function",
    9191      "probing", "Mehrotra's probing heuristic",
    9292      "loqo", "LOQO's centrality rule",
  • branches/dev/Algorithm/IpBacktrackingLSAcceptor.hpp

    • Property svn:keywords set to Author Date Id Revision
    r542 r546  
    33// This code is published under the Common Public License.
    44//
    5 // $Id: IpFilterLineSearch.hpp 501 2005-08-26 15:43:07Z claird $
     5// $Id$
    66//
    77// Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
  • branches/dev/Algorithm/IpBacktrackingLineSearch.cpp

    r542 r546  
    114114      "infeasibility determination if you expect that there is a good chance for the problem to be "
    115115      "infeasible.  In the filter line search procedure, the restoration "
    116       "phase is called more qucikly than usually, and more reduction in "
     116      "phase is called more quickly than usually, and more reduction in "
    117117      "the constraint violation is enforced. If the problem is square, this "
    118118      "option is enabled automatically.");
     
    170170      "Choosing \"0\" here disables the soft "
    171171      "restoration phase.");
     172    roptions->AddLowerBoundedIntegerOption(
     173      "max_soft_resto_iters",
     174      "Maximum number of iterations performed successively in soft restoration phase.",
     175      0, 10,
     176      "If the soft restoration phase is performed for more than so many "
     177      "iteratins in a row, the regular restoration phase is called.");
    172178  }
    173179
     
    191197    options.GetNumericValue("soft_resto_pderror_reduction_factor",
    192198                            soft_resto_pderror_reduction_factor_, prefix);
     199    options.GetIntegerValue("max_soft_resto_iters", max_soft_resto_iters_,
     200                            prefix);
    193201
    194202    bool retvalue = true;
     
    266274      goto_resto = true;
    267275      start_with_resto_= false;
     276    }
     277
     278    if (expect_infeasible_problem_ &&
     279        Max(IpData().curr()->y_c()->Amax(),
     280            IpData().curr()->y_d()->Amax()) > 1e8) {
     281      goto_resto = true;
    268282    }
    269283
     
    322336
    323337      if (in_soft_resto_phase_) {
    324         // If we are currently in the soft restoration phase, continue
    325         // that way, and switch back if enough progress is made to the
    326         // original criterion (e.g., the filter)
    327         bool satisfies_original_criterion = false;
    328         // ToDo use tiny_step in TrySoftRestoStep?
    329         accept = TrySoftRestoStep(actual_delta,
    330                                   satisfies_original_criterion);
    331         if (accept) {
    332           IpData().Set_info_alpha_primal_char('s');
    333           if (satisfies_original_criterion) {
    334             in_soft_resto_phase_ = false;
    335             IpData().Set_info_alpha_primal_char('S');
     338        soft_resto_counter_++;
     339        if (soft_resto_counter_ > max_soft_resto_iters_) {
     340          accept = false;
     341        }
     342        else {
     343          // If we are currently in the soft restoration phase, continue
     344          // that way, and switch back if enough progress is made to the
     345          // original criterion (e.g., the filter)
     346          bool satisfies_original_criterion = false;
     347          // ToDo use tiny_step in TrySoftRestoStep?
     348          accept = TrySoftRestoStep(actual_delta,
     349                                    satisfies_original_criterion);
     350          if (accept) {
     351            IpData().Set_info_alpha_primal_char('s');
     352            if (satisfies_original_criterion) {
     353              in_soft_resto_phase_ = false;
     354              soft_resto_counter_ = 0;
     355              IpData().Set_info_alpha_primal_char('S');
     356            }
    336357          }
    337358        }
     
    474495          }
    475496          in_soft_resto_phase_ = false;
     497          soft_resto_counter_ = 0;
    476498          watchdog_shortened_iter_ = 0;
    477499        }
     
    645667    } /* if (!accept) */
    646668
    647     char info_alpha_primal_char;
     669    char info_alpha_primal_char='?';
    648670    if (!accept && in_watchdog_) {
    649671      info_alpha_primal_char = 'w';
     
    713735    DBG_START_FUN("BacktrackingLineSearch::Reset", dbg_verbosity);
    714736    in_soft_resto_phase_ = false;
     737    soft_resto_counter_ = 0;
    715738
    716739    // Inactivate the watchdog and release all stored data
  • branches/dev/Algorithm/IpBacktrackingLineSearch.hpp

    r542 r546  
    248248     *  0., then this restoration phase is not enabled. */
    249249    Number soft_resto_pderror_reduction_factor_;
     250    /** Maximal number of iterations that can be done in the soft
     251     *  iteration phase before the algorithm reverts to the regular
     252     *  restoration phase. */
     253    Index max_soft_resto_iters_;
    250254
    251255    /** Flag indicating whether magic steps should be used. */
     
    316320    bool in_soft_resto_phase_;
    317321
     322    /** Counter for iteration performed in soft restoration phase in a
     323     *  row */
     324    Index soft_resto_counter_;
     325
    318326    /** Counter for the number of successive iterations in which the
    319327     *  full step was not accepted. */
  • branches/dev/Algorithm/IpIpoptAlg.cpp

    r536 r546  
    385385      IpCq().ResetAdjustedTrialSlacks();
    386386      if (adjusted_slacks==1) {
    387         Jnlst().Printf(J_SUMMARY, J_MAIN,
    388                        "%d Slack too small, adjusting variable bound\n",
    389                        adjusted_slacks);
     387        Jnlst().Printf(J_WARNING, J_MAIN,
     388                       "In iteration $d, %d Slack too small, adjusting variable bound\n",
     389                       IpData().iter_count(), adjusted_slacks);
    390390      }
    391391      else {
    392         Jnlst().Printf(J_SUMMARY, J_MAIN,
    393                        "%d Slacks too small, adjusting variable bounds\n",
    394                        adjusted_slacks);
     392        Jnlst().Printf(J_WARNING, J_MAIN,
     393                       "In iteration $d, %d Slacks too small, adjusting variable bounds\n",
     394                       IpData().iter_count(), adjusted_slacks);
    395395      }
    396396      if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
  • branches/dev/Algorithm/IpOrigIterationOutput.cpp

    r522 r546  
    7171    if (iter%10 == 0 && !IpData().info_skip_output()) {
    7272      // output the header
    73       Jnlst().Printf(J_SUMMARY, J_MAIN, header.c_str());
     73      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, header.c_str());
    7474    }
    7575    else {
     
    110110
    111111    if (!IpData().info_skip_output()) {
    112       Jnlst().Printf(J_SUMMARY, J_MAIN,
     112      Jnlst().Printf(J_ITERSUMMARY, J_MAIN,
    113113                     "%4d%c%14.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d",
    114114                     iter, info_iter, unscaled_f, inf_pr, inf_du, log10(mu), dnrm, regu_x_ptr,
     
    116116                     ls_count);
    117117      if (print_info_string_) {
    118         Jnlst().Printf(J_SUMMARY, J_MAIN, " %s", info_string.c_str());
     118        Jnlst().Printf(J_ITERSUMMARY, J_MAIN, " %s", info_string.c_str());
    119119      }
    120120      else {
    121121        Jnlst().Printf(J_DETAILED, J_MAIN, " %s", info_string.c_str());
    122122      }
    123       Jnlst().Printf(J_SUMMARY, J_MAIN, "\n");
     123      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, "\n");
    124124    }
    125125
  • branches/dev/Algorithm/IpPDFullSpaceSolver.cpp

    r529 r546  
    8686    options.GetNumericValue("residual_ratio_max", residual_ratio_max_, prefix);
    8787    options.GetNumericValue("residual_ratio_singular", residual_ratio_singular_, prefix);
    88     ASSERT_EXCEPTION(residual_ratio_singular_ > residual_ratio_max_, OPTION_INVALID,
    89                      "Option \"residual_ratio_singular\": This value must be larger than residual_ratio_max.");
     88    ASSERT_EXCEPTION(residual_ratio_singular_ >= residual_ratio_max_, OPTION_INVALID,
     89                     "Option \"residual_ratio_singular\": This value must be not smaller than residual_ratio_max.");
    9090    options.GetNumericValue("residual_improvement_factor", residual_improvement_factor_, prefix);
    9191
  • branches/dev/Algorithm/IpPDPerturbationHandler.cpp

    r529 r546  
    9090      0., false, 1e-9,
    9191      "(This is delta_c in the implementation paper - assuming that kappa_c=0.)");
     92    /*
     93    roptions->AddStringOption2(
     94      "always_perturb_cd",
     95      "Switch to enable perturbation for constraints in all iterations.",
     96      "no",
     97      "no", "don't do the perturbation in every iteration",
     98      "yes", "perturb for the constraints in every iteration",
     99      "This might be helpful if the constraints are degenerate.");
     100    */
    92101  }
    93102
     
    102111    options.GetNumericValue("first_hessian_perturbation", delta_xs_init_, prefix);
    103112    options.GetNumericValue("jacobian_regularization", delta_cd_val_, prefix);
     113    /*
     114    options.GetBoolValue("always_perturb_cd", always_perturb_cd_, prefix);
     115    */
    104116
    105117    hess_degenerate_ = NOT_YET_DETERMINED;
  • branches/dev/Algorithm/IpRestoFilterConvCheck.cpp

    r542 r546  
    105105    // ToDo: In the following we might want to be more careful with the lower bound
    106106    Number orig_theta_max = Max(kappa_resto_*orig_curr_theta,
    107                                 1.e1*Min(orig_ip_data->tol(),
     107                                1.e2*Min(orig_ip_data->tol(),
    108108                                         constr_viol_tol_));
    109109
     
    115115    else if (orig_trial_theta > orig_theta_max) {
    116116      Jnlst().Printf(J_DETAILED, J_MAIN,
    117                      "Point does not provide sufficient reduction w.r.t the original theta.\n");
     117                     "Point does not provide sufficient reduction w.r.t the original theta (orig_theta_max=%e).\n", orig_theta_max);
    118118      status = CONTINUE;
    119119    }
  • branches/dev/Algorithm/IpRestoIterationOutput.cpp

    r522 r546  
    8484    if (iter%10 == 0 && !IsValid(resto_orig_iteration_output_)) {
    8585      // output the header
    86       Jnlst().Printf(J_SUMMARY, J_MAIN, header.c_str());
     86      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, header.c_str());
    8787    }
    8888    else {
     
    137137    const std::string info_string = IpData().info_string();
    138138
    139     Jnlst().Printf(J_SUMMARY, J_MAIN,
     139    Jnlst().Printf(J_ITERSUMMARY, J_MAIN,
    140140                   "%4d%c%14.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d",
    141141                   iter, info_iter, f, inf_pr, inf_du, log10(mu), dnrm, regu_x_ptr,
     
    143143                   ls_count);
    144144    if (print_info_string_) {
    145       Jnlst().Printf(J_SUMMARY, J_MAIN, " %s", info_string.c_str());
     145      Jnlst().Printf(J_ITERSUMMARY, J_MAIN, " %s", info_string.c_str());
    146146    }
    147147    else {
    148148      Jnlst().Printf(J_DETAILED, J_MAIN, " %s", info_string.c_str());
    149149    }
    150     Jnlst().Printf(J_SUMMARY, J_MAIN, "\n");
     150    Jnlst().Printf(J_ITERSUMMARY, J_MAIN, "\n");
    151151
    152152    //////////////////////////////////////////////////////////////////////
  • branches/dev/Algorithm/IpRestoMinC_1Nrm.cpp

    r526 r546  
    123123    // some changes
    124124    SmartPtr<OptionsList> actual_resto_options = resto_options_;
    125     if (expect_infeasible_problem_ && count_restorations_==1) {
    126       actual_resto_options = new OptionsList(*resto_options_);
    127       // Ask for significant reduction of infeasibility, in the hope
    128       // that we do not return from the restoration phase is the
    129       // problem is infeasible
    130       actual_resto_options->SetNumericValue("resto.required_infeasibility_reduction", 1e-3);
    131     }
    132     else if(square_problem) {
     125    if(square_problem) {
    133126      actual_resto_options = new OptionsList(*resto_options_);
    134127      // If this is a square problem, the want the restoration phase
    135128      // never to be left until the problem is converged
    136129      actual_resto_options->SetNumericValue("resto.required_infeasibility_reduction", 0.);
     130    }
     131    else if (expect_infeasible_problem_ && count_restorations_==1) {
     132      if (IpCq().curr_constraint_violation()>1e-3) {
     133        actual_resto_options = new OptionsList(*resto_options_);
     134        // Ask for significant reduction of infeasibility, in the hope
     135        // that we do not return from the restoration phase is the
     136        // problem is infeasible
     137        actual_resto_options->SetNumericValue("resto.required_infeasibility_reduction", 1e-3);
     138      }
    137139    }
    138140
  • branches/dev/Algorithm/IpTimingStatistics.cpp

    • Property svn:keywords set to Author Date Id Revision
    r529 r546  
    33// This code is published under the Common Public License.
    44//
    5 // $Id: IpSolveStatistics.cpp 507 2005-08-26 18:33:43Z andreasw $
     5// $Id$
    66//
    77// Authors:  Andreas Waechter          IBM    2005-09-19
  • branches/dev/Algorithm/IpTimingStatistics.hpp

    • Property svn:keywords set to Author Date Id Revision
    r529 r546  
    33// This code is published under the Common Public License.
    44//
    5 // $Id: IpSolveStatistics.hpp 507 2005-08-26 18:33:43Z andreasw $
     5// $Id$
    66//
    77// Authors:  Andreas Waechter               IBM    2005-09-19
  • branches/dev/Apps/AmplSolver/AmplTNLP.cpp

    r500 r546  
    601601
    602602  void AmplTNLP::get_scaling_parameters(Number& obj_scaling,
    603                                         Index n, Number* x_scaling,
    604                                         Index m, Number* g_scaling)
     603                                        bool& use_x_scaling, Index n, Number* x_scaling,
     604                                        bool& use_g_scaling, Index m, Number* g_scaling)
    605605  {
    606606    DBG_ASSERT(IsValid(suffix_handler_));
     
    609609
    610610    const double* x = suffix_handler_->GetNumberSuffixValues("scaling_factor", AmplSuffixHandler::Variable_Source);
    611     for (int i=0; i < n; i++) {
    612       if (x && x[i] > 0.0) {
    613         x_scaling[i] = x[i];
    614       }
    615       else {
    616         x_scaling[i] = 1.0;
    617       }
     611    if (x) {
     612      use_x_scaling = true;
     613      for (int i=0; i < n; i++) {
     614        if (x[i] > 0.0) {
     615          x_scaling[i] = x[i];
     616        }
     617        else {
     618          x_scaling[i] = 1.0;
     619        }
     620      }
     621    }
     622    else {
     623      use_x_scaling = false;
    618624    }
    619625
    620626    const double* g = suffix_handler_->GetNumberSuffixValues("scaling_factor", AmplSuffixHandler::Constraint_Source);
    621     for (int i=0; i < m; i++) {
    622       if (g && g[i] > 0) {
    623         g_scaling[i] = g[i];
    624       }
    625       else {
    626         g_scaling[i] = 1.0;
    627       }
     627    if (g) {
     628      use_g_scaling = true;
     629      for (int i=0; i < m; i++) {
     630        if (g[i] > 0) {
     631          g_scaling[i] = g[i];
     632        }
     633        else {
     634          g_scaling[i] = 1.0;
     635        }
     636      }
     637    }
     638    else {
     639      use_g_scaling = false;
    628640    }
    629641  }
  • branches/dev/Apps/AmplSolver/AmplTNLP.hpp

    r501 r546  
    9595     *  function, and constraints. */
    9696    virtual void get_scaling_parameters(Number& obj_scaling,
    97                                         Index n, Number* x_scaling,
    98                                         Index m, Number* g_scaling);
     97                                        bool& use_x_scaling, Index n, Number* x_scaling,
     98                                        bool& use_g_scaling, Index m, Number* g_scaling);
    9999    //@}
    100100
  • branches/dev/Common/IpJournalist.hpp

    r524 r546  
    4242    J_WARNING,
    4343    J_SUMMARY,
     44    J_ITERSUMMARY,
    4445    J_DETAILED,
    4546    J_MOREDETAILED,
  • branches/dev/Interfaces/IpIpoptApplication.cpp

    r538 r546  
    3939# ifdef IP_DEBUG
    4040      DebugJournalistWrapper::SetJournalist(GetRawPtr(jnlst_));
    41       SmartPtr<Journal> debug_jrnl = jnlst_->AddFileJournal("Debug", "debug.out", J_SUMMARY);
     41      SmartPtr<Journal> debug_jrnl = jnlst_->AddFileJournal("Debug", "debug.out", J_ITERSUMMARY);
    4242      debug_jrnl->SetPrintLevel(J_DBG, J_ALL);
    4343# endif
     
    4949      if (create_console_out) {
    5050        stdout_jrnl_ =
    51           jnlst_->AddFileJournal("console", "stdout", J_SUMMARY);
     51          jnlst_->AddFileJournal("console", "stdout", J_ITERSUMMARY);
    5252        stdout_jrnl_->SetPrintLevel(J_DBG, J_NONE);
    5353      }
     
    208208      "print_level",
    209209      "Output verbosity level.",
    210       0, J_LAST_LEVEL-1, J_SUMMARY,
     210      0, J_LAST_LEVEL-1, J_ITERSUMMARY,
    211211      "Sets the default verbosity level for console output. The "
    212212      "larger this value the more detailed is the output.");
     
    224224      "file_print_level",
    225225      "Verbosity level for output file.",
    226       0, J_LAST_LEVEL-1, J_SUMMARY,
     226      0, J_LAST_LEVEL-1, J_ITERSUMMARY,
    227227      "NOTE: This option only works when read from the PARAMS.DAT options file! "
    228228      "Determines the verbosity level for the file specified by "
     
    243243      "debug_print_level",
    244244      "Verbosity level for debug file.",
    245       0, J_LAST_LEVEL-1, J_SUMMARY,
     245      0, J_LAST_LEVEL-1, J_ITERSUMMARY,
    246246      "This Ipopt library has been compiled in debug mode, and a file "
    247247      "\"debug.out\" is produced for every run.  This option determines "
     
    265265      "Select the technique used for scaling the NLP", "gradient_based",
    266266      "none", "no problem scaling will be performed",
    267       "user_scaling", "scaling parameters will come from the user",
    268       "gradient_based", "scale the problem so the maximum gradient at the starting point is scaling_max_gradient",
     267      "user-scaling", "scaling parameters will come from the user",
     268      "gradient-based", "scale the problem so the maximum gradient at the starting point is scaling_max_gradient",
    269269      "Selects the technique used for scaling the problem before it is solved."
    270270      " For user-scaling, the parameters come from the NLP. If you are using "
     
    314314      std::string nlp_scaling_method;
    315315      options_->GetStringValue("nlp_scaling_method", nlp_scaling_method, "");
    316       if (nlp_scaling_method == "user_scaling") {
     316      if (nlp_scaling_method == "user-scaling") {
    317317        nlp_scaling = new UserScaling(ConstPtr(nlp));
    318318      }
    319       else if (nlp_scaling_method == "gradient_based") {
     319      else if (nlp_scaling_method == "gradient-based") {
    320320        nlp_scaling = new GradientScaling(nlp);
    321321      }
  • branches/dev/Interfaces/IpTNLP.hpp

    r501 r546  
    8080                                 Index m, Number* g_l, Number* g_u)=0;
    8181
    82     /** overload this method to return scaling parameters. This is only
    83      *  called if the options are set to retrieve user scaling
     82    /** overload this method to return scaling parameters. This is
     83     *  only called if the options are set to retrieve user scaling.
     84     *  There, use_x_scaling (or use_g_scaling) should get set to true
     85     *  only if the variables (or constraints) are to be scaled.
    8486     */
    8587    virtual void get_scaling_parameters(Number& obj_scaling,
    86                                         Index n, Number* x_scaling,
    87                                         Index m, Number* g_scaling)
     88                                        bool& use_x_scaling, Index n, Number* x_scaling,
     89                                        bool& use_g_scaling, Index m, Number* g_scaling)
    8890    {
    8991      THROW_EXCEPTION(SCALING_NOT_IMPLEMENTED_FOR_TNLP,
  • branches/dev/Interfaces/IpTNLPAdapter.cpp

    r522 r546  
    625625    Hess_lagrangian_space = Hess_lagrangian_space_;
    626626
     627    if (IsValid(jnlst_)) {
     628      jnlst_->Printf(J_DETAILED, J_STATISTICS,
     629                     "Number of nonzero in equality constraint Jacobian....:%9d\n", nz_jac_c_);
     630      jnlst_->Printf(J_DETAILED, J_STATISTICS,
     631                     "Number of nonzero in inequality constraint Jacobian..:%9d\n", nz_jac_d_);
     632      jnlst_->Printf(J_DETAILED, J_STATISTICS,
     633                     "Number of nonzero in Lagrangian Hessian..............:%9d\n\n", nz_h_);
     634    }
     635
    627636    return true;
    628637  }
     
    10791088    SmartPtr<Vector>& d_scaling) const
    10801089  {
     1090    x_scaling = x_space->MakeNew();
     1091    c_scaling = c_space->MakeNew();
     1092    d_scaling = d_space->MakeNew();
     1093    DBG_ASSERT((c_scaling->Dim()+d_scaling->Dim()) == n_full_g_);
     1094
    10811095    DenseVector* dx = dynamic_cast<DenseVector*>(GetRawPtr(x_scaling));
    10821096    DenseVector* dc = dynamic_cast<DenseVector*>(GetRawPtr(c_scaling));
     
    10871101    Number* dd_values = dd->Values();
    10881102
    1089     x_scaling = x_space->MakeNew();
    1090     c_scaling = c_space->MakeNew();
    1091     d_scaling = d_space->MakeNew();
    1092     DBG_ASSERT((c_scaling->Dim()+d_scaling->Dim()) == n_full_g_);
    10931103    Number* full_g_scaling = new Number[n_full_g_];
     1104    bool use_x_scaling=true;
     1105    bool use_g_scaling=true;
    10941106
    10951107    if (IsValid(P_x_full_x_)) {
    10961108      Number* full_x_scaling = new Number[n_full_x_];
    10971109      tnlp_->get_scaling_parameters(obj_scaling,
    1098                                     n_full_x_, full_x_scaling,
    1099                                     n_full_g_, full_g_scaling);
    1100 
    1101       const Index* x_pos = P_x_full_x_->ExpandedPosIndices();
    1102       for (Index i=0; i<dx->Dim(); i++) {
    1103         dx_values[i] = full_x_scaling[x_pos[i]];
     1110                                    use_x_scaling, n_full_x_, full_x_scaling,
     1111                                    use_g_scaling, n_full_g_, full_g_scaling);
     1112
     1113      if (use_x_scaling) {
     1114        const Index* x_pos = P_x_full_x_->ExpandedPosIndices();
     1115        for (Index i=0; i<dx->Dim(); i++) {
     1116          dx_values[i] = full_x_scaling[x_pos[i]];
     1117        }
    11041118      }
    11051119      delete [] full_x_scaling;
     
    11071121    else {
    11081122      tnlp_->get_scaling_parameters(obj_scaling,
    1109                                     n_full_x_, dx_values,
    1110                                     n_full_g_, full_g_scaling);
    1111     }
    1112 
    1113     const Index* c_pos = P_c_g_->ExpandedPosIndices();
    1114     for (Index i=0; i<P_c_g_->NCols(); i++) {
    1115       dc_values[i] = full_g_scaling[c_pos[i]];
    1116     }
    1117     if (fixed_variable_treatment_==MAKE_CONSTRAINT) {
    1118       const Number one = 1.;
    1119       IpBlasDcopy(n_x_fixed_, &one, 0, &dc_values[P_c_g_->NCols()], 1);
    1120     }
    1121 
    1122     const Index* d_pos = P_d_g_->ExpandedPosIndices();
    1123     for (Index i=0; i<dd->Dim(); i++) {
    1124       dd_values[i] = full_g_scaling[d_pos[i]];
     1123                                    use_x_scaling, n_full_x_, dx_values,
     1124                                    use_g_scaling, n_full_g_, full_g_scaling);
     1125    }
     1126
     1127    if (!use_x_scaling) {
     1128      x_scaling = NULL;
     1129    }
     1130
     1131    if (use_g_scaling) {
     1132      const Index* c_pos = P_c_g_->ExpandedPosIndices();
     1133      for (Index i=0; i<P_c_g_->NCols(); i++) {
     1134        dc_values[i] = full_g_scaling[c_pos[i]];
     1135      }
     1136      if (fixed_variable_treatment_==MAKE_CONSTRAINT) {
     1137        const Number one = 1.;
     1138        IpBlasDcopy(n_x_fixed_, &one, 0, &dc_values[P_c_g_->NCols()], 1);
     1139      }
     1140
     1141      const Index* d_pos = P_d_g_->ExpandedPosIndices();
     1142      for (Index i=0; i<dd->Dim(); i++) {
     1143        dd_values[i] = full_g_scaling[d_pos[i]];
     1144      }
     1145    }
     1146    else {
     1147      c_scaling = NULL;
     1148      d_scaling = NULL;
    11251149    }
    11261150
     
    14131437    ASSERT_EXCEPTION(IsValid(jnlst_), ERROR_IN_TNLP_DERIVATIVE_TEST,
    14141438                     "No Journalist given to TNLPAdapter.  Need Journalist, otherwise can't produce any output in DerivativeChecker!");
     1439
     1440    jnlst_->Printf(J_SUMMARY, J_NLP,
     1441                   "\nStarting derivative checker.\n\n");
    14151442
    14161443    bool retval = true;
Note: See TracChangeset for help on using the changeset viewer.