- Main Page
- Classes
- Files

- File List
- File Members

# src/Algorithm/IpBacktrackingLSAcceptor.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2004, 2007 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpBacktrackingLSAcceptor.hpp 1861 2010-12-21 21:34:47Z andreasw $
    00006 //
    00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
    00008 //           Andreas Waechter                 IBM    2005-10-13
    00009 //               derived file from IpFilterLineSearch.hpp
    00010
    00011 #ifndef __IPBACKTRACKINGLSACCEPTOR_HPP__
    00012 #define __IPBACKTRACKINGLSACCEPTOR_HPP__
    00013
    00014 #include "IpAlgStrategy.hpp"
    00015
    00016 namespace Ipopt
    00017 {
    00018
    00021   class BacktrackingLSAcceptor : public AlgorithmStrategyObject
    00022   {
    00023   public:
    00027     BacktrackingLSAcceptor()
    00028     {}
    00029
    00031     virtual ~BacktrackingLSAcceptor()
    00032     {}
    00034
    00036     virtual bool InitializeImpl(const OptionsList& options,
    00037                                 const std::string& prefix)=0;
    00038
    00045     virtual void Reset()=0;
    00046
    00050     virtual void InitThisLineSearch(bool in_watchdog)=0;
    00051
    00056     virtual void PrepareRestoPhaseStart()=0;
    00057
    00062     virtual Number CalculateAlphaMin()=0;
    00063
    00071     virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal)=0;
    00072
    00084     virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
    00085                                           Number& alpha_primal,
    00086                                           SmartPtr<IteratesVector>& actual_delta)=0;
    00087
    00094     virtual bool TryCorrector(Number alpha_primal_test,
    00095                               Number& alpha_primal,
    00096                               SmartPtr<IteratesVector>& actual_delta)=0;
    00097
    00103     virtual char UpdateForNextIteration(Number alpha_primal_test)=0;
    00104
    00107     virtual void StartWatchDog()=0;
    00108
    00111     virtual void StopWatchDog()=0;
    00112
    00115     virtual bool RestoredIterate()
    00116     {
    00117       return false;
    00118     }
    00119
    00122     virtual bool NeverRestorationPhase()
    00123     {
    00124       return false;
    00125     }
    00126
    00131     virtual bool DoFallback()
    00132     {
    00133       return false;
    00134     }
    00135
    00139     virtual Number ComputeAlphaForY(Number alpha_primal,
    00140                                     Number alpha_dual,
    00141                                     SmartPtr<IteratesVector>& delta)
    00142     {
    00143       THROW_EXCEPTION(OPTION_INVALID,
    00144                       "Value \"acceptor\" for option \"alpha_for_y\" not valid for this line search.");
    00145       return -1.;
    00146     }
    00147
    00150     virtual bool HasComputeAlphaForY() const
    00151     {
    00152       return false;
    00153     }
    00154
    00157     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00159
    00160   private:
    00170     BacktrackingLSAcceptor(const BacktrackingLSAcceptor&);
    00171
    00173     void operator=(const BacktrackingLSAcceptor&);
    00175   };
    00176
    00177 } // namespace Ipopt
    00178
    00179 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines