MOOCHO (Single Doxygen Collection)
Version of the Day
|
This is the most basic interface that clients use to solve an NLP. More...
#include <MoochoPack_NLPSolverClientInterface.hpp>
Classes | |
class | InvalidSetup |
Thrown if the setup is not valid. More... | |
Private Attributes | |
NLPInterfacePack::NLP * | nlp |
IterationPack::AlgorithmTracker * | track |
Public Types | |
enum | EFindMinReturn { SOLUTION_FOUND, MAX_ITER_EXCEEDED, MAX_RUN_TIME_EXCEEDED, ALGORITHMIC_ERROR } |
Solver Parameters | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (int, max_iter) | |
Set the maximum number of iterations the rSQP algorithm can perform. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (double, max_run_time) | |
Set the maximum run_time. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, opt_tol) | |
Set the termination tolerance for the relative (scaled) linear dependence of the gradients part of the first order necessary optimality conditions. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, feas_tol) | |
Set the termination tolerance for the (scaled) equality constraints ||c(x*)||inf which is part of the first order necessary optimality conditions. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, comp_tol) | |
Set the termination tolerance for the complementarity condition for the (scaled) bound constraints which is part of the first order necessary optimality conditions. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, step_tol) | |
Set the termination tolerance for the change in the estimate of the solution. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (EJournalOutputLevel, journal_output_level) | |
Determine the amount of output to a journal file. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (EJournalOutputLevel, null_space_journal_output_level) | |
Determine the amount of output of the null space to a journal file. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (int, journal_print_digits) | |
Set the precesion of the journal output. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, check_results) | |
Set whether computations will be double checked or not. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, calc_conditioning) | |
Set whether the condition numbers of important matrics is computed and printed or not. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, calc_matrix_norms) | |
Set whether or not matrix norms are computed and printed. More... | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (bool, calc_matrix_info_null_space_only) | |
Set whether calc_conditioning and calc_matrix_norms apply to only null space matrices. More... | |
Constructors/initalizers | |
STANDARD_COMPOSITION_MEMBERS (NLP, nlp) | |
<<std comp>="">> members for the nlp More... | |
STANDARD_COMPOSITION_MEMBERS (AlgorithmTracker, track) | |
<<std comp>="">> members for the track More... | |
NLPSolverClientInterface (int max_iter=10000, double max_run_time=1e+10, value_type opt_tol=1e-6, value_type feas_tol=1e-6, value_type comp_tol=1e-6, value_type step_tol=1e-2, EJournalOutputLevel journal_output_level=PRINT_ALGORITHM_STEPS, EJournalOutputLevel null_space_journal_output_level=PRINT_ALGORITHM_STEPS, int journal_print_digits=6, bool check_results=false, bool calc_conditioning=false, bool calc_matrix_norms=false, bool calc_matrix_info_null_space_only=false) | |
Construct with no references set to nlp or track objects. More... | |
virtual | ~NLPSolverClientInterface () |
Solve the NLP | |
virtual EFindMinReturn | find_min ()=0 |
Find the minimun of the set NLP. More... | |
Algorithm description | |
virtual void | print_algorithm (std::ostream &out) const =0 |
Prints a description of the algorithm. More... | |
Algorithm timing | |
virtual void | set_algo_timing (bool algo_timing)=0 |
Causes algorithm to be timed. More... | |
virtual bool | algo_timing () const =0 |
virtual void | print_algorithm_times (std::ostream &out) const =0 |
Outputs table of times for each step and the cummulative times. More... | |
This is the most basic interface that clients use to solve an NLP.
ToDo: Finish documentaiton.
Definition at line 59 of file MoochoPack_NLPSolverClientInterface.hpp.
Enumerator | |
---|---|
SOLUTION_FOUND | |
MAX_ITER_EXCEEDED | |
MAX_RUN_TIME_EXCEEDED | |
ALGORITHMIC_ERROR |
Definition at line 66 of file MoochoPack_NLPSolverClientInterface.hpp.
MoochoPack::NLPSolverClientInterface::NLPSolverClientInterface | ( | int | max_iter = 10000 , |
double | max_run_time = 1e+10 , |
||
value_type | opt_tol = 1e-6 , |
||
value_type | feas_tol = 1e-6 , |
||
value_type | comp_tol = 1e-6 , |
||
value_type | step_tol = 1e-2 , |
||
EJournalOutputLevel | journal_output_level = PRINT_ALGORITHM_STEPS , |
||
EJournalOutputLevel | null_space_journal_output_level = PRINT_ALGORITHM_STEPS , |
||
int | journal_print_digits = 6 , |
||
bool | check_results = false , |
||
bool | calc_conditioning = false , |
||
bool | calc_matrix_norms = false , |
||
bool | calc_matrix_info_null_space_only = false |
||
) |
Construct with no references set to nlp or track objects.
Definition at line 45 of file MoochoPack_NLPSolverClientInterface.cpp.
|
inlinevirtual |
Definition at line 174 of file MoochoPack_NLPSolverClientInterface.hpp.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | int | , |
max_iter | |||
) |
Set the maximum number of iterations the rSQP algorithm can perform.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | double | , |
max_run_time | |||
) |
Set the maximum run_time.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
opt_tol | |||
) |
Set the termination tolerance for the relative (scaled) linear dependence of the gradients part of the first order necessary optimality conditions.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
feas_tol | |||
) |
Set the termination tolerance for the (scaled) equality constraints ||c(x*)||inf which is part of the first order necessary optimality conditions.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
comp_tol | |||
) |
Set the termination tolerance for the complementarity condition for the (scaled) bound constraints which is part of the first order necessary optimality conditions.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
step_tol | |||
) |
Set the termination tolerance for the change in the estimate of the solution.
The test is: |d(i)|/(1+|x(i)|) < step_tol
.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | EJournalOutputLevel | , |
journal_output_level | |||
) |
Determine the amount of output to a journal file.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | EJournalOutputLevel | , |
null_space_journal_output_level | |||
) |
Determine the amount of output of the null space to a journal file.
This option allows the user to perform a higher level of output for quantities in the null space.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | int | , |
journal_print_digits | |||
) |
Set the precesion of the journal output.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | bool | , |
check_results | |||
) |
Set whether computations will be double checked or not.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | bool | , |
calc_conditioning | |||
) |
Set whether the condition numbers of important matrics is computed and printed or not.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | bool | , |
calc_matrix_norms | |||
) |
Set whether or not matrix norms are computed and printed.
MoochoPack::NLPSolverClientInterface::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | bool | , |
calc_matrix_info_null_space_only | |||
) |
Set whether calc_conditioning and calc_matrix_norms apply to only null space matrices.
MoochoPack::NLPSolverClientInterface::STANDARD_COMPOSITION_MEMBERS | ( | NLP | , |
nlp | |||
) |
<<std comp>="">> members for the nlp
MoochoPack::NLPSolverClientInterface::STANDARD_COMPOSITION_MEMBERS | ( | AlgorithmTracker | , |
track | |||
) |
<<std comp>="">> members for the track
|
pure virtual |
Find the minimun of the set NLP.
This function returns SOLUTION_FOUND
if the NLP has been solved to the desired tolerances. In this case this->track().output_final(...,TERMINATE_TRUE)
and this->nlp().report_final_solution(...,true)
are called before this function returns..
If the solution is not found, then this->nlp().report_final_solution(...,false)
is called and one of the following occurs:
MAX_ITER_EXCEEDED
will be returned. In this case this->track().output_final(...,MAX_ITER_EXCEEDED)
is called. MAX_RUN_TIME_EXCEEDED
will be returned. In this case this->track().output_final(...,MAX_RUN_TIME_EXCEEDED)
is called. this->track().output_final(...,TERMINATE_FALSE)
will be called before this exception is rethrown out of this functiion. If the constraints are found to be infeasible, then the exception InfeasibleConstraints
will be thrown. If a line search failure occurs then the exception LineSearchFailure
will be thrown. If some test failed then the exception TestFailed
will be thrown. Many other exceptions may be thrown but these are the main ones that the SQP algorithms known about and will purposefully generate. Preconditions:
this->nlp() != 0
(throw InvalidSetup) Postcondtions:
Implemented in MoochoPack::NLPAlgoContainer.
|
pure virtual |
Prints a description of the algorithm.
Implemented in MoochoPack::NLPAlgoContainer, and MoochoPack::NLPAlgoClientInterface.
|
pure virtual |
Causes algorithm to be timed.
Call with algo_timing == true
before calling find_min()
to have the algorithm timed.
Implemented in MoochoPack::NLPAlgoContainer.
|
pure virtual |
Implemented in MoochoPack::NLPAlgoContainer.
|
pure virtual |
Outputs table of times for each step and the cummulative times.
Call after find_min()
has executed to get a table of times.
Implemented in MoochoPack::NLPAlgoContainer.
|
private |
Definition at line 256 of file MoochoPack_NLPSolverClientInterface.hpp.
|
private |
Definition at line 258 of file MoochoPack_NLPSolverClientInterface.hpp.