50 const char name_f[] =
"f";
51 const char name_c[] =
"c";
52 const char name_c_breve[] =
"c_breve";
53 const char name_h_breve[] =
"h_breve";
57 namespace NLPInterfacePack {
102 VectorSpace::space_ptr_t spc = this->
space_c();
103 return spc.get() ? spc->dim() : 0;
243 return space_h_breve.
get() ? space_h_breve->dim() : 0;
259 true, std::logic_error
260 ,
"NLP::hl_breve(): Error, this method must be overridden if space_h_breve is defined" );
274 true, std::logic_error
275 ,
"NLP::hl_breve(): Error, this method must be overridden if space_h_breve is defined" );
404 true, std::logic_error
405 ,
"NLP::hl_breve(): Error, this method must be overridden if space_h_breve is defined" );
virtual value_type & f()
Returns non-const *this->get_f().
AbstractLinAlgPack::size_type size_type
virtual void calc_c(const Vector &x, bool newx=true) const
Update the constraint residual vector for c at the point x and put it in the stored reference...
VectorMutable * c
Pointer to constraints residual c (Will be NULL if not set)
virtual size_type ns() const
Return the number of slack variables (i.e. number of general inequalities).
virtual const VectorSpace & space() const =0
Return the vector space that this vector belongs to.
virtual void report_final_solution(const Vector &x, const Vector *lambda, const Vector *nu, bool is_optimal)
Used by the solver to report the final solution and multipliers.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
virtual size_type num_c_evals() const
Gives the number of constraint function c(x) evaluations called by the solver since initialize() was ...
virtual VectorMutable & c_breve()
Returns non-const *this->get_c_breve().
virtual VectorMutable * get_c_breve()
Return pointer passed to this->set_c_breve().
virtual vec_space_ptr_t space_x() const =0
Vector space object for unknown variables x (dimension n).
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
virtual vec_space_ptr_t space_c_breve() const
Vector space object for the original equalities c_breve(x_breve)
virtual void get_init_lagrange_mult(VectorMutable *lambda, VectorMutable *nu) const
Get the initial value of the Lagrange multipliers lambda.
const ZeroOrderInfo zero_order_info() const
Return pointer to set quantities.
virtual void imp_calc_c_breve(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
Overridden to compute c_breve(x_breve) and perhaps f(x) and/or h_breve(x_breve)
virtual void imp_calc_f(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const =0
Overridden to compute f(x) (and perhaps other quantities if set).
ZeroOrderInfo first_order_info_breve_
virtual void set_options(const options_ptr_t &options)
Set the options that this NLP may be interested in.
virtual void imp_calc_h_breve(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info_breve) const
Overridden to compute h_breve(x_breve) and perhaps f(x) and/or c_breve(x_breve).
virtual void imp_calc_c(const Vector &x, bool newx, const ZeroOrderInfo &zero_order_info) const =0
Overridden to compute c(x) and perhaps f(x) and/or h(x) (if multiple calculaiton = true)...
virtual void unset_quantities()
Call to unset all storage quantities (both in this class and all subclasses).
ContainedClass * get_role_name(ContainedClass *role_name_, bool owns_role_name_, const char name[])
ZeroOrderInfo first_order_info_
virtual const Vector & hl_breve() const
Returns a reference to the vector of lower bounds on the general inequality constraints h_breve(x_bre...
virtual void calc_f(const Vector &x, bool newx=true) const
Update the value for the objective f at the point x and put it in the stored reference.
virtual size_type n() const
Return the number of variables.
virtual vec_space_ptr_t space_c() const =0
Vector space object for general equality constraints c(x) (dimension m).
const ZeroOrderInfo zero_order_info_breve() const
Return pointer to set hat quantities.
virtual size_type num_bounded_x() const =0
Returns the number of variables in x(i) for which xl(i)> -infinite_bound() or xu(i) < +infinite_bound...
virtual void set_c(VectorMutable *c)
Set a pointer to a vector to be updated when this->calc_c() is called.
virtual value_type * get_f()
Return pointer passed to this->set_f().
Teuchos::RCP< const VectorSpace > vec_space_ptr_t
virtual ~NLP()
Destructor that cleans all the memory it owns.
Struct for objective and constriants (pointer).
virtual const options_ptr_t & get_options() const
Get the OptionsFromStream object being used to extract the options from.
virtual vec_space_ptr_t space_h_breve() const
Vector space object for the original inequalities h_breve(x_breve)
virtual const Permutation & P_var() const
Return the permutation object for the variables.
void assert_role_name_set(const ContainedClass *role_name_, const char func_name[], const char name[])
Assert that the reference is set.
NLP()
Initialize to no reference set to calculation quanities.
virtual void set_c_breve(VectorMutable *c_breve)
Set a pointer to a vector to be updated when this->calc_c_breve() is called.
virtual const Permutation & P_equ() const
Return the permutation object for the constraints.
ContainedClass & role_name(ContainedClass *role_name_, bool owns_role_name_, const char name[])
virtual const Vector & hu_breve() const
Returns a reference to the vector of upper bounds on the general inequality constraints h_breve(x_bre...
virtual void calc_h_breve(const Vector &x, bool newx=true) const
Update the constraint residual vector for h_breve at the point x and put it in the stored reference...
AbstractLinAlgPack::value_type value_type
Abstract interface for mutable coordinate vectors {abstract}.
value_type * f
Pointer to objective function f (Will be NULL if not set)
virtual void set_h_breve(VectorMutable *h_breve)
Set a pointer to a vector to be updated when this->calc_h_breve() is called.
virtual void calc_c_breve(const Vector &x, bool newx=true) const
Update the constraint residual vector for c_breve at the point x and put it in the stored reference...
virtual size_type m() const
Return the number of general equality constraints.
virtual void initialize(bool test_setup=false)
Initialize the NLP before it is used.
virtual size_type num_f_evals() const
Gives the number of object function f(x) evaluations called by the solver since initialize() was call...
virtual VectorMutable * get_h_breve()
Return pointer passed to this->set_h_breve().
static value_type infinite_bound()
Value for an infinite bound.
virtual VectorMutable * get_c()
Return pointer passed to this->set_c().
VectorMutable * h
Pointer to inequality constraints h (Will be NULL if not set)
virtual void set_f(value_type *f)
Set a pointer to an value to be updated when this->calc_f() is called.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
virtual VectorMutable & c()
Returns non-const *this->get_c().
virtual VectorMutable & h_breve()
Returns non-const *this->get_h_breve().