00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
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_;
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 };
00102
00103 }
00104
00105 #endif // LINE_SEARCH_WATCH_DOG_STEP_H