48 #include "NLPInterfacePack_Types.hpp" 49 #include "AbstractLinAlgPack_VectorMutable.hpp" 50 #include "AbstractLinAlgPack_Permutation.hpp" 51 #include "StandardCompositionRelationshipsPack.hpp" 52 #include "Teuchos_RCP.hpp" 53 #include "Teuchos_VerboseObject.hpp" 56 class OptionsFromStream;
303 class NLP :
virtual public Teuchos::VerboseObject<NLP> {
313 typedef Teuchos::RCP<
321 {
public:
UnInitialized(
const std::string& what_arg) : std::logic_error(what_arg) {}};
329 {
public:
IncompatibleType(
const std::string& what_arg) : std::logic_error(what_arg) {}};
333 {
public:
NoBounds(
const std::string& what_arg) : std::logic_error(what_arg) {}};
338 static value_type infinite_bound();
361 virtual void force_xinit_in_bounds(
bool force_xinit_in_bounds) = 0;
364 virtual bool force_xinit_in_bounds()
const = 0;
376 virtual void set_options(
const options_ptr_t& options );
381 virtual const options_ptr_t& get_options()
const;
395 virtual void initialize(
bool test_setup =
false );
398 virtual bool is_initialized()
const = 0;
439 virtual vec_space_ptr_t space_x()
const = 0;
451 virtual vec_space_ptr_t space_c()
const = 0;
465 virtual size_type num_bounded_x()
const = 0;
474 virtual const Vector& xl()
const = 0;
483 virtual const Vector& xu()
const = 0;
495 virtual value_type max_var_bounds_viol()
const = 0;
512 virtual const Vector& xinit()
const = 0;
531 virtual void get_init_lagrange_mult(
532 VectorMutable* lambda
553 virtual void set_f(value_type* f);
560 virtual value_type* get_f();
568 virtual value_type& f();
576 virtual const value_type& f()
const;
597 virtual void set_c(VectorMutable* c);
600 virtual VectorMutable* get_c();
608 virtual VectorMutable& c();
616 virtual const Vector& c()
const;
639 virtual void unset_quantities();
656 virtual void scale_f( value_type scale_f ) = 0;
663 virtual value_type scale_f()
const = 0;
686 virtual void calc_f(
const Vector& x,
bool newx =
true)
const;
709 virtual void calc_c(
const Vector& x,
bool newx =
true)
const;
730 virtual void report_final_solution(
732 ,
const Vector* lambda
784 virtual vec_space_ptr_t space_c_breve()
const;
799 virtual vec_space_ptr_t space_h_breve()
const;
812 virtual const Vector& hl_breve()
const;
824 virtual const Vector& hu_breve()
const;
840 virtual void set_c_breve(VectorMutable* c_breve);
843 virtual VectorMutable* get_c_breve();
851 virtual VectorMutable& c_breve();
859 virtual const Vector& c_breve()
const;
875 virtual void set_h_breve(VectorMutable* h_breve);
878 virtual VectorMutable* get_h_breve();
886 virtual VectorMutable& h_breve();
894 virtual const Vector& h_breve()
const;
908 virtual const Permutation& P_var()
const;
923 virtual const Permutation& P_equ()
const;
948 virtual void calc_c_breve(
const Vector& x,
bool newx =
true)
const;
973 virtual void calc_h_breve(
const Vector& x,
bool newx =
true)
const;
989 : f(f_in), c(c_in), h(h_in)
1030 virtual void imp_calc_f(
const Vector& x,
bool newx,
const ZeroOrderInfo& zero_order_info)
const = 0;
1051 virtual void imp_calc_c(
const Vector& x,
bool newx,
const ZeroOrderInfo& zero_order_info)
const = 0;
1071 virtual void imp_calc_c_breve(
const Vector& x,
bool newx,
const ZeroOrderInfo& zero_order_info_breve)
const;
1091 virtual void imp_calc_h_breve(
const Vector& x,
bool newx,
const ZeroOrderInfo& zero_order_info_breve)
const;
1098 StandardCompositionRelationshipsPack::assert_role_name_set(p,
false, info);
1106 #ifdef DOXYGEN_COMPILE 1114 Teuchos::RCP<Permutation> P_var_;
1115 Teuchos::RCP<Permutation> P_equ_;
1130 return first_order_info_;
1136 return first_order_info_breve_;
Thrown if an incompatible object is used.
VectorMutable * c
Pointer to constraints residual c (Will be NULL if not set)
ZeroOrderInfo(value_type *f_in, VectorMutable *c_in, VectorMutable *h_in)
void assert_ref_set(T *p, std::string info) const
Assert referece has been set for a quanity.
Teuchos::RCP< const OptionsFromStreamPack::OptionsFromStream > options_ptr_t
Teuchos::RCP< const VectorSpace > vec_space_ptr_t
Struct for objective and constriants (pointer).
NLP interface class {abstract}.
Thrown if any member functions are called before initialize() has been called.
value_type * f
Pointer to objective function f (Will be NULL if not set)
Thrown some bounds do not existe.
Thrown from initialize() if some logical error occured.
VectorMutable * h
Pointer to inequality constraints h (Will be NULL if not set)