MoochoPack : Framework for Large-Scale Optimization Algorithms Version of the Day
MoochoPack_FeasibilityStepReducedStd_Strategy.hpp
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef FEASIBILITY_STEP_REDUCED_STD_STRATEGY_H
00030 #define FEASIBILITY_STEP_REDUCED_STD_STRATEGY_H
00031 
00032 #include "MoochoPack_FeasibilityStep_Strategy.hpp"
00033 #include "MoochoPack_QuasiRangeSpaceStep_Strategy.hpp"
00034 #include "MoochoPack_d_bounds_iter_quant.hpp"
00035 #include "IterationPack_CastIQMember.hpp"
00036 #include "ConstrainedOptPack_QPSolverRelaxed.hpp"
00037 #include "ConstrainedOptPack_QPSolverRelaxedTester.hpp"
00038 #include "AbstractLinAlgPack_MatrixOp.hpp"
00039 #include "DenseLinAlgPack_DMatrixClass.hpp"
00040 #include "AbstractLinAlgPack_VectorSpace.hpp"
00041 #include "Teuchos_StandardCompositionMacros.hpp"
00042 #include "Teuchos_StandardMemberCompositionMacros.hpp"
00043 
00044 namespace MoochoPack {
00045 
00048 class FeasibilityStepReducedStd_Strategy : public FeasibilityStep_Strategy
00049 {
00050 public:
00051 
00053   STANDARD_COMPOSITION_MEMBERS( QuasiRangeSpaceStep_Strategy, quasi_range_space_step );
00054 
00055   typedef ConstrainedOptPack::QPSolverRelaxedTester
00056     QPSolverRelaxedTester;
00057 
00059   STANDARD_COMPOSITION_MEMBERS( QPSolverRelaxed, qp_solver );
00060 
00062   STANDARD_COMPOSITION_MEMBERS( QPSolverRelaxedTester, qp_tester );
00063     
00065   enum EQPObjective {
00066     OBJ_MIN_FULL_STEP           
00067     ,OBJ_MIN_NULL_SPACE_STEP    
00068     ,OBJ_RSQP                   
00069   };
00070 
00073   STANDARD_MEMBER_COMPOSITION_MEMBERS( EQPObjective, qp_objective );
00074 
00076   enum EQPTesting {
00077     QP_TEST_DEFAULT     
00078     ,QP_TEST            
00079     ,QP_NO_TEST         
00080   };
00081 
00084   STANDARD_MEMBER_COMPOSITION_MEMBERS( EQPTesting, qp_testing );
00085 
00087   FeasibilityStepReducedStd_Strategy(
00088     const quasi_range_space_step_ptr_t   &quasi_range_space_step
00089     ,const qp_solver_ptr_t               &qp_solver
00090     ,const qp_tester_ptr_t               &qp_tester
00091     ,EQPObjective                        qp_objective     = OBJ_MIN_NULL_SPACE_STEP
00092     ,EQPTesting                          qp_testing       = QP_TEST_DEFAULT
00093     );
00094 
00095   // ////////////////////////////////////////////
00096   // Overridden from FeasibilityStep_Strategy
00097 
00103    bool compute_feasibility_step(
00104     std::ostream& out, EJournalOutputLevel olevel, NLPAlgo *algo, NLPAlgoState *s
00105     ,const Vector& xo, const Vector& c_xo, VectorMutable* w
00106       );
00107 
00109   void print_step( std::ostream& out, const std::string& leading_str ) const;
00110 
00111 private:
00112 
00113   IterationPack::CastIQMember<VectorMutable>  dl_iq_;
00114   IterationPack::CastIQMember<VectorMutable>  du_iq_;
00115   int                                                      current_k_;
00116   Teuchos::RCP<const MatrixOp>            Hess_ptr_;
00117   VectorSpace::vec_mut_ptr_t                               grad_store_;
00118   DMatrix                                                Hess_store_;
00119 
00120 }; // end class FeasibilityStepReducedStd_Strategy
00121 
00122 } // end namespace MoochoPack
00123 
00124 #endif // FEASIBILITY_STEP_REDUCED_STD_STRATEGY_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends