70 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
153 const double INF_BASIS_COND_CHANGE_FRAC = 1e+20;
156 namespace MoochoPack {
163 :max_basis_cond_change_frac_(-1.0)
164 ,exact_reduced_hessian_(false)
165 ,quasi_newton_(QN_AUTO)
166 ,num_lbfgs_updates_stored_(-1)
167 ,lbfgs_auto_scaling_(true)
168 ,hessian_initialization_(INIT_HESS_AUTO)
169 ,qp_solver_type_(QP_AUTO)
170 ,reinit_hessian_on_qp_fail_(true)
171 ,line_search_method_(LINE_SEARCH_AUTO)
172 ,merit_function_type_(MERIT_FUNC_AUTO)
173 ,l1_penalty_param_update_(L1_PENALTY_PARAM_AUTO)
174 ,full_steps_after_k_(-1)
199 ,std::ostream *trase_out
210 <<
"*****************************************************************\n"
211 <<
"*** NLPAlgoConfigIP configuration ***\n"
213 <<
"*** Here, summary information about how the algorithm is ***\n"
214 <<
"*** configured is printed so that the user can see how the ***\n"
215 <<
"*** properties of the NLP and the set options influence ***\n"
216 <<
"*** how an algorithm is configured. ***\n"
217 <<
"*****************************************************************\n";
227 *trase_out <<
"\n*** Creating the NLPAlgo algo object ...\n";
232 algo_cntr->set_algo(algo);
233 algo->set_algo_cntr(algo_cntr);
242 *trase_out <<
"\n*** Setting the NLP and track objects to the algo object ...\n";
244 algo->set_nlp( algo_cntr->get_nlp().get() );
245 algo->set_track( algo_cntr->get_track() );
257 <<
"\n*** Warning, no OptionsFromStream object was set so a default set"
258 " of options will be used!\n";
262 NLP &nlp = algo->nlp();
263 nlp.initialize(algo->algo_cntr().check_results());
270 nb = nlp.num_bounded_x();
273 NLPFirstOrder *nlp_foi = NULL;
274 NLPSecondOrder *nlp_soi = NULL;
275 NLPDirect *nlp_fod = NULL;
276 bool tailored_approach =
false;
279 ,&nlp_foi, &nlp_soi, &nlp_fod, &tailored_approach
282 const int max_dof_quasi_newton_dense
287 m == 0, std::logic_error
288 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
289 "can not currently solve an unconstrained NLP!" );
291 n == m, std::logic_error
292 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
293 "can not currently solve a square system of equations!" );
300 <<
"\n*** Sorting out some of the options given input options ...\n";
302 if( tailored_approach ) {
306 <<
"\nThis is a tailored approach NLP (NLPDirect) which forces the following options:\n"
307 <<
"merit_function_type = L1;\n"
308 <<
"l1_penalty_parameter_update = MULT_FREE;\n"
309 <<
"null_space_matrix = EXPLICIT;\n"
323 <<
"\nThe only merit function currently supported is:\n"
324 <<
"merit_function_type = L1;\n"
335 <<
"\nquasi_newton == AUTO:"
336 <<
"\nnlp.num_bounded_x() == " << nlp.num_bounded_x() <<
":\n";
348 <<
"n-r = " << n-r <<
" <= max_dof_quasi_newton_dense = "
349 << max_dof_quasi_newton_dense <<
":\n"
350 <<
"setting quasi_newton == BFGS\n";
374 "\nline_search_method == 2ND_ORDER_CORRECT:\n"
375 "Sorry, the second order corrrection linesearch is not updated yet!\n"
376 "setting line_search_method = DIRECT ...\n";
382 "\nline_search_method ==WATCHDOG:\n"
383 "Sorry, the watchdog linesearch is not updated yet!\n"
384 "setting line_search_method = DIRECT ...\n";
392 decomp_sys_ptr_t decomp_sys;
394 trase_out, nlp, nlp_foi, nlp_soi, nlp_fod, tailored_approach
398 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
400 decomp_sys_perm = Teuchos::rcp_dynamic_cast<DecompositionSystemVarReductPerm>(decomp_sys);
408 <<
"\n*** Creating the state object and setting up iteration quantity objects ...\n";
423 ? ( nlp_fod->var_dep().size()
424 ? nlp.space_x()->sub_space(nlp_fod->var_dep())->clone()
426 : decomp_sys->space_range()
429 ?( nlp_fod->var_indep().size()
430 ? nlp.space_x()->sub_space(nlp_fod->var_indep())->clone()
432 : decomp_sys->space_null()
442 trase_out, nlp, nlp_foi, nlp_soi, nlp_fod, tailored_approach, decomp_sys
449 state->set_iter_quant(
452 new IterQuantityAccessContiguous<MatrixSymDiagStd>(
456 MatrixSymDiagStd::PostMod>( nlp.space_x() )
462 state->set_iter_quant(
465 new IterQuantityAccessContiguous<MatrixSymDiagStd>(
469 MatrixSymDiagStd::PostMod>( nlp.space_x() )
475 state->set_iter_quant(
478 new IterQuantityAccessContiguous<MatrixSymDiagStd>(
482 MatrixSymDiagStd::PostMod>( nlp.space_x() )
488 state->set_iter_quant(
491 new IterQuantityAccessContiguous<MatrixSymDiagStd>(
495 MatrixSymDiagStd::PostMod>( nlp.space_x() )
501 state->set_iter_quant(
504 new IterQuantityAccessContiguous<MatrixSymOp>(
509 MatrixSymPosDefCholFactor::PostMod(
520 state->set_iter_quant(
523 new IterQuantityAccessContiguous<MatrixSymOp>(
528 MatrixSymPosDefCholFactor::PostMod(
539 state->set_iter_quant(
542 new IterQuantityAccessContiguous<MatrixSymDiagStd>(
546 MatrixSymDiagStd::PostMod>( nlp.space_x() )
554 dyn_cast< IterQuantityAccessContiguous<value_type> >(state->barrier_obj()).resize(2);
555 dyn_cast< IterQuantityAccessContiguous<VectorMutable> >(state->grad_barrier_obj()).resize(2);
563 MatrixSymPosDefCholFactor::PostMod(
570 state->set_iter_quant(
573 new IterQuantityAccessContiguous<MatrixSymOp>(
576 ,abstract_factory_rHL
606 state->set_iter_quant(
609 new IterQuantityAccessContiguous<MeritFuncNLP>(
621 state->set_iter_quant(
637 typedef IterQuantityAccessContiguous<value_type> IQ_scalar_cngs;
638 typedef IterQuantityAccessContiguous<VectorMutable> IQ_vector_cngs;
640 dyn_cast<IQ_vector_cngs>(state->x()).resize(2);
641 dyn_cast<IQ_scalar_cngs>(state->f()).resize(2);
642 if(m)
dyn_cast<IQ_vector_cngs>(state->c()).resize(2);
643 dyn_cast<IQ_vector_cngs>(state->Gf()).resize(2);
644 if(m && nlp_foi) state->Gc();
647 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
648 && decomp_sys_perm.
get() == NULL
651 if(m)
dyn_cast<IQ_vector_cngs>(state->Ypy()).resize(2);
653 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
654 && decomp_sys_perm.
get() == NULL
657 if(m)
dyn_cast<IQ_vector_cngs>(state->Zpz()).resize(2);
658 dyn_cast<IQ_vector_cngs>(state->d()).resize(2);
661 dyn_cast<IQ_vector_cngs>(state->rGf()).resize(2);
668 dyn_cast<IQ_scalar_cngs>(state->barrier_parameter()).resize(2);
670 dyn_cast<IQ_scalar_cngs>(state->alpha()).resize(2);
671 dyn_cast<IQ_scalar_cngs>(state->mu()).resize(2);
672 dyn_cast<IQ_scalar_cngs>(state->phi()).resize(2);
674 dyn_cast<IQ_scalar_cngs>(state->opt_kkt_err()).resize(2);
675 dyn_cast<IQ_scalar_cngs>(state->feas_kkt_err()).resize(2);
677 dyn_cast<IQ_vector_cngs>(state->rGL()).resize(2);
679 if(m)
dyn_cast<IQ_vector_cngs>(state->lambda()).resize(2);
680 dyn_cast<IQ_vector_cngs>(state->nu()).resize(2);
683 algo->set_state( state );
690 *trase_out <<
"\n*** Creating and setting the step objects ...\n";
707 trase_out, nlp, nlp_foi, nlp_soi, nlp_fod, tailored_approach, decomp_sys
708 ,&eval_new_point_step, &calc_fd_prod, &bounds_tester, &new_decomp_selection_strategy
726 options_setter(preEvalNewPointBarrier_step.
get());
735 if( !tailored_approach ) {
741 if( !tailored_approach ) {
751 new_decomp_selection_strategy
756 new_decomp_selection_strategy
762 algo_step_ptr_t check_descent_quasi_normal_step_step =
Teuchos::null;
763 if( algo->algo_cntr().check_results() ) {
780 opt_setter( step.
get() );
783 check_skip_bfgs_update_step = step;
805 opt_setter( bfgs_strategy.get() );
819 true, std::logic_error
820 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
821 "The quansi_newton options of PBFGS and LPBFGS have not been updated yet!" );
835 algo->state().set_iter_quant(
837 ,
Teuchos::rcp(
new IterQuantityAccessContiguous<QuasiNewtonStats>(
854 options_setter(updateReducedSigma_step.
get());
932 opt_setter( check_convergence_strategy.
get() );
939 check_convergence_step = _check_convergence_step;
943 algo_step_ptr_t merit_func_penalty_param_update_step =
Teuchos::null;
957 true, std::logic_error
958 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
959 "The l1_penalty_parameter_update option of MULT_FREE has not been updated yet!" );
975 true, std::logic_error
976 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
977 "The merit_function_type options of MODIFIED_L1 and MODIFIED_L1_INCR have not been updated yet!" );
984 ppu_options_setter( param_update_step.
get() );
987 merit_func_penalty_param_update_step = param_update_step;
1000 direct_line_search =
Teuchos::rcp(
new DirectLineSearchArmQuad_Strategy());
1003 ls_options_setter( direct_line_search.
get(),
"DirectLineSearchArmQuadSQPStep" );
1013 true, std::logic_error
1014 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
1015 "The line_search_method option of 2ND_ORDER_CORRECT has not been updated yet!" );
1020 true, std::logic_error
1021 ,
"NLPAlgoConfigIP::config_algo_cntr(...) : Error, "
1022 "The line_search_method option of WATCHDOG has not been updated yet!" );
1032 LineSearchFilter_StepSetOptions options_setter(line_search_filter_step.
get());
1033 options_setter.set_options(*
options_);
1036 line_search_step = line_search_filter_step;
1043 if( new_decomp_selection_strategy.
get() ) {
1047 ,new_decomp_selection_strategy
1063 <<
"\nConfiguring an algorithm for an unconstrained "
1064 <<
"NLP (m == 0, num_bounded_x == 0) ...\n";
1066 m == 0 && nb == 0, std::logic_error
1067 ,
"NLPAlgoConfigIP::config_alg_cntr(...) : Error, "
1068 "Unconstrained NLPs are not supported yet!" );
1076 <<
"\nConfiguring an algorithm for a simple bound constrained "
1077 <<
"NLP (m == 0, num_bounded_x > 0) ...\n";
1079 m == 0 && nb == 0, std::logic_error
1080 ,
"NLPAlgoConfigIP::config_alg_cntr(...) : Error, "
1081 "Bound constrained NLPs are not supported yet!" );
1090 <<
"\nConfiguring an algorithm for a system of nonlinear equations "
1091 <<
"NLP (n == m) ...\n";
1093 n == m, std::logic_error
1094 ,
"NLPAlgoConfigIP::config_alg_cntr(...) : Error, "
1095 "Nonlinear equation (NLE) problems are not supported yet!" );
1098 else if ( m > 0 || nb > 0 ) {
1108 <<
"\nConfiguring an algorithm for a nonlinear equality constrained "
1109 <<
"NLP ( m > 0 && num_bounded_x == 0) ...\n";
1117 <<
"\nConfiguring an algorithm for a nonlinear generally constrained "
1118 <<
"NLP ( num_bounded_x > 0 ) ...\n";
1128 int assoc_step_num = 0;
1138 algo->insert_assoc_step( step_num,
IterationPack::PRE_STEP, 1,
"PreEvalNewPointBarrier", preEvalNewPointBarrier_step);
1141 if( check_descent_quasi_normal_step_step.get() && tailored_approach && algo->algo_cntr().check_results() )
1143 algo->insert_assoc_step(
1147 ,
"CheckDescentQuasiNormalStep"
1148 ,check_descent_quasi_normal_step_step
1153 algo->insert_assoc_step( step_num,
IterationPack::POST_STEP, ++assoc_step_num,
"PostEvalNewPointBarrier", postEvalNewPointBarrier_step);
1157 if( !tailored_approach ) {
1166 if( !tailored_approach ) {
1176 algo->insert_step( ++step_num,
"UpdateBarrierParameter", updateBarrierParameter_step );
1179 if( !tailored_approach ) {
1182 if( check_decomp_from_py_step.get() )
1183 algo->insert_assoc_step(
1187 ,
"CheckDecompositionFromPy"
1188 ,check_decomp_from_py_step
1190 if( check_decomp_from_Rpy_step.get() )
1191 algo->insert_assoc_step(
1195 ,
"CheckDecompositionFromRPy"
1196 ,check_decomp_from_Rpy_step
1198 if( check_descent_quasi_normal_step_step.get() )
1199 algo->insert_assoc_step(
1203 ,
"CheckDescentQuasiNormalStep"
1204 ,check_descent_quasi_normal_step_step
1212 algo->insert_step( ++step_num,
"UpdateReducedSigma", updateReducedSigma_step);
1215 algo->insert_step( ++step_num,
"TangentialStepIP", tangential_step);
1220 algo->insert_step( ++step_num,
"CalcD_vStep_Step", calc_d_v_step_step );
1223 algo->insert_step( ++step_num,
"PreProcessBarrierLineSearch_Step", preprocess_barrier_linesearch_step );
1227 algo->insert_step( ++step_num,
LineSearch_name, line_search_full_step_step );
1244 if(merit_func_penalty_param_update_step.get()) {
1245 algo->insert_assoc_step(
1249 ,
"MeritFunc_PenaltyParamUpdate"
1250 ,merit_func_penalty_param_update_step
1256 algo->insert_step( ++step_num,
"PostProcessBarrierLineSearch_Step", postprocess_barrier_linesearch_step );
1274 _algo == NULL, std::invalid_argument
1275 ,
"NLPAlgoConfigIP::init_algo(_algo) : Error, "
1276 "_algo can not be NULL" );
1280 NLP &nlp = algo.nlp();
1290 << std::setprecision(algo.algo_cntr().journal_print_digits())
1304 , std::ostream *trase_out
1307 namespace ofsp = OptionsFromStreamPack;
1308 using ofsp::OptionsFromStream;
1309 typedef OptionsFromStream::options_group_t options_group_t;
1310 using ofsp::StringToIntMap;
1316 const std::string opt_grp_name =
"NLPAlgoConfigIP";
1317 const OptionsFromStream::options_group_t optgrp = options.
options_group( opt_grp_name );
1318 if( OptionsFromStream::options_group_exists( optgrp ) ) {
1321 const int num_opts = 11;
1323 MAX_BASIS_COND_CHANGE_FRAC
1324 ,EXACT_REDUCED_HESSIAN
1326 ,NUM_LBFGS_UPDATES_STORED
1328 ,HESSIAN_INITIALIZATION
1330 ,REINIT_HESSIAN_ON_QP_FAIL
1332 ,MERIT_FUNCTION_TYPE
1333 ,L1_PENALTY_PARAM_UPDATE
1335 const char* SIpConfig[num_opts] = {
1336 "max_basis_cond_change_frac"
1337 ,
"exact_reduced_hessian"
1339 ,
"num_lbfgs_updates_stored"
1340 ,
"lbfgs_auto_scaling"
1341 ,
"hessian_initialization"
1343 ,
"reinit_hessian_on_qp_fail"
1344 ,
"line_search_method"
1345 ,
"merit_function_type"
1346 ,
"l1_penalty_parameter_update"
1348 StringToIntMap map( opt_grp_name, num_opts, SIpConfig );
1350 options_group_t::const_iterator itr = optgrp.begin();
1351 for( ; itr != optgrp.end(); ++itr ) {
1353 case MAX_BASIS_COND_CHANGE_FRAC:
1356 case EXACT_REDUCED_HESSIAN:
1362 if( opt_val ==
"AUTO" )
1364 else if( opt_val ==
"BFGS" )
1366 else if( opt_val ==
"PBFGS" )
1368 else if( opt_val ==
"LBFGS" )
1370 else if( opt_val ==
"LPBFGS" )
1374 true, std::invalid_argument
1375 ,
"NLPAlgoConfigIP::readin_options(...) : "
1376 "Error, incorrect value for \"quasi_newton\" "
1377 ", Only options of BFGS, PBFGS"
1378 ", LBFGS, LPBFGS and AUTO are avalible."
1382 case NUM_LBFGS_UPDATES_STORED:
1385 case LBFGS_AUTO_SCALING:
1389 case HESSIAN_INITIALIZATION:
1392 if( opt_val ==
"IDENTITY" )
1394 else if( opt_val ==
"FINITE_DIFF_SCALE_IDENTITY" )
1396 else if( opt_val ==
"FINITE_DIFF_DIAGONAL" )
1398 else if( opt_val ==
"FINITE_DIFF_DIAGONAL_ABS" )
1400 else if( opt_val ==
"AUTO" )
1404 true, std::invalid_argument
1405 ,
"NLPAlgoConfigIP::readin_options(...) : "
1406 "Error, incorrect value for \"hessian_initialization\" "
1407 ", Only options of IDENTITY, FINITE_DIFF_SCALE_IDENTITY,"
1408 " FINITE_DIFF_DIAGONAL, FINITE_DIFF_DIAGONAL_ABS and AUTO"
1415 if( qp_solver ==
"AUTO" ) {
1417 }
else if( qp_solver ==
"QPSOL" ) {
1419 }
else if( qp_solver ==
"QPOPT" ) {
1420 #ifdef CONSTRAINED_OPTIMIZATION_PACK_USE_QPOPT
1424 true, std::invalid_argument
1425 ,
"NLPAlgoConfigIP::readin_options(...) : QPOPT is not supported,"
1426 " must define CONSTRAINED_OPTIMIZATION_PACK_USE_QPOPT!" );
1428 }
else if( qp_solver ==
"QPKWIK" ) {
1430 }
else if( qp_solver ==
"QPSCHUR" ) {
1434 true, std::invalid_argument
1435 ,
"NLPAlgoConfigIP::readin_options(...) : "
1436 "Error, incorrect value for \"qp_solver\" "
1437 "Only qp solvers QPOPT, QPSOL, QPKWIK, QPSCHUR and AUTO are avalible." );
1441 case REINIT_HESSIAN_ON_QP_FAIL:
1444 case LINE_SEARCH_METHOD:
1447 if( option ==
"NONE" ) {
1449 }
else if( option ==
"DIRECT" ) {
1451 }
else if( option ==
"2ND_ORDER_CORRECT" ) {
1453 }
else if( option ==
"WATCHDOG" ) {
1455 }
else if( option ==
"AUTO" ) {
1457 }
else if( option ==
"FILTER" ) {
1461 true, std::invalid_argument
1462 ,
"NLPAlgoConfigIP::readin_options(...) : "
1463 "Error, incorrect value for \"line_search_method\".\n"
1464 "Only the options NONE, DIRECT, 2ND_ORDER_CORRECT, FILTER, WATCHDOG "
1465 "and AUTO are avalible." );
1469 case MERIT_FUNCTION_TYPE:
1472 if( option ==
"L1" )
1474 else if( option ==
"MODIFIED_L1" )
1476 else if( option ==
"MODIFIED_L1_INCR" )
1478 else if( option ==
"AUTO" )
1482 true, std::invalid_argument
1483 ,
"NLPAlgoConfigIP::readin_options(...) : "
1484 "Error, incorrect value for \"merit_function_type\".\n"
1485 "Only the options L1, MODIFIED_L1, MODIFIED_L1_INCR "
1486 "and AUTO are avalible." );
1489 case L1_PENALTY_PARAM_UPDATE:
1492 if( option ==
"WITH_MULT" )
1495 else if( option ==
"MULT_FREE" )
1498 else if( option ==
"AUTO" )
1503 true, std::invalid_argument
1504 ,
"NLPAlgoConfigIP::readin_options(...) : "
1505 "Error, incorrect value for \"l1_penalty_param_update\".\n"
1506 "Only the options WITH_MULT, MULT_FREE and AUTO"
1518 <<
"\n\n*** Warning! The options group \"NLPAlgoConfigIP\" was not found.\n"
1519 <<
"Using a default set of options instead ... \n";
1530 ,std::ostream *trase_out
1535 <<
"\n*** Setting option defaults for options not set by the user or determined some other way ...\n";
1540 <<
"\nmax_basis_cond_change_frac < 0 : setting max_basis_cond_change_frac = 1e+4 \n";
1550 <<
"\nquasi_newton == AUTO: setting quasi_newton = BFGS\n";
1559 <<
"\nnum_lbfgs_updates_stored < 0 : setting num_lbfgs_updates_stored = 10\n";
1569 <<
"\nhessian_initialization == AUTO: setting hessian_initialization = FINITE_DIFF_DIAGONAL_ABS\n";
1578 <<
"\nqp_solver_type == AUTO: setting qp_solver_type = QPSCHUR\n";
1588 <<
"\nline_search_method == AUTO: setting line_search_method = FILTER\n";
1597 <<
"\nmerit_function_type == AUTO: setting merit_function_type = MODIFIED_L1_INCR\n";
1606 <<
"\nl1_penalty_param_update == AUTO: setting l1_penalty_param_update = MULT_FREE\n";
1615 <<
"\nfull_steps_after_k < 0 : the line search will never be turned off after so many iterations\n";
1622 <<
"\n*** End setting default options\n";
Checks for descent in the decomposed equality constraints with respect to the range space step Ypy us...
void config_algo_cntr(NLPAlgoContainer *algo_cntr, std::ostream *trase_out)
EQuasiNewton quasi_newton_
Set options for CheckSkipBFGSUpdateStd_Step from a OptionsFromStream object.
Extracts options from a text stream and then allows convenient access to them.
Fraction to boundary rule for calculating alpha max.
EMeritFunctionType merit_function_type_
AbstractLinAlgPack::size_type size_type
void process_nlp_and_options(std::ostream *trase_out, NLP &nlp, NLPFirstOrder **nlp_foi, NLPSecondOrder **nlp_soi, NLPDirect **nlp_fod, bool *tailored_approach)
Process the NLP and process the options passed in from set_options(). Postconditions: ...
const std::string barrier_obj_name
Checks if a BFGS update should be preformed.
const std::string FILTER_IQ_STRING
bool reinit_hessian_on_qp_fail_
SOptionValues uov_
Options structs.
Teuchos::RCP< const OptionsFromStreamPack::OptionsFromStream > options_ptr_t
bool StringToBool(const char *opt_name, const char *str)
Convert a string "true" or "false" into bool #true# or #false#.
virtual void max_iter(size_t max_iter)
void create_eval_new_point(std::ostream *trase_out, NLP &nlp, NLPFirstOrder *nlp_foi, NLPSecondOrder *nlp_soi, NLPDirect *nlp_fod, bool tailored_approach, const Teuchos::RCP< DecompositionSystem > &decomp_sys, Teuchos::RCP< IterationPack::AlgorithmStep > *eval_new_point_step, Teuchos::RCP< CalcFiniteDiffProd > *calc_fd_prod, Teuchos::RCP< VariableBoundsTester > *bounds_tester, Teuchos::RCP< NewDecompositionSelection_Strategy > *new_decomp_selection_strategy)
Create the EvalNewPoint step object and allocated objects.
Set options for MeritFunc_PenaltyParamUpdate_AddedStep from a OptionsFromStream object.
Interface NLPAlgoContainer uses to access NLPAlgo.
Fraction to boundary rule for calculating alpha max.
Set options for DirectLineSearchArmQuad_Strategy from a OptionsFromStream object. ...
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const std::string & option_name(OptionsGroup::const_iterator &itr)
void set_options(const OptionsFromStream &options)
Overridden from SetOptionsFromStream and calls setOption(...).
const std::string Vl_name
Computes the reducecd gradient of the objective rGf_k = Z_k' * Gf_k
void InitializeFromNLP(Teuchos::RCP< NLP > original_nlp)
const std::string rHB_name
const std::string CalcReducedGradLagrangian_name
SOptionValues & current_option_values()
Return the current option values being used.
rSQP Algorithm control class.
void init_algo(NLPAlgoInterface *algo)
Standard class for updating the reduced sigma for interior point optimization.
bool exact_reduced_hessian_
Specializes the update of the penalty parameter for a merit function as: min_mu = |(Gf_k+nu_k)'* Ypy_...
Simple wrapper that provides an objective fn with the barrier term included.
OptionsFromStreamPack::OptionsFromStream * options
Directs the selection of a new decomposition if the line search fails.
void add_iter_quantities(std::ostream *trase_out, NLP &nlp, NLPFirstOrder *nlp_foi, NLPSecondOrder *nlp_soi, NLPDirect *nlp_fod, bool tailored_approach, const Teuchos::RCP< DecompositionSystem > &decomp_sys, const Teuchos::RCP< NLPAlgoState > &state)
Add the common iteration quantities to the state object.
const std::string grad_barrier_obj_name
DecompositionSystemStateStepBuilderStd decomp_sys_step_builder_
Builder class for some common code.
Set options for CheckConvergence_Strategy from an OptionsFromStream object.
Implementation for NLPAlgo solver.
Calculates dvl_k = mu*invXl_k*e - vl_k - invXl_k*Vl_k*d_k and dvu_k = mu*invXu_k*e - vu_k + invXu_k*V...
Barrier Parameter (mu) Update.
value_type max_basis_cond_change_frac_
const std::string CalcDFromYPYZPZ_name
const std::string merit_func_nlp_name
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Takes the full step x_kp1 = x_k + d_k (d_k = Ypy_k + Zpz_k).
virtual std::ostream & journal_out() const
Return a reference to a std::ostream to be used to output debug information and the like...
ELineSearchMethod line_search_method_
int num_lbfgs_updates_stored_
T_To & dyn_cast(T_From &from)
const std::string invXl_name
const std::string QuasiNormalStep_name
EQPSolverType qp_solver_type_
Reduced space SQP state encapsulation interface.
const std::string invXu_name
const std::string EvalNewPoint_name
virtual void max_run_time(double max_iter)
Set the maximum runtime (in minues) The runtime is checked at the end of each iteration and if it exc...
AlgorithmTracker & track()
Updates rHL_k using a secant update.
Delegates the line search to a DirectLineSearch_Strategy object.
Implementation of CheckConvergence_Strategy interface.
Null Space Step for Interior Point algorithm.
static void readin_options(const OptionsFromStreamPack::OptionsFromStream &options, SOptionValues *option_values, std::ostream *trase_out)
Read in the options from a stream.
Perform BFGS updates on full reduced Hessian.
const std::string rHL_name
Check if the decomposition is going singular and if it is select a new decomposition.
static void set_default_options(const SOptionValues &user_option_values, SOptionValues *current_option_values, std::ostream *trase_out)
Set the defaults for options not set by the user.
void create_decomp_sys(std::ostream *trase_out, NLP &nlp, NLPFirstOrder *nlp_foi, NLPSecondOrder *nlp_soi, NLPDirect *nlp_fod, bool tailored_approach, Teuchos::RCP< DecompositionSystem > *decomp_sys)
Create the decomposition system object.
Calculates the reduced gradient of the Lagrangian rGL = rGf + Z' * nu + GcUP' * lambda(equ_undecomp) ...
void set_options(const options_ptr_t &options)
Set the OptionsFromStream object that will be used for specifying the options.
const std::string Sigma_name
options_ptr_t options_
Smart pointer to options.
options_group_t options_group(const std::string &options_group_name)
const std::string ReducedGradient_name
NLPAlgoState & rsqp_state()
<<std aggr>="">> members for algo_cntr
Calculates the range space step by, solving for py = -inv(R)*c(equ_decomp), then setting Ypy = Y * py...
Standard evaluation step class for extra parameters in primal/dual barrier method.
Strategy interface which contains the guts for a dampened BFGS update.
const std::string ReducedHessian_name
Set options for BFGSUpdate_Strategy from an OptionsFromStream object.
const options_ptr_t & get_options() const
void do_step_first(Algorithm::poss_type first_step_poss)
Check if the decomposition is going singular and if it is select a new decomposition.
Standard evaluation step class for extra parameters in primal/dual barrier method.
EHessianInitialization hessian_initialization_
void set_options(const options_ptr_t &options)
Set the options that will be used to configure the algorithmic objects.
const std::string CheckConvergence_name
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
Filter line-search step class.
const std::string quasi_newton_stats_name
Name given to the quasi-Newton updating staistics iteration quantity.
const std::string LineSearch_name
const std::string & option_value(OptionsGroup::const_iterator &itr)
EL1PenaltyParamUpdate l1_penalty_param_update_
const std::string Vu_name