|
ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization Version of the Day
|
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 #ifdef CONSTRAINED_OPTIMIZATION_PACK_USE_QPOPT 00030 00031 #ifndef QP_SOLVER_RELAXED_QPOPT_H 00032 #define QP_SOLVER_RELAXED_QPOPT_H 00033 00034 #include "ConstrainedOptPack_QPSolverRelaxedQPOPTSOL.hpp" 00035 #include "Teuchos_StandardMemberCompositionMacros.hpp" 00036 00037 namespace ConstrainedOptPack { 00038 00043 class QPSolverRelaxedQPOPT : public QPSolverRelaxedQPOPTSOL 00044 { 00045 public: 00046 00048 typedef QPSolverRelaxedQPOPTSOL inherited; 00049 00052 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, max_qp_iter_frac ); 00053 00055 QPSolverRelaxedQPOPT( 00056 value_type max_qp_iter_frac = 10.0 00057 ); 00058 00060 ~QPSolverRelaxedQPOPT(); 00061 00062 // ///////////////////////////////// 00063 // Overridden from QPSolverRelaxed 00064 00066 void release_memory(); 00067 00068 protected: 00069 00070 // ///////////////////////////////////////////////////////////// 00071 // Overridden from QPSolverRelaxedQPOPTSOL 00072 00074 f_int liwork(f_int N, f_int NCLIN) const; 00076 f_int lrwork(f_int N, f_int NCLIN) const; 00078 EInform call_qp_solver(bool warm_start); 00079 00080 private: 00081 00082 // //////////////////////////// 00083 // Private types 00084 00086 enum EQPOPTInform { 00087 STRONG_LOCAL_MIN = 0, 00088 WEAK_LOCAL_MIN = 1, 00089 UNBOUNDED = 2, 00090 INFEASIBLE = 3, 00091 ITMAX_EXCEEDED = 4, 00092 MAX_DOF_TOO_SMALL = 5, 00093 INVALID_INPUT = 6, 00094 PROB_TYPE_NOT_REGOG = 7 00095 }; 00096 00097 // //////////////////////////// 00098 // Private data members 00099 00100 // extra QPOPT control and input parameters. 00101 00102 // control 00103 00104 f_int ITMAX_; 00105 f_dbl_prec BIGBND_; 00106 f_dbl_prec FEATOL_; 00107 00108 // input/output 00109 00110 f_int LDA_; 00111 f_int LDH_; 00112 f_dbl_prec* H_; 00113 f_int INFORM_; 00114 00115 // //////////////////////////// 00116 // Private member functions 00117 00118 // not defined and not to be called. 00119 QPSolverRelaxedQPOPT(const QPSolverRelaxedQPOPT&); 00120 QPSolverRelaxedQPOPT& operator=(const QPSolverRelaxedQPOPT&); 00121 00122 }; // end class QPSolverRelaxedQPOPT 00123 00124 } // end namespace ConstrainedOptPack 00125 00126 #endif // QP_SOLVER_RELAXED_QPOPT_H 00127 00128 #endif // CONSTRAINED_OPTIMIZATION_PACK_USE_QPOPT
1.7.4