Changeset 511


Ignore:
Timestamp:
Aug 26, 2005 6:20:20 PM (14 years ago)
Author:
andreasw
Message:

merged with dev r510. ChangeLog? entry:

2005-08-26 - version 3.0.0 - dev release number 510

First official release of the new C++ implementation of Ipopt.

Location:
trunk
Files:
1 added
37 deleted
117 edited
134 copied

Legend:

Unmodified
Added
Removed
  • trunk/AUTHORS

    • Property svn:eol-style set to native
    r424 r511  
    11Main authors:
    22
    3 - Andreas Waechter (IBM)
    4 - Carl Laird (IBM, CMU)
     3Andreas Waechter, project leader (IBM)
     4Carl Laird (IBM, Carnegie Mellon University)
    55
    66
     
    1111  PDSystemImpl/PDFullSpace/IpTAUCSSolverInterface.hpp
    1212  PDSystemImpl/PDFullSpace/IpTAUCSSolverInterface.cpp
     13
     14- Yoshiaki Kawajiri (Carnegie Mellon Univeristy):
     15  First version of Latex documentation file
     16
     17  Docs/documentation.tex
  • trunk/Algorithm/IpAdaptiveMuUpdate.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#include "IpJournalist.hpp"
    1111
    12 #ifdef OLD_C_HEADERS
    13 # include <math.h>
     12#ifdef HAVE_CMATH
     13# include <cmath>
    1414#else
    15 # include <cmath>
     15# ifdef HAVE_MATH_H
     16#  include <math.h>
     17# else
     18#  error "don't have header file for math"
     19# endif
    1620#endif
    1721
     
    2024  // ToDo Make the different globalization strategies extra classes
    2125
    22   DBG_SET_VERBOSITY(0);
    23 
    24   DefineIpoptType(AdaptiveMuUpdate);
     26#ifdef IP_DEBUG
     27  static const Index dbg_verbosity = 0;
     28#endif
    2529
    2630  AdaptiveMuUpdate::AdaptiveMuUpdate
     
    4953      "Maximum value for barrier parameter.",
    5054      0.0, true, 1e10,
    51       "This option allows to speficy and upper bound on the adaptively chosen "
    52       "barrier parameter.");
     55      "This option specifies an upper bound on the barrier parameter in the "
     56      "adaptive mu selection mode.");
    5357    roptions->AddLowerBoundedNumberOption(
    5458      "mu_min",
    55       "Minimum value for barrier parameter ",
     59      "Minimum value for barrier parameter.",
    5660      0.0, true, 1e-9,
    57       "This option allows to specify a lower bound on the adaptively chosen "
    58       "barrier parameter. By default, it is set to "
     61      "This option specifies the lower bound on the barrier parameter in the "
     62      "adaptive mu selection mode. By default, it is set to "
    5963      "min(\"tol\",\"compl_inf_tol\")/(\"barrier_tol_factor\"+1), which "
    6064      "should be a very reasonable value.");
     65    std::string prev_cat = roptions->RegisteringCategory();
     66    roptions->SetRegisteringCategory("Undocumented");
    6167    roptions->AddLowerBoundedNumberOption(
    6268      "adaptive_mu_safeguard_factor",
    63       "ToDo: This option should probably be deleted!",
     69      "",
    6470      0.0, false, 0.0);
     71    roptions->SetRegisteringCategory(prev_cat);
    6572
    6673    roptions->AddStringOption3(
    6774      "adaptive_mu_globalization",
    68       "Globalization strategy for non-monotone mode",
    69       "kkt-error",
     75      "Globalization strategy for the adaptive mu selection mode",
     76      "obj-constr-filter",
    7077      "kkt-error", "nonmonotone decrease of kkt-error",
    7178      "obj-constr-filter", "2-dim filter for objective and constraint violation",
    72       /*"kkt-error-filter", "3-dim filter for kkt-error components", not yet implemented*/
    7379      "never-monotone-mode", "disables globalization",
    7480      "To achieve global convergence of the adaptive version, the algorithm "
    75       "has to swtich to the monotone mode (Fiacco-McCormick approach) when "
    76       "convergence does not seem to appear.  This option determines the "
    77       "criterion to be used to decide when to switch to the monotone mode.");
     81      "has to switch to the monotone mode (Fiacco-McCormick approach) when "
     82      "convergence does not seem to appear.  This option sets the "
     83      "criterion used to decide when to do this switch.");
    7884
    7985    roptions->AddLowerBoundedIntegerOption(
    8086      "adaptive_mu_kkterror_red_iters",
    81       "Specifying maximal number of iterations in which sufficient progress in kkt-error globalization must be made.",
     87      "Maximum number of iterations requiring sufficient progress.",
    8288      0, 4,
    83       "For the \"kkt-error\" based globalization strategy, this "
    84       "determines after maximal how many iterations sufficient progress must "
    85       "be made.  If that number of iterations is exceeded, the "
     89      "For the \"kkt-error\" based globalization strategy, sufficient "
     90      "progress must be made for \"adaptive_mu_kkterror_red_iters\" "
     91      "iterations. If this number of iterations is exceeded, the "
    8692      "globalization strategy switches to the monotone mode.");
    8793
    8894    roptions->AddBoundedNumberOption(
    8995      "adaptive_mu_kkterror_red_fact",
    90       "Factor specifying sufficient decrease in kkt-error globalization strategy",
     96      "Sufficient decrease factor for \"kkt-error\" globalization strategy.",
    9197      0.0, true, 1.0, true,
    9298      0.9999,
    93       "For the \"kkt-error\" based globalization strategy, this "
    94       "determines by how much the error has to be decrease to be deemed "
    95       "sufficient.");
     99      "For the \"kkt-error\" based globalization strategy, the error "
     100      "must decrease by this factor to be deemed sufficient decrease.");
    96101
    97102    roptions->AddBoundedNumberOption(
    98103      "filter_margin_fact",
    99       "Factor determining width of margin for *-filter adaptive globalization strategies.",
     104      "Factor determining width of margin for obj-constr-filter adaptive globalization strategy.",
    100105      0.0, true, 1.0, true,
    101106      1e-5,
    102       "The definition of sufficient progress for the adaptive globalization "
    103       "strategy \"obj-constr-filter\" for a filter entry is defined as "
     107      "When using the adaptive globalization strategy, \"obj-constr-filter\", "
     108      "sufficient progress for a filter entry is defined as "
    104109      "follows: (new obj) < (filter obj) - filter_margin_fact*(new "
    105110      "constr-voil) OR (new constr-viol) < (filter constr-viol) - "
     
    108113    roptions->AddLowerBoundedNumberOption(
    109114      "filter_max_margin",
    110       "Maximal width of margin.in *-filter adaptive globalization strategies.",
     115      "Maximum width of margin in obj-constr--filter adaptive globalization strategy.",
    111116      0.0, true,
    112117      1.0,
    113       "ToDo: Detailed description later.");
     118      // ToDo Detailed description later
     119      "");
    114120    roptions->AddStringOption2(
    115121      "adaptive_mu_restore_previous_iterate",
    116       "Determines whether the previous iterate should be restore if the monotone mode is entered.",
     122      "Should the previous iterate be restored if the monotone mode is entered.",
    117123      "no",
    118124      "no", "don't restore accepted iterate",
    119125      "yes", "restore accepted iterate",
    120126      "When the globalization strategy for the adaptive barrier algorithm "
    121       "switches to the monotone mode, it can either start that mode "
    122       "from the most recent iterate (no), or from the most previous "
    123       "iterate, which had been accepted (yes).");
     127      "switches to the monotone mode, it can either start "
     128      "from the most recent iterate (no), or from the last "
     129      "iterate that was accepted (yes).");
    124130
    125131    roptions->AddLowerBoundedNumberOption(
     
    128134      0.0, true, 0.8,
    129135      "When the globalization strategy for the adaptive barrier algorithm "
    130       "switches to the monotone mode, the barrier parameter is set to the "
    131       "current average complementarity times the value of this parameter.");
     136      "switches to the monotone mode and fixed_mu_oracle is chosen as "
     137      "\"average_compl\", the barrier parameter is set to the "
     138      "current average complementarity times the value of "
     139      "\"adaptive_mu_monotone_init_factor\".");
    132140
    133141    roptions->AddStringOption4(
     
    140148      "2-norm", "use 2-norm",
    141149      "When computing the KKT error for the globalization strategies, the "
    142       "norm specified with this option is used.  [This options is also used "
    143       "in QualityFunctionMuOracle]");
     150      "norm to be used is specified with this option. Note, this options is also used "
     151      "in the QualityFunctionMuOracle.");
    144152
    145153  }
     
    559567                   IpData().curr()->v_L()->Dim() + IpData().curr()->v_U()->Dim();
    560568
    561     Number dual_inf;
    562     Number primal_inf;
    563     Number complty;
     569    Number dual_inf=0.;
     570    Number primal_inf=0.;
     571    Number complty=0.;
    564572    switch (adaptive_mu_kkt_norm_) {
    565573      case QualityFunctionMuOracle::NM_NORM_1:
  • trunk/Algorithm/IpAdaptiveMuUpdate.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1414#include "IpMuOracle.hpp"
    1515#include "IpFilter.hpp"
    16 #include "IpIpoptType.hpp"
    1716#include "IpQualityFunctionMuOracle.hpp"
    1817
    1918namespace Ipopt
    2019{
    21 
    22   DeclareIpoptType(AdaptiveMuUpdate);
    2320
    2421  /** Non-monotone mu update.
  • trunk/Algorithm/IpAlgBuilder.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1212#include "IpAugRestoSystemSolver.hpp"
    1313#include "IpPDFullSpaceSolver.hpp"
     14#include "IpPDPerturbationHandler.hpp"
    1415#include "IpOptErrorConvCheck.hpp"
    1516#include "IpFilterLineSearch.hpp"
     
    2930#include "IpRestoRestoPhase.hpp"
    3031#include "IpTSymLinearSolver.hpp"
    31 #include "IpMa27TSolverInterface.hpp"
    32 #include "IpMc19TSymScalingMethod.hpp"
     32
     33#ifdef HAVE_MA27
     34# include "IpMa27TSolverInterface.hpp"
     35#endif
     36#ifdef HAVE_MC19
     37# include "IpMc19TSymScalingMethod.hpp"
     38#endif
    3339#ifdef HAVE_PARDISO
    3440# include "IpPardisoSolverInterface.hpp"
     
    4046namespace Ipopt
    4147{
    42   DBG_SET_VERBOSITY(0);
    43 
    44   DefineIpoptType(AlgorithmBuilder);
     48#ifdef IP_DEBUG
     49  static const Index dbg_verbosity = 0;
     50#endif
    4551
    4652  void AlgorithmBuilder::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
    4753  {
     54    roptions->SetRegisteringCategory("Undocumented");
    4855    roptions->AddStringOption3(
    4956      "linear_solver",
     
    5461      "taucs", "use TAUCS package",
    5562      "Determines which linear algebra package is to be used for the "
    56       "solution of the linear system from which the search directions is "
    57       "obtained.  Note that depending on your Ipopt installation, not all "
    58       "options might be available.");
     63      "solution of the augmented linear system (for obtaining the search "
     64      "directions). "
     65      "Note that depending on your Ipopt installation, not all "
     66      "options may be available.");
     67    roptions->SetRegisteringCategory("Linear Solver");
    5968    roptions->AddStringOption2(
    6069      "linear_system_scaling",
     
    6372      "none", "no scaling will be performed",
    6473      "mc19", "use the Harwell routine mc19",
    65       "Determines which method should be use to compute symmetric scaling "
    66       "factors for the augmented system.");
     74      "Determines the method used to compute symmetric scaling "
     75      "factors for the augmented system. This scaling will be done "
     76      "in addition to any NLP problem scaling.");
     77
     78    roptions->SetRegisteringCategory("Mu Update");
    6779    roptions->AddStringOption2(
    6880      "mu_strategy",
     
    7183      "monotone", "use the monotone (Fiacco-McCormick) strategy",
    7284      "adaptive", "use the adaptive update strategy",
    73       "Determines which barrier parameter strategy is to be used.");
     85      "Determines which barrier parameter update strategy is to be used.");
    7486    roptions->AddStringOption3(
    7587      "mu_oracle",
    76       "Oracle for a new barrier parameters in the adaptive strategy",
     88      "Oracle for a new barrier parameter in the adaptive strategy.",
    7789      "probing",
    7890      "probing", "Mehrotra's probing heuristic",
     
    8294      "\"free-mode\" iteration of the adaptive barrier parameter "
    8395      "strategy. (Only considered if \"adaptive\" is selected for "
    84       "option \"mu_strategy\".");
     96      "option \"mu_strategy\").");
    8597    roptions->AddStringOption4(
    8698      "fixed_mu_oracle",
     
    94106      "computed when switching to the \"monotone mode\" in the adaptive "
    95107      "strategy. (Only considered if \"adaptive\" is selected for option "
    96       "\"mu_strategy\".");
     108      "\"mu_strategy\".)");
     109    roptions->SetRegisteringCategory("Initialization");
    97110    roptions->AddStringOption2(
    98111      "warm_start_init_point",
     
    119132    SmartPtr<TSymScalingMethod> ScalingMethod;
    120133    std::string linear_system_scaling;
    121     options.GetValue("linear_system_scaling",
    122                      linear_system_scaling, prefix);
     134    options.GetStringValue("linear_system_scaling",
     135                           linear_system_scaling, prefix);
    123136    if (linear_system_scaling=="mc19") {
     137#ifdef HAVE_MC19
    124138      ScalingMethod = new Mc19TSymScalingMethod();
     139#else
     140
     141      THROW_EXCEPTION(OPTION_INVALID,
     142                      "Selected linear system scaling method MC19 not available.");
     143#endif
     144
    125145    }
    126146
    127147    SmartPtr<SparseSymLinearSolverInterface> SolverInterface;
    128148    std::string linear_solver;
    129     options.GetValue("linear_solver", linear_solver, prefix);
     149    options.GetStringValue("linear_solver", linear_solver, prefix);
    130150    if (linear_solver=="ma27") {
     151#ifdef HAVE_MA27
    131152      SolverInterface = new Ma27TSolverInterface();
     153#else
     154
     155      THROW_EXCEPTION(OPTION_INVALID,
     156                      "Selected linear solver MA27 not available.");
     157#endif
     158
    132159    }
    133160    else if (linear_solver=="pardiso") {
     
    136163#else
    137164
    138       THROW_EXCEPTION(OptionsList::OPTION_OUT_OF_RANGE,
    139                       "Selected solver Pardiso not available.");
     165      THROW_EXCEPTION(OPTION_INVALID,
     166                      "Selected linear solver Pardiso not available.");
    140167#endif
    141168
     
    146173#else
    147174
    148       ASSERT_EXCEPTION(false,
    149                        OptionsList::OPTION_OUT_OF_RANGE,
    150                        "Selected solver TAUCS not available.");
     175      THROW_EXCEPTION(OPTION_INVALID,
     176                      "Selected linear solver TAUCS not available.");
    151177#endif
    152178
     
    159185      //        = new AugTSystemSolver(*Ma27Solver);
    160186      new StdAugSystemSolver(*ScaledSolver);
     187    SmartPtr<PDPerturbationHandler> pertHandler =
     188      new PDPerturbationHandler();
    161189    SmartPtr<PDSystemSolver> PDSolver =
    162       new PDFullSpaceSolver(*AugSolver);
     190      new PDFullSpaceSolver(*AugSolver, *pertHandler);
    163191
    164192    // Create the object for initializing the iterates
     
    169197    bool warm_start_init_point;
    170198    std::string warm_start_option;
    171     options.GetValue("warm_start_init_point", warm_start_option, prefix);
     199    options.GetStringValue("warm_start_init_point", warm_start_option, prefix);
    172200    warm_start_init_point = (warm_start_option == "yes");
    173201
     
    182210    SmartPtr<AugSystemSolver> resto_AugSolver =
    183211      new AugRestoSystemSolver(*AugSolver);
     212    SmartPtr<PDPerturbationHandler> resto_pertHandler =
     213      new PDPerturbationHandler();
    184214    SmartPtr<PDSystemSolver> resto_PDSolver =
    185       new PDFullSpaceSolver(*resto_AugSolver);
     215      new PDFullSpaceSolver(*resto_AugSolver, *resto_pertHandler);
    186216
    187217    // Convergence check in the restoration phase
     
    200230    SmartPtr<MuUpdate> resto_MuUpdate;
    201231    std::string resto_smuupdate;
    202     options.GetValue("mu_strategy", resto_smuupdate, "resto."+prefix);
     232    options.GetStringValue("mu_strategy", resto_smuupdate, "resto."+prefix);
    203233
    204234    std::string resto_smuoracle;
    205235    std::string resto_sfixmuoracle;
    206236    if (resto_smuupdate=="adaptive" ) {
    207       options.GetValue("mu_oracle", resto_smuoracle, "resto."+prefix);
    208       options.GetValue("fixed_mu_oracle", resto_sfixmuoracle, "resto."+prefix);
     237      options.GetStringValue("mu_oracle", resto_smuoracle, "resto."+prefix);
     238      options.GetStringValue("fixed_mu_oracle", resto_sfixmuoracle, "resto."+prefix);
    209239    }
    210240
     
    280310    SmartPtr<MuUpdate> MuUpdate;
    281311    std::string smuupdate;
    282     options.GetValue("mu_strategy", smuupdate, prefix);
     312    options.GetStringValue("mu_strategy", smuupdate, prefix);
    283313    std::string smuoracle;
    284314    std::string sfixmuoracle;
    285315    if (smuupdate=="adaptive" ) {
    286       options.GetValue("mu_oracle", smuoracle, prefix);
    287       options.GetValue("fixed_mu_oracle", sfixmuoracle, prefix);
     316      options.GetStringValue("mu_oracle", smuoracle, prefix);
     317      options.GetStringValue("fixed_mu_oracle", sfixmuoracle, prefix);
    288318    }
    289319
  • trunk/Algorithm/IpAlgBuilder.hpp

    r310 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004,2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPALGBUILDER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpIpoptAlg.hpp"
    1413
    1514namespace Ipopt
    1615{
    17 
    18   DeclareIpoptType(AlgorithmBuilder);
    1916
    2017  /** Builder to create a complete IpoptAlg object.  This object
  • trunk/Algorithm/IpAlgStrategy.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPALGSTRATEGY_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpOptionsList.hpp"
    1413#include "IpJournalist.hpp"
  • trunk/Algorithm/IpConvCheck.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPCONVCHECK_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413
  • trunk/Algorithm/IpDefaultIterateInitializer.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-23
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-23
    88
    99#include "IpDefaultIterateInitializer.hpp"
     
    1111namespace Ipopt
    1212{
    13   DBG_SET_VERBOSITY(0);
    14 
    15   DefineIpoptType(DefaultIterateInitializer);
     13#ifdef IP_DEBUG
     14  static const Index dbg_verbosity = 0;
     15#endif
    1616
    1717  DefaultIterateInitializer::DefaultIterateInitializer
     
    2626    reg_options->AddLowerBoundedNumberOption(
    2727      "bound_push",
    28       "Desired minimal absolute distance of initial point to bound",
     28      "Desired minimum absolute distance from the initial point to bound.",
    2929      0.0, true, 0.01,
    30       "Determines (together with \"bound_frac\") by how much the initial "
    31       "point might have to be modified in order to be sufficiently inside "
    32       "the bounds.");
     30      "Determines how much the initial point might have to "
     31      "be modified in order to be sufficiently inside "
     32      "the bounds (together with \"bound_frac\").  (This is kappa_1 in "
     33      "Section 3.6 of implementation paper.)");
    3334    reg_options->AddBoundedNumberOption(
    3435      "bound_frac",
    35       "Desired minimal relative distance of initial point to bound",
     36      "Desired minimum relative distance from the initial point to bound.",
    3637      0, true, 0.5, false, 0.01,
    37       "Determines (together with \"bound_push\") by how much the initial "
    38       "point might have to be modified in order to be sufficiently inside "
    39       "the bounds.");
     38      "Determines how much the initial point might have to "
     39      "be modified in order to be sufficiently inside "
     40      "the bounds (together with \"bound_push\").  (This is kappa_2 in "
     41      "Section 3.6 of implementation paper.)");
    4042    reg_options->AddLowerBoundedNumberOption(
    4143      "constr_mult_init_max",
    42       "Maximal allowed least-square guess of constraint multipliers.",
     44      "Maximum allowed least-square guess of constraint multipliers.",
    4345      0, false, 1e3,
    4446      "Determines how large the initial least-square guesses of the contraint "
    45       "multipliers (in max-norm) are allowed to be. If the guess is larger "
     47      "multipliers are allowed to be (in max-norm). If the guess is larger "
    4648      "than this value, it is discarded and all constraint multipliers are "
    47       "set to zero.  This options is also used in the classes "
    48       "\"RestoIterateInitializer\".  By default, "
    49       "\"resto.constr_mult_init_max\" (the one "
     49      "set to zero.  This options is also used when initializing the "
     50      "restoration phase. By default, \"resto.constr_mult_init_max\" (the one "
    5051      "used in RestoIterateInitializer) is set to zero.");
    5152    reg_options->AddLowerBoundedNumberOption(
    5253      "bound_mult_init_val",
    53       "Initial value for the bound multipliers",
     54      "Initial value for the bound multipliers.",
    5455      0, true, 1.0,
    5556      "All dual variables corresponding to bound constraints are "
     
    99100    // Now we compute the initial values that the algorithm is going to
    100101    // actually use.  We first store them in the trial fields in ip_data.
    101 
    102     // ToDo combine the following code with warm_start_intializer
    103102
    104103    // Push the x iterates sufficiently inside the bounds
     
    291290      new_x = ConstPtr(delta_x);
    292291      jnlst.Printf(J_DETAILED, J_INITIALIZATION, "Moved initial values of %s sufficiently inside the bounds.\n", name.c_str());
    293       jnlst.PrintVector(J_VECTOR, J_INITIALIZATION, "original vars", orig_x);
    294       jnlst.PrintVector(J_VECTOR, J_INITIALIZATION, "new vars", *new_x);
     292      orig_x.Print(jnlst, J_VECTOR, J_INITIALIZATION, "original vars");
     293      new_x->Print(jnlst, J_VECTOR, J_INITIALIZATION, "new vars");
    295294    }
    296295    else {
  • trunk/Algorithm/IpDefaultIterateInitializer.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-24
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-24
    88
    99#ifndef __IPDEFAULTITERATEINITIALIZER_HPP__
    1010#define __IPDEFAULTITERATEINITIALIZER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpIterateInitializer.hpp"
    1413#include "IpEqMultCalculator.hpp"
     
    1615namespace Ipopt
    1716{
    18 
    19   DeclareIpoptType(DefaultIterateInitializer);
    2017
    2118  /** Class implementing the default initialization procedure (based
  • trunk/Algorithm/IpFilter.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004,2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1313{
    1414
    15   DBG_SET_VERBOSITY(0);
     15#ifdef IP_DEBUG
     16  static const Index dbg_verbosity = 0;
     17#endif
    1618
    1719  ///////////////////////////////////////////////////////////////////////////
  • trunk/Algorithm/IpFilter.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPFILTER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpJournalist.hpp"
     13#include "IpDebug.hpp"
    1414#include <list>
    1515#include <vector>
     
    3939      DBG_ASSERT((Index)vals.size() == ncoor);
    4040
    41       // ToDo decide where we can get Compare_le from
     41      // ToDo decide if we need Compare_le
    4242      bool retval = false;
    4343      for (Index i=0; i<ncoor; i++) {
  • trunk/Algorithm/IpFilterLineSearch.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1212#include "IpAlgTypes.hpp"
    1313
    14 #ifdef OLD_C_HEADERS
    15 # include <math.h>
    16 # include <ctype.h>
     14#ifdef HAVE_CMATH
     15# include <cmath>
    1716#else
    18 # include <cmath>
     17# ifdef HAVE_MATH_H
     18#  include <math.h>
     19# else
     20#  error "don't have header file for math"
     21# endif
     22#endif
     23
     24#ifdef HAVE_CCTYPE
    1925# include <cctype>
     26#else
     27# ifdef HAVE_CTYPE_H
     28#  include <ctype.h>
     29# else
     30#  error "don't have header file for ctype"
     31# endif
    2032#endif
    2133
     
    2335{
    2436
    25   DBG_SET_VERBOSITY(0);
    26 
    27   DefineIpoptType(FilterLineSearch);
     37#ifdef IP_DEBUG
     38  static const Index dbg_verbosity = 0;
     39#endif
    2840
    2941  FilterLineSearch::FilterLineSearch(const SmartPtr<RestorationPhase>& resto_phase,
     
    6173    roptions->AddLowerBoundedNumberOption(
    6274      "theta_min_fact",
    63       "Determines constraint violation threshold in switching rule.",
     75      "Determines constraint violation threshold in the switching rule.",
    6476      0.0, true, 1e-4,
    65       "The algorithmic parameter theta_min is determined as theta_max_fact "
     77      "The algorithmic parameter theta_min is determined as theta_min_fact "
    6678      "times the maximum of 1 and the constraint violation at initial point.  "
    67       "The switching rules treats an iteration as h-type iteration whenever "
     79      "The switching rules treats an iteration as an h-type iteration whenever "
    6880      "the current constraint violation is larger than theta_min (see "
    6981      "paragraph before Eqn. (19) in implementation paper).");
     
    7486      "(See Eqn. (20) in implementation paper)");
    7587    roptions->AddLowerBoundedNumberOption(
    76       "delta", "Multiplier for constraint violation in switching rule.",
     88      "delta", "Multiplier for constraint violation in the switching rule.",
    7789      0.0, true, 1.0,
    78       "(See Eqn. (19) in implementation paper)");
     90      "(See Eqn. (19) in implementation paper.)");
    7991    roptions->AddLowerBoundedNumberOption(
    8092      "s_phi",
    81       "Exponent for linear barrier function model in switching rule.",
     93      "Exponent for linear barrier function model in the switching rule.",
    8294      1.0, true, 2.3,
    83       "(See Eqn. (19) in implementation paper)");
     95      "(See Eqn. (19) in implementation paper.)");
    8496    roptions->AddLowerBoundedNumberOption(
    8597      "s_theta",
    86       "Exponent for current constraint violation in switching rule.",
     98      "Exponent for current constraint violation in the switching rule.",
    8799      1.0, true, 1.1,
    88       "(See Eqn. (19) in implementation paper)");
     100      "(See Eqn. (19) in implementation paper.)");
    89101    roptions->AddBoundedNumberOption(
    90102      "gamma_phi",
    91       "Relaxation factor in filter margin for barrier function.",
     103      "Relaxation factor in the filter margin for the barrier function.",
    92104      0.0, true, 1.0, true, 1e-8,
    93       "(See Eqn. (18a) in implementation paper)");
     105      "(See Eqn. (18a) in implementation paper.)");
    94106    roptions->AddBoundedNumberOption(
    95107      "gamma_theta",
    96       "Relaxation factor in filter margin for constraint violation.",
     108      "Relaxation factor in the filter margin for the constraint violation.",
    97109      0.0, true, 1.0, true, 1e-5,
    98       "(See Eqn. (18b) in implementation paper)");
     110      "(See Eqn. (18b) in implementation paper.)");
    99111    roptions->AddBoundedNumberOption(
    100112      "alpha_min_frac",
    101       "Safety factor for minimal step size (switch to restoration phase).",
     113      "Safety factor for the minimal step size (before switching to restoration phase).",
    102114      0.0, true, 1.0, true, 0.05,
    103       "(This is gamma_alpha in Eqn. (20) in implementation paper)");
     115      "(This is gamma_alpha in Eqn. (20) in implementation paper.)");
    104116    roptions->AddBoundedNumberOption(
    105117      "alpha_red_factor",
    106       "Fractional reduction of trial step size in the backtracking line search.",
     118      "Fractional reduction of the trial step size in the backtracking line search.",
    107119      0.0, true, 1.0, true, 0.5,
    108       "Determines the fraction by how much the trial step size is reduced in "
    109       "every step of the backtracking line search.");
     120      "At every step of the backtracking line search, the trial step size is "
     121      "reduced by this factor.");
    110122    roptions->AddLowerBoundedIntegerOption(
    111123      "max_soc",
    112       "Maximal number of second order correction trial steps.",
     124      "Maximum number of second order correction trial steps at each iteration.",
    113125      0, 4,
    114       "Determines the maximal number of second order correction trial steps "
    115       "that should be performed.  Choosing 0 disables the second order "
     126      "Choosing 0 disables the second order "
    116127      "corrections. (This is p^{max} of Step A-5.9 of "
    117128      "Algorithm A in implementation paper.)");
    118129    roptions->AddLowerBoundedNumberOption(
    119130      "kappa_soc",
    120       "Factor in sufficient reduction rule for second order correction.",
     131      "Factor in the sufficient reduction rule for second order correction.",
    121132      0.0, true, 0.99,
    122       "Determines by how much a second order correction step must reduce the "
     133      "This option determines how much a second order correction step must reduce the "
    123134      "constraint violation so that further correction steps are attempted.  "
    124135      "(See Step A-5.9 of Algorithm A in implementation paper.)");
    125136    roptions->AddLowerBoundedNumberOption(
    126137      "obj_max_inc",
    127       "Determines upper bound on acceptable increase of barrier objective function.",
     138      "Determines the upper bound on the acceptable increase of barrier objective function.",
    128139      1.0, true, 5.0,
    129       "A trial point leading to more orders of magnitude increase in the "
    130       "barrier objective function are rejected.");
     140      "Trial points are rejected if they lead to an increase in the "
     141      "barrier objective function by more than obj_max_inc orders "
     142      "of magnitude.");
     143
     144    std::string prev_category = roptions->RegisteringCategory();
     145    roptions->SetRegisteringCategory("Undocumented");
    131146    roptions->AddStringOption2(
    132147      "magic_steps",
     
    136151      "yes", "take magic steps",
    137152      "DOESN'T REALLY WORK YET!");
     153    roptions->SetRegisteringCategory(prev_category);
    138154    roptions->AddStringOption3(
    139155      "corrector_type",
    140       "Type of corrector steps.",
     156      "The type of corrector steps that should be taken.",
    141157      "none",
    142158      "none", "no corrector",
    143159      "affine", "corrector step towards mu=0",
    144160      "primal-dual", "corrector step towards current mu",
    145       "Determines what kind of corrector steps should be tried.");
     161      "If \"mu_strategy\" is \"adaptive\", this option determines "
     162      "what kind of corrector steps should be tried.");
    146163
    147164    roptions->AddStringOption2(
     
    151168      "no", "don't skip",
    152169      "yes", "skip",
    153       "The corrector step is not tried if during the computation of "
    154       "the search direction in the current iteration negative curvature has "
    155       "been encountered.");
     170      "The corrector step is not tried if negative curvature has been "
     171      "encountered during the computation of the search direction in "
     172      "the current iteration. This option is only used if \"mu_strategy\" is "
     173      "\"adaptive\".");
    156174
    157175    roptions->AddStringOption2(
     
    162180      "yes", "skip",
    163181      "The corrector step is not tried if the algorithm is currently in the "
    164       "monotone mode (see also option \"barrier_strategy\").");
     182      "monotone mode (see also option \"barrier_strategy\")."
     183      "This option is only used if \"mu_strategy\" is \"adaptive\".");
    165184
    166185    roptions->AddStringOption2(
    167186      "accept_every_trial_step",
    168       "always accept the frist trial step",
     187      "Always accept the frist trial step.",
    169188      "no",
    170189      "no", "don't arbitrarily accept the full step",
     
    175194    roptions->AddStringOption7(
    176195      "alpha_for_y",
    177       "Step size for constraint multipliers.",
     196      "Method to determine the step size for constraint multipliers.",
    178197      "primal",
    179198      "primal", "use primal step size",
     
    184203      "min_dual_infeas", "choose step size minimizing new dual infeasibility",
    185204      "safe_min_dual_infeas", "like \"min_dual_infeas\", but safeguarded by \"min\" and \"max\"",
    186       "Determines which step size (alpha_y) should be used to update the "
     205      "This option determines how the step size (alpha_y) will be calculated when updating the "
    187206      "constraint multipliers.");
    188207
    189208    roptions->AddLowerBoundedNumberOption(
    190209      "corrector_compl_avrg_red_fact",
    191       "Complementarity tolerance factor for accepting corrector step",
     210      "Complementarity tolerance factor for accepting corrector step.",
    192211      0.0, true, 1.0,
    193       "Determines the factor by which complementarity is allowed to increase "
     212      "This option determines the factor by which complementarity is allowed to increase "
    194213      "for a corrector step to be accepted.");
    195214
     
    201220      "yes", "the problem has a good chance to be infeasible",
    202221      "This options is meant to activate heuristics that may speed up the "
    203       "infeasibility determination if you expect the problem to be "
     222      "infeasibility determination if you expect that there is a good chance for the problem to be "
    204223      "infeasible.  In the filter line search procedure, the restoration "
    205224      "phase is called more qucikly than usually, and more reduction in "
    206225      "the constraint violation is enforced. If the problem is square, this "
    207       "is enabled automatically.");
     226      "option is enabled automatically.");
    208227    roptions->AddLowerBoundedNumberOption(
    209228      "expect_infeasible_problem_ctol",
    210       "Threshold for disabling \"expect_infeasible_problem\" option",
     229      "Threshold for disabling \"expect_infeasible_problem\" option.",
    211230      0.0, false, 1e-3,
    212       "If the constraint violation becomes small than this threshold, "
     231      "If the constraint violation becomes smaller than this threshold, "
    213232      "the \"expect_infeasible_problem\" heuristics in the filter line "
    214       "search will are disabled. If the problem is square, this is set to 0.");
     233      "search are disabled. If the problem is square, this options is set to "
     234      "0.");
    215235    roptions->AddLowerBoundedNumberOption(
    216236      "soft_resto_pderror_reduction_factor",
    217       "Required reduction in primal-dual error in soft restoration phase.",
     237      "Required reduction in primal-dual error in the soft restoration phase.",
    218238      0.0, false, (1.0 - 1e-4),
    219       "For the soft restoration phase (which attempts to reduce the "
    220       "primal-dual error with regular steps), this indicates by which "
    221       "factor the primal-dual error has to be reduced in order to continue "
    222       "with the soft restoration phase. If the regular primal-dual step, "
    223       "damped onl to satisfty the fraction-to-the-boundary rule, is not "
    224       "decreasing the error by this factor, then the regular restoration "
    225       "phase is called.  Choosing \"0\" here disables the soft "
     239      "The soft restoration phase attempts to reduce the "
     240      "primal-dual error with regular steps. If the damped "
     241      "primal-dual step (damped only to satisfy the "
     242      "fraction-to-the-boundary rule) is not decreasing the primal-dual error "
     243      "by at least this factor, then the regular restoration phase is called. "
     244      "Choosing \"0\" here disables the soft "
    226245      "restoration phase.");
    227246    roptions->AddStringOption2(
     
    231250      "no", "don't force start in restoration phase",
    232251      "yes", "force start in restoration phase",
    233       "Setting this option to yes forces the algorithm to switch to the "
    234       "restoration phase in the first iteration.  If the initial point "
    235       "is feasible, the algorithm will abort with a failure.");
     252      "Setting this option to \"yes\" forces the algorithm to switch to the "
     253      "feasibility restoration phase in the first iteration. If the initial "
     254      "point is feasible, the algorithm will abort with a failure.");
    236255    roptions->AddLowerBoundedNumberOption(
    237256      "tiny_step_tol",
     
    239258      0.0, false, 10.0*std::numeric_limits<double>::epsilon(),
    240259      "If the search direction in the primal variables (x and s) is, in "
    241       "relative terms for each component, less than this values, the "
    242       "algorithm accepts the full step without line search.  The default "
    243       "value is 10 times machine precision.");
     260      "relative terms for each component, less than this value, the "
     261      "algorithm accepts the full step without line search.  If this happens "
     262      "repeatedly, the algorithm will terminate with a corresponding exit "
     263      "message. The default value is 10 times machine precision.");
    244264    roptions->AddLowerBoundedIntegerOption(
    245265      "watchdog_shortened_iter_trigger",
     
    252272    roptions->AddLowerBoundedIntegerOption(
    253273      "watchdog_trial_iter_max",
    254       "Maximal number of watchdog iterations.",
     274      "Maximum number of watchdog iterations.",
    255275      1, 3,
    256       "Determines the number of trial iterations before the watchdog "
     276      "This option determines the number of trial iterations "
     277      "allowed before the watchdog "
    257278      "procedure is aborted and the algorithm returns to the stored point.");
    258279  }
     
    263284    options.GetNumericValue("theta_max_fact", theta_max_fact_, prefix);
    264285    options.GetNumericValue("theta_min_fact", theta_min_fact_, prefix);
    265     ASSERT_EXCEPTION(theta_min_fact_ < theta_max_fact_, OptionsList::OPTION_OUT_OF_RANGE,
     286    ASSERT_EXCEPTION(theta_min_fact_ < theta_max_fact_, OPTION_INVALID,
    266287                     "Option \"theta_min_fact\": This value must be larger than 0 and less than theta_max_fact.");
    267288    options.GetNumericValue("eta_phi", eta_phi_, prefix);
     
    275296    options.GetIntegerValue("max_soc", max_soc_, prefix);
    276297    if (max_soc_>0) {
    277       ASSERT_EXCEPTION(IsValid(pd_solver_), OptionsList::OPTION_OUT_OF_RANGE,
     298      ASSERT_EXCEPTION(IsValid(pd_solver_), OPTION_INVALID,
    278299                       "Option \"max_soc\": This option is non-negative, but no linear solver for computing the SOC given to FilterLineSearch object.");
    279300    }
     
    306327    options.GetIntegerValue("watchdog_trial_iter_max", watchdog_trial_iter_max_, prefix);
    307328    options.GetIntegerValue("watchdog_shortened_iter_trigger", watchdog_shortened_iter_trigger_, prefix);
    308 
    309     // ToDo decide if also the PDSystemSolver should be initialized here...
    310329
    311330    rigorous_ = true;
     
    695714        }
    696715        catch(IpoptNLP::Eval_Error& e) {
    697           e.ReportException(Jnlst());
     716          e.ReportException(Jnlst(), J_DETAILED);
    698717          Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    699718                         "Warning: Cutting back alpha due to evaluation error\n");
     719          IpData().Append_info_string("e");
    700720          accept = false;
    701721          evaluation_error = true;
     
    824844
    825845    if (theta_max_>0 && trial_theta>theta_max_) {
     846      Jnlst().Printf(J_DETAILED, J_LINE_SEARCH,
     847                     "trial_theta = %e is larger than theta_max = %e\n",
     848                     trial_theta, theta_max_);
     849      IpData().Append_info_string("Tmax");
    826850      return false;
    827851    }
    828852
    829853    Number trial_barr = IpCq().trial_barrier_obj();
    830     DBG_ASSERT(FiniteNumber(trial_barr));
     854    DBG_ASSERT(IsFiniteNumber(trial_barr));
    831855
    832856    Jnlst().Printf(J_DETAILED, J_LINE_SEARCH,
     
    9821006    }
    9831007    catch(IpoptNLP::Eval_Error& e) {
    984       e.ReportException(Jnlst());
     1008      e.ReportException(Jnlst(), J_DETAILED);
    9851009      Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    9861010                     "Warning: Evaluation error during soft restoration phase step.\n");
     1011      IpData().Append_info_string("e");
    9871012      return false;
    9881013    }
     
    10081033    }
    10091034    catch(IpoptNLP::Eval_Error& e) {
    1010       e.ReportException(Jnlst());
     1035      e.ReportException(Jnlst(), J_DETAILED);
    10111036      Jnlst().Printf(J_WARNING, J_LINE_SEARCH,
    10121037                     "Warning: Evaluation error during soft restoration phase step.\n");
     1038      IpData().Append_info_string("e");
    10131039      return false;
    10141040    }
     
    11001126    IpData().SetTrialBoundMultipliersFromStep(alpha_dual, *delta->z_L(), *delta->z_U(), *delta->v_L(), *delta->v_U());
    11011127
    1102     Number alpha_y;
     1128    Number alpha_y=-1.;
    11031129    switch (alpha_for_y_) {
    11041130      case PRIMAL_ALPHA_FOR_Y:
     
    12251251      }
    12261252      catch(IpoptNLP::Eval_Error& e) {
    1227         e.ReportException(Jnlst());
     1253        e.ReportException(Jnlst(), J_DETAILED);
    12281254        Jnlst().Printf(J_WARNING, J_MAIN, "Warning: SOC step rejected due to evaluation error\n");
     1255        IpData().Append_info_string("e");
    12291256        accept = false;
    12301257        // There is no point in continuing SOC procedure
     
    14211448    }
    14221449    catch(IpoptNLP::Eval_Error& e) {
    1423       e.ReportException(Jnlst());
     1450      e.ReportException(Jnlst(), J_DETAILED);
    14241451      Jnlst().Printf(J_WARNING, J_MAIN,
    14251452                     "Warning: Corrector step rejected due to evaluation error\n");
     1453      IpData().Append_info_string("e");
    14261454      accept = false;
    14271455    }
     
    14391467                       "*** Accepted corrector for Iteration: %d\n",
    14401468                       IpData().iter_count());
    1441         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    1442                             "delta_corr", *delta_corr);
     1469        delta_corr->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "delta_corr");
    14431470      }
    14441471    }
     
    15251552        IpData().Append_info_string("M");
    15261553        Jnlst().Printf(J_DETAILED, J_LINE_SEARCH, "Magic step with max-norm %.6e taken.\n", delta_s_magic->Amax());
    1527         Jnlst().PrintVector(J_MOREVECTOR, J_LINE_SEARCH,
    1528                             "delta_s_magic", *delta_s_magic);
     1554        delta_s_magic->Print(Jnlst(), J_MOREVECTOR, J_LINE_SEARCH,
     1555                             "delta_s_magic");
    15291556      }
    15301557
  • trunk/Algorithm/IpFilterLineSearch.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004,2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPFILTERLINESEARCH_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpFilter.hpp"
    1413#include "IpLineSearch.hpp"
    1514#include "IpRestoPhase.hpp"
    1615#include "IpPDSystemSolver.hpp"
    17 #include "IpIpoptType.hpp"
    1816#include "IpConvCheck.hpp"
    1917
    2018namespace Ipopt
    2119{
    22 
    23   DeclareIpoptType(FilterLineSearch);
    2420
    2521  /** Filter line search.  This class implements the filter line
     
    10298    //@}
    10399
    104     /** Methods for IpoptType */
     100    /** Methods for OptionsList */
    105101    //@{
    106102    static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
  • trunk/Algorithm/IpGradientScaling.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2004-07-13
    88
    99#include "IpGradientScaling.hpp"
    1010#include "IpTripletHelper.hpp"
    1111
    12 #ifdef OLD_C_HEADERS
    13 # include <math.h>
     12#ifdef HAVE_CMATH
     13# include <cmath>
    1414#else
    15 # include <cmath>
     15# ifdef HAVE_MATH_H
     16#  include <math.h>
     17# else
     18#  error "don't have header file for math"
     19# endif
    1620#endif
    1721
     
    1923{
    2024
    21   DefineIpoptType(GradientScaling);
    22 
    23   void GradientScaling::RegisterOptions(SmartPtr<RegisteredOptions>& roptions)
     25  void GradientScaling::RegisterOptions(const SmartPtr<RegisteredOptions>& roptions)
    2426  {
    2527    roptions->AddLowerBoundedNumberOption(
    26       "nlp_scaling_max_gradient", "maximum gradient after scaling",
     28      "nlp_scaling_max_gradient", "Maximum gradient after NLP scaling.",
    2729      0, true, 100.0,
    2830      "This is the gradient scaling cut-off. If the maximum"
    2931      " gradient is above this value, then gradient based scaling"
    30       " will be performed. Scaling parameters will scale the maximum"
    31       " gradient back to this value. Note: This option is only used"
    32       " if \"nlp_scaling_method\" is chosen as \"gradient_based\".");
     32      " will be performed. Scaling parameters are calculated to"
     33      " scale the maximum gradient back to this value. (This is g_max in "
     34      "Section 3.8 of the implementation paper.) Note: This"
     35      " option is only used if \"nlp_scaling_method\" is chosen as"
     36      " \"gradient_based\".");
    3337  }
    3438
  • trunk/Algorithm/IpGradientScaling.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-07-13
    88
    99#ifndef __IPGRADIENTCALING_HPP__
     
    1212#include "IpNLPScaling.hpp"
    1313#include "IpNLP.hpp"
    14 #include "IpIpoptType.hpp"
    1514
    1615namespace Ipopt
    1716{
    18 
    19   DeclareIpoptType(GradientScaling);
    20 
    2117  /** This class does problem scaling by setting the
    2218   *  scaling parameters based on the maximum of the
     
    4238    //@{
    4339    /** Register the options for this class */
    44     static void RegisterOptions(SmartPtr<RegisteredOptions>& roptions);
     40    static void RegisterOptions(const SmartPtr<RegisteredOptions>& roptions);
    4541    //@}
    4642
  • trunk/Algorithm/IpIpoptAlg.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1313namespace Ipopt
    1414{
    15   DBG_SET_VERBOSITY(0);
    16 
    17   DefineIpoptType(IpoptAlgorithm);
     15#ifdef IP_DEBUG
     16  static const Index dbg_verbosity = 0;
     17#endif
    1818
    1919  IpoptAlgorithm::IpoptAlgorithm(const SmartPtr<PDSystemSolver>& pd_solver,
     
    4949  void IpoptAlgorithm::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
    5050  {
     51    roptions->SetRegisteringCategory("Line Search");
    5152    roptions->AddLowerBoundedNumberOption(
    5253      "kappa_sigma",
    53       "Factor limiting deviation of dual variables from primal estimates.",
     54      "Factor limiting the deviation of dual variables from primal estimates.",
    5455      0, true, 1e10,
    55       "(see Eqn. (16) in the implementation paper.) Setting to value less than "
    56       "one disables correction.");
     56      "If the dual variables deviate from their primal estimates, a correction "
     57      "is performed. (See Eqn. (16) in the implementation paper.) "
     58      "Setting the to value less than one disables the correction.");
    5759  }
    5860
     
    180182    }
    181183    catch(TINY_STEP_DETECTED& exc) {
     184      exc.ReportException(Jnlst(), J_DETAILED);
     185      return STOP_AT_TINY_STEP;
     186    }
     187    catch(ACCEPTABLE_POINT_REACHED& exc) {
     188      exc.ReportException(Jnlst(), J_DETAILED);
     189      return STOP_AT_ACCEPTABLE_POINT;
     190    }
     191    catch(LOCALLY_INFEASIBLE& exc) {
     192      exc.ReportException(Jnlst(), J_DETAILED);
     193      return LOCAL_INFEASIBILITY;
     194    }
     195    catch(RESTORATION_FAILED& exc) {
     196      exc.ReportException(Jnlst(), J_DETAILED);
     197      return RESTORATION_FAILURE;
     198    }
     199    catch(FEASIBILITY_PROBLEM_SOLVED& exc) {
     200      exc.ReportException(Jnlst(), J_DETAILED);
     201      return SUCCESS;
     202    }
     203    catch(INTERNAL_ABORT& exc) {
    182204      exc.ReportException(Jnlst());
    183       return STOP_AT_TINY_STEP;
    184     }
    185     catch(ACCEPTABLE_POINT_REACHED& exc) {
    186       exc.ReportException(Jnlst());
    187       return STOP_AT_ACCEPTABLE_POINT;
    188     }
    189     catch(LOCALLY_INFEASIBLE& exc) {
    190       exc.ReportException(Jnlst());
    191       return LOCAL_INFEASIBILITY;
    192     }
    193     catch(RESTORATION_FAILED& exc) {
    194       exc.ReportException(Jnlst());
    195       return RESTORATION_FAILURE;
    196     }
    197     catch(FEASIBILITY_PROBLEM_SOLVED& exc) {
    198       exc.ReportException(Jnlst());
    199       return SUCCESS;
     205      return INTERNAL_ERROR;
    200206    }
    201207
    202208    DBG_ASSERT(false && "Unknown return code in the algorithm");
     209
     210    return INTERNAL_ERROR;
    203211  }
    204212
     
    251259    DBG_PRINT_VECTOR(2, "rhs", *rhs);
    252260
    253     //ToDo: allow us to delete entries in IpData to save memory?
    254     // To save memory, delete the old search directions
    255     //     IpData().SetFromPtr_delta_x(NULL);
    256     //     IpData().SetFromPtr_delta_s(NULL);
    257     //     IpData().SetFromPtr_delta_y_c(NULL);
    258     //     IpData().SetFromPtr_delta_y_d(NULL);
    259     //     IpData().SetFromPtr_delta_z_L(NULL);
    260     //     IpData().SetFromPtr_delta_z_U(NULL);
    261     //     IpData().SetFromPtr_delta_v_L(NULL);
    262     //     IpData().SetFromPtr_delta_v_U(NULL);
    263 
    264261    // Get space for the search direction
    265262    SmartPtr<IteratesVector> delta = IpData().curr()->MakeNewIteratesVector(true);
     
    273270                   "*** Step Calculated for Iteration: %d\n",
    274271                   IpData().iter_count());
    275     Jnlst().PrintVector(J_MOREVECTOR, J_MAIN, "delta", *IpData().delta());
     272    IpData().delta()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "delta");
    276273  }
    277274
     
    327324      }
    328325      if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    329         Jnlst().PrintVector(J_VECTOR, J_MAIN, "old_x_L", *IpNLP().x_L());
    330         Jnlst().PrintVector(J_VECTOR, J_MAIN, "old_x_U", *IpNLP().x_U());
    331         Jnlst().PrintVector(J_VECTOR, J_MAIN, "old_d_L", *IpNLP().d_L());
    332         Jnlst().PrintVector(J_VECTOR, J_MAIN, "old_d_U", *IpNLP().d_U());
     326        IpNLP().x_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "old_x_L");
     327        IpNLP().x_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "old_x_U");
     328        IpNLP().d_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "old_d_L");
     329        IpNLP().d_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "old_d_U");
    333330      }
    334331
     
    356353
    357354      if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    358         Jnlst().PrintVector(J_VECTOR, J_MAIN, "new_x_L", *IpNLP().x_L());
    359         Jnlst().PrintVector(J_VECTOR, J_MAIN, "new_x_U", *IpNLP().x_U());
    360         Jnlst().PrintVector(J_VECTOR, J_MAIN, "new_d_L", *IpNLP().d_L());
    361         Jnlst().PrintVector(J_VECTOR, J_MAIN, "new_d_U", *IpNLP().d_U());
     355        IpNLP().x_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "new_x_L");
     356        IpNLP().x_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "new_x_U");
     357        IpNLP().d_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "new_d_L");
     358        IpNLP().d_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "new_d_U");
    362359      }
    363360
  • trunk/Algorithm/IpIpoptAlg.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPIPOPTALG_HPP__
    1111
    12 #include "IpUtils.hpp"
    13 #include "IpSmartPtr.hpp"
    1412#include "IpIpoptNLP.hpp"
    1513#include "IpAlgStrategy.hpp"
     
    2119#include "IpIterateInitializer.hpp"
    2220#include "IpIterationOutput.hpp"
    23 #include "IpIpoptType.hpp"
    2421#include "IpAlgTypes.hpp"
    2522
    2623namespace Ipopt
    2724{
    28 
    29   DeclareIpoptType(IpoptAlgorithm);
    3025
    3126  /** The main ipopt algorithm class.
  • trunk/Algorithm/IpIpoptCalculatedQuantities.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    88
    99#include "IpIpoptCalculatedQuantities.hpp"
    10 #ifdef OLD_C_HEADERS
    11 #include <math.h>
     10
     11#ifdef HAVE_CMATH
     12# include <cmath>
    1213#else
    13 #include <cmath>
     14# ifdef HAVE_MATH_H
     15#  include <math.h>
     16# else
     17#  error "don't have header file for math"
     18# endif
    1419#endif
    1520
     
    1823namespace Ipopt
    1924{
    20   DBG_SET_VERBOSITY(0);
    21 
    22   DefineIpoptType(IpoptCalculatedQuantities);
     25#ifdef IP_DEBUG
     26  static const Index dbg_verbosity = 0;
     27#endif
    2328
    2429  IpoptCalculatedQuantities::IpoptCalculatedQuantities
     
    137142  void IpoptCalculatedQuantities::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
    138143  {
     144    roptions->SetRegisteringCategory("Convergence");
    139145    roptions->AddLowerBoundedNumberOption(
    140146      "s_max",
    141147      "Scaling threshold for the NLP error.",
    142148      0.0, true, 100.0,
    143       "(see paragraph after Eqn. (6) in the implementation paper)");
     149      "(See paragraph after Eqn. (6) in the implementation paper.)");
     150
     151    roptions->SetRegisteringCategory("NLP");
    144152    roptions->AddLowerBoundedNumberOption(
    145153      "kappa_d",
    146154      "Weight for linear damping term (to handle one-sided bounds).",
    147155      0.0, false, 1e-5,
    148       "(see Section 3.7 in implementation paper)");
     156      "(see Section 3.7 in implementation paper.)");
     157
     158    roptions->SetRegisteringCategory("Line Search");
    149159    roptions->AddLowerBoundedNumberOption(
    150160      "slack_move",
     
    152162      0.0, false,
    153163      pow(std::numeric_limits<double>::epsilon(), 0.75),
    154       "Due to numercal issues or lack of interior, the slack variables might "
     164      "Due to numerical issues or the lack of an interior, the slack variables might "
    155165      "become very small.  If a slack becomes very small compared to machine "
    156       "precision, the corresponding bound is moved a little.  This parameter "
    157       "determines how large the perturbation should be.  Its default value is "
     166      "precision, the corresponding bound is moved slightly.  This parameter "
     167      "determines how large the move should be.  Its default value is "
    158168      "mach_eps^{3/4}.  (See also end of Section 3.5 in implementation paper "
    159169      "- but actual implementation might be somewhat different.)");
     170    roptions->SetRegisteringCategory("Convergence");
    160171    roptions->AddStringOption3(
    161172      "constraint_violation_norm_type",
    162       "Norm to be used for the constraint violation",
     173      "Norm to be used for the constraint violation.",
    163174      "1-norm",
    164175      "1-norm", "use the 1-norm",
     
    166177      "max-norm", "use the infinity norm",
    167178      "Determines which norm should be used when the algorithm computes the "
    168       "constraint violation, for example for the line search.");
     179      "constraint violation (for example, in the line search).");
    169180  }
    170181
     
    700711    DBG_PRINT((1, "BarrierTerm with damping = %25.16e\n", retval));
    701712
    702     DBG_ASSERT(FiniteNumber(retval));
     713    DBG_ASSERT(IsFiniteNumber(retval));
    703714    return retval;
    704715  }
     
    736747      curr_barrier_obj_cache_.AddCachedResult(result, tdeps, sdeps);
    737748    }
    738     DBG_ASSERT(FiniteNumber(result));
     749    DBG_ASSERT(IsFiniteNumber(result));
    739750    return result;
    740751  }
     
    773784      trial_barrier_obj_cache_.AddCachedResult(result, tdeps, sdeps);
    774785    }
    775     DBG_ASSERT(FiniteNumber(result));
     786    DBG_ASSERT(IsFiniteNumber(result));
    776787    return result;
    777788  }
  • trunk/Algorithm/IpIpoptCalculatedQuantities.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPIPOPTCALCULATEDQUANTITIES_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpIpoptNLP.hpp"
    1413#include "IpIpoptData.hpp"
     
    2322    NORM_MAX
    2423  };
    25 
    26   DeclareIpoptType(IpoptCalculatedQuantities);
    2724
    2825  /** Class for all IPOPT specific calculated quantities.
  • trunk/Algorithm/IpIpoptData.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1313{
    1414
    15   DBG_SET_VERBOSITY(0);
    16 
    17   DefineIpoptType(IpoptData);
     15#ifdef IP_DEBUG
     16  static const Index dbg_verbosity = 0;
     17#endif
    1818
    1919  IpoptData::IpoptData()
     
    4141  {}
    4242
    43   void IpoptData::RegisterOptions(SmartPtr<RegisteredOptions> reg_options)
    44   {
    45     reg_options->AddLowerBoundedNumberOption(
     43  void IpoptData::RegisterOptions(const SmartPtr<RegisteredOptions>& roptions)
     44  {
     45    roptions->SetRegisteringCategory("Convergence");
     46    roptions->AddLowerBoundedNumberOption(
    4647      "tol",
    47       "Convergence tolerance (relative).",
     48      "Desired convergence tolerance (relative).",
    4849      0.0, true,  1e-8,
    49       "Determines the convergence tolerance for the algorthim.  The "
     50      "Determines the convergence tolerance for the algorithm.  The "
    5051      "algorithm terminates successfully, if the (scaled) NLP error "
    5152      "becomes smaller than this value, and if the (absolute) criteria "
    5253      "according to \"dual_inf_tol\", \"primal_inf_tol\", and "
    5354      "\"cmpl_inf_tol\" are met.  (This is epsilon_tol in Eqn. (6) in "
    54       "implementation paper).  [Some other algorithmic features also use "
    55       "this quantity.]");
     55      "implementation paper).  See also \"acceptable_tol\" as a second "
     56      "termination criterion.  Note, some other algorithmic features also use "
     57      "this quantity.");
    5658  }
    5759
     
    227229    trial_ = NULL;
    228230
    229     // ToDo: Why don't we free the delta_ here?
    230 
    231231    // Free the memory for the affine-scaling step
    232232    delta_aff_ = NULL;
  • trunk/Algorithm/IpIpoptData.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPIPOPTDATA_HPP__
    1111
    12 #include "IpUtils.hpp"
    13 #include "IpSmartPtr.hpp"
    14 #include "IpVector.hpp"
    1512#include "IpSymMatrix.hpp"
    16 #include "IpReferenced.hpp"
    1713#include "IpOptionsList.hpp"
    1814#include "IpIteratesVector.hpp"
    19 #include "IpIpoptType.hpp"
     15#include "IpRegOptions.hpp"
    2016
    2117namespace Ipopt
    2218{
    23 
    24   DeclareIpoptType(IpoptData);
    2519
    2620  /* Forward declaration */
     
    371365    /** Methods for IpoptType */
    372366    //@{
    373     static void RegisterOptions(SmartPtr<RegisteredOptions> reg_options);
     367    static void RegisterOptions(const SmartPtr<RegisteredOptions>& roptions);
    374368    //@}
    375369
  • trunk/Algorithm/IpIpoptNLP.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPIPOPTNLP_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpNLP.hpp"
    1413#include "IpJournalist.hpp"
    15 #include "IpReferenced.hpp"
    16 #include "IpException.hpp"
    1714#include "IpNLPScaling.hpp"
    1815
     
    176173      return false;
    177174    }
     175
    178176    /** Replacement for the default objective function method which
    179177     *  knows about the barrier parameter */
    180     virtual Number f(const Vector& x, Number mu)
    181     {
    182       DBG_ASSERT(false && "ERROR: This method is only a placeholder for f(mu) and should not be called");
    183       return 0.;
    184     }
     178    virtual Number f(const Vector& x, Number mu) = 0;
     179
    185180    /** Replacement for the default objective gradient method which
    186181     *  knows about the barrier parameter  */
    187     virtual SmartPtr<const Vector> grad_f(const Vector& x, Number mu)
    188     {
    189       DBG_ASSERT(false && "ERROR: This method is only a placeholder for grad_f(mu) and should not be called");
    190       return NULL;
    191     }
     182    virtual SmartPtr<const Vector> grad_f(const Vector& x, Number mu) = 0;
     183
    192184    /** Replacement for the default Lagrangian Hessian method which
    193185     *  knows about the barrier parameter */
     
    196188                                        const Vector& yc,
    197189                                        const Vector& yd,
    198                                         Number mu)
    199     {
    200       DBG_ASSERT(false && "ERROR: This method is only a for h(mu) and should not be called");
    201       return NULL;
    202     }
     190                                        Number mu) = 0;
    203191    //@}
    204192
  • trunk/Algorithm/IpIterateInitializer.hpp

    r2 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-24
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-24
    88
    99#ifndef __IPITERATEINITIALIZER_HPP__
    1010#define __IPITERATEINITIALIZER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413#include "IpIpoptNLP.hpp"
  • trunk/Algorithm/IpIteratesVector.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International BusinDess Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-06-06
    88
    99#include "IpIteratesVector.hpp"
     
    1212{
    1313
    14   DBG_SET_VERBOSITY(0);
     14#ifdef IP_DEBUG
     15  static const Index dbg_verbosity = 0;
     16#endif
    1517
    1618  IteratesVector::IteratesVector(const IteratesVectorSpace* owner_space, bool create_new)
     
    154156  IteratesVectorSpace::~IteratesVectorSpace()
    155157  {}
    156   ;
    157158
    158159} // namespae Ipopt
  • trunk/Algorithm/IpIteratesVector.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2004-06-06
    88
    99#ifndef __IPITERATESVECTOR_HPP__
  • trunk/Algorithm/IpIterationOutput.hpp

    r2 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPITERATIONOUTPUT_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413#include "IpIpoptNLP.hpp"
  • trunk/Algorithm/IpLineSearch.hpp

    r157 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPLINESEARCH_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413#include "IpIpoptCalculatedQuantities.hpp"
  • trunk/Algorithm/IpLoqoMuOracle.cpp

    r210 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1111#include <limits>
    1212
    13 #ifdef OLD_C_HEADERS
    14 # include <math.h>
     13#ifdef HAVE_CMATH
     14# include <cmath>
    1515#else
    16 # include <cmath>
     16# ifdef HAVE_MATH_H
     17#  include <math.h>
     18# else
     19#  error "don't have header file for math"
     20# endif
    1721#endif
    1822
     
    2024{
    2125
    22   DBG_SET_VERBOSITY(0);
     26#ifdef IP_DEBUG
     27  static const Index dbg_verbosity = 0;
     28#endif
    2329
    2430  LoqoMuOracle::LoqoMuOracle()
  • trunk/Algorithm/IpLoqoMuOracle.hpp

    r2 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
  • trunk/Algorithm/IpMonotoneMuUpdate.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#include "IpJournalist.hpp"
    1111
    12 #ifdef OLD_C_HEADERS
    13 # include <math.h>
     12#ifdef HAVE_CMATH
     13# include <cmath>
    1414#else
    15 # include <cmath>
     15# ifdef HAVE_MATH_H
     16#  include <math.h>
     17# else
     18#  error "don't have header file for math"
     19# endif
    1620#endif
    1721
     
    1923{
    2024
    21   DBG_SET_VERBOSITY(0);
    22 
    23   DefineIpoptType(MonotoneMuUpdate);
     25#ifdef IP_DEBUG
     26  static const Index dbg_verbosity = 0;
     27#endif
    2428
    2529  MonotoneMuUpdate::MonotoneMuUpdate(const SmartPtr<LineSearch>& linesearch)
     
    4044  }
    4145
    42   void MonotoneMuUpdate::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
     46  void MonotoneMuUpdate::RegisterOptions(const SmartPtr<RegisteredOptions>& roptions)
    4347  {
    4448    roptions->AddLowerBoundedNumberOption(
     
    4852      "This option determines the initial value for the barrier parameter "
    4953      "(mu).  It is only relevant in the monotone, Fiacco-McCormick "
    50       "version of the algorithm., i.e., if \"mu_strategy\" is chosen "
    51       "as \"monotone\"");
     54      "version of the algorithm. (i.e., if \"mu_strategy\" is chosen "
     55      "as \"monotone\")");
    5256    roptions->AddLowerBoundedNumberOption(
    5357      "barrier_tol_factor",
     
    5660      10.0,
    5761      "The convergence tolerance for each barrier problem in the montone mode "
    58       "is the value of the barrier parameter times this value. This option is "
    59       "also used in class \"AdaptiveMuUpdate\" during the monotone mode. "
    60       "(This is kappa_epsilon in implementation paper).");
     62      "is the value of the barrier parameter times \"barrier_tol_factor\". "
     63      "This option is also used in the adaptive mu strategy during the "
     64      "monotone mode. (This is kappa_epsilon in implementation paper).");
    6165    roptions->AddBoundedNumberOption(
    6266      "mu_linear_decrease_factor",
     
    6771      "is obtained by taking the minimum of mu*\"mu_linear_decrease_factor\" "
    6872      "and mu^\"superlinear_decrease_power\".  (This is kappa_mu in "
    69       "implementation paper.) [This option is also used in "
    70       "AdaptiveMuUpdate]");
     73      "implementation paper.) This option is also used in the adaptive mu "
     74      "strategy during the monotone mode.");
    7175    roptions->AddBoundedNumberOption(
    7276      "mu_superlinear_decrease_power",
     
    7781      "is obtained by taking the minimum of mu*\"mu_linear_decrease_factor\" "
    7882      "and mu^\"superlinear_decrease_power\".  (This is theta_mu in "
    79       "implementation paper.) [This option is also used in "
    80       "AdaptiveMuUpdate]");
     83      "implementation paper.) This option is also used in the adaptive mu "
     84      "strategy during the monotone mode.");
    8185    roptions->AddBoundedNumberOption(
    8286      "tau_min",
     
    8488      0.0, true, 1.0, true,
    8589      0.99,
    86       "(This is tau_min in implementation paper.) [This option is also "
    87       "used in AdaptiveMuUpdate]");
     90      "(This is tau_min in implementation paper.)  This option is also used "
     91      "in the adaptive mu strategy during the monotone mode.");
    8892  }
    8993
  • trunk/Algorithm/IpMonotoneMuUpdate.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1212#include "IpMuUpdate.hpp"
    1313#include "IpLineSearch.hpp"
    14 #include "IpIpoptType.hpp"
     14#include "IpRegOptions.hpp"
    1515
    1616namespace Ipopt
    1717{
    18 
    19   DeclareIpoptType(MonotoneMuUpdate);
    2018
    2119  /** Monotone Mu Update. This class implements the standard monotone mu update
     
    3836                                const std::string& prefix);
    3937
    40     /** Method for determining the barrier parameter for the next iteration.
    41      *  When the optimality error for the current barrier parameter is less than
    42      *  a tolerance, the barrier parameter is reduced, and the Reset method of the
    43      *  LineSearch object linesearch is called.
    44      *  TODO: MORE DETAILS HERE */
     38    /** Method for determining the barrier parameter for the next
     39     *  iteration.  When the optimality error for the current barrier
     40     *  parameter is less than a tolerance, the barrier parameter is
     41     *  reduced, and the Reset method of the LineSearch object
     42     *  linesearch is called. */
    4543    virtual void UpdateBarrierParameter();
    4644
    4745    /** Methods for IpoptType */
    4846    //@{
    49     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
     47    static void RegisterOptions(const SmartPtr<RegisteredOptions>& roptions);
    5048    //@}
    5149
  • trunk/Algorithm/IpMuOracle.hpp

    r316 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPMUORACLE_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413
  • trunk/Algorithm/IpMuUpdate.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPMUUPDATE_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413
  • trunk/Algorithm/IpNLPScaling.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-06-25
    88
    99#include "IpNLPScaling.hpp"
     
    1212{
    1313
    14   DBG_SET_VERBOSITY(0);
     14#ifdef IP_DEBUG
     15  static const Index dbg_verbosity = 0;
     16#endif
    1517
    1618  SmartPtr<Vector> NLPScalingObject::apply_vector_scaling_x_LU_NonConst(
     
    178180  }
    179181
    180   DefineIpoptType(StandardScalingBase);
    181 
    182182  void
    183183  StandardScalingBase::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
     
    187187      "Scaling factor for the objective function.",
    188188      1.,
    189       "This option allows to set a scaling factor for the objective function "
    190       "that is used to scale the problem that is seen internally by "
    191       "Ipopt. If additional scaling parameters are computed "
    192       "(e.g. user-scaling or gradient-based), this factor is multiplied "
    193       "in addition. If this value is chosen to be negative, Ipopt will "
    194       "maximize the objective function.");
     189      "This option sets a scaling factor for the objective function. "
     190      "The scaling is seen internally by Ipopt but the unscaled objective is "
     191      "reported in the console output. "
     192      "If additional scaling parameters are computed "
     193      "(e.g. user-scaling or gradient-based), both factors are multiplied. "
     194      "If this value is chosen to be negative, Ipopt will "
     195      "maximize the objective function instead of minimizing it.");
    195196  }
    196197
     
    224225      Jnlst().Printf(J_VECTOR, J_MAIN, "objective scaling factor = %g\n", df_);
    225226      if (IsValid(dx_)) {
    226         Jnlst().PrintVector(J_VECTOR, J_MAIN, "x scaling vector", *dx_);
     227        dx_->Print(Jnlst(), J_VECTOR, J_MAIN, "x scaling vector");
    227228      }
    228229      else {
     
    230231      }
    231232      if (IsValid(dc)) {
    232         Jnlst().PrintVector(J_VECTOR, J_MAIN, "c scaling vector", *dc);
     233        dc->Print(Jnlst(), J_VECTOR, J_MAIN, "c scaling vector");
    233234      }
    234235      else {
     
    236237      }
    237238      if (IsValid(dd)) {
    238         Jnlst().PrintVector(J_VECTOR, J_MAIN, "d scaling vector", *dd);
     239        dd->Print(Jnlst(), J_VECTOR, J_MAIN, "d scaling vector");
    239240      }
    240241      else {
     
    299300    }
    300301    return scaled_x;
    301   };
     302  }
    302303
    303304  SmartPtr<const Vector> StandardScalingBase::apply_vector_scaling_x(
  • trunk/Algorithm/IpNLPScaling.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPNLPSCALING_HPP__
    1111
    12 #include "IpSmartPtr.hpp"
    13 #include "IpVector.hpp"
    14 #include "IpMatrix.hpp"
    1512#include "IpSymMatrix.hpp"
    1613#include "IpScaledMatrix.hpp"
    1714#include "IpSymScaledMatrix.hpp"
    1815#include "IpOptionsList.hpp"
    19 #include "IpIpoptType.hpp"
     16#include "IpRegOptions.hpp"
    2017
    2118namespace Ipopt
     
    218215    SmartPtr<const Journalist> jnlst_;
    219216  };
    220 
    221   DeclareIpoptType(StandardScalingBase);
    222217
    223218  /** This is a base class for many standard scaling
  • trunk/Algorithm/IpOptErrorConvCheck.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1111namespace Ipopt
    1212{
    13   DBG_SET_VERBOSITY(0);
    14 
    15   DefineIpoptType(OptimalityErrorConvergenceCheck);
     13#ifdef IP_DEBUG
     14  static const Index dbg_verbosity = 0;
     15#endif
    1616
    1717  OptimalityErrorConvergenceCheck::OptimalityErrorConvergenceCheck()
     
    2828      0, 3000,
    2929      "The algorithm terminates with an error message if the number of "
    30       "iterations exceeded this number. [Also used in RestoFilterConvCheck]");
     30      "iterations exceeded this number. This option is also used in the "
     31      "restoration phase.");
    3132    roptions->AddLowerBoundedNumberOption(
    3233      "dual_inf_tol",
    33       "Acceptance threshold for the dual infeasibility.",
     34      "Desired threshold for the dual infeasibility.",
    3435      0.0, true, 1e-4,
    3536      "Absolute tolerance on the dual infesaibility. Successful termination "
     
    3839    roptions->AddLowerBoundedNumberOption(
    3940      "constr_viol_tol",
    40       "Acceptance threshold for the constraint violation.",
     41      "Desired threshold for the constraint violation.",
    4142      0.0, true, 1e-4,
    4243      "Absolute tolerance on the constraint violation. Successful termination "
     
    4546    roptions->AddLowerBoundedNumberOption(
    4647      "compl_inf_tol",
    47       "Acceptance threshold for the complementarity conditions.",
     48      "Desired threshold for the complementarity conditions.",
    4849      0.0, true, 1e-4,
    4950      "Absolute tolerance on the complementarity. Successful termination "
     
    5253    roptions->AddLowerBoundedIntegerOption(
    5354      "acceptable_iter",
    54       "Number of acceptable iterates to trigger termination.",
     55      "Number of acceptable iterates before triggering termination.",
    5556      0, 15,
    56       "If the algorithm encounters so many successive acceptable iterates "
     57      "If the algorithm encounters this many successive acceptable iterates "
    5758      "(see \"acceptable_tol\"), it terminates, assuming that the problem "
    5859      "has been solved to best possible accuracy given round-off.  If it is "
     
    6263      "Acceptable convergence tolerance (relative).",
    6364      0.0, true,  1e-6,
    64       "Determines which (scaled) overall optimality error is considered to be "
    65       "acceptable. If the algorithm encounters \"acceptable_iter\" iterations "
    66       "in a row that are considered \"acceptable\", it will terminate before "
    67       "the desired convergence tolerance (\"tol\", \"dual_inf_tol\", etc) is "
    68       "met.");
     65      "Determines which (scaled) overall optimality error is considered to be"
     66      " \"acceptable.\" There are two levels of termination criteria.  If the "
     67      "usual \"desired\" tolerances (see tol, dual_inf_tol etc) are satisfied "
     68      "at an iteration, the algorithm immediately terminates with a success "
     69      "message.  On the other hand, if the algorithm encounters "
     70      "\"acceptable_iter\" many iterations in a row that are considered "
     71      "\"acceptable\", it will terminate before the desired convergence "
     72      "tolerance is met. This is useful in cases where the algorithm might "
     73      "not be able to achieve the \"desired\" level of accuracy.");
    6974    roptions->AddLowerBoundedNumberOption(
    7075      "acceptable_dual_inf_tol",
     
    7378      "Absolute tolerance on the dual infesaibility. Acceptable termination "
    7479      "requires that the (unscaled) dual infeasibility is less than this "
    75       "threshold.");
     80      "threshold; see also acceptable_tol.");
    7681    roptions->AddLowerBoundedNumberOption(
    7782      "acceptable_constr_viol_tol",
     
    8085      "Absolute tolerance on the constraint violation. Acceptable termination "
    8186      "requires that the (unscaled) constraint violation is less than this "
    82       "threshold.");
     87      "threshold; see also acceptable_tol.");
    8388    roptions->AddLowerBoundedNumberOption(
    8489      "acceptable_compl_inf_tol",
     
    8792      "Absolute tolerance on the complementarity. Acceptable termination "
    8893      "requires that the (unscaled) complementarity is less than this "
    89       "threshold.");
     94      "threshold; see also acceptable_tol.");
    9095  }
    9196
  • trunk/Algorithm/IpOptErrorConvCheck.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPOPTERRORCONVCHECK_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpConvCheck.hpp"
    1413
    1514namespace Ipopt
    1615{
    17 
    18   DeclareIpoptType(OptimalityErrorConvergenceCheck);
    1916
    2017  /** Brief Class Description.
  • trunk/Algorithm/IpOrigIpoptNLP.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    88
    99#include "IpOrigIpoptNLP.hpp"
    10 #ifdef OLD_C_HEADERS
    11 # include <math.h>
     10
     11#ifdef HAVE_CMATH
     12# include <cmath>
    1213#else
    13 # include <cmath>
     14# ifdef HAVE_MATH_H
     15#  include <math.h>
     16# else
     17#  error "don't have header file for math"
     18# endif
     19#endif
     20
     21#ifdef HAVE_CASSERT
     22# include <cassert>
     23#else
     24# ifdef HAVE_ASSERT_H
     25#  include <assert.h>
     26# else
     27#  error "don't have header file for assert"
     28# endif
    1429#endif
    1530
    1631namespace Ipopt
    1732{
    18   DBG_SET_VERBOSITY(0);
    19 
    20   DefineIpoptType(OrigIpoptNLP);
     33#ifdef IP_DEBUG
     34  static const Index dbg_verbosity = 0;
     35#endif
    2136
    2237  OrigIpoptNLP::OrigIpoptNLP(const SmartPtr<const Journalist>& jnlst,
     
    5570      1e-8,
    5671      "Before start of the optimization, the bounds given by the user are "
    57       "relaxed.  This option determines the factor by how much.  If it "
    58       "is set to zero, then this option is disabled.  (See Eqn.(35) in "
    59       "implmentation paper.)");
     72      "relaxed.  This option sets the factor for this relaxation.  If it "
     73      "is set to zero, then then bounds relaxation is disabled. "
     74      "(See Eqn.(35) in implmentation paper.)");
    6075  }
    6176
     
    254269      bool success = nlp_->Eval_f(*unscaled_x, ret);
    255270      DBG_PRINT((1, "success = %d ret = %e\n", success, ret));
    256       ASSERT_EXCEPTION(success && FiniteNumber(ret), Eval_Error,
     271      ASSERT_EXCEPTION(success && IsFiniteNumber(ret), Eval_Error,
    257272                       "Error evaluating the objective function");
    258273      ret = NLP_scaling()->apply_obj_scaling(ret);
     
    261276
    262277    return ret;
     278  }
     279
     280  Number OrigIpoptNLP::f(const Vector& x, Number mu)
     281  {
     282    assert(false && "ERROR: This method is only a placeholder for f(mu) and should not be called");
     283    return 0.;
    263284  }
    264285
     
    273294      SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
    274295      bool success = nlp_->Eval_grad_f(*unscaled_x, *unscaled_grad_f);
    275       ASSERT_EXCEPTION(success && FiniteNumber(unscaled_grad_f->Nrm2()),
     296      ASSERT_EXCEPTION(success && IsFiniteNumber(unscaled_grad_f->Nrm2()),
    276297                       Eval_Error, "Error evaluating the gradient of the objective function");
    277298      retValue = NLP_scaling()->apply_grad_obj_scaling(ConstPtr(unscaled_grad_f));
     
    282303  }
    283304
     305  SmartPtr<const Vector> OrigIpoptNLP::grad_f(const Vector& x, Number mu)
     306  {
     307    assert(false && "ERROR: This method is only a placeholder for grad_f(mu) and should not be called");
     308    return NULL;
     309  }
     310
    284311  /** Equality constraint residual */
    285312  SmartPtr<const Vector> OrigIpoptNLP::c(const Vector& x)
    286313  {
    287314    SmartPtr<const Vector> retValue;
    288     SmartPtr<const Vector> dep;
    289315    if (c_space_->Dim()==0) {
    290316      // We do this caching of an empty vector so that the returned
    291317      // Vector has always the same tag (this might make a difference
    292318      // in cases where only the constraints are supposed to change...
    293       dep = NULL;
     319      SmartPtr<const Vector> dep = NULL;
    294320      if (!c_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    295321        retValue = c_space_->MakeNew();
     
    298324    }
    299325    else {
    300       dep = &x;
    301     }
    302     if (!c_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    303       SmartPtr<Vector> unscaled_c = c_space_->MakeNew();
    304       c_evals_++;
    305       SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
    306       bool success = nlp_->Eval_c(*unscaled_x, *unscaled_c);
    307       ASSERT_EXCEPTION(success && FiniteNumber(unscaled_c->Nrm2()),
    308                        Eval_Error, "Error evaluating the equality constraints");
    309       retValue = NLP_scaling()->apply_vector_scaling_c(ConstPtr(unscaled_c));
    310       c_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
     326      if (!c_cache_.GetCachedResult1Dep(retValue, x)) {
     327        SmartPtr<Vector> unscaled_c = c_space_->MakeNew();
     328        c_evals_++;
     329        SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
     330        bool success = nlp_->Eval_c(*unscaled_x, *unscaled_c);
     331        ASSERT_EXCEPTION(success && IsFiniteNumber(unscaled_c->Nrm2()),
     332                         Eval_Error, "Error evaluating the equality constraints");
     333        retValue = NLP_scaling()->apply_vector_scaling_c(ConstPtr(unscaled_c));
     334        c_cache_.AddCachedResult1Dep(retValue, x);
     335      }
    311336    }
    312337
     
    318343    DBG_START_METH("OrigIpoptNLP::d", dbg_verbosity);
    319344    SmartPtr<const Vector> retValue;
    320     SmartPtr<const Vector> dep;
    321345    if (d_space_->Dim()==0) {
    322346      // We do this caching of an empty vector so that the returned
    323347      // Vector has always the same tag (this might make a difference
    324348      // in cases where only the constraints are supposed to change...
    325       dep = NULL;
     349      SmartPtr<const Vector> dep = NULL;
    326350      if (!d_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    327351        retValue = d_space_->MakeNew();
     
    330354    }
    331355    else {
    332       dep = &x;
    333     }
    334     if (!d_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    335       d_evals_++;
    336       SmartPtr<Vector> unscaled_d = d_space_->MakeNew();
    337 
    338       DBG_PRINT_VECTOR(2, "scaled_x", x);
    339       SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
    340       bool success = nlp_->Eval_d(*unscaled_x, *unscaled_d);
    341       DBG_PRINT_VECTOR(2, "unscaled_d", *unscaled_d);
    342       ASSERT_EXCEPTION(success && FiniteNumber(unscaled_d->Nrm2()),
    343                        Eval_Error, "Error evaluating the inequality constraints");
    344       retValue = NLP_scaling()->apply_vector_scaling_d(ConstPtr(unscaled_d));
    345       d_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
     356      if (!d_cache_.GetCachedResult1Dep(retValue, x)) {
     357        d_evals_++;
     358        SmartPtr<Vector> unscaled_d = d_space_->MakeNew();
     359
     360        DBG_PRINT_VECTOR(2, "scaled_x", x);
     361        SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
     362        bool success = nlp_->Eval_d(*unscaled_x, *unscaled_d);
     363        DBG_PRINT_VECTOR(2, "unscaled_d", *unscaled_d);
     364        ASSERT_EXCEPTION(success && IsFiniteNumber(unscaled_d->Nrm2()),
     365                         Eval_Error, "Error evaluating the inequality constraints");
     366        retValue = NLP_scaling()->apply_vector_scaling_d(ConstPtr(unscaled_d));
     367        d_cache_.AddCachedResult1Dep(retValue, x);
     368      }
    346369    }
    347370
     
    352375  {
    353376    SmartPtr<const Matrix> retValue;
    354     SmartPtr<const Vector> dep;
    355377    if (c_space_->Dim()==0) {
    356378      // We do this caching of an empty vector so that the returned
    357379      // Matrix has always the same tag
    358       dep = NULL;
     380      SmartPtr<const Vector> dep = NULL;
    359381      if (!jac_c_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    360         retValue = jac_c_space_->MakeNew();
     382        SmartPtr<Matrix> unscaled_jac_c = jac_c_space_->MakeNew();
     383        retValue = NLP_scaling()->apply_jac_c_scaling(ConstPtr(unscaled_jac_c));
    361384        jac_c_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
    362385      }
    363386    }
    364387    else {
    365       dep = &x;
    366     }
    367     if (!jac_c_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    368       jac_c_evals_++;
    369       SmartPtr<Matrix> unscaled_jac_c = jac_c_space_->MakeNew();
    370 
    371       SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
    372       bool success = nlp_->Eval_jac_c(*unscaled_x, *unscaled_jac_c);
    373       ASSERT_EXCEPTION(success, Eval_Error, "Error evaluating the jacobian of the equality constraints");
    374       retValue = NLP_scaling()->apply_jac_c_scaling(ConstPtr(unscaled_jac_c));
    375       jac_c_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
     388      if (!jac_c_cache_.GetCachedResult1Dep(retValue, x)) {
     389        jac_c_evals_++;
     390        SmartPtr<Matrix> unscaled_jac_c = jac_c_space_->MakeNew();
     391
     392        SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
     393        bool success = nlp_->Eval_jac_c(*unscaled_x, *unscaled_jac_c);
     394        ASSERT_EXCEPTION(success, Eval_Error, "Error evaluating the jacobian of the equality constraints");
     395        retValue = NLP_scaling()->apply_jac_c_scaling(ConstPtr(unscaled_jac_c));
     396        jac_c_cache_.AddCachedResult1Dep(retValue, x);
     397      }
    376398    }
    377399
     
    382404  {
    383405    SmartPtr<const Matrix> retValue;
    384     SmartPtr<const Vector> dep;
    385406    if (d_space_->Dim()==0) {
    386407      // We do this caching of an empty vector so that the returned
    387408      // Matrix has always the same tag
    388       dep = NULL;
     409      SmartPtr<const Vector> dep = NULL;
    389410      if (!jac_d_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    390         retValue = jac_d_space_->MakeNew();
     411        SmartPtr<Matrix> unscaled_jac_d = jac_d_space_->MakeNew();
     412        retValue = NLP_scaling()->apply_jac_d_scaling(ConstPtr(unscaled_jac_d));
    391413        jac_d_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
    392414      }
    393415    }
    394416    else {
    395       dep = &x;
    396     }
    397     if (!jac_d_cache_.GetCachedResult1Dep(retValue, GetRawPtr(dep))) {
    398       jac_d_evals_++;
    399       SmartPtr<Matrix> unscaled_jac_d = jac_d_space_->MakeNew();
    400 
    401       SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
    402       bool success = nlp_->Eval_jac_d(*unscaled_x, *unscaled_jac_d);
    403       ASSERT_EXCEPTION(success, Eval_Error, "Error evaluating the jacobian of the inequality constraints");
    404       retValue = NLP_scaling()->apply_jac_d_scaling(ConstPtr(unscaled_jac_d));
    405       jac_d_cache_.AddCachedResult1Dep(retValue, GetRawPtr(dep));
     417      if (!jac_d_cache_.GetCachedResult1Dep(retValue, x)) {
     418        jac_d_evals_++;
     419        SmartPtr<Matrix> unscaled_jac_d = jac_d_space_->MakeNew();
     420
     421        SmartPtr<const Vector> unscaled_x = NLP_scaling()->unapply_vector_scaling_x(&x);
     422        bool success = nlp_->Eval_jac_d(*unscaled_x, *unscaled_jac_d);
     423        ASSERT_EXCEPTION(success, Eval_Error, "Error evaluating the jacobian of the inequality constraints");
     424        retValue = NLP_scaling()->apply_jac_d_scaling(ConstPtr(unscaled_jac_d));
     425        jac_d_cache_.AddCachedResult1Dep(retValue, x);
     426      }
    406427    }
    407428
     
    439460    return retValue;
    440461  }
     462
     463  SmartPtr<const SymMatrix> OrigIpoptNLP::h(const Vector& x,
     464      Number obj_factor,
     465      const Vector& yc,
     466      const Vector& yd,
     467      Number mu)
     468  {
     469    assert(false &&
     470           "ERROR: This method is only a for h(mu) and should not be called");
     471    return NULL;
     472  }
     473
    441474
    442475  void OrigIpoptNLP::GetSpaces(SmartPtr<const VectorSpace>& x_space,
  • trunk/Algorithm/IpOrigIpoptNLP.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1212#include "IpIpoptNLP.hpp"
    1313#include "IpException.hpp"
    14 #include "IpIpoptType.hpp"
    1514
    1615namespace Ipopt
    1716{
    18 
    19   DeclareIpoptType(OrigIpoptNLP);
    2017
    2118  /** This class maps the traditional NLP into
     
    6461    virtual Number f(const Vector& x);
    6562
     63    /** Objective value (depending in mu) - incorrect version for
     64     *  OrigIpoptNLP */
     65    virtual Number f(const Vector& x, Number mu);
     66
    6667    /** Gradient of the objective */
    6768    virtual SmartPtr<const Vector> grad_f(const Vector& x);
     69
     70    /** Gradient of the objective (depending in mu) - incorrect
     71     *  version for OrigIpoptNLP */
     72    virtual SmartPtr<const Vector> grad_f(const Vector& x, Number mu);
    6873
    6974    /** Equality constraint residual */
     
    8691                                        const Vector& yd
    8792                                       );
     93
     94    /** Hessian of the Lagrangian (depending in mu) - incorrect
     95     *  version for OrigIpoptNLP */
     96    virtual SmartPtr<const SymMatrix> h(const Vector& x,
     97                                        Number obj_factor,
     98                                        const Vector& yc,
     99                                        const Vector& yd,
     100                                        Number mu);
    88101
    89102    /** Lower bounds on x */
  • trunk/Algorithm/IpOrigIterationOutput.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-23
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-23
    88
    99#include "IpOrigIterationOutput.hpp"
    10 #ifdef OLD_C_HEADERS
    11 # include <math.h>
     10
     11#ifdef HAVE_CMATH
     12# include <cmath>
    1213#else
    13 # include <cmath>
     14# ifdef HAVE_MATH_H
     15#  include <math.h>
     16# else
     17#  error "don't have header file for math"
     18# endif
    1419#endif
    1520
    1621namespace Ipopt
    1722{
    18   DBG_SET_VERBOSITY(0);
     23#ifdef IP_DEBUG
     24  static const Index dbg_verbosity = 0;
     25#endif
    1926
    2027  OrigIterationOutput::OrigIterationOutput()
     
    2330  OrigIterationOutput::~OrigIterationOutput()
    2431  {}
     32
     33  void
     34  OrigIterationOutput::RegisterOptions(SmartPtr<RegisteredOptions> roptions)
     35  {
     36    std::string prev_cat = roptions->RegisteringCategory();
     37    roptions->SetRegisteringCategory("Undocumented");
     38    roptions->AddStringOption2(
     39      "print_info_string",
     40      "Enables printing of additional info string at end of iteration output.",
     41      "no",
     42      "no", "don't print string",
     43      "yes", "print string at end of each iteration output",
     44      "This string contains some insider information about the current iteration.");
     45    roptions->SetRegisteringCategory(prev_cat);
     46  }
    2547
    2648  bool OrigIterationOutput::InitializeImpl(const OptionsList& options,
    2749      const std::string& prefix)
    2850  {
     51    options.GetBoolValue("print_info_string", print_info_string_, prefix);
     52
    2953    return true;
    3054  }
     
    3862    Index iter = IpData().iter_count();
    3963    std::string header =
    40       " iter     objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n";
     64      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n";
    4165    Jnlst().Printf(J_DETAILED, J_MAIN,
    4266                   "\n\n**************************************************\n");
     
    87111    if (!IpData().info_skip_output()) {
    88112      Jnlst().Printf(J_SUMMARY, J_MAIN,
    89                      "%5d%c %14.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d %s\n",
     113                     "%4d%c %13.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d",
    90114                     iter, info_iter, unscaled_f, inf_pr, inf_du, log10(mu), dnrm, regu_x_ptr,
    91115                     alpha_dual, alpha_primal, alpha_primal_char,
    92                      ls_count, info_string.c_str());
     116                     ls_count);
     117      if (print_info_string_) {
     118        Jnlst().Printf(J_SUMMARY, J_MAIN, " %s", info_string.c_str());
     119      }
     120      else {
     121        Jnlst().Printf(J_DETAILED, J_MAIN, " %s", info_string.c_str());
     122      }
     123      Jnlst().Printf(J_SUMMARY, J_MAIN, "\n");
    93124    }
    94125
     
    154185    }
    155186    if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    156       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_x", *IpData().curr()->x());
    157       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_s", *IpData().curr()->s());
    158 
    159       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_y_c", *IpData().curr()->y_c());
    160       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_y_d", *IpData().curr()->y_d());
    161 
    162       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_x_L", *IpCq().curr_slack_x_L());
    163       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_x_U", *IpCq().curr_slack_x_U());
    164 
    165       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_z_L", *IpData().curr()->z_L());
    166       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_z_U", *IpData().curr()->z_U());
    167 
    168       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_s_L", *IpCq().curr_slack_s_L());
    169       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_s_U", *IpCq().curr_slack_s_U());
    170 
    171       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_v_L", *IpData().curr()->v_L());
    172       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_v_U", *IpData().curr()->v_U());
     187      IpData().curr()->x()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_x");
     188      IpData().curr()->s()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_s");
     189
     190      IpData().curr()->y_c()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_y_c");
     191      IpData().curr()->y_d()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_y_d");
     192
     193      IpCq().curr_slack_x_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_x_L");
     194      IpCq().curr_slack_x_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_x_U");
     195      IpData().curr()->z_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_z_L");
     196      IpData().curr()->z_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_z_U");
     197
     198      IpCq().curr_slack_s_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_s_L");
     199      IpCq().curr_slack_s_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_s_U");
     200      IpData().curr()->v_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_v_L");
     201      IpData().curr()->v_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_v_U");
    173202    }
    174203    if (Jnlst().ProduceOutput(J_MOREVECTOR, J_MAIN)) {
    175       Jnlst().PrintVector(J_MOREVECTOR, J_MAIN, "curr_grad_lag_x", *IpCq().curr_grad_lag_x());
    176       Jnlst().PrintVector(J_MOREVECTOR, J_MAIN, "curr_grad_lag_s", *IpCq().curr_grad_lag_s());
     204      IpCq().curr_grad_lag_x()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "curr_grad_lag_x");
     205      IpCq().curr_grad_lag_s()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "curr_grad_lag_s");
    177206      if (IsValid(IpData().delta())) {
    178         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    179                             "delta_x", *IpData().delta()->x());
    180         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    181                             "delta_s", *IpData().delta()->s());
    182         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    183                             "delta_y_c", *IpData().delta()->y_c());
    184         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    185                             "delta_y_d", *IpData().delta()->y_d());
    186         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    187                             "delta_z_L", *IpData().delta()->z_L());
    188         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    189                             "delta_z_U", *IpData().delta()->z_U());
    190         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    191                             "delta_v_L", *IpData().delta()->v_L());
    192         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    193                             "delta_v_U", *IpData().delta()->v_U());
     207        IpData().delta()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "delta");
    194208      }
    195209    }
     
    207221    }
    208222    if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    209       Jnlst().PrintVector(J_VECTOR, J_MAIN, "grad_f", *IpCq().curr_grad_f());
    210       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_c", *IpCq().curr_c());
    211       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_d", *IpCq().curr_d());
    212       Jnlst().PrintVector(J_VECTOR, J_MAIN,
    213                           "curr_d - curr_s", *IpCq().curr_d_minus_s());
     223      IpCq().curr_grad_f()->Print(Jnlst(), J_VECTOR, J_MAIN, "grad_f");
     224      IpCq().curr_c()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_c");
     225      IpCq().curr_d()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_d");
     226      IpCq().curr_d_minus_s()->Print(Jnlst(), J_VECTOR, J_MAIN,
     227                                     "curr_d - curr_s");
    214228    }
    215229
    216230    if (Jnlst().ProduceOutput(J_MATRIX, J_MAIN)) {
    217       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "jac_c", *IpCq().curr_jac_c());
    218       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "jac_d", *IpCq().curr_jac_d());
    219       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "h", *IpCq().curr_exact_hessian());
     231      IpCq().curr_jac_c()->Print(Jnlst(), J_MATRIX, J_MAIN, "jac_c");
     232      IpCq().curr_jac_d()->Print(Jnlst(), J_MATRIX, J_MAIN, "jac_d");
     233      IpCq().curr_exact_hessian()->Print(Jnlst(), J_MATRIX, J_MAIN, "h");
    220234    }
    221235
  • trunk/Algorithm/IpOrigIterationOutput.hpp

    r2 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    3838    virtual void WriteOutput();
    3939
     40    /** Methods for OptionsList */
     41    //@{
     42    static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
     43    //@}
     44
    4045  private:
    4146    /**@name Default Compiler Generated Methods (Hidden to avoid
     
    5156    void operator=(const OrigIterationOutput&);
    5257    //@}
     58
     59    /** Flag indicating weather info string should be printed at end
     60     *  of iteration summary line. */
     61    bool print_info_string_;
    5362  };
    5463
  • trunk/Algorithm/IpProbingMuOracle.cpp

    r321 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    99#include "IpProbingMuOracle.hpp"
    1010
    11 #ifdef OLD_C_HEADERS
    12 # include <math.h>
     11#ifdef HAVE_CMATH
     12# include <cmath>
    1313#else
    14 # include <cmath>
     14# ifdef HAVE_MATH_H
     15#  include <math.h>
     16# else
     17#  error "don't have header file for math"
     18# endif
    1519#endif
    1620
    1721namespace Ipopt
    1822{
    19 
    20   DBG_SET_VERBOSITY(0);
    21 
    22   DefineIpoptType(ProbingMuOracle);
     23#ifdef IP_DEBUG
     24  static const Index dbg_verbosity = 0;
     25#endif
    2326
    2427  ProbingMuOracle::ProbingMuOracle(const SmartPtr<PDSystemSolver>& pd_solver)
  • trunk/Algorithm/IpProbingMuOracle.hpp

    r321 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1515namespace Ipopt
    1616{
    17 
    18   DeclareIpoptType(ProbingMuOracle);
    1917
    2018  /** Implementation of the probing strategy for computing the
  • trunk/Algorithm/IpQualityFunctionMuOracle.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter            IBM    2004-11-12
     7// Authors:  Carl Laird, Andreas Waechter            IBM    2004-11-12
    88
    99#include "IpQualityFunctionMuOracle.hpp"
    1010
    11 #ifdef OLD_C_HEADERS
    12 # include <math.h>
     11#ifdef HAVE_CMATH
     12# include <cmath>
    1313#else
    14 # include <cmath>
     14# ifdef HAVE_MATH_H
     15#  include <math.h>
     16# else
     17#  error "don't have header file for math"
     18# endif
    1519#endif
    1620
    1721namespace Ipopt
    1822{
    19 
    20   DBG_SET_VERBOSITY(0);
    21 
    22   DefineIpoptType(QualityFunctionMuOracle);
     23#ifdef IP_DEBUG
     24  static const Index dbg_verbosity = 0;
     25#endif
    2326
    2427  QualityFunctionMuOracle::QualityFunctionMuOracle(const SmartPtr<PDSystemSolver>& pd_solver)
     
    5558    roptions->AddLowerBoundedNumberOption(
    5659      "sigma_max",
    57       "Maximal value of centering parameter.",
     60      "Maximum value of the centering parameter.",
    5861      0.0, true, 1e2);
    5962    roptions->AddStringOption4(
     
    6770    roptions->AddStringOption4(
    6871      "quality_function_centrality",
    69       "Determines whether a penalty term for centrality is included quality function.",
     72      "The penalty term for centrality that is included in quality function.",
    7073      "none",
    7174      "none", "no penalty term is added",
     
    7376      "reciprocal", "complementarity * the reciprocal of the centrality measure",
    7477      "cubed-reciprocal", "complementarity * the reciprocal of the centrality measure cubed",
    75       "This determines whether a term penalizing deviation from centrality "
    76       "with respect to complementarity is added the quality function.  The "
     78      "This determines whether a term is added to the quality function to "
     79      "penalize deviation from centrality with respect to complementarity.  The "
    7780      "complementarity measure here is the xi in the Loqo update rule.");
    7881    roptions->AddStringOption2(
    7982      "quality_function_balancing_term",
    80       "Determines whether a balancing term for centrality is included in quality function.",
     83      "The balancing term included in the quality function for centrality.",
    8184      "none",
    8285      "none", "no balancing term is added",
    83       "cubic", "Max(0,Max(dual_ing,primal_inf)-compl)^3",
    84       "This determines whether a term penalizing stuations there the "
    85       "complementality is much smaller than dual and primal "
    86       "infeasibilities is added to the quality function.");
     86      "cubic", "Max(0,Max(dual_inf,primal_inf)-compl)^3",
     87      "This determines whether a term is added to the quality function that "
     88      "penalizes situations where the complementarity is much smaller "
     89      "than dual and primal infeasibilities.");
    8790    roptions->AddLowerBoundedIntegerOption(
    8891      "max_bisection_steps",
    89       "Maximal number of search steps during direct search procedure determining optimal centering parameter.",
    90       0, 4);
     92      "Maximum number of search steps during direct search procedure "
     93      "determining the optimal centering parameter.",
     94      0, 8,
     95      "The bisection search is performed for the quality function based mu "
     96      "oractle.");
    9197    roptions->AddBoundedNumberOption(
    9298      "bisection_tol",
    93       "Tolerance for the bisection search procedure determining optimal centering parameter.",
     99      "Tolerance for the bisection search procedure determining "
     100      "the optimal centering parameter.",
    94101      0.0, true, 1.0, true,
    95       1e-3);
     102      1e-3,
     103      "The bisection search is performed for the quality function based mu "
     104      "oractle.");
    96105  }
    97106
     
    528537                                      *tmp_slack_s_L_, *tmp_slack_s_U_);
    529538
    530     Number dual_inf;
    531     Number primal_inf;
    532     Number compl_inf;
     539    Number dual_inf=-1.;
     540    Number primal_inf=-1.;
     541    Number compl_inf=-1.;
    533542
    534543    switch (quality_function_norm_) {
  • trunk/Algorithm/IpQualityFunctionMuOracle.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004,2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1212#include "IpMuOracle.hpp"
    1313#include "IpPDSystemSolver.hpp"
    14 #include "IpIpoptType.hpp"
    1514#include "IpIpoptCalculatedQuantities.hpp"
    1615
    1716namespace Ipopt
    1817{
    19 
    20   DeclareIpoptType(QualityFunctionMuOracle);
    2118
    2219  /** Implementation of the probing strategy for computing the
  • trunk/Algorithm/IpRestoFilterConvCheck.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1313namespace Ipopt
    1414{
    15 
    16   DBG_SET_VERBOSITY(0);
    17 
    18   DefineIpoptType(RestoFilterConvergenceCheck);
     15#ifdef IP_DEBUG
     16  static const Index dbg_verbosity = 0;
     17#endif
    1918
    2019  RestoFilterConvergenceCheck::RestoFilterConvergenceCheck()
     
    4443    roptions->AddBoundedNumberOption(
    4544      "required_infeasibility_reduction",
    46       "Required reduction of infeasibility before restoration phase is left.",
     45      "Required reduction of infeasibility before leaving restoration phase.",
    4746      0.0, false, 1.0, true,
    4847      0.9,
  • trunk/Algorithm/IpRestoFilterConvCheck.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPRESTOFILTERCONVCHECK_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpOptErrorConvCheck.hpp"
    1413#include "IpFilterLineSearch.hpp"
    15 #include "IpIpoptType.hpp"
    1614
    1715namespace Ipopt
    1816{
    19 
    20   DeclareIpoptType(RestoFilterConvergenceCheck);
    2117
    2218  /** Convergence check for the restoration phase as called by the
  • trunk/Algorithm/IpRestoIpoptNLP.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1313#include "IpNLPScaling.hpp"
    1414
    15 #ifdef OLD_C_HEADERS
    16 #include <math.h>
     15#ifdef HAVE_CMATH
     16# include <cmath>
    1717#else
    18 #include <cmath>
     18# ifdef HAVE_MATH_H
     19#  include <math.h>
     20# else
     21#  error "don't have header file for math"
     22# endif
     23#endif
     24
     25#ifdef HAVE_CASSERT
     26# include <cassert>
     27#else
     28# ifdef HAVE_ASSERT_H
     29#  include <assert.h>
     30# else
     31#  error "don't have header file for assert"
     32# endif
    1933#endif
    2034
    2135namespace Ipopt
    2236{
    23   DBG_SET_VERBOSITY(0);
    24 
    25   DefineIpoptType(RestoIpoptNLP);
     37#ifdef IP_DEBUG
     38  static const Index dbg_verbosity = 0;
     39#endif
    2640
    2741  RestoIpoptNLP::RestoIpoptNLP(IpoptNLP& orig_ip_nlp,
     
    122136    // vector x
    123137    Index total_dim = orig_x_space->Dim() + 2*orig_c_space->Dim()
    124                       //orig  + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    125138                      + 2*orig_d_space->Dim();
    126139    x_space_ = new CompoundVectorSpace(5, total_dim);
     
    130143    x_space_->SetCompSpace(3, *orig_d_space); // n_d
    131144    x_space_->SetCompSpace(4, *orig_d_space); // p_d
    132     //orig    x_space_->SetCompSpace(3, *orig_d_l_space); // n_d
    133     //orig    x_space_->SetCompSpace(4, *orig_d_u_space); // p_d
    134145
    135146    DBG_PRINT((1, "Setting the c_space_\n"));
     
    144155    // vector x_L
    145156    total_dim = orig_x_l_space->Dim() + 2*orig_c_space->Dim()
    146                 //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    147157                + 2*orig_d_space->Dim();
    148158    x_l_space_ = new CompoundVectorSpace(5, total_dim);
     
    152162    x_l_space_->SetCompSpace(3, *orig_d_space); // n_d >=0
    153163    x_l_space_->SetCompSpace(4, *orig_d_space); // p_d >=0
    154     //orig    x_l_space_->SetCompSpace(3, *orig_d_l_space); // n_d >=0
    155     //orig    x_l_space_->SetCompSpace(4, *orig_d_u_space); // p_d >=0
    156164
    157165    DBG_PRINT((1, "Setting the x_u_space_\n"));
     
    162170    // matrix px_l
    163171    Index total_rows = orig_x_space->Dim() + 2*orig_c_space->Dim()
    164                        //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    165172                       + 2*orig_d_space->Dim();
    166173    Index total_cols = orig_x_l_space->Dim() + 2*orig_c_space->Dim()
    167                        //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    168174                       + 2*orig_d_space->Dim();
    169175    px_l_space_ = new CompoundMatrixSpace(5, 5, total_rows, total_cols);
     
    173179    px_l_space_->SetBlockRows(3, orig_d_space->Dim());
    174180    px_l_space_->SetBlockRows(4, orig_d_space->Dim());
    175     //orig    px_l_space_->SetBlockRows(3, orig_d_l_space->Dim());
    176     //orig    px_l_space_->SetBlockRows(4, orig_d_u_space->Dim());
    177181    px_l_space_->SetBlockCols(0, orig_x_l_space->Dim());
    178182    px_l_space_->SetBlockCols(1, orig_c_space->Dim());
     
    180184    px_l_space_->SetBlockCols(3, orig_d_space->Dim());
    181185    px_l_space_->SetBlockCols(4, orig_d_space->Dim());
    182     //orig    px_l_space_->SetBlockCols(3, orig_d_l_space->Dim());
    183     //orig    px_l_space_->SetBlockCols(4, orig_d_u_space->Dim());
    184186
    185187    px_l_space_->SetCompSpace(0, 0, *orig_px_l_space);
     
    197199    px_l_space_->SetCompSpace(1, 1, *identity_mat_space_nc, true);
    198200    px_l_space_->SetCompSpace(2, 2, *identity_mat_space_nc, true);
    199     //orig    SmartPtr<const MatrixSpace> identity_mat_space_nd_l
    200     //orig    = new IdentityMatrixSpace(orig_d_l_space->Dim());
    201201    SmartPtr<const MatrixSpace> identity_mat_space_nd
    202202    = new IdentityMatrixSpace(orig_d_space->Dim());
    203     //orig    px_l_space_->SetCompSpace(3, 3, *identity_mat_space_nd_l, true);
    204203    px_l_space_->SetCompSpace(3, 3, *identity_mat_space_nd, true);
    205     //orig    SmartPtr<const MatrixSpace> identity_mat_space_nd_u
    206     //orig      = new IdentityMatrixSpace(orig_d_u_space->Dim());
    207     //orig    px_l_space_->SetCompSpace(4, 4, *identity_mat_space_nd_u, true);
    208204    px_l_space_->SetCompSpace(4, 4, *identity_mat_space_nd, true);
    209205
     
    212208
    213209    total_rows = orig_x_space->Dim() + 2*orig_c_space->Dim()
    214                  //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    215210                 + 2*orig_d_space->Dim();
    216211    total_cols = orig_x_u_space->Dim();
     
    222217    px_u_space_->SetBlockRows(3, orig_d_space->Dim());
    223218    px_u_space_->SetBlockRows(4, orig_d_space->Dim());
    224     //orig    px_u_space_->SetBlockRows(3, orig_d_l_space->Dim());
    225     //orig    px_u_space_->SetBlockRows(4, orig_d_u_space->Dim());
    226219    px_u_space_->SetBlockCols(0, orig_x_u_space->Dim());
    227220
     
    246239    total_cols = orig_x_space->Dim() + 2*orig_c_space->Dim()
    247240                 + 2*orig_d_space->Dim();
    248     //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    249241    jac_c_space_ = new CompoundMatrixSpace(1, 5, total_rows, total_cols);
    250242    jac_c_space_->SetBlockRows(0, orig_c_space->Dim());
     
    254246    jac_c_space_->SetBlockCols(3, orig_d_space->Dim());
    255247    jac_c_space_->SetBlockCols(4, orig_d_space->Dim());
    256     //orig    jac_c_space_->SetBlockCols(3, orig_d_l_space->Dim());
    257     //orig    jac_c_space_->SetBlockCols(4, orig_d_u_space->Dim());
    258248
    259249    jac_c_space_->SetCompSpace(0, 0, *orig_jac_c_space);
     
    267257    total_cols = orig_x_space->Dim() + 2*orig_c_space->Dim()
    268258                 + 2*orig_d_space->Dim();
    269     //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    270259    jac_d_space_ = new CompoundMatrixSpace(1, 5, total_rows, total_cols);
    271260    jac_d_space_->SetBlockRows(0, orig_d_space->Dim());
     
    275264    jac_d_space_->SetBlockCols(3, orig_d_space->Dim());
    276265    jac_d_space_->SetBlockCols(4, orig_d_space->Dim());
    277     //orig    jac_d_space_->SetBlockCols(3, orig_d_l_space->Dim());
    278     //orig    jac_d_space_->SetBlockCols(4, orig_d_u_space->Dim());
    279266
    280267    jac_d_space_->SetCompSpace(0, 0, *orig_jac_d_space);
     268    DBG_PRINT((1, "orig_jac_d_space = %x\n", GetRawPtr(orig_jac_d_space)))
    281269    // Blocks (0,1) and (0,2) are zero'ed out
    282270    jac_d_space_->SetCompSpace(0, 3, *identity_mat_space_nd, true);
    283271    jac_d_space_->SetCompSpace(0, 4, *identity_mat_space_nd, true);
    284     //orig    jac_d_space_->SetCompSpace(0, 3, *orig_pd_l_space, true);
    285     //orig    SmartPtr<SumMatrixSpace> sum_pd_u
    286     //orig    = new SumMatrixSpace(orig_d_space->Dim(), orig_d_u_space->Dim(), 1);
    287     //orig    jac_d_space_->SetCompSpace(0, 4, *sum_pd_u, true);
    288272
    289273    DBG_PRINT((1, "Creating the h_space_\n"));
     
    291275    total_dim = orig_x_space->Dim() + 2*orig_c_space->Dim()
    292276                + 2*orig_d_space->Dim();
    293     //orig      + orig_d_l_space->Dim() + orig_d_u_space->Dim();
    294277    h_space_ = new CompoundSymMatrixSpace(5, total_dim);
    295278    h_space_->SetBlockDim(0, orig_x_space->Dim());
     
    298281    h_space_->SetBlockDim(3, orig_d_space->Dim());
    299282    h_space_->SetBlockDim(4, orig_d_space->Dim());
    300     //orig    h_space_->SetBlockDim(3, orig_d_l_space->Dim());
    301     //orig    h_space_->SetBlockDim(4, orig_d_u_space->Dim());
    302283
    303284    SmartPtr<const MatrixSpace> sumsym_mat_space =
     
    427408  }
    428409
     410  Number RestoIpoptNLP::f(const Vector& x)
     411  {
     412    assert(false && "ERROR: In RestoIpoptNLP f() is called without mu!");
     413    return 0.;
     414  }
     415
    429416  Number RestoIpoptNLP::f(const Vector& x, Number mu)
    430417  {
     
    499486  }
    500487
     488  SmartPtr<const Vector> RestoIpoptNLP::grad_f(const Vector& x)
     489  {
     490    assert(false && "ERROR: In RestoIpoptNLP grad_f() is called without mu!");
     491    return NULL;
     492  }
    501493
    502494  SmartPtr<const Vector> RestoIpoptNLP::d(const Vector& x)
     
    512504    retPtr->Axpy(1., *nd_only);
    513505    retPtr->Axpy(-1., *pd_only);
    514 #ifdef orig
    515 
    516     SmartPtr<Vector> tmp = orig_d->MakeNew();
    517     orig_ip_nlp_->Pd_L()->MultVector(1.0, *nd_only, 0.0, *tmp);
    518     retPtr->Axpy(1.0, *tmp);
    519     orig_ip_nlp_->Pd_U()->MultVector(1.0, *pd_only, 0.0, *tmp);
    520     retPtr->Axpy(-1.0, *tmp);
    521 #endif
    522506
    523507    return GetRawPtr(retPtr);
     
    561545  SmartPtr<const Matrix> RestoIpoptNLP::jac_d(const Vector& x)
    562546  {
     547    DBG_START_METH("RestoIpoptNLP::jac_d", dbg_verbosity);
     548
    563549    // Here, we set the (0,0) block with the values from the
    564550    // original jac_d and set the factor for the -I (jac w.r.t. p_d)
     
    576562    // space (since auto_allocate was set to true in SetCompSpace)
    577563    SmartPtr<CompoundMatrix> retPtr = jac_d_space_->MakeNewCompoundMatrix();
    578 
    579     // Set the block for the original jacobian
     564    DBG_PRINT((1, "jac_d_space_ = %x\n", GetRawPtr(jac_d_space_)))
     565
     566    // Set the block for the original Jacobian
    580567    retPtr->SetComp(0,0,*jac_d_only);
    581568
     
    589576    jac_d_pd->SetFactor(-1.0);
    590577
    591 #ifdef orig
    592     // Jacobian of resto d w.r.t. n_d is Pd_L
    593     retPtr->SetComp(0, 3, *orig_ip_nlp_->Pd_L());
    594 
    595     // Change the matrix factor to -1 for Pd_U
    596     // Jacobian of the resto d w.r.t. p_d is -Pd_U
    597     SmartPtr<Matrix> jac_d_pd_mat = retPtr->GetCompNonConst(0,4);
    598     SumMatrix* jac_d_pd_sum = dynamic_cast<SumMatrix*>(GetRawPtr(jac_d_pd_mat));
    599     DBG_ASSERT(jac_d_pd_sum);
    600     jac_d_pd_sum->SetTerm(0, -1.0, *orig_ip_nlp_->Pd_U());
    601 #endif
    602 
    603578    return GetRawPtr(retPtr);
     579  }
     580
     581  SmartPtr<const SymMatrix> RestoIpoptNLP::h(const Vector& x,
     582      Number obj_factor,
     583      const Vector& yc,
     584      const Vector& yd
     585                                            )
     586  {
     587    assert(false && "ERROR: In RestoIpoptNLP h() is called without mu!");
     588    return NULL;
    604589  }
    605590
  • trunk/Algorithm/IpRestoIpoptNLP.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    2222namespace Ipopt
    2323{
    24 
    25   DeclareIpoptType(RestoIpoptNLP);
    2624
    2725  /** This class maps the traditional NLP into
     
    8684
    8785    /** Objective value (incorrect version for restoration phase) */
    88     virtual Number f(const Vector& x)
    89     {
    90       DBG_ASSERT(false && "ERROR: In RestoIpoptNLP f() is called without mu!");
    91       return 0.;
    92     }
     86    virtual Number f(const Vector& x);
    9387
    9488    /** Objective value */
     
    9690
    9791    /** Gradient of the objective (incorrect version for restoration phase) */
    98     virtual SmartPtr<const Vector> grad_f(const Vector& x)
    99     {
    100       DBG_ASSERT(false && "ERROR: In RestoIpoptNLP grad_f() is called without mu!");
    101       return NULL;
    102     }
     92    virtual SmartPtr<const Vector> grad_f(const Vector& x);
    10393
    10494    /** Gradient of the objective */
     
    124114                                        const Vector& yc,
    125115                                        const Vector& yd
    126                                        )
    127     {
    128       DBG_ASSERT(false && "ERROR: In RestoIpoptNLP h() is called without mu!");
    129       return NULL;
    130     }
     116                                       );
    131117
    132118    /** Hessian of the Lagrangian */
  • trunk/Algorithm/IpRestoIterateInitializer.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-10-12
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-10-12
    88
    99#include "IpRestoIterateInitializer.hpp"
     
    1313namespace Ipopt
    1414{
    15   DBG_SET_VERBOSITY(0);
     15#ifdef IP_DEBUG
     16  static const Index dbg_verbosity = 0;
     17#endif
    1618
    1719  RestoIterateInitializer::RestoIterateInitializer
  • trunk/Algorithm/IpRestoIterateInitializer.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-24
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-24
    88
    99#ifndef __IPRESTOITERATEINITIALIZER_HPP__
    1010#define __IPRESTOITERATEINITIALIZER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpIterateInitializer.hpp"
    1413#include "IpEqMultCalculator.hpp"
    15 #include "IpIpoptType.hpp"
    1614
    1715namespace Ipopt
  • trunk/Algorithm/IpRestoIterationOutput.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-23
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2004-09-23
    88
    99#include "IpRestoIterationOutput.hpp"
    1010#include "IpRestoIpoptNLP.hpp"
    1111
    12 #ifdef OLD_C_HEADERS
    13 # include <math.h>
     12#ifdef HAVE_CMATH
     13# include <cmath>
    1414#else
    15 # include <cmath>
     15# ifdef HAVE_MATH_H
     16#  include <math.h>
     17# else
     18#  error "don't have header file for math"
     19# endif
    1620#endif
    1721
    1822namespace Ipopt
    1923{
    20   DBG_SET_VERBOSITY(0);
     24#ifdef IP_DEBUG
     25  static const Index dbg_verbosity = 0;
     26#endif
    2127
    2228  RestoIterationOutput::RestoIterationOutput(const SmartPtr<OrigIterationOutput>& resto_orig_iteration_output)
     
    3137      const std::string& prefix)
    3238  {
     39    options.GetBoolValue("print_info_string", print_info_string_, prefix);
     40
    3341    bool retval = true;
    3442    if (IsValid(resto_orig_iteration_output_)) {
     
    6775
    6876    std::string header =
    69       " iter     objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n";
     77      "iter    objective    inf_pr   inf_du lg(mu)  ||d||  lg(rg) alpha_du alpha_pr  ls\n";
    7078    Jnlst().Printf(J_DETAILED, J_MAIN,
    7179                   "\n\n**************************************************\n");
     
    130138
    131139    Jnlst().Printf(J_SUMMARY, J_MAIN,
    132                    "%5d%c %14.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d %s\n",
     140                   "%4d%c %13.7e %7.2e %7.2e %5.1f %7.2e %5s %7.2e %7.2e%c%3d",
    133141                   iter, info_iter, f, inf_pr, inf_du, log10(mu), dnrm, regu_x_ptr,
    134142                   alpha_dual, alpha_primal, alpha_primal_char,
    135                    ls_count, info_string.c_str());
    136 
     143                   ls_count);
     144    if (print_info_string_) {
     145      Jnlst().Printf(J_SUMMARY, J_MAIN, " %s", info_string.c_str());
     146    }
     147    else {
     148      Jnlst().Printf(J_DETAILED, J_MAIN, " %s", info_string.c_str());
     149    }
     150    Jnlst().Printf(J_SUMMARY, J_MAIN, "\n");
    137151
    138152    //////////////////////////////////////////////////////////////////////
     
    198212    }
    199213    if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    200       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_x", *IpData().curr()->x());
    201       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_s", *IpData().curr()->s());
    202 
    203       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_y_c", *IpData().curr()->y_c());
    204       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_y_d", *IpData().curr()->y_d());
    205 
    206       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_x_L", *IpCq().curr_slack_x_L());
    207       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_x_U", *IpCq().curr_slack_x_U());
    208 
    209       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_z_L", *IpData().curr()->z_L());
    210       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_z_U", *IpData().curr()->z_U());
    211 
    212       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_s_L", *IpCq().curr_slack_s_L());
    213       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_slack_s_U", *IpCq().curr_slack_s_U());
    214 
    215       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_v_L", *IpData().curr()->v_L());
    216       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_v_U", *IpData().curr()->v_U());
     214      IpData().curr()->x()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_x");
     215      IpData().curr()->s()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_s");
     216
     217      IpData().curr()->y_c()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_y_c");
     218      IpData().curr()->y_d()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_y_d");
     219
     220      IpCq().curr_slack_x_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_x_L");
     221      IpCq().curr_slack_x_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_x_U");
     222      IpData().curr()->z_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_z_L");
     223      IpData().curr()->z_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_z_U");
     224
     225      IpCq().curr_slack_s_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_s_L");
     226      IpCq().curr_slack_s_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_slack_s_U");
     227      IpData().curr()->v_L()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_v_L");
     228      IpData().curr()->v_U()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_v_U");
    217229    }
    218230    if (Jnlst().ProduceOutput(J_MOREVECTOR, J_MAIN)) {
    219       Jnlst().PrintVector(J_MOREVECTOR, J_MAIN, "curr_grad_lag_x", *IpCq().curr_grad_lag_x());
    220       Jnlst().PrintVector(J_MOREVECTOR, J_MAIN, "curr_grad_lag_s", *IpCq().curr_grad_lag_s());
     231      IpCq().curr_grad_lag_x()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "curr_grad_lag_x");
     232      IpCq().curr_grad_lag_s()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "curr_grad_lag_s");
    221233      if (IsValid(IpData().delta())) {
    222         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    223                             "delta_x", *IpData().delta()->x());
    224         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    225                             "delta_s", *IpData().delta()->s());
    226         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    227                             "delta_y_c", *IpData().delta()->y_c());
    228         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    229                             "delta_y_d", *IpData().delta()->y_d());
    230         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    231                             "delta_z_L", *IpData().delta()->z_L());
    232         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    233                             "delta_z_U", *IpData().delta()->z_U());
    234         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    235                             "delta_v_L", *IpData().delta()->v_L());
    236         Jnlst().PrintVector(J_MOREVECTOR, J_MAIN,
    237                             "delta_v_U", *IpData().delta()->v_U());
     234        IpData().delta()->Print(Jnlst(), J_MOREVECTOR, J_MAIN, "delta");
    238235      }
    239236    }
     
    251248    }
    252249    if (Jnlst().ProduceOutput(J_VECTOR, J_MAIN)) {
    253       Jnlst().PrintVector(J_VECTOR, J_MAIN, "grad_f", *IpCq().curr_grad_f());
    254       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_c", *IpCq().curr_c());
    255       Jnlst().PrintVector(J_VECTOR, J_MAIN, "curr_d", *IpCq().curr_d());
    256       Jnlst().PrintVector(J_VECTOR, J_MAIN,
    257                           "curr_d - curr_s", *IpCq().curr_d_minus_s());
    258     }
     250      IpCq().curr_grad_f()->Print(Jnlst(), J_VECTOR, J_MAIN, "grad_f");
     251      IpCq().curr_c()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_c");
     252      IpCq().curr_d()->Print(Jnlst(), J_VECTOR, J_MAIN, "curr_d");
     253      IpCq().curr_d_minus_s()->Print(Jnlst(), J_VECTOR, J_MAIN,
     254                                     "curr_d - curr_s");
     255    }
     256
    259257    if (Jnlst().ProduceOutput(J_MATRIX, J_MAIN)) {
    260       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "jac_c", *IpCq().curr_jac_c());
    261       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "jac_d", *IpCq().curr_jac_d());
    262       Jnlst().PrintMatrix(J_MATRIX, J_MAIN, "h", *IpCq().curr_exact_hessian());
     258      IpCq().curr_jac_c()->Print(Jnlst(), J_MATRIX, J_MAIN, "jac_c");
     259      IpCq().curr_jac_d()->Print(Jnlst(), J_MATRIX, J_MAIN, "jac_d");
     260      IpCq().curr_exact_hessian()->Print(Jnlst(), J_MATRIX, J_MAIN, "h");
    263261    }
    264262
  • trunk/Algorithm/IpRestoIterationOutput.hpp

    r2 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter, Carl Laird       IBM    2004-09-27
     7// Authors:  Carl Laird, Andreas Waechter       IBM    2004-09-27
    88
    99#ifndef __IPRESTOITERATIONOUTPUT_HPP__
     
    6161    //@}
    6262
     63    /** Pointer to output strategy object during regular iterations. */
    6364    SmartPtr<OrigIterationOutput> resto_orig_iteration_output_;
     65
     66    /** Flag indicating weather info string should be printed at end
     67     *  of iteration summary line. */
     68    bool print_info_string_;
    6469  };
    6570
  • trunk/Algorithm/IpRestoMinC_1Nrm.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1414namespace Ipopt
    1515{
    16   DBG_SET_VERBOSITY(0);
    17 
    18   DefineIpoptType(MinC_1NrmRestorationPhase);
     16#ifdef IP_DEBUG
     17  static const Index dbg_verbosity = 0;
     18#endif
    1919
    2020  MinC_1NrmRestorationPhase::MinC_1NrmRestorationPhase
     
    3636    roptions->AddLowerBoundedNumberOption(
    3737      "bound_mult_reset_threshold",
    38       "Threshold for resetting bound multipliers after restoration phase.",
     38      "Threshold for resetting bound multipliers after the restoration phase.",
    3939      0.0, false,
    4040      1e3,
     
    7373                         prefix);
    7474
    75     // ToDo take care of this somewhere else?  avoid that the
    76     // restoration phase is trigged by user option in first iteration
    77     // of the restoration phase
    78     resto_options_->SetValue("resto.start_with_resto", "no");
     75    // Avoid that the restoration phase is trigged by user option in
     76    // first iteration of the restoration phase
     77    resto_options_->SetStringValue("resto.start_with_resto", "no");
     78
     79    // We want the default for the theta_max_fact in the restoration
     80    // phase higher than for the regular phase
     81    Number theta_max_fact;
     82    if (!options.GetNumericValue("resto.theta_max_fact",
     83                                 theta_max_fact, "")) {
     84      resto_options_->SetNumericValue("resto.theta_max_fact", 1e8);
     85    }
    7986
    8087    count_restorations_ = 0;
     
    159166      }
    160167      if (Jnlst().ProduceOutput(J_VECTOR, J_LINE_SEARCH)) {
    161         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    162                             "x", *resto_ip_data->curr()->x());
    163         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    164                             "y_c", *resto_ip_data->curr()->y_c());
    165         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    166                             "y_d", *resto_ip_data->curr()->y_d());
    167         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    168                             "z_L", *resto_ip_data->curr()->z_L());
    169         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    170                             "z_U", *resto_ip_data->curr()->z_U());
    171         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    172                             "v_L", *resto_ip_data->curr()->v_L());
    173         Jnlst().PrintVector(J_VECTOR, J_LINE_SEARCH,
    174                             "v_U", *resto_ip_data->curr()->v_U());
     168        resto_ip_data->curr()->Print(Jnlst(), J_VECTOR, J_LINE_SEARCH, "curr");
    175169      }
    176170
  • trunk/Algorithm/IpRestoMinC_1Nrm.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPRESTOC_1NRM_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpRestoPhase.hpp"
    1413#include "IpIpoptAlg.hpp"
     
    1716namespace Ipopt
    1817{
    19 
    20   DeclareIpoptType(MinC_1NrmRestorationPhase);
    2118
    2219  /** Restoration Phase that minimizes the 1-norm of the constraint
  • trunk/Algorithm/IpRestoPhase.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    1010#define __IPRESTOPHASE_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpAlgStrategy.hpp"
    1413#include "IpIpoptNLP.hpp"
  • trunk/Algorithm/IpRestoRestoPhase.cpp

    r305 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-02-11
    88
    99#include "IpRestoRestoPhase.hpp"
     
    1212namespace Ipopt
    1313{
    14   DBG_SET_VERBOSITY(0);
     14#ifdef IP_DEBUG
     15  static const Index dbg_verbosity = 0;
     16#endif
    1517
    1618  RestoRestorationPhase::RestoRestorationPhase()
  • trunk/Algorithm/IpRestoRestoPhase.hpp

    r191 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-02-11
    88
    99#ifndef __IPRESTORESTOPHASE_HPP__
    1010#define __IPRESTORESTOPHASE_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpRestoPhase.hpp"
    1413#include "IpIpoptAlg.hpp"
  • trunk/Algorithm/IpUserScaling.cpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-06-25
    88
    99#include "IpUserScaling.hpp"
  • trunk/Algorithm/IpUserScaling.hpp

    • Property svn:eol-style set to native
    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
     7// Authors:  Carl Laird, Andreas Waechter     IBM    2005-06-25
    88
    99#ifndef __IPUSERSCALING_HPP__
  • trunk/Algorithm/IpWarmStartIterateInitializer.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-23
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2005-04-01
    88
    99#include "IpWarmStartIterateInitializer.hpp"
     
    1212// ToDo make independent of DenseVector
    1313#include "IpDenseVector.hpp"
    14 #ifdef OLD_C_HEADERS
    15 # include <math.h>
     14
     15#ifdef HAVE_CMATH
     16# include <cmath>
    1617#else
    17 # include <cmath>
     18# ifdef HAVE_MATH_H
     19#  include <math.h>
     20# else
     21#  error "don't have header file for math"
     22# endif
    1823#endif
    1924
    2025namespace Ipopt
    2126{
    22   DBG_SET_VERBOSITY(0);
    23 
    24   DefineIpoptType(WarmStartIterateInitializer);
     27#ifdef IP_DEBUG
     28  static const Index dbg_verbosity = 0;
     29#endif
    2530
    2631  WarmStartIterateInitializer::WarmStartIterateInitializer()
     
    3742    roptions->AddLowerBoundedNumberOption("warm_start_mult_bound_push", "same as mult_bound_push for the regular initializer",
    3843                                          0.0, true, 1e-3);
    39     roptions->AddNumberOption("warm_start_mult_init_max", "(No Range?) max initial value for the equality multipliers",
     44    roptions->AddNumberOption("warm_start_mult_init_max", "Maximum initial value for the equality multipliers",
    4045                              1e6);
    41     roptions->AddNumberOption("warm_start_target_mu", "(No range?) - default value in code was 0e-3 ???",
     46    roptions->AddNumberOption("warm_start_target_mu", "(No range?) default value in code was 0e-3 ???",
    4247                              0e-3);
    4348  }
     
    7075    IpData().InitializeDataStructures(IpNLP(), true, true, true, true, true);
    7176
    72     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "user-provided x",
    73                         *IpData().curr()->x());
    74     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "user-provided y_c",
    75                         *IpData().curr()->y_c());
    76     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "user-provided y_d",
    77                         *IpData().curr()->y_d());
    78     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "user-provided z_L",
    79                         *IpData().curr()->z_L());
    80     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "user-provided z_U",
    81                         *IpData().curr()->z_U());
     77    IpData().curr()->x()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     78                                "user-provided x");
     79    IpData().curr()->y_c()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     80                                  "user-provided y_c");
     81    IpData().curr()->y_d()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     82                                  "user-provided y_d");
     83    IpData().curr()->z_L()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     84                                  "user-provided z_L");
     85    IpData().curr()->z_U()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     86                                  "user-provided z_U");
    8287    if (Jnlst().ProduceOutput(J_MOREVECTOR, J_INITIALIZATION)) {
    83       Jnlst().PrintVector(J_MOREVECTOR, J_INITIALIZATION, "d at user-provided x",
    84                           *IpCq().curr_d());
     88      IpCq().curr_d()->Print(Jnlst(), J_MOREVECTOR, J_INITIALIZATION,
     89                             "d at user-provided x");
    8590    }
    8691
     
    166171                        *IpData().curr()->v_U(), *IpNLP().Pd_U(),
    167172                        new_s, new_v_U);
    168       Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "DELETEME new_s",
    169                           *new_s);
    170       Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "DELETEME d_U",
    171                           *IpNLP().d_U());
    172       Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "DELETEME new_v_U",
    173                           *new_v_U);
    174173
    175174      // Now submit the full modified point
     
    206205        *IpNLP().Px_U());
    207206
    208     // ToDo: Don't see why this line is required
    209     //    IpData().SetTrialPrimalVariablesFromPtr(new_x, new_s);
    210 
    211207    // Push the primal s variables
    212208    DefaultIterateInitializer::push_variables(Jnlst(),
     
    220216        *IpNLP().Pd_L(),
    221217        *IpNLP().Pd_U());
    222     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "DELETEME new_s cor",
    223                         *new_s);
    224218
    225219    // Push the multipliers
     
    255249    IpData().AcceptTrialPoint();
    256250
    257     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial x",
    258                         *IpData().curr()->x());
    259     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial s",
    260                         *IpData().curr()->s());
    261     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial y_c",
    262                         *IpData().curr()->y_c());
    263     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial y_d",
    264                         *IpData().curr()->y_d());
    265     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial z_L",
    266                         *IpData().curr()->z_L());
    267     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial z_U",
    268                         *IpData().curr()->z_U());
    269     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial v_L",
    270                         *IpData().curr()->v_L());
    271     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "initial v_U",
    272                         *IpData().curr()->v_U());
     251    IpData().curr()->x()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     252                                "initial x");
     253    IpData().curr()->s()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     254                                "initial s");
     255    IpData().curr()->y_c()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     256                                  "initial y_c");
     257    IpData().curr()->y_d()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     258                                  "initial y_d");
     259    IpData().curr()->z_L()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     260                                  "initial z_L");
     261    IpData().curr()->z_U()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     262                                  "initial z_U");
     263    IpData().curr()->v_L()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     264                                  "initial v_L");
     265    IpData().curr()->v_U()->Print(Jnlst(), J_VECTOR, J_INITIALIZATION,
     266                                  "initial v_U");
    273267    if (Jnlst().ProduceOutput(J_MOREVECTOR, J_INITIALIZATION)) {
    274       Jnlst().PrintVector(J_MOREVECTOR, J_INITIALIZATION, "initial slack_x_L",
    275                           *IpCq().curr_slack_x_L());
    276       Jnlst().PrintVector(J_MOREVECTOR, J_INITIALIZATION, "initial slack_x_U",
    277                           *IpCq().curr_slack_x_U());
    278       Jnlst().PrintVector(J_MOREVECTOR, J_INITIALIZATION, "initial slack_s_L",
    279                           *IpCq().curr_slack_s_L());
    280       Jnlst().PrintVector(J_MOREVECTOR, J_INITIALIZATION, "initial slack_s_U",
    281                           *IpCq().curr_slack_s_U());
     268      IpCq().curr_slack_x_L()->Print(Jnlst(), J_MOREVECTOR, J_INITIALIZATION,
     269                                     "initial slack_x_L");
     270      IpCq().curr_slack_x_U()->Print(Jnlst(), J_MOREVECTOR, J_INITIALIZATION,
     271                                     "initial slack_x_U");
     272      IpCq().curr_slack_s_L()->Print(Jnlst(), J_MOREVECTOR, J_INITIALIZATION,
     273                                     "initial slack_s_L");
     274      IpCq().curr_slack_s_U()->Print(Jnlst(), J_MOREVECTOR, J_INITIALIZATION,
     275                                     "initial slack_s_U");
    282276    }
    283277
     
    296290    SmartPtr<Vector> new_mults = curr_mults.MakeNewCopy();
    297291    adapt_to_target_mu(*new_slacks, *new_mults, warm_start_target_mu_);
    298     Jnlst().PrintVector(J_VECTOR, J_INITIALIZATION, "DELETEME new_slacks",
    299                         *new_slacks);
    300292    new_slacks->Axpy(-1, curr_slacks); // this is now correction step
    301293    SmartPtr<Vector> new_vars = curr_vars.MakeNew();
  • trunk/Algorithm/IpWarmStartIterateInitializer.hpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    55// $Id$
    66//
    7 // Authors:  Andreas Waechter              IBM    2004-09-24
     7// Authors:  Carl Laird, Andreas Waechter              IBM    2005-04-01
    88
    99#ifndef __IPWARMSTARTITERATEINITIALIZER_HPP__
    1010#define __IPWARMSTARTITERATEINITIALIZER_HPP__
    1111
    12 #include "IpUtils.hpp"
    1312#include "IpIterateInitializer.hpp"
    1413#include "IpEqMultCalculator.hpp"
    15 #include "IpIpoptType.hpp"
    1614
    1715namespace Ipopt
    1816{
    19 
    20   DeclareIpoptType(WarmStartIterateInitializer);
    2117
    2218  /** Class implementing an initialization procedure for warm starts.
  • trunk/Algorithm/Makefile.am

    r424 r511  
    1 # Copyright (C) 2004, International Business Machines and others.
     1# Copyright (C) 2004, 2005 International Business Machines and others.
    22# All Rights Reserved.
    33# This file is distributed under the Common Public License.
     
    99AUTOMAKE_OPTIONS = foreign
    1010
     11SUBDIRS = LinearSolvers
     12
    1113noinst_LIBRARIES = libipoptalg.a
    1214
    1315libipoptalg_a_SOURCES = \
    14         IpAlgBuilder.hpp IpAlgBuilder.cpp \
     16        IpAdaptiveMuUpdate.cpp IpAdaptiveMuUpdate.hpp \
     17        IpAlgBuilder.cpp IpAlgBuilder.hpp \
     18        IpAlgorithmRegOp.cpp IpAlgorithmRegOp.hpp \
    1519        IpAlgStrategy.hpp \
     20        IpAugRestoSystemSolver.cpp IpAugRestoSystemSolver.hpp \
     21        IpAugSystemSolver.hpp \
    1622        IpConvCheck.hpp \
    17         IpDefaultIterateInitializer.hpp IpDefaultIterateInitializer.cpp \
    18         IpWarmStartIterateInitializer.hpp IpWarmStartIterateInitializer.cpp \
     23        IpDefaultIterateInitializer.cpp IpDefaultIterateInitializer.hpp \
     24        IpEqMultCalculator.hpp \
    1925        IpFilter.cpp IpFilter.hpp \
    2026        IpFilterLineSearch.cpp IpFilterLineSearch.hpp \
    21         IpGradientScaling.hpp IpGradientScaling.cpp \
     27        IpGradientScaling.cpp IpGradientScaling.hpp \
    2228        IpIpoptAlg.cpp IpIpoptAlg.hpp \
    2329        IpIpoptCalculatedQuantities.cpp IpIpoptCalculatedQuantities.hpp \
    2430        IpIpoptData.cpp IpIpoptData.hpp \
    25         IpIpoptNLP.hpp  \
     31        IpIpoptNLP.hpp \
    2632        IpIterateInitializer.hpp \
    27         IpIteratesVector.hpp IpIteratesVector.cpp \
     33        IpIteratesVector.cpp IpIteratesVector.hpp \
    2834        IpIterationOutput.hpp \
     35        IpLeastSquareMults.cpp IpLeastSquareMults.hpp \
    2936        IpLineSearch.hpp \
    30         IpLoqoMuOracle.hpp IpLoqoMuOracle.cpp \
    31         IpMonotoneMuUpdate.hpp IpMonotoneMuUpdate.cpp \
     37        IpLoqoMuOracle.cpp IpLoqoMuOracle.hpp \
     38        IpMonotoneMuUpdate.cpp IpMonotoneMuUpdate.hpp \
    3239        IpMuOracle.hpp \
    3340        IpMuUpdate.hpp \
    34         IpAdaptiveMuUpdate.hpp IpAdaptiveMuUpdate.cpp \
    35         IpNLPScaling.hpp IpNLPScaling.cpp \
     41        IpNLPScaling.cpp IpNLPScaling.hpp \
    3642        IpOptErrorConvCheck.cpp IpOptErrorConvCheck.hpp \
    3743        IpOrigIpoptNLP.cpp IpOrigIpoptNLP.hpp \
    38         IpOrigIterationOutput.hpp IpOrigIterationOutput.cpp \
    39         IpProbingMuOracle.hpp IpProbingMuOracle.cpp \
    40         IpQualityFunctionMuOracle.hpp IpQualityFunctionMuOracle.cpp \
     44        IpOrigIterationOutput.cpp IpOrigIterationOutput.hpp \
     45        IpPDFullSpaceSolver.cpp IpPDFullSpaceSolver.hpp \
     46        IpPDPerturbationHandler.cpp IpPDPerturbationHandler.hpp \
     47        IpPDSystemSolver.hpp \
     48        IpProbingMuOracle.cpp IpProbingMuOracle.hpp \
     49        IpQualityFunctionMuOracle.cpp IpQualityFunctionMuOracle.hpp \
    4150        IpRestoFilterConvCheck.cpp IpRestoFilterConvCheck.hpp \
    42         IpRestoIpoptNLP.hpp IpRestoIpoptNLP.cpp \
    43         IpRestoIterateInitializer.hpp IpRestoIterateInitializer.cpp \
    44         IpRestoIterationOutput.hpp IpRestoIterationOutput.cpp \
     51        IpRestoIpoptNLP.cpp IpRestoIpoptNLP.hpp \
     52        IpRestoIterateInitializer.cpp IpRestoIterateInitializer.hpp \
     53        IpRestoIterationOutput.cpp IpRestoIterationOutput.hpp \
    4554        IpRestoMinC_1Nrm.cpp IpRestoMinC_1Nrm.hpp \
    4655        IpRestoPhase.hpp \
    47         IpRestoRestoPhase.hpp IpRestoRestoPhase.cpp \
    48         IpUserScaling.cpp IpUserScaling.hpp
     56        IpRestoRestoPhase.cpp IpRestoRestoPhase.hpp \
     57        IpStdAugSystemSolver.cpp IpStdAugSystemSolver.hpp \
     58        IpUserScaling.cpp IpUserScaling.hpp \
     59        IpWarmStartIterateInitializer.cpp IpWarmStartIterateInitializer.hpp
    4960
    50 CXXFLAGS += -I$(srcdir)/../Common
    51 CXXFLAGS += -I$(srcdir)/../Interfaces
    52 CXXFLAGS += -I$(srcdir)/../PDSystemImpl/PDFullSpace
    53 CXXFLAGS += -I$(srcdir)/../LinAlgImpl/Serial
     61CXXFLAGS += -I$(srcdir)/../Common \
     62        -I$(srcdir)/../LinAlg \
     63        -I$(srcdir)/../LinAlg/TMatrices \
     64        -I$(srcdir)/../Interfaces \
     65        -I$(srcdir)/LinearSolvers
    5466
    5567# Astyle stuff
    5668
    5769ASTYLE_FILES = \
    58         IpAlgBuilder.hppbak IpAlgBuilder.cppbak \
     70        IpAdaptiveMuUpdate.cppbak IpAdaptiveMuUpdate.hppbak \
     71        IpAlgBuilder.cppbak IpAlgBuilder.hppbak \
     72        IpAlgorithmRegOp.cppbak IpAlgorithmRegOp.hppbak \
    5973        IpAlgStrategy.hppbak \
     74        IpAugRestoSystemSolver.cppbak IpAugRestoSystemSolver.hppbak \
     75        IpAugSystemSolver.hppbak \
    6076        IpConvCheck.hppbak \
    61         IpDefaultIterateInitializer.hppbak IpDefaultIterateInitializer.cppbak \
    62         IpWarmStartIterateInitializer.hppbak IpWarmStartIterateInitializer.cppbak \
     77        IpDefaultIterateInitializer.cppbak IpDefaultIterateInitializer.hppbak \
     78        IpEqMultCalculator.hppbak \
    6379        IpFilter.cppbak IpFilter.hppbak \
    6480        IpFilterLineSearch.cppbak IpFilterLineSearch.hppbak \
    65         IpGradientScaling.hppbak IpGradientScaling.cppbak \
     81        IpGradientScaling.cppbak IpGradientScaling.hppbak \
    6682        IpIpoptAlg.cppbak IpIpoptAlg.hppbak \
    6783        IpIpoptCalculatedQuantities.cppbak IpIpoptCalculatedQuantities.hppbak \
     
    6985        IpIpoptNLP.hppbak \
    7086        IpIterateInitializer.hppbak \
    71         IpIteratesVector.hppbak IpIteratesVector.cppbak \
     87        IpIteratesVector.cppbak IpIteratesVector.hppbak \
    7288        IpIterationOutput.hppbak \
     89        IpLeastSquareMults.cppbak IpLeastSquareMults.hppbak \
    7390        IpLineSearch.hppbak \
    74         IpLoqoMuOracle.hppbak IpLoqoMuOracle.cppbak \
    75         IpMonotoneMuUpdate.hppbak IpMonotoneMuUpdate.cppbak \
     91        IpLoqoMuOracle.cppbak IpLoqoMuOracle.hppbak \
     92        IpMonotoneMuUpdate.cppbak IpMonotoneMuUpdate.hppbak \
    7693        IpMuOracle.hppbak \
    7794        IpMuUpdate.hppbak \
    78         IpAdaptiveMuUpdate.hppbak IpAdaptiveMuUpdate.cppbak \
    79         IpNLPScaling.hppbak IpNLPScaling.cppbak \
     95        IpNLPScaling.cppbak IpNLPScaling.hppbak \
    8096        IpOptErrorConvCheck.cppbak IpOptErrorConvCheck.hppbak \
    8197        IpOrigIpoptNLP.cppbak IpOrigIpoptNLP.hppbak \
    82         IpOrigIterationOutput.hppbak IpOrigIterationOutput.cppbak \
    83         IpProbingMuOracle.hppbak IpProbingMuOracle.cppbak \
    84         IpQualityFunctionMuOracle.hppbak IpQualityFunctionMuOracle.cppbak \
     98        IpOrigIterationOutput.cppbak IpOrigIterationOutput.hppbak \
     99        IpPDFullSpaceSolver.cppbak IpPDFullSpaceSolver.hppbak \
     100        IpPDPerturbationHandler.cppbak IpPDPerturbationHandler.hppbak \
     101        IpPDSystemSolver.hppbak \
     102        IpProbingMuOracle.cppbak IpProbingMuOracle.hppbak \
     103        IpQualityFunctionMuOracle.cppbak IpQualityFunctionMuOracle.hppbak \
    85104        IpRestoFilterConvCheck.cppbak IpRestoFilterConvCheck.hppbak \
    86         IpRestoIpoptNLP.hppbak IpRestoIpoptNLP.cppbak \
    87         IpRestoIterateInitializer.hppbak IpRestoIterateInitializer.cppbak \
    88         IpRestoIterationOutput.hppbak IpRestoIterationOutput.cppbak \
     105        IpRestoIpoptNLP.cppbak IpRestoIpoptNLP.hppbak \
     106        IpRestoIterateInitializer.cppbak IpRestoIterateInitializer.hppbak \
     107        IpRestoIterationOutput.cppbak IpRestoIterationOutput.hppbak \
    89108        IpRestoMinC_1Nrm.cppbak IpRestoMinC_1Nrm.hppbak \
    90109        IpRestoPhase.hppbak \
    91         IpRestoRestoPhase.hppbak IpRestoRestoPhase.cppbak \
    92         IpUserScaling.cppbak IpUserScaling.hppbak
     110        IpRestoRestoPhase.cppbak IpRestoRestoPhase.hppbak \
     111        IpStdAugSystemSolver.cppbak IpStdAugSystemSolver.hppbak \
     112        IpUserScaling.cppbak IpUserScaling.hppbak \
     113        IpWarmStartIterateInitializer.cppbak IpWarmStartIterateInitializer.hppbak
    93114
    94115ASTYLE = @ASTYLE@
  • trunk/Algorithm/Makefile.in

    r424 r511  
    1515@SET_MAKE@
    1616
    17 # Copyright (C) 2004, International Business Machines and others.
     17# Copyright (C) 2004, 2005 International Business Machines and others.
    1818# All Rights Reserved.
    1919# This file is distributed under the Common Public License.
     
    5656libipoptalg_a_AR = $(AR) $(ARFLAGS)
    5757libipoptalg_a_LIBADD =
    58 am_libipoptalg_a_OBJECTS = IpAlgBuilder.$(OBJEXT) \
    59         IpDefaultIterateInitializer.$(OBJEXT) \
    60         IpWarmStartIterateInitializer.$(OBJEXT) IpFilter.$(OBJEXT) \
     58am_libipoptalg_a_OBJECTS = IpAdaptiveMuUpdate.$(OBJEXT) \
     59        IpAlgBuilder.$(OBJEXT) IpAlgorithmRegOp.$(OBJEXT) \
     60        IpAugRestoSystemSolver.$(OBJEXT) \
     61        IpDefaultIterateInitializer.$(OBJEXT) IpFilter.$(OBJEXT) \
    6162        IpFilterLineSearch.$(OBJEXT) IpGradientScaling.$(OBJEXT) \
    6263        IpIpoptAlg.$(OBJEXT) IpIpoptCalculatedQuantities.$(OBJEXT) \
    6364        IpIpoptData.$(OBJEXT) IpIteratesVector.$(OBJEXT) \
    64         IpLoqoMuOracle.$(OBJEXT) IpMonotoneMuUpdate.$(OBJEXT) \
    65         IpAdaptiveMuUpdate.$(OBJEXT) IpNLPScaling.$(OBJEXT) \
     65        IpLeastSquareMults.$(OBJEXT) IpLoqoMuOracle.$(OBJEXT) \
     66        IpMonotoneMuUpdate.$(OBJEXT) IpNLPScaling.$(OBJEXT) \
    6667        IpOptErrorConvCheck.$(OBJEXT) IpOrigIpoptNLP.$(OBJEXT) \
    67         IpOrigIterationOutput.$(OBJEXT) IpProbingMuOracle.$(OBJEXT) \
     68        IpOrigIterationOutput.$(OBJEXT) IpPDFullSpaceSolver.$(OBJEXT) \
     69        IpPDPerturbationHandler.$(OBJEXT) IpProbingMuOracle.$(OBJEXT) \
    6870        IpQualityFunctionMuOracle.$(OBJEXT) \
    6971        IpRestoFilterConvCheck.$(OBJEXT) IpRestoIpoptNLP.$(OBJEXT) \
    7072        IpRestoIterateInitializer.$(OBJEXT) \
    7173        IpRestoIterationOutput.$(OBJEXT) IpRestoMinC_1Nrm.$(OBJEXT) \
    72         IpRestoRestoPhase.$(OBJEXT) IpUserScaling.$(OBJEXT)
     74        IpRestoRestoPhase.$(OBJEXT) IpStdAugSystemSolver.$(OBJEXT) \
     75        IpUserScaling.$(OBJEXT) \
     76        IpWarmStartIterateInitializer.$(OBJEXT)
    7377libipoptalg_a_OBJECTS = $(am_libipoptalg_a_OBJECTS)
    7478DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/inc
     
    8690SOURCES = $(libipoptalg_a_SOURCES)
    8791DIST_SOURCES = $(libipoptalg_a_SOURCES)
     92RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
     93        html-recursive info-recursive install-data-recursive \
     94        install-exec-recursive install-info-recursive \
     95        install-recursive installcheck-recursive installdirs-recursive \
     96        pdf-recursive ps-recursive uninstall-info-recursive \
     97        uninstall-recursive
    8898ETAGS = etags
    8999CTAGS = ctags
     100DIST_SUBDIRS = $(SUBDIRS)
    90101DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
    91102ACLOCAL = @ACLOCAL@
     
    96107AR = @AR@
    97108ARFLAGS = @ARFLAGS@
     109AR_X = @AR_X@
    98110ASLLIB = @ASLLIB@
    99111ASLMAKEFILECMDS = @ASLMAKEFILECMDS@
     
    117129BUILDHSL_FALSE = @BUILDHSL_FALSE@
    118130BUILDHSL_TRUE = @BUILDHSL_TRUE@
    119 BUILDLAPACKDIR_FALSE = @BUILDLAPACKDIR_FALSE@
    120 BUILDLAPACKDIR_TRUE = @BUILDLAPACKDIR_TRUE@
    121 BUILDLAPACK_FALSE = @BUILDLAPACK_FALSE@
    122 BUILDLAPACK_TRUE = @BUILDLAPACK_TRUE@
    123131BUILDMA27_FALSE = @BUILDMA27_FALSE@
    124132BUILDMA27_TRUE = @BUILDMA27_TRUE@
     
    128136CCDEPMODE = @CCDEPMODE@
    129137CFLAGS = @CFLAGS@
    130 CPP = @CPP@
    131138CPPFLAGS = @CPPFLAGS@
    132139CXX = @CXX@
     140CXXCPP = @CXXCPP@
    133141CXXDEPMODE = @CXXDEPMODE@
    134 CXXFLAGS = @CXXFLAGS@ -I$(srcdir)/../Common -I$(srcdir)/../Interfaces \
    135         -I$(srcdir)/../PDSystemImpl/PDFullSpace \
    136         -I$(srcdir)/../LinAlgImpl/Serial
     142CXXFLAGS = @CXXFLAGS@ -I$(srcdir)/../Common -I$(srcdir)/../LinAlg \
     143        -I$(srcdir)/../LinAlg/TMatrices -I$(srcdir)/../Interfaces \
     144        -I$(srcdir)/LinearSolvers
    137145CXXLIBS = @CXXLIBS@
    138146CYGPATH_W = @CYGPATH_W@
     
    147155FFLAGS = @FFLAGS@
    148156FLIBS = @FLIBS@
     157HAVE_MA27_FALSE = @HAVE_MA27_FALSE@
     158HAVE_MA27_TRUE = @HAVE_MA27_TRUE@
     159HAVE_MC19_FALSE = @HAVE_MC19_FALSE@
     160HAVE_MC19_TRUE = @HAVE_MC19_TRUE@
    149161HAVE_PARDISO_FALSE = @HAVE_PARDISO_FALSE@
    150162HAVE_PARDISO_TRUE = @HAVE_PARDISO_TRUE@
     
    220232target_alias = @target_alias@
    221233AUTOMAKE_OPTIONS = foreign
     234SUBDIRS = LinearSolvers
    222235noinst_LIBRARIES = libipoptalg.a
    223236libipoptalg_a_SOURCES = \
    224         IpAlgBuilder.hpp IpAlgBuilder.cpp \
     237        IpAdaptiveMuUpdate.cpp IpAdaptiveMuUpdate.hpp \
     238        IpAlgBuilder.cpp IpAlgBuilder.hpp \
     239        IpAlgorithmRegOp.cpp IpAlgorithmRegOp.hpp \
    225240        IpAlgStrategy.hpp \
     241        IpAugRestoSystemSolver.cpp IpAugRestoSystemSolver.hpp \
     242        IpAugSystemSolver.hpp \
    226243        IpConvCheck.hpp \
    227         IpDefaultIterateInitializer.hpp IpDefaultIterateInitializer.cpp \
    228         IpWarmStartIterateInitializer.hpp IpWarmStartIterateInitializer.cpp \
     244        IpDefaultIterateInitializer.cpp IpDefaultIterateInitializer.hpp \
     245        IpEqMultCalculator.hpp \
    229246        IpFilter.cpp IpFilter.hpp \
    230247        IpFilterLineSearch.cpp IpFilterLineSearch.hpp \
    231         IpGradientScaling.hpp IpGradientScaling.cpp \
     248        IpGradientScaling.cpp IpGradientScaling.hpp \
    232249        IpIpoptAlg.cpp IpIpoptAlg.hpp \
    233250        IpIpoptCalculatedQuantities.cpp IpIpoptCalculatedQuantities.hpp \
    234251        IpIpoptData.cpp IpIpoptData.hpp \
    235         IpIpoptNLP.hpp  \
     252        IpIpoptNLP.hpp \
    236253        IpIterateInitializer.hpp \
    237         IpIteratesVector.hpp IpIteratesVector.cpp \
     254        IpIteratesVector.cpp IpIteratesVector.hpp \
    238255        IpIterationOutput.hpp \
     256        IpLeastSquareMults.cpp IpLeastSquareMults.hpp \
    239257        IpLineSearch.hpp \
    240         IpLoqoMuOracle.hpp IpLoqoMuOracle.cpp \
    241         IpMonotoneMuUpdate.hpp IpMonotoneMuUpdate.cpp \
     258        IpLoqoMuOracle.cpp IpLoqoMuOracle.hpp \
     259        IpMonotoneMuUpdate.cpp IpMonotoneMuUpdate.hpp \
    242260        IpMuOracle.hpp \
    243261        IpMuUpdate.hpp \
    244         IpAdaptiveMuUpdate.hpp IpAdaptiveMuUpdate.cpp \
    245         IpNLPScaling.hpp IpNLPScaling.cpp \
     262        IpNLPScaling.cpp IpNLPScaling.hpp \
    246263        IpOptErrorConvCheck.cpp IpOptErrorConvCheck.hpp \
    247264        IpOrigIpoptNLP.cpp IpOrigIpoptNLP.hpp \
    248         IpOrigIterationOutput.hpp IpOrigIterationOutput.cpp \
    249         IpProbingMuOracle.hpp IpProbingMuOracle.cpp \
    250         IpQualityFunctionMuOracle.hpp IpQualityFunctionMuOracle.cpp \
     265        IpOrigIterationOutput.cpp IpOrigIterationOutput.hpp \
     266        IpPDFullSpaceSolver.cpp IpPDFullSpaceSolver.hpp \
     267        IpPDPerturbationHandler.cpp IpPDPerturbationHandler.hpp \
     268        IpPDSystemSolver.hpp \
     269        IpProbingMuOracle.cpp IpProbingMuOracle.hpp \
     270        IpQualityFunctionMuOracle.cpp IpQualityFunctionMuOracle.hpp \
    251271        IpRestoFilterConvCheck.cpp IpRestoFilterConvCheck.hpp \
    252         IpRestoIpoptNLP.hpp IpRestoIpoptNLP.cpp \
    253         IpRestoIterateInitializer.hpp IpRestoIterateInitializer.cpp \
    254         IpRestoIterationOutput.hpp IpRestoIterationOutput.cpp \
     272        IpRestoIpoptNLP.cpp IpRestoIpoptNLP.hpp \
     273        IpRestoIterateInitializer.cpp IpRestoIterateInitializer.hpp \
     274        IpRestoIterationOutput.cpp IpRestoIterationOutput.hpp \
    255275        IpRestoMinC_1Nrm.cpp IpRestoMinC_1Nrm.hpp \
    256276        IpRestoPhase.hpp \
    257         IpRestoRestoPhase.hpp IpRestoRestoPhase.cpp \
    258         IpUserScaling.cpp IpUserScaling.hpp
     277        IpRestoRestoPhase.cpp IpRestoRestoPhase.hpp \
     278        IpStdAugSystemSolver.cpp IpStdAugSystemSolver.hpp \
     279        IpUserScaling.cpp IpUserScaling.hpp \
     280        IpWarmStartIterateInitializer.cpp IpWarmStartIterateInitializer.hpp
    259281
    260282
    261283# Astyle stuff
    262284ASTYLE_FILES = \
    263         IpAlgBuilder.hppbak IpAlgBuilder.cppbak \
     285        IpAdaptiveMuUpdate.cppbak IpAdaptiveMuUpdate.hppbak \
     286        IpAlgBuilder.cppbak IpAlgBuilder.hppbak \
     287        IpAlgorithmRegOp.cppbak IpAlgorithmRegOp.hppbak \
    264288        IpAlgStrategy.hppbak \
     289        IpAugRestoSystemSolver.cppbak IpAugRestoSystemSolver.hppbak \
     290        IpAugSystemSolver.hppbak \
    265291        IpConvCheck.hppbak \
    266         IpDefaultIterateInitializer.hppbak IpDefaultIterateInitializer.cppbak \
    267         IpWarmStartIterateInitializer.hppbak IpWarmStartIterateInitializer.cppbak \
     292        IpDefaultIterateInitializer.cppbak IpDefaultIterateInitializer.hppbak \
     293        IpEqMultCalculator.hppbak \
    268294        IpFilter.cppbak IpFilter.hppbak \
    269295        IpFilterLineSearch.cppbak IpFilterLineSearch.hppbak \
    270         IpGradientScaling.hppbak IpGradientScaling.cppbak \
     296        IpGradientScaling.cppbak IpGradientScaling.hppbak \
    271297        IpIpoptAlg.cppbak IpIpoptAlg.hppbak \
    272298        IpIpoptCalculatedQuantities.cppbak IpIpoptCalculatedQuantities.hppbak \
     
    274300        IpIpoptNLP.hppbak \
    275301        IpIterateInitializer.hppbak \
    276         IpIteratesVector.hppbak IpIteratesVector.cppbak \
     302        IpIteratesVector.cppbak IpIteratesVector.hppbak \
    277303        IpIterationOutput.hppbak \
     304        IpLeastSquareMults.cppbak IpLeastSquareMults.hppbak \
    278305        IpLineSearch.hppbak \
    279         IpLoqoMuOracle.hppbak IpLoqoMuOracle.cppbak \
    280         IpMonotoneMuUpdate.hppbak IpMonotoneMuUpdate.cppbak \
     306        IpLoqoMuOracle.cppbak IpLoqoMuOracle.hppbak \
     307        IpMonotoneMuUpdate.cppbak IpMonotoneMuUpdate.hppbak \
    281308        IpMuOracle.hppbak \
    282309        IpMuUpdate.hppbak \
    283         IpAdaptiveMuUpdate.hppbak IpAdaptiveMuUpdate.cppbak \
    284         IpNLPScaling.hppbak IpNLPScaling.cppbak \
     310        IpNLPScaling.cppbak IpNLPScaling.hppbak \
    285311        IpOptErrorConvCheck.cppbak IpOptErrorConvCheck.hppbak \
    286312        IpOrigIpoptNLP.cppbak IpOrigIpoptNLP.hppbak \
    287         IpOrigIterationOutput.hppbak IpOrigIterationOutput.cppbak \
    288         IpProbingMuOracle.hppbak IpProbingMuOracle.cppbak \
    289         IpQualityFunctionMuOracle.hppbak IpQualityFunctionMuOracle.cppbak \
     313        IpOrigIterationOutput.cppbak IpOrigIterationOutput.hppbak \
     314        IpPDFullSpaceSolver.cppbak IpPDFullSpaceSolver.hppbak \
     315        IpPDPerturbationHandler.cppbak IpPDPerturbationHandler.hppbak \
     316        IpPDSystemSolver.hppbak \
     317        IpProbingMuOracle.cppbak IpProbingMuOracle.hppbak \
     318        IpQualityFunctionMuOracle.cppbak IpQualityFunctionMuOracle.hppbak \
    290319        IpRestoFilterConvCheck.cppbak IpRestoFilterConvCheck.hppbak \
    291         IpRestoIpoptNLP.hppbak IpRestoIpoptNLP.cppbak \
    292         IpRestoIterateInitializer.hppbak IpRestoIterateInitializer.cppbak \
    293         IpRestoIterationOutput.hppbak IpRestoIterationOutput.cppbak \
     320        IpRestoIpoptNLP.cppbak IpRestoIpoptNLP.hppbak \
     321        IpRestoIterateInitializer.cppbak IpRestoIterateInitializer.hppbak \
     322        IpRestoIterationOutput.cppbak IpRestoIterationOutput.hppbak \
    294323        IpRestoMinC_1Nrm.cppbak IpRestoMinC_1Nrm.hppbak \
    295324        IpRestoPhase.hppbak \
    296         IpRestoRestoPhase.hppbak IpRestoRestoPhase.cppbak \
    297         IpUserScaling.cppbak IpUserScaling.hppbak
     325        IpRestoRestoPhase.cppbak IpRestoRestoPhase.hppbak \
     326        IpStdAugSystemSolver.cppbak IpStdAugSystemSolver.hppbak \
     327        IpUserScaling.cppbak IpUserScaling.hppbak \
     328        IpWarmStartIterateInitializer.cppbak IpWarmStartIterateInitializer.hppbak
    298329
    299330CLEANFILES = $(ASTYLE_FILES)
    300331SUFFIXES = .cppbak .hppbak
    301 all: all-am
     332all: all-recursive
    302333
    303334.SUFFIXES:
     
    348379@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpAdaptiveMuUpdate.Po@am__quote@
    349380@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpAlgBuilder.Po@am__quote@
     381@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpAlgorithmRegOp.Po@am__quote@
     382@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpAugRestoSystemSolver.Po@am__quote@
    350383@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpDefaultIterateInitializer.Po@am__quote@
    351384@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpFilter.Po@am__quote@
     
    356389@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpIpoptData.Po@am__quote@
    357390@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpIteratesVector.Po@am__quote@
     391@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpLeastSquareMults.Po@am__quote@
    358392@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpLoqoMuOracle.Po@am__quote@
    359393@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpMonotoneMuUpdate.Po@am__quote@
     
    362396@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpOrigIpoptNLP.Po@am__quote@
    363397@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpOrigIterationOutput.Po@am__quote@
     398@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpPDFullSpaceSolver.Po@am__quote@
     399@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpPDPerturbationHandler.Po@am__quote@
    364400@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpProbingMuOracle.Po@am__quote@
    365401@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpQualityFunctionMuOracle.Po@am__quote@
     
    370406@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpRestoMinC_1Nrm.Po@am__quote@
    371407@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpRestoRestoPhase.Po@am__quote@
     408@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpStdAugSystemSolver.Po@am__quote@
    372409@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpUserScaling.Po@am__quote@
    373410@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IpWarmStartIterateInitializer.Po@am__quote@
     
    387424@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
    388425uninstall-info-am:
     426
     427# This directory's subdirectories are mostly independent; you can cd
     428# into them and run `make' without going through this Makefile.
     429# To change the values of `make' variables: instead of editing Makefiles,
     430# (1) if the variable is set in `config.status', edit `config.status'
     431#     (which will cause the Makefiles to be regenerated when you run `make');
     432# (2) otherwise, pass the desired values on the `make' command line.
     433$(RECURSIVE_TARGETS):
     434        @failcom='exit 1'; \
     435        for f in x $$MAKEFLAGS; do \
     436          case $$f in \
     437            *=* | --[!k]*);; \
     438            *k*) failcom='fail=yes';; \
     439          esac; \
     440        done; \
     441        dot_seen=no; \
     442        target=`echo $@ | sed s/-recursive//`; \
     443        list='$(SUBDIRS)'; for subdir in $$list; do \
     444          echo "Making $$target in $$subdir"; \
     445          if test "$$subdir" = "."; then \
     446            dot_seen=yes; \
     447            local_target="$$target-am"; \
     448          else \
     449            local_target="$$target"; \
     450          fi; \
     451          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     452          || eval $$failcom; \
     453        done; \
     454        if test "$$dot_seen" = "no"; then \
     455          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
     456        fi; test -z "$$fail"
     457
     458mostlyclean-recursive clean-recursive distclean-recursive \
     459maintainer-clean-recursive:
     460        @failcom='exit 1'; \
     461        for f in x $$MAKEFLAGS; do \
     462          case $$f in \
     463            *=* | --[!k]*);; \
     464            *k*) failcom='fail=yes';; \
     465          esac; \
     466        done; \
     467        dot_seen=no; \
     468        case "$@" in \
     469          distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
     470          *) list='$(SUBDIRS)' ;; \
     471        esac; \
     472        rev=''; for subdir in $$list; do \
     473          if test "$$subdir" = "."; then :; else \
     474            rev="$$subdir $$rev"; \
     475          fi; \
     476        done; \
     477        rev="$$rev ."; \
     478        target=`echo $@ | sed s/-recursive//`; \
     479        for subdir in $$rev; do \
     480          echo "Making $$target in $$subdir"; \
     481          if test "$$subdir" = "."; then \
     482            local_target="$$target-am"; \
     483          else \
     484            local_target="$$target"; \
     485          fi; \
     486          (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
     487          || eval $$failcom; \
     488        done && test -z "$$fail"
     489tags-recursive:
     490        list='$(SUBDIRS)'; for subdir in $$list; do \
     491          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
     492        done
     493ctags-recursive:
     494        list='$(SUBDIRS)'; for subdir in $$list; do \
     495          test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
     496        done
    389497
    390498ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    398506tags: TAGS
    399507
    400 TAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     508TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    401509                $(TAGS_FILES) $(LISP)
    402510        tags=; \
    403511        here=`pwd`; \
     512        if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
     513          include_option=--etags-include; \
     514          empty_fix=.; \
     515        else \
     516          include_option=--include; \
     517          empty_fix=; \
     518        fi; \
     519        list='$(SUBDIRS)'; for subdir in $$list; do \
     520          if test "$$subdir" = .; then :; else \
     521            test ! -f $$subdir/TAGS || \
     522              tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
     523          fi; \
     524        done; \
    404525        list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
    405526        unique=`for i in $$list; do \
     
    414535        fi
    415536ctags: CTAGS
    416 CTAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
     537CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
    417538                $(TAGS_FILES) $(LISP)
    418539        tags=; \
     
    463584          fi; \
    464585        done
     586        list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
     587          if test "$$subdir" = .; then :; else \
     588            test -d "$(distdir)/$$subdir" \
     589            || $(mkdir_p) "$(distdir)/$$subdir" \
     590            || exit 1; \
     591            distdir=`$(am__cd) $(distdir) && pwd`; \
     592            top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
     593            (cd $$subdir && \
     594              $(MAKE) $(AM_MAKEFLAGS) \
     595                top_distdir="$$top_distdir" \
     596                distdir="$$distdir/$$subdir" \
     597                distdir) \
     598              || exit 1; \
     599          fi; \
     600        done
    465601check-am: all-am
    466 check: check-am
     602check: check-recursive
    467603all-am: Makefile $(LIBRARIES)
    468 installdirs:
    469 install: install-am
    470 install-exec: install-exec-am
    471 install-data: install-data-am
    472 uninstall: uninstall-am
     604installdirs: installdirs-recursive
     605installdirs-am:
     606install: install-recursive
     607install-exec: install-exec-recursive
     608install-data: install-data-recursive
     609uninstall: uninstall-recursive
    473610
    474611install-am: all-am
    475612        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
    476613
    477 installcheck: installcheck-am
     614installcheck: installcheck-recursive
    478615install-strip:
    479616        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
     
    492629        @echo "This command is intended for maintainers to use"
    493630        @echo "it deletes files that may require special tools to rebuild."
    494 clean: clean-am
     631clean: clean-recursive
    495632
    496633clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
    497634
    498 distclean: distclean-am
     635distclean: distclean-recursive
    499636        -rm -rf ./$(DEPDIR)
    500637        -rm -f Makefile
     
    502639        distclean-tags
    503640
    504 dvi: dvi-am
     641dvi: dvi-recursive
    505642
    506643dvi-am:
    507644
    508 html: html-am
    509 
    510 info: info-am
     645html: html-recursive
     646
     647info: info-recursive
    511648
    512649info-am:
     
    516653install-exec-am:
    517654
    518 install-info: install-info-am
     655install-info: install-info-recursive
    519656
    520657install-man:
     
    522659installcheck-am:
    523660
    524 maintainer-clean: maintainer-clean-am
     661maintainer-clean: maintainer-clean-recursive
    525662        -rm -rf ./$(DEPDIR)
    526663        -rm -f Makefile
    527664maintainer-clean-am: distclean-am maintainer-clean-generic
    528665
    529 mostlyclean: mostlyclean-am
     666mostlyclean: mostlyclean-recursive
    530667
    531668mostlyclean-am: mostlyclean-compile mostlyclean-generic
    532669
    533 pdf: pdf-am
     670pdf: pdf-recursive
    534671
    535672pdf-am:
    536673
    537 ps: ps-am
     674ps: ps-recursive
    538675
    539676ps-am:
     
    541678uninstall-am: uninstall-info-am
    542679
    543 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
    544         clean-noinstLIBRARIES ctags distclean distclean-compile \
    545         distclean-generic distclean-tags distdir dvi dvi-am html \
    546         html-am info info-am install install-am install-data \
    547         install-data-am install-exec install-exec-am install-info \
    548         install-info-am install-man install-strip installcheck \
    549         installcheck-am installdirs maintainer-clean \
    550         maintainer-clean-generic mostlyclean mostlyclean-compile \
    551         mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
    552         uninstall-am uninstall-info-am
     680uninstall-info: uninstall-info-recursive
     681
     682.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
     683        clean clean-generic clean-noinstLIBRARIES clean-recursive \
     684        ctags ctags-recursive distclean distclean-compile \
     685        distclean-generic distclean-recursive distclean-tags distdir \
     686        dvi dvi-am html html-am info info-am install install-am \
     687        install-data install-data-am install-exec install-exec-am \
     688        install-info install-info-am install-man install-strip \
     689        installcheck installcheck-am installdirs installdirs-am \
     690        maintainer-clean maintainer-clean-generic \
     691        maintainer-clean-recursive mostlyclean mostlyclean-compile \
     692        mostlyclean-generic mostlyclean-recursive pdf pdf-am ps ps-am \
     693        tags tags-recursive uninstall uninstall-am uninstall-info-am
    553694
    554695
  • trunk/Apps/AmplSolver/AmplTNLP.cpp

    r424 r511  
    1 // Copyright (C) 2004, International Business Machines and others.
     1// Copyright (C) 2004, 2005 International Business Machines and others.
    22// All Rights Reserved.
    33// This code is published under the Common Public License.
     
    77// Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
    88
    9 // TODO:
    10 // - clean up the boolean for initialization
    11 // - pass in a tag so we can know when x has changed
    12 // - look closer at the interface - it should pass in non-zeros as well as m in the jacobian stuff (maybe hessian stuff)
    13 
    149#include "AmplTNLP.hpp"
    1510#include "IpDenseVector.hpp"
     
    1712#include "IpSymTMatrix.hpp"
    1813#include "IpBlas.hpp"
    19 #include "IpInterfaceTypes.hpp"
    2014
    2115/* AMPL includes */
    22 //extern "C"
    23 //{
    2416#include "asl.h"
    2517#include "asl_pfgh.h"
    2618#include "getstub.h"
    27 //}
    2819
    2920namespace Ipopt
    3021{
    31   DBG_SET_VERBOSITY(0);
    32 
    33   AmplTNLP::AmplTNLP(const SmartPtr<const Journalist>& jnlst, char**& argv,
     22#ifdef IP_DEBUG
     23  static const Index dbg_verbosity = 0;
     24#endif
     25
     26  AmplTNLP::AmplTNLP(const SmartPtr<const Journalist>& jnlst,
     27                     const SmartPtr<OptionsList> options,
     28                     char**& argv,
    3429                     SmartPtr<AmplSuffixHandler> suffix_handler /* = NULL */,
    3530                     bool allow_discrete /* = false */)
    3631      :
    3732      TNLP(),
    38       jnlst_(ConstPtr(jnlst)),
     33      jnlst_(jnlst),
    3934      asl_(NULL),
    4035      obj_sign_(1),
     
    6560
    6661    // Read the options and stub
    67     // ToDo: Figure out the options stuff
    68     char* stub = getstub(&argv, NULL); // need to deal with options here
     62