42 #ifndef EXAMPLE_NLP_OBJ_GRADIENT_H
43 #define EXAMPLE_NLP_OBJ_GRADIENT_H
45 #include "NLPInterfacePack_NLPObjGrad.hpp"
46 #include "AbstractLinAlgPack_VectorMutable.hpp"
47 #include "AbstractLinAlgPack_VectorSpace.hpp"
48 #include "AbstractLinAlgPack_VectorSpaceBlocked.hpp"
49 #include "Teuchos_Assert.hpp"
51 namespace NLPInterfacePack {
89 const VectorSpace::space_ptr_t& vec_space
127 const Vector&
xinit()
const;
129 const Vector&
xl()
const;
131 const Vector&
xu()
const;
141 ,
const Vector* lambda
155 const Vector& x,
bool newx
159 const Vector& x,
bool newx
171 const Vector& x,
bool newx
181 VectorSpace::space_ptr_t vec_space_;
182 VectorSpace::space_ptr_t vec_space_comp_;
187 value_type obj_scale_;
189 bool force_xinit_in_bounds_;
192 VectorSpace::vec_mut_ptr_t xinit_;
193 VectorSpace::vec_mut_ptr_t xl_;
194 VectorSpace::vec_mut_ptr_t xu_;
200 void assert_is_initialized()
const;
208 void ExampleNLPObjGrad::assert_is_initialized()
const
213 ,
"ExampleNLPObjGrad::assert_is_initialized() : Error, "
214 "ExampleNLPObjGrad::initialize() has not been called yet." );
219 #endif // EXAMPLE_NLP_OBJ_GRADIENT_H
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const Vector & xu() const
const ZeroOrderInfo zero_order_info() const
void imp_calc_f(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
void report_final_solution(const Vector &x, const Vector *lambda, const Vector *nu, bool optimal)
const Vector & xinit() const
virtual Range1D var_dep() const
bool is_initialized() const
void imp_calc_c(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
bool force_xinit_in_bounds() const
size_type num_bounded_x() const
void imp_calc_h(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
This implementation does nothing (should never be called though).
Simple example NLP subclass to illustrate how to implement the NLPObjGrad interface for a specialized...
value_type scale_f() const
virtual Range1D var_indep() const
vec_space_ptr_t space_x() const
ExampleNLPObjGrad(const VectorSpace::space_ptr_t &vec_space, value_type xo, bool has_bounds, bool dep_bounded)
Constructor.
void initialize(bool test_setup)
const Vector & xl() const
value_type max_var_bounds_viol() const
vec_space_ptr_t space_c() const
void imp_calc_Gf(const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const