49 namespace NLPInterfacePack {
56 :is_initialized_(false),nlp_selects_basis_(nlp_selects_basis),basis_selection_was_given_(false)
57 ,linear_obj_(linear_obj),n_orig_(3),m_orig_(2),Gc_orig_nz_(4),a_(a),b_(b)
60 const char msg_err_head[] =
"NLPWBCounterExample::NLPWBCounterExample(...) : Error";
151 *zero_order_info.
f = (
linear_obj_ ? x(1) : 0.5*x(1)*x(1) );
159 c(1) = x(1)*x(1) - x(2) +
a_;
160 c(2) = x(1) - x(3) -
b_;
178 IVector *var_perm_full
179 ,IVector *equ_perm_full
192 var_perm_full->resize(
n_orig_);
193 (*var_perm_full)(1) = 2;
194 (*var_perm_full)(2) = 3;
195 (*var_perm_full)(3) = 1;
196 equ_perm_full->resize(
m_orig_);
243 Gc_j[0] = 1; Gc_i[0] = 1;
244 Gc_j[1] = 1; Gc_i[1] = 2;
245 Gc_j[2] = 2; Gc_i[2] = 1;
246 Gc_j[3] = 2; Gc_i[3] = 3;
AbstractLinAlgPack::size_type size_type
value_type * f
Pointer to objective function f (may be NULL if not set)
RTOp_index_type index_type
bool imp_get_next_basis(IVector *var_perm_full, IVector *equ_perm_full, size_type *rank_full, size_type *rank)
bool imp_nlp_has_changed() const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
size_type imp_Gc_nz_orig() const
int resize(OrdinalType length_in)
size_type imp_m_orig() const
void imp_calc_c_orig(const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
const DVectorSlice imp_hl_orig() const
DVectorSlice x_full() const
Give reference to current x_full.
void initialize(bool test_setup)
size_type imp_Gh_nz_orig() const
const DVectorSlice imp_xl_orig() const
void imp_calc_Gf_orig(const DVectorSlice &x_full, bool newx, const ObjGradInfoSerial &obj_grad_info) const
bool basis_selection_was_given_
void imp_calc_Gh_orig(const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const
bool is_initialized() const
Struct for objective and constriants (pointer) as serial vectors.
Struct for zero and explicit first order quantities that subclass must fill in.
DVector * Gf
Gradient of objective function Gf (may be NULL if not set)
const f_int f_dbl_prec a[]
DVector * c
Pointer to constraints residual c (may be NULL if not set)
bool nlp_selects_basis() const
void identity_perm(IVector *perm)
DenseLinAlgPack::VectorSliceTmpl< value_type > DVectorSlice
const DVectorSlice imp_hu_orig() const
void imp_calc_f_orig(const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
bool imp_has_var_bounds() const
void imp_calc_Gc_orig(const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const
AbstractLinAlgPack::value_type value_type
size_type imp_n_orig() const
size_type imp_mI_orig() const
Struct for serial gradient (objective), objective and constriants (pointers)
virtual VectorMutable & Gf()
Returns non-const *this->get_Gf().
void imp_report_orig_final_solution(const DVectorSlice &x_orig, const DVectorSlice *lambda_orig, const DVectorSlice *lambdaI_orig, const DVectorSlice *nu_orig, bool is_optimal)
const DVectorSlice imp_xinit_orig() const
void imp_calc_h_orig(const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const
value_type max_var_bounds_viol() const
static value_type infinite_bound()
Value for an infinite bound.
const DVectorSlice imp_xu_orig() const
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
virtual VectorMutable & c()
Returns non-const *this->get_c().
void initialize(bool test_setup)