- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

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

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2006 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Common Public License.
    00004 //
    00005 // $Id: IpPDPerturbationHandler.hpp 759 2006-07-07 03:07:08Z 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     bool ConsiderNewSystem(Number& delta_x, Number& delta_s,
    00047                            Number& delta_c, Number& delta_d);
    00048
    00053     bool PerturbForSingularity(Number& delta_x, Number& delta_s,
    00054                                Number& delta_c, Number& delta_d);
    00055
    00060     bool PerturbForWrongInertia(Number& delta_x, Number& delta_s,
    00061                                 Number& delta_c, Number& delta_d);
    00062
    00065     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   private:
    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       NOT_YET_DETERMINED,
    00123       NOT_DEGENERATE,
    00124       DEGENERATE
    00125     };
    00126
    00129     DegenType hess_degenerate_;
    00130
    00133     DegenType jac_degenerate_;
    00134
    00138     Index degen_iters_;
    00139
    00141     enum TrialStatus {
    00142       NO_TEST,
    00143       TEST_DELTA_C_EQ_0_DELTA_X_EQ_0,
    00144       TEST_DELTA_C_GT_0_DELTA_X_EQ_0,
    00145       TEST_DELTA_C_EQ_0_DELTA_X_GT_0,
    00146       TEST_DELTA_C_GT_0_DELTA_X_GT_0
    00147     };
    00148
    00150     TrialStatus test_status_;
    00152
    00156     Number delta_xs_max_;
    00158     Number delta_xs_min_;
    00160     Number delta_xs_first_inc_fact_;
    00162     Number delta_xs_inc_fact_;
    00164     Number delta_xs_dec_fact_;
    00166     Number delta_xs_init_;
    00168     Number delta_cd_val_;
    00170     Number delta_cd_exp_;
    00174     bool reset_last_;
    00176     Index degen_iters_max_;
    00178
    00184     bool get_deltas_for_wrong_inertia(Number& delta_x, Number& delta_s,
    00185                                       Number& delta_c, Number& delta_d);
    00186
    00190     void finalize_test();
    00192     Number delta_cd();
    00194
    00195   };
    00196
    00197 } // namespace Ipopt
    00198
    00199 #endif