|
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_WATCH_DOG_STEP_H 00030 #define LINE_SEARCH_WATCH_DOG_STEP_H 00031 00032 #include "rSQPAlgo_StepBaseClasses.h" 00033 #include "ConstrainedOptPack_MeritFuncNLP.hpp" 00034 #include "ConstrainedOptPack_DirectLineSearch_Strategy.hpp" 00035 #include "DenseLinAlgPack_DVectorClass.hpp" 00036 #include "Teuchos_StandardCompositionMacros.hpp" 00037 #include "MiStandardAggregationMacros.h" 00038 #include "Teuchos_StandardMemberCompositionMacros.hpp" 00039 00040 namespace MoochoPack { 00041 00048 class LineSearchWatchDog_Step : public LineSearch_Step { 00049 public: 00050 00052 STANDARD_COMPOSITION_MEMBERS(DirectLineSearch_Strategy,direct_line_search); 00053 00055 STANDARD_COMPOSITION_MEMBERS(MeritFuncNLP,merit_func); 00056 00059 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, eta ); 00060 00064 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, opt_kkt_err_threshold ); 00065 00069 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, feas_kkt_err_threshold ); 00070 00072 LineSearchWatchDog_Step( 00073 const direct_line_search_ptr_t& direct_line_search = 0 00074 , const merit_func_ptr_t& merit_func = 0 00075 , value_type eta = 1e-4 00076 , value_type opt_kkt_err_threshold = 1e-1 00077 , value_type feas_kkt_err_threshold = 1e-3 00078 ); 00079 00080 // //////////////////// 00081 // Overridden 00082 00084 bool do_step(Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00085 , poss_type assoc_step_poss); 00086 00088 void print_step( const Algorithm& algo, poss_type step_poss, IterationPack::EDoStepType type 00089 , poss_type assoc_step_poss, std::ostream& out, const std::string& leading_str ) const; 00090 00091 private: 00092 int watch_k_; // >= 0 means that we are using the watchdog. 00093 DVector xo_; 00094 value_type fo_; 00095 value_type nrm_co_; 00096 DVector do_; 00097 value_type phio_; 00098 value_type Dphio_; 00099 value_type phiop1_; 00100 00101 }; // end class LineSearchWatchDog_Step 00102 00103 } // end namespace MoochoPack 00104 00105 #endif // LINE_SEARCH_WATCH_DOG_STEP_H
1.7.4