|
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_SOLVER_RELAXED_TESTER_H 00043 #define QP_SOLVER_RELAXED_TESTER_H 00044 00045 #include "ConstrainedOptPack_QPSolverRelaxed.hpp" 00046 #include "Teuchos_StandardMemberCompositionMacros.hpp" 00047 00048 namespace ConstrainedOptPack { 00049 00146 class QPSolverRelaxedTester { 00147 public: 00148 00150 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, opt_warning_tol ); 00151 00153 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, opt_error_tol ); 00154 00156 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, feas_warning_tol ); 00157 00159 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, feas_error_tol ); 00160 00162 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, comp_warning_tol ); 00163 00165 STANDARD_MEMBER_COMPOSITION_MEMBERS( value_type, comp_error_tol ); 00166 00168 QPSolverRelaxedTester( 00169 value_type opt_warning_tol = 1e-10 00170 ,value_type opt_error_tol = 1e-5 00171 ,value_type feas_warning_tol = 1e-10 00172 ,value_type feas_error_tol = 1e-5 00173 ,value_type comp_warning_tol = 1e-10 00174 ,value_type comp_error_tol = 1e-5 00175 ); 00176 00178 virtual ~QPSolverRelaxedTester() {} 00179 00226 virtual bool check_optimality_conditions( 00227 QPSolverStats::ESolutionType solution_type 00228 ,const value_type infinite_bound 00229 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00230 ,const Vector& g, const MatrixSymOp& G 00231 ,value_type etaL 00232 ,const Vector& dL, const Vector& dU 00233 ,const MatrixOp& E, BLAS_Cpp::Transp trans_E, const Vector& b 00234 ,const Vector& eL, const Vector& eU 00235 ,const MatrixOp& F, BLAS_Cpp::Transp trans_F, const Vector& f 00236 ,const value_type* obj_d 00237 ,const value_type* eta, const Vector* d 00238 ,const Vector* nu 00239 ,const Vector* mu, const Vector* Ed 00240 ,const Vector* lambda, const Vector* Fd 00241 ); 00242 00245 virtual bool check_optimality_conditions( 00246 QPSolverStats::ESolutionType solution_type 00247 ,const value_type infinite_bound 00248 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00249 ,const Vector& g, const MatrixSymOp& G 00250 ,value_type etaL 00251 ,const Vector& dL, const Vector& dU 00252 ,const MatrixOp& E, BLAS_Cpp::Transp trans_E, const Vector& b 00253 ,const Vector& eL, const Vector& eU 00254 ,const value_type* obj_d 00255 ,const value_type* eta, const Vector* d 00256 ,const Vector* nu 00257 ,const Vector* mu, const Vector* Ed 00258 ); 00259 00262 virtual bool check_optimality_conditions( 00263 QPSolverStats::ESolutionType solution_type 00264 ,const value_type infinite_bound 00265 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00266 ,const Vector& g, const MatrixSymOp& G 00267 ,value_type etaL 00268 ,const Vector& dL, const Vector& dU 00269 ,const MatrixOp& F, BLAS_Cpp::Transp trans_F, const Vector& f 00270 ,const value_type* obj_d 00271 ,const value_type* eta, const Vector* d 00272 ,const Vector* nu 00273 ,const Vector* lambda, const Vector* Fd 00274 ); 00275 00276 00280 virtual bool check_optimality_conditions( 00281 QPSolverStats::ESolutionType solution_type 00282 ,const value_type infinite_bound 00283 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00284 ,const Vector& g, const MatrixSymOp& G 00285 ,const Vector& dL, const Vector& dU 00286 ,const value_type* obj_d 00287 ,const Vector* d 00288 ,const Vector* nu 00289 ); 00290 00295 virtual bool check_optimality_conditions( 00296 QPSolverStats::ESolutionType solution_type 00297 ,const value_type infinite_bound 00298 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00299 ,const Vector& g, const MatrixSymOp& G 00300 ,value_type etaL 00301 ,const Vector* dL, const Vector* dU 00302 ,const MatrixOp* E, BLAS_Cpp::Transp trans_E, const Vector* b 00303 ,const Vector* eL, const Vector* eU 00304 ,const MatrixOp* F, BLAS_Cpp::Transp trans_F, const Vector* f 00305 ,const value_type* obj_d 00306 ,const value_type* eta, const Vector* d 00307 ,const Vector* nu 00308 ,const Vector* mu, const Vector* Ed 00309 ,const Vector* lambda, const Vector* Fd 00310 ); 00311 00312 protected: 00313 00319 virtual bool imp_check_optimality_conditions( 00320 QPSolverStats::ESolutionType solution_type 00321 ,const value_type infinite_bound 00322 ,std::ostream* out, bool print_all_warnings, bool print_vectors 00323 ,const Vector& g, const MatrixSymOp& G 00324 ,value_type etaL 00325 ,const Vector* dL, const Vector* dU 00326 ,const MatrixOp* E, BLAS_Cpp::Transp trans_E, const Vector* b 00327 ,const Vector* eL, const Vector* eU 00328 ,const MatrixOp* F, BLAS_Cpp::Transp trans_F, const Vector* f 00329 ,const value_type* obj_d 00330 ,const value_type* eta, const Vector* d 00331 ,const Vector* nu 00332 ,const Vector* mu, const Vector* Ed 00333 ,const Vector* lambda, const Vector* Fd 00334 ); 00335 00336 }; // end class QPSolverRelaxedTester 00337 00338 } // end namespace ConstrainedOptimizationPackTypes 00339 00340 #endif // QP_SOLVER_RELAXED_TESTER_H
1.7.6.1