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

typedef Teuchos::RefCountPtr<
NLP > 
nlp_ptr_t
typedef Teuchos::RefCountPtr<
AlgorithmTracker > 
track_ptr_t
void set_nlp (const Teuchos::RefCountPtr< NLP > &nlp)
 <<std comp="">> members for the nlp
Teuchos::RefCountPtr< NLP > get_nlp () const
NLP & nlp ()
const NLP & nlp () const
void set_track (const Teuchos::RefCountPtr< AlgorithmTracker > &track)
 <<std comp="">> members for the track
Teuchos::RefCountPtr< AlgorithmTracker > get_track () const
AlgorithmTracker & track ()
const AlgorithmTracker & track () const
 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 ()
 
Teuchos::RefCountPtr< NLP > nlp_
Teuchos::RefCountPtr< AlgorithmTracker > track_

Public Types

enum  EFindMinReturn { SOLUTION_FOUND, MAX_ITER_EXCEEDED, MAX_RUN_TIME_EXCEEDED, ALGORITHMIC_ERROR }
  More...

Solver Parameters

void max_iter (const int &max_iter)
 Set the maximum number of iterations the rSQP algorithm can perform.
const int & max_iter () const
void max_run_time (const double &max_run_time)
 Set the maximum run_time.
const double & max_run_time () const
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.
const value_typeopt_tol () const
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.
const value_typefeas_tol () const
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.
const value_typecomp_tol () const
void step_tol (const value_type &step_tol)
 Set the termination tolerance for the change in the estimate of the solution.
const value_typestep_tol () const
void journal_output_level (const EJournalOutputLevel &journal_output_level)
 Determine the amount of output to a journal file.
const EJournalOutputLeveljournal_output_level () const
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.
const EJournalOutputLevelnull_space_journal_output_level () const
void journal_print_digits (const int &journal_print_digits)
 Set the precesion of the journal output.
const int & journal_print_digits () const
void check_results (const bool &check_results)
 Set whether computations will be double checked or not.
const bool & check_results () const
void calc_conditioning (const bool &calc_conditioning)
 Set whether the condition numbers of important matrics is computed and printed or not.
const bool & calc_conditioning () const
void calc_matrix_norms (const bool &calc_matrix_norms)
 Set whether or not matrix norms are computed and printed.
const bool & calc_matrix_norms () const
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.
const bool & calc_matrix_info_null_space_only () const
int max_iter_
double max_run_time_
value_type opt_tol_
value_type feas_tol_
value_type comp_tol_
value_type step_tol_
EJournalOutputLevel journal_output_level_
EJournalOutputLevel null_space_journal_output_level_
int journal_print_digits_
bool check_results_
bool calc_conditioning_
bool calc_matrix_norms_
bool calc_matrix_info_null_space_only_

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.

Private Attributes

NLPInterfacePack::NLPnlp
 
IterationPack::AlgorithmTrackertrack
 

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 Typedef Documentation

typedef Teuchos::RefCountPtr< NLP > MoochoPack::NLPSolverClientInterface::nlp_ptr_t
 

Definition at line 137 of file MoochoPack_NLPSolverClientInterface.hpp.

typedef Teuchos::RefCountPtr< AlgorithmTracker > MoochoPack::NLPSolverClientInterface::track_ptr_t
 

Definition at line 140 of file MoochoPack_NLPSolverClientInterface.hpp.


Member Enumeration Documentation

enum MoochoPack::NLPSolverClientInterface::EFindMinReturn
 

Enumeration values:
SOLUTION_FOUND 
MAX_ITER_EXCEEDED 
MAX_RUN_TIME_EXCEEDED 
ALGORITHMIC_ERROR 

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

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

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.

Teuchos::RefCountPtr< NLP > MoochoPack::NLPSolverClientInterface::get_nlp  )  const [inline]
 

Definition at line 137 of file MoochoPack_NLPSolverClientInterface.hpp.

