# IpInexactLSAcceptor.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2008 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpInexactLSAcceptor.hpp 1861 2010-12-21 21:34:47Z andreasw $
    00006 //
    00007 // Authors:  Andreas Waechter                 IBM    2008-09-11
    00008 //               derived file from IpPenaltyLSAcceptor.hpp (rev 019)
    00009
    00010 #ifndef __IPINEXACTLSACCEPTOR_HPP__
    00011 #define __IPINEXACTLSACCEPTOR_HPP__
    00012
    00013 #include "IpBacktrackingLSAcceptor.hpp"
    00014 #include "IpInexactCq.hpp"
    00015
    00016 namespace Ipopt
    00017 {
    00018
    00022   class InexactLSAcceptor : public BacktrackingLSAcceptor
    00023   {
    00024   public:
    00030     InexactLSAcceptor();
    00031
    00033     virtual ~InexactLSAcceptor();
    00035
    00037     virtual bool InitializeImpl(const OptionsList& options,
    00038                                 const std::string& prefix);
    00039
    00046     virtual void Reset();
    00047
    00051     virtual void InitThisLineSearch(bool in_watchdog);
    00052
    00055     virtual void PrepareRestoPhaseStart();
    00056
    00058     virtual Number CalculateAlphaMin();
    00059
    00065     virtual bool CheckAcceptabilityOfTrialPoint(Number alpha_primal);
    00066
    00071     virtual bool TrySecondOrderCorrection(Number alpha_primal_test,
    00072                                           Number& alpha_primal,
    00073                                           SmartPtr<IteratesVector>& actual_delta);
    00074
    00081     virtual bool TryCorrector(Number alpha_primal_test,
    00082                               Number& alpha_primal,
    00083                               SmartPtr<IteratesVector>& actual_delta);
    00084
    00089     virtual char UpdateForNextIteration(Number alpha_primal_test);
    00090
    00093     virtual void StartWatchDog();
    00094
    00097     virtual void StopWatchDog();
    00098
    00105     bool IsAcceptableToCurrentIterate(Number trial_barr, Number trial_theta,
    00106                                       bool called_from_restoration=false) const;
    00108
    00110     virtual Number ComputeAlphaForY(Number alpha_primal,
    00111                                     Number alpha_dual,
    00112                                     SmartPtr<IteratesVector>& delta);
    00113
    00116     virtual bool HasComputeAlphaForY() const
    00117     {
    00118       return true;
    00119     }
    00120
    00123     static void RegisterOptions(SmartPtr<RegisteredOptions> roptions);
    00125
    00126   protected:
    00128     InexactData& InexData()
    00129     {
    00130       InexactData& inexact_data =
    00131         static_cast<InexactData&>(IpData().AdditionalData());
    00132       DBG_ASSERT(dynamic_cast<InexactData*>(&IpData().AdditionalData()));
    00133       return inexact_data;
    00134     }
    00135
    00137     InexactCq& InexCq()
    00138     {
    00139       InexactCq& inexact_cq =
    00140         static_cast<InexactCq&>(IpCq().AdditionalCq());
    00141       DBG_ASSERT(dynamic_cast<InexactCq*>(&IpCq().AdditionalCq()));
    00142       return inexact_cq;
    00143     }
    00144
    00145   private:
    00155     InexactLSAcceptor(const InexactLSAcceptor&);
    00156
    00158     void operator=(const InexactLSAcceptor&);
    00160
    00162     Number CalcPred(Number alpha);
    00163
    00167     void ResetSlacks();
    00168
    00172     Number nu_init_;
    00174     Number nu_low_init_;
    00176     Number nu_low_fact_;
    00178     Number nu_inc_;
    00180     Number eta_;
    00182     Number rho_;
    00184     Number tcc_theta_;
    00186     Number nu_update_inf_skip_tol_;
    00189     bool flexible_penalty_function_;
    00191
    00196     Number reference_theta_;
    00199     Number reference_barr_;
    00202     Number reference_pred_;
    00204     Number watchdog_theta_;
    00206     Number watchdog_barr_;
    00208     Number watchdog_pred_;
    00210
    00214     Number nu_;
    00216     Number last_nu_;
    00218     Number nu_low_;
    00220     Number last_nu_low_;
    00222     Number inexact_decomposition_activate_tol_;
    00224     Number inexact_decomposition_inactivate_tol_;
    00226
    00230     bool in_tt2_;
    00231
    00234     Number resto_pred_;
    00235
    00238     bool accepted_by_low_only_;
    00239   };
    00240
    00241 } // namespace Ipopt
    00242
    00243 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines