45 #include "MoochoPack_TangentialStepWithInequStd_StepSetOptions.hpp" 46 #include "OptionsFromStreamPack_StringToBool.hpp" 47 #include "Teuchos_Assert.hpp" 52 const int local_num_options = 4;
57 ,PRIMAL_FEASIBLE_POINT_ERROR
58 ,DUAL_FEASIBLE_POINT_ERROR
61 const char* local_SOptions[local_num_options] = {
64 ,
"primal_feasible_point_error" 65 ,
"dual_feasible_point_error" 74 ,
const char opt_grp_name[]
77 opt_grp_name, local_num_options, local_SOptions )
83 int option_num,
const std::string& option_value )
85 using OptionsFromStreamPack::StringToBool;
88 switch( (local_EOptions)option_num ) {
90 target().warm_start_frac(std::fabs(std::atof(option_value.c_str())));
94 const std::string &option = option_value.c_str();
95 if( option ==
"QP_TEST_DEFAULT" )
96 target().qp_testing( target_t::QP_TEST_DEFAULT );
97 else if( option ==
"QP_TEST" )
98 target().qp_testing( target_t::QP_TEST );
99 else if( option ==
"QP_NO_TEST" )
100 target().qp_testing( target_t::QP_NO_TEST );
102 TEUCHOS_TEST_FOR_EXCEPTION(
103 true, std::invalid_argument
104 ,
"Error, incorrect value \'" << option <<
"\' for " 105 "\"qp_testing\". Only the options " 106 "QP_TEST_DEFAULT, QP_TEST, and QP_NO_TEST " 110 case PRIMAL_FEASIBLE_POINT_ERROR:
111 target().primal_feasible_point_error(StringToBool(
"primal_feasible_point_error",option_value.c_str()));
113 case DUAL_FEASIBLE_POINT_ERROR:
114 target().dual_feasible_point_error(StringToBool(
"dual_feasible_point_error",option_value.c_str()));
117 TEUCHOS_TEST_FOR_EXCEPT(
true);
TangentialStepWithInequStd_StepSetOptions(TangentialStepWithInequStd_Step *target=NULL, const char opt_grp_name[]="TangentialStepWithInequStd")
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
Solves the reduced QP subproblem with bounds and/or general inequalities.