- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/SVN-release/Ipopt-3.7.1/Ipopt/src/Algorithm/IpPDPerturbationHandler.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2007 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Common Public License.
    00004 //
    00005 // $Id: IpPDPerturbationHandler.hpp 1019 2007-06-24 03:52:34Z andreasw $
    00006 //
    00007 // Authors:  Carl Laird, Andreas Waechter              IBM    2005-08-04
    00008
    00009 #ifndef __IPPDPERTURBATIONHANDLER_HPP__
    00010 #define __IPPDPERTURBATIONHANDLER_HPP__
    00011
    00012 #include "IpAlgStrategy.hpp"
    00013
    00014 namespace Ipopt
    00015 {
    00016
    00024   class PDPerturbationHandler: public AlgorithmStrategyObject
    00025   {
    00026   public:
    00030     PDPerturbationHandler();
    00032     virtual ~PDPerturbationHandler()
    00033     {}
    00035
    00036     /* overloaded from AlgorithmStrategyObject */
    00037     virtual bool InitializeImpl(const OptionsList& options,
    00038                                 const std::string& prefix);
    00039
    00046     virtual bool ConsiderNewSystem(Number& delta_x, Number& delta_s,
    00047                                    Number& delta_c, Number& delta_d);
    00048
    00053     virtual bool PerturbForSingularity(Number& delta_x, Number& delta_s,
    00054                                        Number& delta_c, Number& delta_d);
    00055
    00060     virtual bool PerturbForWrongInertia(Number& delta_x, Number& delta_s,
    00061                                         Number& delta_c, Number& delta_d);
    00062
    00065     virtual void CurrentPerturbation(Number& delta_x, Number& delta_s,
    00066                                      Number& delta_c, Number& delta_d);
    00067
    00070     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00072
    00073   protected:
    00083     PDPerturbationHandler(const PDPerturbationHandler&);
    00084
    00086     void operator=(const PDPerturbationHandler&);
    00088
    00092     Number delta_x_last_;
    00094     Number delta_s_last_;
    00096     Number delta_c_last_;
    00098     Number delta_d_last_;
    00100
    00105     Number delta_x_curr_;
    00107     Number delta_s_curr_;
    00109     Number delta_c_curr_;
    00111     Number delta_d_curr_;
    00113
    00116     bool get_deltas_for_wrong_inertia_called_;
    00117
    00121     enum DegenType
    00122     {
    00123       NOT_YET_DETERMINED,
    00124       NOT_DEGENERATE,
    00125       DEGENERATE
    00126     };
    00127
    00130     DegenType hess_degenerate_;
    00131
    00134     DegenType jac_degenerate_;
    00135
    00139     Index degen_iters_;
    00140
    00142     enum TrialStatus
    00143     {
    00144       NO_TEST,
    00145       TEST_DELTA_C_EQ_0_DELTA_X_EQ_0,
    00146       TEST_DELTA_C_GT_0_DELTA_X_EQ_0,
    00147       TEST_DELTA_C_EQ_0_DELTA_X_GT_0,
    00148       TEST_DELTA_C_GT_0_DELTA_X_GT_0
    00149     };
    00150
    00152     TrialStatus test_status_;
    00154
    00158     Number delta_xs_max_;
    00160     Number delta_xs_min_;
    00162     Number delta_xs_first_inc_fact_;
    00164     Number delta_xs_inc_fact_;
    00166     Number delta_xs_dec_fact_;
    00168     Number delta_xs_init_;
    00170     Number delta_cd_val_;
    00172     Number delta_cd_exp_;
    00176     bool reset_last_;
    00178     Index degen_iters_max_;
    00181     bool perturb_always_cd_;
    00183
    00189     bool get_deltas_for_wrong_inertia(Number& delta_x, Number& delta_s,
    00190                                       Number& delta_c, Number& delta_d);
    00191
    00195     void finalize_test();
    00197     Number delta_cd();
    00199
    00200   };
    00201
    00202 } // namespace Ipopt
    00203
    00204 #endif