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"
70 namespace MoochoPack {
74 ,
const char opt_grp_name[]
76 :OptionsFromStreamPack::SetOptionsFromStreamNode(
77 opt_grp_name, local_num_options, local_SOptions )
78 ,OptionsFromStreamPack::SetOptionsToTargetBase<
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 );
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()));
bool StringToBool(const char *opt_name, const char *str)
Convert a string "true" or "false" into bool #true# or #false#.
TangentialStepWithInequStd_StepSetOptions(TangentialStepWithInequStd_Step *target=NULL, const char opt_grp_name[]="TangentialStepWithInequStd")
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TangentialStepWithInequStd_Step & target()
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
Solves the reduced QP subproblem with bounds and/or general inequalities.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const std::string & option_value(OptionsGroup::const_iterator &itr)