46 #include "MoochoPack_LineSearchFullStepAfterKIter_Step.hpp"
47 #include "MoochoPack_moocho_algo_conversion.hpp"
48 #include "IterationPack_print_algorithm_step.hpp"
51 , poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)
53 NLPAlgo &algo = rsqp_algo(_algo);
54 NLPAlgoState &s = algo.rsqp_state();
55 NLP &nlp = algo.nlp();
57 EJournalOutputLevel olevel = algo.algo_cntr().journal_output_level();
58 std::ostream& out = algo.track().journal_out();
59 out << std::boolalpha;
62 if( (
int)olevel >= (
int)PRINT_ALGORITHM_STEPS ) {
63 using IterationPack::print_algorithm_step;
64 print_algorithm_step( algo, step_poss, type, assoc_step_poss, out );
69 if( (
int)olevel >= (
int)PRINT_ALGORITHM_STEPS ) {
70 out <<
"\nk = " << s.k() << ( take_full_step ?
" > " :
" < ")
74 if( !take_full_step ) {
75 return line_search().do_step(_algo,step_poss,type,assoc_step_poss);
78 if( (
int)olevel >= (
int)PRINT_ALGORITHM_STEPS ) {
79 out <<
"\nKeep the full step...\n";
87 , poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss
88 , std::ostream& out,
const std::string& L )
const
90 out << L <<
"*** Start using full steps after full_steps_after_k iterations.\n"
91 << L <<
"default: full_steps_after_k = very big\n";
92 out << L <<
"if k < full_steps_after_k then\n";
93 line_search().print_step(algo,step_poss,type,assoc_step_poss,out,L +
" " );
value_type full_steps_after_k() const
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
bool do_step(Algorithm &algo, poss_type step_poss, IterationPack::EDoStepType type, poss_type assoc_step_poss)