ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization Version of the Day
ConstrainedOptPack_QPSolverRelaxedLOQO.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 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions are
00012 // met:
00013 //
00014 // 1. Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 //
00017 // 2. Redistributions in binary form must reproduce the above copyright
00018 // notice, this list of conditions and the following disclaimer in the
00019 // documentation and/or other materials provided with the distribution.
00020 //
00021 // 3. Neither the name of the Corporation nor the names of the
00022 // contributors may be used to endorse or promote products derived from
00023 // this software without specific prior written permission.
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00038 // 
00039 // ***********************************************************************
00040 // @HEADER
00041 
00042 #ifdef CONSTRAINED_OPTIMIZATION_PACK_USE_LOQO
00043 
00044 #ifndef QP_SOLVER_RELAXED_LOQO_H
00045 #define QP_SOLVER_RELAXED_LOQO_H
00046 
00047 #include <vector>
00048 
00049 #include "ConstrainedOptPack_QPSolverRelaxed.hpp"
00050 #include "DenseLinAlgPack_DVectorClass.hpp"
00051 #include "DenseLinAlgPack_DMatrixClass.hpp"
00052 #include "Teuchos_StandardMemberCompositionMacros.hpp"
00053 #include "Teuchos_StandardCompositionMacros.hpp"
00054 
00055 namespace ConstrainedOptPack {
00056 
00063 class QPSolverRelaxedLOQO : public QPSolverRelaxed
00064 {
00065 public:
00066 
00074   class InitLOQOHessianJacobian {
00075   public:
00076 
00078     virtual ~InitLOQOHessianJacobian() {}
00079 
00118     virtual void init_hess_jacob(
00119       const MatrixOp& G, const value_type bigM
00120       , const MatrixOp* E, BLAS_Cpp::Transp trans_E, const DVectorSlice* b
00121       , const int loqo_b_stat[], const size_type num_inequal
00122       , const MatrixOp* F, BLAS_Cpp::Transp trans_F, const DVectorSlice* f
00123       , void* loqo_lp
00124       ) const;
00125 
00126   }; // end class InitLOQOHessianJacobian
00127 
00130   STANDARD_COMPOSITION_MEMBERS( InitLOQOHessianJacobian, init_hess_jacob );
00131 
00134   STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, bigM );
00135 
00139   STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, nonbinding_lag_mult );
00140 
00142   QPSolverRelaxedLOQO(
00143     const init_hess_jacob_ptr_t    init_hess_jacob      = new  InitLOQOHessianJacobian()
00144     ,value_type                     bigM                 = 1e+10
00145     ,value_type                     nonbinding_lag_mult  = 1e-12
00146     );
00147 
00149   ~QPSolverRelaxedLOQO();
00150 
00151   // /////////////////////////////////
00152   // Overridden from QPSolverRelaxed
00153 
00155   QPSolverStats get_qp_stats() const;
00156 
00158   void release_memory();
00159 
00160 protected:
00161 
00162   // /////////////////////////////////
00163   // Overridden from QPSolverRelaxed
00164 
00166   QPSolverStats::ESolutionType imp_solve_qp(
00167       std::ostream* out, EOutputLevel olevel, ERunTests test_what
00168     , const DVectorSlice& g, const MatrixOp& G
00169     , value_type etaL
00170     , const SpVectorSlice& dL, const SpVectorSlice& dU
00171     , const MatrixOp* E, BLAS_Cpp::Transp trans_E, const DVectorSlice* b
00172       , const SpVectorSlice* eL, const SpVectorSlice* eU
00173     , const MatrixOp* F, BLAS_Cpp::Transp trans_F, const DVectorSlice* f
00174     , value_type* obj_d
00175     , value_type* eta, DVectorSlice* d
00176     , SpVector* nu
00177     , SpVector* mu, DVectorSlice* Ed
00178     , DVectorSlice* lambda, DVectorSlice* Fd
00179     );
00180 
00181 private:
00182 
00183   // //////////////////////////////////////////////////////////////
00184   // Private types
00185 
00186   // //////////////////////////////////////////////////////////////
00187   // Private Data Members.
00188 
00189   QPSolverStats     qp_stats_;
00190 
00191   // ////////////////////////////
00192   // Private member functions
00193 
00194 };  // end class QPSolverRelaxedLOQO
00195 
00196 } // end namespace ConstrainedOptimizationPackTypes
00197 
00198 #endif  // QP_SOLVER_RELAXED_QPKWIK_H
00199 
00200 #endif // CONSTRAINED_OPTIMIZATION_PACK_USE_LOQO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends