source: branches/dev/Algorithm/IpRestoFilterConvCheck.hpp @ 501

Last change on this file since 501 was 501, checked in by claird, 14 years ago

Cleaned up all the Copyright comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1// Copyright (C) 2004, 2005 International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Common Public License.
4//
5// $Id: IpRestoFilterConvCheck.hpp 501 2005-08-26 15:43:07Z claird $
6//
7// Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
8
9#ifndef __IPRESTOFILTERCONVCHECK_HPP__
10#define __IPRESTOFILTERCONVCHECK_HPP__
11
12#include "IpOptErrorConvCheck.hpp"
13#include "IpFilterLineSearch.hpp"
14
15namespace Ipopt
16{
17
18  /** Convergence check for the restoration phase as called by the
19   *  filter.  This inherits from the OptimalityErrorConvergenceCheck
20   *  so that the method for the regular optimality error convergence
21   *  criterion can be checked as well.  In addition, this convergence
22   *  check returns the CONVERGED message, if the current iteration is
23   *  acceptable to the original filter.
24   *
25   *  Since this object needs to know about the original NLP, it also
26   *  inherits from RestoProblemCoupler, so that the restoration phase
27   *  object can call the SetObjs method to set the corresponding
28   *  pointers before the Initilize for the restoration phase
29   *  algorithm is called.
30   */
31  class RestoFilterConvergenceCheck :
32        public OptimalityErrorConvergenceCheck
33  {
34  public:
35    /**@name Constructors/Destructors */
36    //@{
37    /** Default Constructor */
38    RestoFilterConvergenceCheck();
39
40    /** Default destructor */
41    virtual ~RestoFilterConvergenceCheck();
42    //@}
43
44    /** Set the object for the original filter line search. Here,
45     *  filter_line_search must be the same strategy object to which
46     *  the restoration phase object with this object is given.  This
47     *  method must be called to finish the definition of the
48     *  algorithm, before Initialize is called. */
49    void SetOrigFilterLineSearch(const FilterLineSearch& orig_filter_line_search);
50
51    /** overloaded from AlgorithmStrategyObject */
52    virtual bool InitializeImpl(const OptionsList& options,
53                                const std::string& prefix);
54
55    /** overloaded from ConvergenceCheck */
56    virtual ConvergenceStatus CheckConvergence();
57
58    /** Methods used by IpoptType */
59    //@{
60    static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
61    //@}
62  private:
63    /**@name Default Compiler Generated Methods (Hidden to avoid
64     * implicit creation/calling).  These methods are not implemented
65     * and we do not want the compiler to implement them for us, so we
66     * declare them private and do not define them. This ensures that
67     * they will not be implicitly created/called. */
68    //@{
69    /** Copy Constructor */
70    RestoFilterConvergenceCheck(const RestoFilterConvergenceCheck&);
71
72    /** Overloaded Equals Operator */
73    void operator=(const RestoFilterConvergenceCheck&);
74    //@}
75
76    /** @name Algorithmic parameters */
77    //@{
78    /** Fraction of required reduction in infeasibility before problem
79     *  is considered to be solved. */
80    Number kappa_resto_;
81    /** Maximum number of iterations in restoration phase */
82    Index maximum_iters_;
83    //@}
84
85    /** Flag indicating that this is the first call.  We don't want to
86     *  leave the restoration phase without taking at least one step,
87     *  so this flag is used to ensure this. */
88    bool first_resto_iter_;
89
90    /** Strategy object for the filter line search method for the
91     *  original NLP.  CAREFUL: We must not hold on to this object
92     *  with a SmartPtr, because have otherwise circular references
93     *  that prevent the destructor of the line search object to be
94     *  called! */
95    const FilterLineSearch* orig_filter_line_search_;
96  };
97
98} // namespace Ipopt
99
100#endif
Note: See TracBrowser for help on using the repository browser.