ConstrainedOptPack_QPSolverRelaxedQPKWIK.hpp

Go to the documentation of this file.
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 QP_SOLVER_RELAXED_QPKWIK_H
00030 #define QP_SOLVER_RELAXED_QPKWIK_H
00031 
00032 #include <vector>
00033 
00034 #include "ConstrainedOptPack_QPSolverRelaxed.hpp"
00035 #include "DenseLinAlgPack_DVectorClass.hpp"
00036 #include "DenseLinAlgPack_DMatrixClass.hpp"
00037 #include "Teuchos_StandardMemberCompositionMacros.hpp"
00038 
00039 namespace ConstrainedOptPack {
00040 
00047 class QPSolverRelaxedQPKWIK : public QPSolverRelaxed
00048 {
00049 public:
00050 
00053 
00055   STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, max_qp_iter_frac );
00056 
00058   STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, infinite_bound );
00059 
00061   QPSolverRelaxedQPKWIK(
00062       value_type        max_qp_iter_frac  = 10.0
00063       ,value_type       infinite_bound      = 1e+20
00064     );
00065 
00067   ~QPSolverRelaxedQPKWIK();
00068 
00070 
00073 
00075   QPSolverStats get_qp_stats() const;
00077   void release_memory();
00078 
00080 
00081 protected:
00082 
00085 
00087   QPSolverStats::ESolutionType imp_solve_qp(
00088     std::ostream* out, EOutputLevel olevel, ERunTests test_what
00089     ,const Vector& g, const MatrixSymOp& G
00090     ,value_type etaL
00091     ,const Vector* dL, const Vector* dU
00092     ,const MatrixOp* E, BLAS_Cpp::Transp trans_E, const Vector* b
00093     ,const Vector* eL, const Vector* eU
00094     ,const MatrixOp* F, BLAS_Cpp::Transp trans_F, const Vector* f
00095     ,value_type* obj_d
00096     ,value_type* eta, VectorMutable* d
00097     ,VectorMutable* nu
00098     ,VectorMutable* mu, VectorMutable* Ed
00099     ,VectorMutable* lambda, VectorMutable* Fd
00100     );
00101 
00103 
00104 private:
00105 
00106   // //////////////////////////////////////////////////////////////
00107   // Private types
00108 
00110   typedef std::vector<index_type>  IBND_t;
00112   typedef std::vector<index_type>  IACTSTORE_t;
00114   typedef std::vector<index_type>  IACT_t;
00116   typedef std::vector<index_type>  ISTATE_t;
00117 
00118   // //////////////////////////////////////////////////////////////
00119   // Private Data Members.
00120 
00121   QPSolverStats   qp_stats_;
00122 
00123   // Inverse mapping for IBND_INV(j) == k <-> IBND(k) == j
00124   IBND_t          IBND_INV_;
00125 
00126   // Parameters to QPKWIK
00127 
00129   index_type      N_;
00131   index_type      M1_;
00133   index_type      M2_;
00135   index_type      M3_;
00137   DVector          GRAD_;
00139   DMatrix       UINV_AUG_;
00141   index_type      LDUINV_AUG_;
00143   IBND_t          IBND_;
00145   DVector          BL_;
00147   DVector          BU_;
00149   DMatrix       A_;
00151   index_type    LDA_;
00153   DVector          YPY_;
00155   index_type      IYPY_;
00157   index_type      WARM_;
00159   value_type      NUMPARAM_[3];
00161   index_type      MAX_ITER_;
00162 
00163   // Input / Output
00164 
00166   DVector          X_;
00168   index_type      NACTSTORE_;
00170   IACTSTORE_t     IACTSTORE_;
00172   index_type      INF_;
00173   
00174   // Output
00175 
00177   index_type      NACT_;
00179   IACT_t          IACT_;
00181   DVector          UR_;
00183   value_type      EXTRA_;
00185   index_type      ITER_;
00187   index_type      NUM_ADDS_;
00189   index_type      NUM_DROPS_;
00190   
00191   // Internal state
00192 
00194   ISTATE_t        ISTATE_;
00195 
00196   // Workspace
00197 
00199   index_type      LRW_;
00201   DVector          RW_;
00202 
00203 }; // end class QPSolverRelaxedQPKWIK
00204 
00205 } // end namespace ConstrainedOptimizationPackTypes
00206 
00207 #endif // QP_SOLVER_RELAXED_QPKWIK_H

Generated on Tue Oct 20 12:51:45 2009 for MOOCHO (Single Doxygen Collection) by doxygen 1.4.7