- Main Page
- Classes
- Files

- File List
- File Members

# src/Algorithm/IpIpoptAlg.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2004, 2010 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpIpoptAlg.hpp 2167 2013-03-08 11:15:38Z stefan $
    00006 //
    00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
    00008
    00009 #ifndef __IPIPOPTALG_HPP__
    00010 #define __IPIPOPTALG_HPP__
    00011
    00012 #include "IpIpoptNLP.hpp"
    00013 #include "IpAlgStrategy.hpp"
    00014 #include "IpSearchDirCalculator.hpp"
    00015 #include "IpLineSearch.hpp"
    00016 #include "IpMuUpdate.hpp"
    00017 #include "IpConvCheck.hpp"
    00018 #include "IpOptionsList.hpp"
    00019 #include "IpIterateInitializer.hpp"
    00020 #include "IpIterationOutput.hpp"
    00021 #include "IpAlgTypes.hpp"
    00022 #include "IpHessianUpdater.hpp"
    00023 #include "IpEqMultCalculator.hpp"
    00024
    00025 namespace Ipopt
    00026 {
    00027
    00030   DECLARE_STD_EXCEPTION(STEP_COMPUTATION_FAILED);
    00032
    00045   class IpoptAlgorithm : public AlgorithmStrategyObject
    00046   {
    00047   public:
    00048
    00055     IpoptAlgorithm(const SmartPtr<SearchDirectionCalculator>& search_dir_calculator,
    00056                    const SmartPtr<LineSearch>& line_search,
    00057                    const SmartPtr<MuUpdate>& mu_update,
    00058                    const SmartPtr<ConvergenceCheck>& conv_check,
    00059                    const SmartPtr<IterateInitializer>& iterate_initializer,
    00060                    const SmartPtr<IterationOutput>& iter_output,
    00061                    const SmartPtr<HessianUpdater>& hessian_updater,
    00062                    const SmartPtr<EqMultiplierCalculator>& eq_multiplier_calculator = NULL);
    00063
    00065     virtual ~IpoptAlgorithm();
    00067
    00068
    00070     virtual bool InitializeImpl(const OptionsList& options,
    00071                                 const std::string& prefix);
    00072
    00074     SolverReturn Optimize(bool isResto = false);
    00075
    00078     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00080
    00083     SmartPtr<SearchDirectionCalculator> SearchDirCalc()
    00084     {
    00085       return search_dir_calculator_;
    00086     }
    00088
    00089     static void print_copyright_message(const Journalist& jnlst);
    00090
    00091   private:
    00101     IpoptAlgorithm();
    00102
    00104     IpoptAlgorithm(const IpoptAlgorithm&);
    00105
    00107     void operator=(const IpoptAlgorithm&);
    00109
    00112     SmartPtr<SearchDirectionCalculator> search_dir_calculator_;
    00113     SmartPtr<LineSearch> line_search_;
    00114     SmartPtr<MuUpdate> mu_update_;
    00115     SmartPtr<ConvergenceCheck> conv_check_;
    00116     SmartPtr<IterateInitializer> iterate_initializer_;
    00117     SmartPtr<IterationOutput> iter_output_;
    00118     SmartPtr<HessianUpdater> hessian_updater_;
    00121     SmartPtr<EqMultiplierCalculator> eq_multiplier_calculator_;
    00123
    00130     void UpdateHessian();
    00131
    00136     bool UpdateBarrierParameter();
    00137
    00142     bool ComputeSearchDirection();
    00143
    00147     void ComputeAcceptableTrialPoint();
    00148
    00151     void AcceptTrialPoint();
    00152
    00154     void OutputIteration();
    00155
    00159     void InitializeIterates();
    00160
    00162     void PrintProblemStatistics();
    00163
    00165     void ComputeFeasibilityMultipliers();
    00167
    00171     bool skip_print_problem_stats_;
    00173
    00180     Number kappa_sigma_;
    00184     bool recalc_y_;
    00186     Number recalc_y_feas_tol_;
    00190     bool mehrotra_algorithm_;
    00192     std::string linear_solver_;
    00194
    00197     void calc_number_of_bounds(
    00198       const Vector& x,
    00199       const Vector& x_L,
    00200       const Vector& x_U,
    00201       const Matrix& Px_L,
    00202       const Matrix& Px_U,
    00203       Index& n_tot,
    00204       Index& n_only_lower,
    00205       Index& n_both,
    00206       Index& n_only_upper);
    00207
    00215     Number correct_bound_multiplier(const Vector& trial_z,
    00216                                     const Vector& trial_slack,
    00217                                     const Vector& trial_compl,
    00218                                     SmartPtr<const Vector>& new_trial_z);
    00220   };
    00221
    00222 } // namespace Ipopt
    00223
    00224 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines