OptBaNewton.h

00001 #ifndef optbcnewton2_h
00002 #define optbcnewton2_h
00003 
00004 /*----------------------------------------------------------------------
00005  Copyright (c) 2001, Sandia Corporation.
00006  J.C. Meza, Sandia National Laboratories, meza@ca.sandia.gov
00007  ----------------------------------------------------------------------*/
00008 
00009 #include "OptBCNewtonLike.h"
00010 
00011 
00012 namespace OPTPP {
00013 
00027 class OptBaNewton: public OptBCNewton2Deriv {
00028 
00030   double          mu;
00032   double          fvalue_barrier, fprev_barrier, fprev_outer;
00034   NEWMAT::ColumnVector    grad_barrier, gprev_barrier; 
00036   NEWMAT::SymmetricMatrix Hess_barrier; 
00037 
00038  public:
00039 
00040 // Analytic Hessian case
00041 
00047   OptBaNewton(NLP2* p): OptBCNewton2Deriv(p)
00048     {strcpy(method,"Bound constrained Newton with barrier");}
00049 
00056   OptBaNewton(NLP2* p, UPDATEFCN u): OptBCNewton2Deriv(p, u)
00057     {strcpy(method,"Bound constrained Newton with barrier");}
00058 
00065   OptBaNewton(NLP2* p, TOLS t): OptBCNewton2Deriv(p, t)
00066     {strcpy(method,"Bound constrained Newton with barrier");}
00067 
00071   virtual ~OptBaNewton(){ }
00072 
00073 //--------------------------------------
00074 // These are defined elsewhere
00075 //--------------------------------------
00076   void            initOpt();
00077   void            initHessian();
00078   int             checkInnerConvg(int);
00079   int             checkConvg();
00080   void            acceptStep(int,int);
00081   void            optimize();
00082   void            updateBarrierMultiplier();
00083   NEWMAT::SymmetricMatrix updateH(NEWMAT::SymmetricMatrix& H, int k);
00084   double          compute_Barrier_Fvalue(double,NEWMAT::ColumnVector&);
00085   NEWMAT::ColumnVector    compute_Barrier_Gradient(NEWMAT::ColumnVector&,
00086     NEWMAT::ColumnVector&);
00087   NEWMAT::SymmetricMatrix compute_Barrier_Hessian(NEWMAT::SymmetricMatrix&,
00088     NEWMAT::ColumnVector&);
00089   NEWMAT::ColumnVector    computeSearch2(NEWMAT::SymmetricMatrix&, 
00090     NEWMAT::ColumnVector&);
00091   int             computeStep(NEWMAT::ColumnVector );
00092   double          computeMaxStep(NEWMAT::ColumnVector &);
00093   double          scalarNewton(double,double,double,double,double);
00094   void            setAsideCurrentVariables();
00095 
00096 };
00097 } // namespace OPTPP
00098 #endif
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3