48 #include "MoochoPack_NLPAlgoContainer.hpp"
49 #include "MoochoPack_NLPAlgoInterface.hpp"
50 #include "MoochoPack_NLPAlgoState.hpp"
51 #include "NLPInterfacePack_NLP.hpp"
52 #include "Teuchos_Assert.hpp"
66 ,( m && s.lambda().updated_k(0) ) ? &s.lambda().get_k(0) : NULL
67 ,( nb && s.nu().updated_k(0) ) ? &s.nu().get_k(0) : NULL
75 namespace MoochoPack {
81 algo_ = Teuchos::null;
115 solve_return = algo().dispatch();
118 report_final_point(algo().retrieve_state(),
false,&nlp());
121 report_final_point(algo().retrieve_state(),solve_return==NLPSolverClientInterface::SOLUTION_FOUND,&nlp());
127 assert_valid_setup();
128 if(!get_algo().
get())
134 algo().interface_print_algorithm(out);
139 algo().interface_set_algo_timing(algo_timing);
144 return algo().interface_algo_timing();
148 std::ostream& out )
const
150 algo().interface_print_algorithm_times(out);
153 void NLPAlgoContainer::assert_valid_setup()
const {
156 ,
"NLPAlgoContainer::assert_valid_setup() : The NLP object has not been set" );
159 ,
"NLPAlgoContainer::assert_valid_setup() : The AlgorithmTracker object has not been set" );
162 ,
"NLPAlgoContainer::assert_valid_setup() : The NLPAlgoConfig object has not been set" );
virtual void init_algo(NLPAlgoInterface *algo)=0
Initialize the rSQP algorithm object for the start of SQP iterations.
virtual void report_final_solution(const Vector &x, const Vector *lambda, const Vector *nu, bool is_optimal)
void set_config(const config_ptr_t &config)
EFindMinReturn find_min()
virtual void config_algo_cntr(NLPAlgoContainer *algo_cntr, std::ostream *trase_out=0)=0
Configure the rSQP algorithm container with an rSQP algorithm object.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual T_info & get_k(int offset)=0
void print_algorithm_times(std::ostream &out) const
virtual bool updated_k(int offset) const =0
void print_algorithm(std::ostream &out) const
Reduced space SQP state encapsulation interface.
virtual size_type num_bounded_x() const =0
void configure_algorithm(std::ostream *trase_out)
Interface for objects responsible for configuring an rSQP algorithm.
Thrown if the setup is not valid.
virtual size_type m() const
void set_algo_timing(bool algo_timing)
config_ptr_t & get_config()