NLP& MoochoPack::NLPSolverClientInterface::nlp  )  [inline]
 

Definition at line 137 of file MoochoPack_NLPSolverClientInterface.hpp.

const NLP& MoochoPack::NLPSolverClientInterface::nlp  )  const [inline]
 

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.

Teuchos::RefCountPtr< AlgorithmTracker > MoochoPack::NLPSolverClientInterface::get_track  )  const [inline]
 

Definition at line 140 of file MoochoPack_NLPSolverClientInterface.hpp.

AlgorithmTracker& MoochoPack::NLPSolverClientInterface::track  )  [inline]
 

Definition at line 140 of file MoochoPack_NLPSolverClientInterface.hpp.

const AlgorithmTracker& MoochoPack::NLPSolverClientInterface::track  )  const [inline]
 

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.


Member Data Documentation

int MoochoPack::NLPSolverClientInterface::max_iter_ [private]
 

Definition at line 70 of file MoochoPack_NLPSolverClientInterface.hpp.

double MoochoPack::NLPSolverClientInterface::max_run_time_ [private]
 

Definition at line 74 of file MoochoPack_NLPSolverClientInterface.hpp.

value_type MoochoPack::NLPSolverClientInterface::opt_tol_ [private]
 

Definition at line 79 of file MoochoPack_NLPSolverClientInterface.hpp.

value_type MoochoPack::NLPSolverClientInterface::feas_tol_ [private]
 

Definition at line 84 of file MoochoPack_NLPSolverClientInterface.hpp.

value_type MoochoPack::NLPSolverClientInterface::comp_tol_ [private]
 

Definition at line 90 of file MoochoPack_NLPSolverClientInterface.hpp.

value_type MoochoPack::NLPSolverClientInterface::step_tol_ [private]
 

Definition at line 96 of file MoochoPack_NLPSolverClientInterface.hpp.

EJournalOutputLevel MoochoPack::NLPSolverClientInterface::journal_output_level_ [private]
 

Definition at line 100 of file MoochoPack_NLPSolverClientInterface.hpp.

EJournalOutputLevel MoochoPack::NLPSolverClientInterface::null_space_journal_output_level_ [private]
 

Definition at line 107 of file MoochoPack_NLPSolverClientInterface.hpp.

int MoochoPack::NLPSolverClientInterface::journal_print_digits_ [private]
 

Definition at line 111 of file MoochoPack_NLPSolverClientInterface.hpp.

bool MoochoPack::NLPSolverClientInterface::check_results_ [private]
 

Definition at line 115 of file MoochoPack_NLPSolverClientInterface.hpp.

bool MoochoPack::NLPSolverClientInterface::calc_conditioning_ [private]
 

Definition at line 120 of file MoochoPack_NLPSolverClientInterface.hpp.

bool MoochoPack::NLPSolverClientInterface::calc_matrix_norms_ [private]
 

Definition at line 124 of file MoochoPack_NLPSolverClientInterface.hpp.

bool MoochoPack::NLPSolverClientInterface::calc_matrix_info_null_space_only_ [private]
 

Definition at line 129 of file MoochoPack_NLPSolverClientInterface.hpp.

Teuchos::RefCountPtr< NLP > MoochoPack::NLPSolverClientInterface::nlp_ [private]
 

Definition at line 137 of file MoochoPack_NLPSolverClientInterface.hpp.

Teuchos::RefCountPtr< AlgorithmTracker > MoochoPack::NLPSolverClientInterface::track_ [private]
 

Definition at line 140 of file MoochoPack_NLPSolverClientInterface.hpp.

NLPInterfacePack::NLP* MoochoPack::NLPSolverClientInterface::nlp [private]
 

Definition at line 243 of file MoochoPack_NLPSolverClientInterface.hpp.

IterationPack::AlgorithmTracker* MoochoPack::NLPSolverClientInterface::track [private]
 

Definition at line 245 of file MoochoPack_NLPSolverClientInterface.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:36:19 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1