42 #ifndef EXAMPLE_NLP_OBJ_GRADIENT_H
43 #define EXAMPLE_NLP_OBJ_GRADIENT_H
51 namespace NLPInterfacePack {
89 const VectorSpace::space_ptr_t& vec_space
155 const Vector& x,
bool newx
159 const Vector& x,
bool newx
171 const Vector& x,
bool newx
193 VectorSpace::vec_mut_ptr_t
xl_;
194 VectorSpace::vec_mut_ptr_t
xu_;
213 ,
"ExampleNLPObjGrad::assert_is_initialized() : Error, "
214 "ExampleNLPObjGrad::initialize() has not been called yet." );
219 #endif // EXAMPLE_NLP_OBJ_GRADIENT_H
NLP interface class that adds gradient information for the objective function {abstract}.
AbstractLinAlgPack::size_type size_type
Struct for gradient (objective), objective and constriants (pointers)
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
VectorSpace::space_ptr_t vec_space_comp_
VectorSpace::space_ptr_t vec_space_
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const Vector & xu() const
const ZeroOrderInfo zero_order_info() const
Return pointer to set quantities.
const ObjGradInfo obj_grad_info() const
Return objective gradient and zero order information.
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 assert_is_initialized() const
void imp_calc_c(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
VectorSpace::vec_mut_ptr_t xu_
bool force_xinit_in_bounds_
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...
VectorSpace::vec_mut_ptr_t xl_
value_type scale_f() const
Struct for objective and constriants (pointer).
NLP interface class {abstract}.
Thrown if any member functions are called before initialize() has been called.
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.
NLP()
Initialize to no reference set to calculation quanities.
void initialize(bool test_setup)
AbstractLinAlgPack::value_type value_type
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
RangePack::Range1D Range1D
VectorSpace::vec_mut_ptr_t xinit_