MoochoPack::NLPSolverClientInterface Class Reference

This is the most basic interface that clients use to solve an NLP. More...

#include <MoochoPack_NLPSolverClientInterface.hpp>

Inheritance diagram for MoochoPack::NLPSolverClientInterface:

[legend]
List of all members.

Constructors/initalizers

void set_nlp (const Teuchos::RefCountPtr< NLP > &nlp)
 <<std comp="">> members for the nlp
void set_track (const Teuchos::RefCountPtr< AlgorithmTracker > &track)
 <<std comp="">> members for the track
 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.
virtual ~NLPSolverClientInterface ()
 

Public Types

enum  EFindMinReturn
  More...

Solver Parameters

void max_iter (const int &max_iter)
 Set the maximum number of iterations the rSQP algorithm can perform.
void max_run_time (const double &max_run_time)
 Set the maximum run_time.
void opt_tol (const 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.
void feas_tol (const 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.
void comp_tol (const 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.
void step_tol (const value_type &step_tol)
 Set the termination tolerance for the change in the estimate of the solution.
void journal_output_level (const EJournalOutputLevel &journal_output_level)
 Determine the amount of output to a journal file.
void null_space_journal_output_level (const EJournalOutputLevel &null_space_journal_output_level)
 Determine the amount of output of the null space to a journal file.
void journal_print_digits (const int &journal_print_digits)
 Set the precesion of the journal output.
void check_results (const bool &check_results)
 Set whether computations will be double checked or not.
void calc_conditioning (const bool &calc_conditioning)
 Set whether the condition numbers of important matrics is computed and printed or not.
void calc_matrix_norms (const bool &calc_matrix_norms)
 Set whether or not matrix norms are computed and printed.
void calc_matrix_info_null_space_only (const bool &calc_matrix_info_null_space_only)
 Set whether calc_conditioning and calc_matrix_norms apply to only null space matrices.

Solve the NLP

virtual EFindMinReturn find_min ()=0
 Find the minimun of the set NLP.

Algorithm description

virtual void print_algorithm (std::ostream &out) const =0
 Prints a description of the algorithm.

Algorithm timing

virtual void set_algo_timing (bool algo_timing)=0
 Causes algorithm to be timed.
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.

Detailed Description

This is the most basic interface that clients use to solve an NLP.

ToDo: Finish documentaiton.

Definition at line 46 of file MoochoPack_NLPSolverClientInterface.hpp.


Member Enumeration Documentation

enum MoochoPack::NLPSolverClientInterface::EFindMinReturn
 

Definition at line 53 of file MoochoPack_NLPSolverClientInterface.hpp.


Constructor & Destructor Documentation

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 32 of file MoochoPack_NLPSolverClientInterface.cpp.

virtual MoochoPack::NLPSolverClientInterface::~NLPSolverClientInterface  )  [inline, virtual]
 

Definition at line 161 of file MoochoPack_NLPSolverClientInterface.hpp.


Member Function Documentation

void MoochoPack::NLPSolverClientInterface::max_iter const int &  max_iter  )  [inline]
 

Set the maximum number of iterations the rSQP algorithm can perform.

Definition at line 70 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::max_run_time const double &  max_run_time  )  [inline]
 

Set the maximum run_time.

Definition at line 74 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::opt_tol const value_type &  opt_tol  )  [inline]
 

Set the termination tolerance for the relative (scaled) linear dependence of the gradients part of the first order necessary optimality conditions.

Definition at line 79 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::feas_tol const value_type &  feas_tol  )  [inline]
 

Set the termination tolerance for the (scaled) equality constraints ||c(x*)||inf which is part of the first order necessary optimality conditions.

Definition at line 84 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::comp_tol const value_type &  comp_tol  )  [inline]
 

Set the termination tolerance for the complementarity condition for the (scaled) bound constraints which is part of the first order necessary optimality conditions.

Definition at line 90 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::step_tol const value_type &  step_tol  )  [inline]
 

Set the termination tolerance for the change in the estimate of the solution.

The test is: |d(i)|/(1+|x(i)|) < step_tol.

Definition at line 96 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::journal_output_level const EJournalOutputLevel &  journal_output_level  )  [inline]
 

Determine the amount of output to a journal file.

Definition at line 100 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::null_space_journal_output_level const EJournalOutputLevel &  null_space_journal_output_level  )  [inline]
 

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.

Definition at line 107 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::journal_print_digits const int &  journal_print_digits  )  [inline]
 

Set the precesion of the journal output.

Definition at line 111 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::check_results const bool &  check_results  )  [inline]
 

Set whether computations will be double checked or not.

Definition at line 115 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::calc_conditioning const bool &  calc_conditioning  )  [inline]
 

Set whether the condition numbers of important matrics is computed and printed or not.

Definition at line 120 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::calc_matrix_norms const bool &  calc_matrix_norms  )  [inline]
 

Set whether or not matrix norms are computed and printed.

Definition at line 124 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::calc_matrix_info_null_space_only const bool &  calc_matrix_info_null_space_only  )  [inline]
 

Set whether calc_conditioning and calc_matrix_norms apply to only null space matrices.

Definition at line 129 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::set_nlp const Teuchos::RefCountPtr< NLP > &  nlp  )  [inline]
 

<<std comp="">> members for the nlp

Definition at line 137 of file MoochoPack_NLPSolverClientInterface.hpp.

void MoochoPack::NLPSolverClientInterface::set_track const Teuchos::RefCountPtr< AlgorithmTracker > &  track  )  [inline]
 

<<std comp="">> members for the track

Definition at line 140 of file MoochoPack_NLPSolverClientInterface.hpp.

virtual EFindMinReturn MoochoPack::NLPSolverClientInterface::find_min  )  [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:

  • If the maximum number of iterations has been exceeded then MAX_ITER_EXCEEDED will be returned. In this case this->track().output_final(...,MAX_ITER_EXCEEDED) is called.
  • If the maximum runtime has been exceeded then MAX_RUN_TIME_EXCEEDED will be returned. In this case this->track().output_final(...,MAX_RUN_TIME_EXCEEDED) is called.
  • An exception is thrown. The client should be prepaired to catch any exceptions thrown from this function. All of the purposefully thrown exceptions are derived from std::exception so the client can check the what() function to see and description of the error. If an exception is thrown then 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:

Postcondtions:

  • Minimum of NLP is found to opt_tol, max_iter was reached or max_run_time reached (throw std::exection)

Implemented in MoochoPack::NLPAlgoContainer.

virtual void MoochoPack::NLPSolverClientInterface::print_algorithm std::ostream &  out  )  const [pure virtual]
 

Prints a description of the algorithm.

Implemented in MoochoPack::NLPAlgoClientInterface, and MoochoPack::NLPAlgoContainer.

virtual void MoochoPack::NLPSolverClientInterface::set_algo_timing bool  algo_timing  )  [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.

virtual bool MoochoPack::NLPSolverClientInterface::algo_timing  )  const [pure virtual]
 

Implemented in MoochoPack::NLPAlgoContainer.

virtual void MoochoPack::NLPSolverClientInterface::print_algorithm_times std::ostream &  out  )  const [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.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:34:29 2008 for MoochoPack : Framework for Large-Scale Optimization Algorithms by doxygen 1.3.9.1