|
MoochoPack : Framework for Large-Scale Optimization Algorithms Version of the Day
|
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 LINE_SEARCH_2ND_ORDER_CORRECT_STEP_H 00030 #define LINE_SEARCH_2ND_ORDER_CORRECT_STEP_H 00031 00032 #include "MoochoPack/src/rSQPAlgo_StepBaseClasses.h" 00033 #include "MoochoPack_FeasibilityStep_Strategy.hpp" 00034 #include "ConstrainedOptPack_MeritFuncNLP.hpp" 00035 #include "ConstrainedOptPack_DirectLineSearch_Strategy.hpp" 00036 #include "Teuchos_StandardCompositionMacros.hpp" 00037 #include "MiStandardAggregationMacros.h" 00038 #include "Teuchos_StandardMemberCompositionMacros.hpp" 00039 00040 namespace MoochoPack { 00041 00046 class LineSearch2ndOrderCorrect_Step : public LineSearch_Step { 00047 public: 00048 00050 enum ENewtonOutputLevel { 00051 PRINT_USE_DEFAULT 00052 ,PRINT_NEWTON_NOTHING = 0 00053 ,PRINT_NEWTON_SUMMARY_INFO = 1 00054 ,PRINT_NEWTON_STEPS = 2 00055 ,PRINT_NEWTON_VECTORS = 3 00056 }; 00057 00059 enum EForcedConstrReduction { CONSTR_LESS_X_D, CONSTR_LESS_X }; 00060 00066 STANDARD_COMPOSITION_MEMBERS(DirectLineSearch_Strategy,direct_ls_sqp); 00067 00072 STANDARD_COMPOSITION_MEMBERS(MeritFuncNLP,merit_func); 00073 00079 STANDARD_COMPOSITION_MEMBERS(FeasibilityStep_Strategy,feasibility_step); 00080 00086 STANDARD_COMPOSITION_MEMBERS(DirectLineSearch_Strategy,direct_ls_newton); 00087 00089 LineSearch2ndOrderCorrect_Step( 00090 const direct_ls_sqp_ptr_t& direct_ls_sqp = NULL 00091 ,const merit_func_ptr_t& merit_func = NULL 00092 ,const feasibility_step_ptr_t& feasibility_step = NULL 00093 ,const direct_ls_newton_ptr_t& direct_ls_newton = 0 00094 ,value_type eta = 1.0e-4 00095 ,ENewtonOutputLevel newton_olevel = PRINT_USE_DEFAULT 00096 ,value_type constr_norm_threshold = 1.0 00097 ,value_type constr_incr_ratio = 10.0 00098 ,int after_k_iter = 0 00099 ,EForcedConstrReduction forced_constr_reduction = CONSTR_LESS_X 00100 ,value_type forced_reduct_ratio = 1.0 00101 ,value_type max_step_ratio = 1.0 00102 ,int max_newton_iter = 3 00103 ); 00104 00109 00111 STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type,eta); 00112 00114 STANDARD_MEMBER_COMPOSITION_MEMBERS(ENewtonOutputLevel,newton_olevel); 00115 00117 STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type,constr_norm_threshold); 00118 00120 STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type,constr_incr_ratio); 00121 00123 STANDARD_MEMBER_COMPOSITION_MEMBERS(int,after_k_iter); 00124 00126 STANDARD_MEMBER_COMPOSITION_MEMBERS(EForcedConstrReduction,forced_constr_reduction); 00127 00129 STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type,forced_reduct_ratio); 00130 00132 STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type,max_step_ratio); 00133 00135 STANDARD_MEMBER_COMPOSITION_MEMBERS(int,max_newton_iter); 00136 00138 00139 // //////////////////// 00140 // Overridden 00141 00143 bool do_step(Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00144 , poss_type assoc_step_poss); 00145 00147 void print_step( const Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00148 , poss_type assoc_step_poss, std::ostream& out, const std::string& leading_str ) const; 00149 00150 }; // end class LineSearch2ndOrderCorrect_Step 00151 00152 } // end namespace MoochoPack 00153 00154 #endif // LINE_SEARCH_2ND_ORDER_CORRECT_STEP_H
1.7.4