source: trunk/Algorithm/IpConvCheck.hpp @ 424

Last change on this file since 424 was 424, checked in by andreasw, 14 years ago

Synchronized with branches/dev r423

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1// Copyright (C) 2004, International Business Machines and others.
2// All Rights Reserved.
3// This code is published under the Common Public License.
4//
5// $Id: IpConvCheck.hpp 424 2005-08-04 06:55:26Z andreasw $
6//
7// Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
8
9#ifndef __IPCONVCHECK_HPP__
10#define __IPCONVCHECK_HPP__
11
12#include "IpUtils.hpp"
13#include "IpAlgStrategy.hpp"
14
15namespace Ipopt
16{
17
18  /** Base class for checking the algorithm
19   *  termination criteria.
20   */
21  class ConvergenceCheck : public AlgorithmStrategyObject
22  {
23  public:
24    /**@name Constructors/Destructors */
25    //@{
26    /** Constructor */
27    ConvergenceCheck()
28    {}
29
30    /** Default destructor */
31    virtual ~ConvergenceCheck()
32    {}
33    //@}
34
35    /** Convergence return enum */
36    enum ConvergenceStatus {
37      CONTINUE,
38      CONVERGED,
39      CONVERGED_TO_ACCEPTABLE_POINT,
40      MAXITER_EXCEEDED,
41      FAILED
42    };
43
44    /** overloaded from AlgorithmStrategyObject */
45    virtual bool InitializeImpl(const OptionsList& options,
46                                const std::string& prefix) = 0;
47
48    /** Pure virtual method for performing the convergence test */
49    virtual ConvergenceStatus CheckConvergence()=0;
50
51    /** Method for testing if the current iterate is considered to
52     *  satisfy the "accptable level" of accuracy.  The idea is that
53     *  if the desired convergence tolerance cannot be achieved, the
54     *  algorithm might stop after a number of acceptable points have
55     *  been encountered. */
56    virtual bool CurrentIsAcceptable()=0;
57
58  private:
59    /**@name Default Compiler Generated Methods
60     * (Hidden to avoid implicit creation/calling).
61     * These methods are not implemented and
62     * we do not want the compiler to implement
63     * them for us, so we declare them private
64     * and do not define them. This ensures that
65     * they will not be implicitly created/called. */
66    //@{
67    /** Default Constructor */
68    //    ConvergenceCheck();
69
70    /** Copy Constructor */
71    ConvergenceCheck(const ConvergenceCheck&);
72
73    /** Overloaded Equals Operator */
74    void operator=(const ConvergenceCheck&);
75    //@}
76
77  };
78
79} // namespace Ipopt
80
81#endif
Note: See TracBrowser for help on using the repository browser.