45 #include "NLPInterfacePack_NLPObjGrad.hpp"
47 namespace NLPInterfacePack {
61 void mu(
const value_type
mu);
96 { nlp_->initialize(test_setup); }
99 {
return nlp_->is_initialized(); }
102 { nlp_->set_Gf(Gf); }
105 {
return nlp_->get_Gf(); }
108 {
return nlp_->Gf(); }
111 {
return nlp_->Gf(); }
113 void calc_Gf(
const Vector& x,
bool newx =
true)
const;
116 {
return nlp_->num_Gf_evals(); }
125 { nlp_->force_xinit_in_bounds(force_xinit_in_bounds); }
128 {
return nlp_->force_xinit_in_bounds(); }
131 {
return nlp_->n(); }
134 {
return nlp_->m(); }
137 {
return nlp_->space_x(); }
140 {
return nlp_->space_c(); }
143 {
return nlp_->num_bounded_x(); }
146 {
return nlp_->xl(); }
149 {
return nlp_->xu(); }
152 {
return nlp_->max_var_bounds_viol(); }
155 {
return nlp_->xinit(); }
161 { nlp_->get_init_lagrange_mult(lambda, nu); }
167 {
return nlp_->get_f(); }
170 {
return nlp_->f(); }
172 const value_type&
f()
const
173 {
return nlp_->f(); }
179 {
return nlp_->get_c(); }
182 {
return nlp_->c(); }
185 {
return nlp_->c(); }
191 {
return nlp_->scale_f(); }
193 void calc_f(
const Vector& x,
bool newx =
true)
const;
196 { nlp_->calc_c(x, newx); }
204 { nlp_->report_final_solution(
205 x, lambda, nu, is_optimal
210 {
return nlp_->num_f_evals(); }
213 {
return nlp_->num_c_evals(); }
216 {
return nlp_->ns(); }
219 {
return nlp_->space_c_breve(); }
222 {
return nlp_->space_h_breve(); }
225 {
return nlp_->hl_breve(); }
228 {
return nlp_->hu_breve(); }
231 { nlp_->set_c_breve(c_breve); }
234 {
return nlp_->get_c_breve(); }
237 {
return nlp_->c_breve(); }
240 {
return nlp_->c_breve(); }
243 { nlp_->set_h_breve(h_breve); }
246 {
return nlp_->get_h_breve(); }
249 {
return nlp_->h_breve(); }
252 {
return nlp_->h_breve(); }
255 {
return nlp_->P_var(); }
258 {
return nlp_->P_equ(); }
261 { nlp_->calc_c_breve(x,newx); }
264 { nlp_->calc_h_breve(x,newx); }
316 mutable value_type barrier_term_;
317 mutable value_type objective_term_;
322 value_type CalculateBarrierTerm(
const Vector& x)
const;
328 #endif // BARRIER_NLP_H
NLP interface class that adds gradient information for the objective function {abstract}.
vec_space_ptr_t space_c_breve() const
value_type barrier_term() const
Get the barrier term. Must be called after calc_f().
vec_space_ptr_t space_c() const
void scale_f(value_type scale_f)
void imp_calc_c(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
const Vector & xu() const
void report_final_solution(const Vector &x, const Vector *lambda, const Vector *nu, bool is_optimal)
void calc_h_breve(const Vector &x, bool newx) const
VectorMutable * get_h_breve()
void calc_f(const Vector &x, bool newx=true) const
Overloaded to include barrier term.
const Vector & xinit() const
size_type num_Gf_evals() const
size_type num_c_evals() const
void InitializeFromNLP(Teuchos::RCP< NLP > original_nlp)
bool is_initialized() const
const ZeroOrderInfo zero_order_info() const
Return pointer to set quantities.
const Teuchos::RCP< Vector > grad_objective_term() const
Get the value of the gradient of the true objective term. Must be called after calc_Gf().
const ObjGradInfo obj_grad_info() const
Return objective gradient and zero order information.
void imp_calc_c_breve(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
void initialize(bool test_setup)
Simple wrapper that provides an objective fn with the barrier term included.
const Vector & c_breve() const
size_type num_bounded_x() const
const Vector & hu_breve() const
const Permutation & P_var() const
const Vector & xl() const
value_type scale_f() const
void mu(const value_type mu)
Set the barrier parameter.
const Vector & Gf() const
vec_space_ptr_t space_h_breve() const
const ZeroOrderInfo zero_order_info_breve() const
Return pointer to set hat quantities.
void set_h_breve(VectorMutable *h_breve)
VectorMutable * get_c_breve()
void set_c(VectorMutable *c)
void get_init_lagrange_mult(VectorMutable *lambda, VectorMutable *nu) const
void set_c_breve(VectorMutable *c_breve)
void imp_calc_h_breve(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
value_type objective_term() const
Get the true objective term value. Must be called after calc_f().
void calc_c(const Vector &x, bool newx=true) const
VectorMutable & c_breve()
void force_xinit_in_bounds(bool force_xinit_in_bounds)
void imp_calc_Gf(const Vector &x, bool newx, const ObjGradInfo &obj_grad_info) const
const Permutation & P_equ() const
const value_type & f() const
size_type num_f_evals() const
const Teuchos::RCP< Vector > grad_barrier_term() const
Get the value of the gradient of the barrier term. Must be called after calc_Gf() ...
void imp_calc_f(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const
bool force_xinit_in_bounds() const
void set_Gf(VectorMutable *Gf)
VectorMutable & h_breve()
void calc_c_breve(const Vector &x, bool newx) const
void set_f(value_type *f)
const Vector & hl_breve() const
vec_space_ptr_t space_x() const
value_type max_var_bounds_viol() const
void calc_Gf(const Vector &x, bool newx=true) const
Overloaded to include barrier term.
const Vector & h_breve() const