51 namespace MoochoPack {
54 const line_search_step_ptr_t &line_search_step
55 ,
const new_decomp_strategy_ptr_t &new_decomp_strategy
57 :line_search_step_(line_search_step)
58 ,new_decomp_strategy_(new_decomp_strategy)
59 ,last_ls_failure_k_(-100)
67 return line_search_step().do_step(_algo,step_poss,type,assoc_step_poss);
77 out <<
"\nLine search failed "
78 <<
" (k = " << algo.
state().
k() <<
")\n"
79 <<
"LineSearchFailure description: " << lsf_excpt.what() <<
"\n";
84 out <<
"\nThe line search failed again even with a new decomposition!"
85 <<
" (k = " << algo.
state().
k() <<
")\n"
92 out <<
"\nSelecting a new decomposition..."
93 <<
" (k = " << algo.
state().
k() <<
")\n";
97 return new_decomp_strategy().new_decomposition(algo,step_poss,type,assoc_step_poss);
105 ,std::ostream&
out,
const std::string& L
109 << L <<
"do line search step : " <<
typeName(line_search_step()) << std::endl;
110 line_search_step().print_step(algo,step_poss,type,assoc_step_poss,out,L+
" ");
112 << L <<
"end line search step\n"
113 << L <<
"if thrown line_search_failure then\n"
114 << L <<
" if line search failed at the last iteration also then\n"
115 << L <<
" throw line_search_failure\n"
117 << L <<
" new decomposition selection : " <<
typeName(new_decomp_strategy()) << std::endl
119 new_decomp_strategy().print_new_decomposition(
120 rsqp_algo(algo),step_poss,type,assoc_step_poss,out, L +
" " );
122 << L <<
" end new decomposition selection\n"
void print_step(const Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss, std::ostream &out, const std::string &leading_str) const
std::string typeName(const T &t)
rSQP Algorithm control class.
LineSearchFailureNewDecompositionSelection_Step()
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
Thrown if a line search failure occurs.
EJournalOutputLevel
enum for journal output.
Reduced space SQP state encapsulation interface.
AlgorithmTracker & track()
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
Acts as the central hub for an iterative algorithm.
NLPAlgoState & rsqp_state()
<<std aggr>="">> members for algo_cntr
NLPAlgo & rsqp_algo(Algorithm &algo)
Convert from a Algorithm to a NLPAlgo.