|
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 // 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 #ifndef QP_INIT_FIXED_FREE_STD_H 00043 #define QP_INIT_FIXED_FREE_STD_H 00044 00045 #include "ConstrainedOptPack_QPSchur.hpp" 00046 00047 namespace ConstrainedOptPack { 00048 namespace QPSchurPack { 00049 00058 class QPInitFixedFreeStd : public QP { 00059 public: 00060 00062 QPInitFixedFreeStd(); 00063 00130 void initialize( 00131 const DVectorSlice &g 00132 ,const MatrixSymOp &G 00133 ,const MatrixOp *A 00134 ,size_type n_R 00135 ,const size_type i_x_free[] 00136 ,const size_type i_x_fixed[] 00137 ,const EBounds bnd_fixed[] 00138 ,const DVectorSlice &b_X 00139 ,const MatrixSymOpNonsing &Ko 00140 ,const DVectorSlice &fo 00141 ,Constraints *constraints 00142 ,std::ostream *out = NULL 00143 ,bool test_setup = false 00144 ,value_type warning_tol = 1e-10 00145 ,value_type error_tol = 1e-5 00146 ,bool print_all_warnings = false 00147 ); 00148 00151 00153 size_type n() const; 00155 size_type m() const; 00157 const DVectorSlice g() const; 00159 const MatrixSymOp& G() const; 00161 const MatrixOp& A() const; 00163 size_type n_R() const; 00165 const x_init_t& x_init() const; 00167 const l_x_X_map_t& l_x_X_map() const; 00169 const i_x_X_map_t& i_x_X_map() const; 00171 const DVectorSlice b_X() const; 00173 const GenPermMatrixSlice& Q_R() const; 00175 const GenPermMatrixSlice& Q_X() const; 00177 const MatrixSymOpNonsing& Ko() const; 00179 const DVectorSlice fo() const; 00181 Constraints& constraints(); 00183 const Constraints& constraints() const; 00184 00186 00187 private: 00188 00189 // /////////////////////////////////// 00190 // Private types 00191 00192 typedef std::vector<size_type> row_i_t; 00193 typedef std::vector<size_type> col_j_t; 00194 00195 // /////////////////////////////////// 00196 // Private data members 00197 00198 00199 size_type n_; 00200 size_type n_R_; 00201 size_type m_; 00202 DVectorSlice g_; // will not be modified! 00203 const MatrixSymOp *G_; 00204 const MatrixOp *A_; // If NULL not no equalities in Ko 00205 x_init_t x_init_; 00206 l_x_X_map_t l_x_X_map_; 00207 i_x_X_map_t i_x_X_map_; 00208 DVectorSlice b_X_; // will not be modified! 00209 GenPermMatrixSlice Q_R_; 00210 row_i_t Q_R_row_i_; 00211 col_j_t Q_R_col_j_; 00212 GenPermMatrixSlice Q_X_; 00213 row_i_t Q_X_row_i_; 00214 col_j_t Q_X_col_j_; 00215 const MatrixSymOpNonsing 00216 *Ko_; 00217 DVectorSlice fo_; // will not be modified 00218 Constraints *constraints_; 00219 00220 // Private member function 00221 void assert_initialized() const; 00222 00223 }; // end class QPInitFixedFreeStd 00224 00225 } // end namespace QPSchurPack 00226 } // end namespace ConstrainedOptPack 00227 00228 #endif // QP_INIT_FIXED_FREE_STD_H
1.7.6.1