51 namespace MoochoPack {
54 const null_space_step_ptr_t& null_space_step
56 :null_space_step_(null_space_step)
57 ,last_qp_failure_k_(-100)
66 return null_space_step().do_step(_algo,step_poss,type,assoc_step_poss);
75 out <<
"\nQP failed! "
76 <<
" (k = " << algo.
state().
k() <<
")\n"
77 <<
"QPFailure description: " << qp_excpt.what() <<
"\n";
79 if( s.
k() >= algo.algo_cntr().
max_iter() ) {
81 out <<
"\nThe maximum number of rSQP iterations\n"
82 <<
" have been exceeded so quit "
83 <<
" (k = " << algo.
state().
k() <<
")\n";
90 out <<
"\nThe QP failed again even with a new reduced Hessian rHL_k!"
91 <<
" (k = " << algo.
state().
k() <<
")\n"
97 out <<
"\nWiping out all memory for rHL and going back to reinitalize it ..."
98 <<
" (k = " << algo.
state().
k() <<
")\n";
102 out <<
"Wipe out all update rHL_{k} for all k\n"
103 <<
"goto ReducedHessian\n";
105 s.rHL().set_all_not_updated();
115 ,std::ostream&
out,
const std::string& L
119 << L <<
"do null space step : " <<
typeName(null_space_step()) << std::endl;
120 null_space_step().print_step(algo,step_poss,type,assoc_step_poss,out,L+
" ");
122 << L <<
"end null space step\n"
123 << L <<
"if QPFailure was thrown then\n"
124 << L <<
" if QP failed already then\n"
125 << L <<
" rethrow QPFailure\n"
127 << L <<
" if k > max_iter then\n"
128 << L <<
" terminate the algorithm!\n"
130 << L <<
" set all rHL_{k} to not updated\n"
131 << L <<
" goto ReducedHessian\n"
std::string typeName(const T &t)
virtual void max_iter(size_t max_iter)
Thrown if a the QP failed and was not corrected.
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
rSQP Algorithm control class.
QPFailureReinitReducedHessian_Step()
virtual void terminate(bool success)
Called by step objects to terminate the algorithm.
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
EJournalOutputLevel
enum for journal output.
Reduced space SQP state encapsulation interface.
virtual void do_step_next(const std::string &step_name)
Called by step objects to set the step (given its name) that this will envoke the next time this call...
AlgorithmTracker & track()
Acts as the central hub for an iterative algorithm.
NLPAlgoState & rsqp_state()
<<std aggr>="">> members for algo_cntr
const std::string ReducedHessian_name
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
NLPAlgo & rsqp_algo(Algorithm &algo)
Convert from a Algorithm to a NLPAlgo.