MOOCHO
Version of the Day
|
NLP subclass for the Waechter and Biegler Counter Example. More...
#include <NLPInterfacePack_NLPWBCounterExample.hpp>
Constructors / initializers | |
NLPWBCounterExample (value_type xinit[3], value_type a=0.0, value_type b=1.0, bool nlp_selects_basis=true, bool linear_obj=true) | |
Constructor. More... | |
Overridden public members from NLP | |
void | initialize (bool test_setup) |
bool | is_initialized () const |
value_type | max_var_bounds_viol () const |
Overridden from NLPVarReductPerm | |
bool | nlp_selects_basis () const |
Overridden protected methods from NLPSerialPreprocess | |
bool | imp_nlp_has_changed () const |
size_type | imp_n_orig () const |
size_type | imp_m_orig () const |
size_type | imp_mI_orig () const |
const DVectorSlice | imp_xinit_orig () const |
bool | imp_has_var_bounds () const |
const DVectorSlice | imp_xl_orig () const |
const DVectorSlice | imp_xu_orig () const |
const DVectorSlice | imp_hl_orig () const |
const DVectorSlice | imp_hu_orig () const |
void | imp_calc_f_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const |
void | imp_calc_c_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const |
void | imp_calc_h_orig (const DVectorSlice &x_full, bool newx, const ZeroOrderInfoSerial &zero_order_info) const |
void | imp_calc_Gf_orig (const DVectorSlice &x_full, bool newx, const ObjGradInfoSerial &obj_grad_info) const |
bool | imp_get_next_basis (IVector *var_perm_full, IVector *equ_perm_full, size_type *rank_full, size_type *rank) |
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) |
Overridden protected methods from NLPSerialPreprocessExplJac | |
size_type | imp_Gc_nz_orig () const |
size_type | imp_Gh_nz_orig () const |
void | imp_calc_Gc_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const |
void | imp_calc_Gh_orig (const DVectorSlice &x_full, bool newx, const FirstOrderExplInfo &first_order_expl_info) const |
NLP subclass for the Waechter and Biegler Counter Example.
The Waechter & Biegler counter example NLP is defined as:
min f(x) s.t. c(1) = x(1)^2 - x(2) + a = 0 c(2) = x(1) - x(3) - b = 0 x(2),x(3) >= 0 where: b >= 0
and where a
and b
are constants. In the counter example, the form of the objective function f(x)
is not important, but we have to specify one here in order to have MOOCHO solve the problem. So we will specify the objective function as
/ x(1) : if linear_obj == true f(x) = | \ 0.5*x(1)^2 : if linear_obj == false
where the client can specify linear_obj
(in the constructor).
Note that an excellent basis selection is for x(2)
and x(3)
to be in the basis since this gives the basis matrix of C = -I
.
Definition at line 81 of file NLPInterfacePack_NLPWBCounterExample.hpp.
NLPInterfacePack::NLPWBCounterExample::NLPWBCounterExample | ( | value_type | xinit[3], |
value_type | a = 0.0 , |
||
value_type | b = 1.0 , |
||
bool | nlp_selects_basis = true , |
||
bool | linear_obj = true |
||
) |
Constructor.
a | [in] The constant in constriant c(1) |
b | [in] The constant in constriant c(2) |
xinit | [in] Array (size 3) of initial guess for x |
nlp_selects_basis | [in] If true, then this NLP will select the basis variables as x(2) and x(3) (which gives C = -I ). |
linear_obj | [in] If true, the the objective is set to f(x) = x(1) , else it is set to f(x) = 0.5*x(1)^2 |
Definition at line 53 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
virtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 76 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
virtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 83 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
virtual |
Implements NLPInterfacePack::NLP.
Definition at line 88 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
virtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocess.
Definition at line 215 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocess.
Definition at line 95 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 100 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 105 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 110 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 115 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 120 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 125 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 130 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 135 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 141 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 147 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 154 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 163 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocess.
Definition at line 169 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocess.
Definition at line 177 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Reimplemented from NLPInterfacePack::NLPSerialPreprocess.
Definition at line 204 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 222 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 227 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 232 of file NLPInterfacePack_NLPWBCounterExample.cpp.
|
protectedvirtual |
Implements NLPInterfacePack::NLPSerialPreprocessExplJac.
Definition at line 257 of file NLPInterfacePack_NLPWBCounterExample.cpp.