MoochoPack_NLPAlgoConfigIP.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef ALGO_CONFIG_IP_H
00030 #define ALGO_CONFIG_IP_H
00031 
00032 #include "MoochoPack_NLPAlgoConfig.hpp"
00033 #include "MoochoPack_NLPAlgo.hpp"
00034 #include "MoochoPack_DecompositionSystemStateStepBuilderStd.hpp"
00035 #include "OptionsFromStreamPack_OptionsFromStream.hpp"
00036 
00037 namespace MoochoPack {
00038 
00050 class NLPAlgoConfigIP : public NLPAlgoConfig {
00051 public:
00052 
00054   NLPAlgoConfigIP();
00055 
00057   ~NLPAlgoConfigIP();
00058 
00061 
00072   void set_options( const options_ptr_t& options );
00074   const options_ptr_t& get_options() const;
00076   void config_algo_cntr(NLPAlgoContainer* algo_cntr, std::ostream* trase_out);
00078   void init_algo(NLPAlgoInterface* algo);
00079 
00081 
00082 public:
00083 
00086 
00088   enum EQuasiNewton {
00089     QN_AUTO, QN_BFGS, QN_PBFGS, QN_LBFGS, QN_LPBFGS };
00091   enum EHessianInitialization {
00092     INIT_HESS_AUTO, INIT_HESS_IDENTITY, INIT_HESS_FIN_DIFF_SCALE_IDENTITY
00093     , INIT_HESS_FIN_DIFF_SCALE_DIAGONAL, INIT_HESS_FIN_DIFF_SCALE_DIAGONAL_ABS };
00095   enum EQPSolverType {
00096     QP_AUTO, QP_QPSOL, QP_QPOPT, QP_QPKWIK, QP_QPSCHUR };
00098   enum ELineSearchMethod {
00099     LINE_SEARCH_AUTO, LINE_SEARCH_NONE, LINE_SEARCH_DIRECT
00100     , LINE_SEARCH_2ND_ORDER_CORRECT, LINE_SEARCH_WATCHDOG
00101     , LINE_SEARCH_FILTER };
00103   enum EMeritFunctionType {
00104     MERIT_FUNC_AUTO, MERIT_FUNC_L1, MERIT_FUNC_MOD_L1
00105     , MERIT_FUNC_MOD_L1_INCR };
00107   enum EL1PenaltyParamUpdate {
00108     L1_PENALTY_PARAM_AUTO, L1_PENALTY_PARAM_WITH_MULT
00109     , L1_PENALTY_PARAM_MULT_FREE };
00110 
00112 
00115 
00117   struct SOptionValues {
00118     // Constructor (sets default values)
00119     SOptionValues();
00120     // Variable Reduction,  Range/Null space decompositions
00121     value_type        max_basis_cond_change_frac_;  // If < , don't change default
00122     // Reduced Hessian Approximations
00123     bool          exact_reduced_hessian_;
00124     EQuasiNewton      quasi_newton_;
00125     int           num_lbfgs_updates_stored_;      // If < 0, don't change default
00126     bool          lbfgs_auto_scaling_;
00127     EHessianInitialization  hessian_initialization_;
00128     // QP subproblem solvers
00129     EQPSolverType     qp_solver_type_;
00130     bool                    reinit_hessian_on_qp_fail_;
00131     // Line search methods
00132     ELineSearchMethod   line_search_method_;
00133     EMeritFunctionType    merit_function_type_;
00134     EL1PenaltyParamUpdate l1_penalty_param_update_;
00135     int           full_steps_after_k_;      // If < 0, do not use this option at all.
00136   };
00137 
00139 
00140 private:
00141 
00143   DecompositionSystemStateStepBuilderStd   decomp_sys_step_builder_;
00144 
00146   options_ptr_t      options_;
00147 
00149   SOptionValues       uov_; // options set by user
00150   SOptionValues       cov_; // current option values actually used
00151 
00152   // ///////////////////////////////////////////////////////
00153   // Private member functions
00154 
00156   static void readin_options(
00157     const OptionsFromStreamPack::OptionsFromStream& options
00158     , SOptionValues *option_values, std::ostream* trase_out );
00159 
00161   static void set_default_options(
00162     const SOptionValues& user_option_values
00163     , SOptionValues *current_option_values
00164     , std::ostream* trase_out );
00165 
00166 };  // end class NLPAlgoConfigIP
00167 
00177 } // end namespace MoochoPack 
00178 
00179 #endif  // ALGO_CONFIG_IP_H

Generated on Wed May 12 21:51:20 2010 for MoochoPack : Framework for Large-Scale Optimization Algorithms by  doxygen 1.4.7