MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConstrainedOptPack_QPSolverRelaxedQPKWIK.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef QP_SOLVER_RELAXED_QPKWIK_H
43 #define QP_SOLVER_RELAXED_QPKWIK_H
44 
45 #include <vector>
46 
51 #include "Teuchos_F77_wrappers.h"
52 
53 namespace ConstrainedOptPack {
54 
62 {
63 public:
64 
67 
70 
73 
76  value_type max_qp_iter_frac = 10.0
77  ,value_type infinite_bound = 1e+20
78  );
79 
82 
84 
87 
91  void release_memory();
92 
94 
95 protected:
96 
99 
102  std::ostream* out, EOutputLevel olevel, ERunTests test_what
103  ,const Vector& g, const MatrixSymOp& G
104  ,value_type etaL
105  ,const Vector* dL, const Vector* dU
106  ,const MatrixOp* E, BLAS_Cpp::Transp trans_E, const Vector* b
107  ,const Vector* eL, const Vector* eU
108  ,const MatrixOp* F, BLAS_Cpp::Transp trans_F, const Vector* f
109  ,value_type* obj_d
110  ,value_type* eta, VectorMutable* d
111  ,VectorMutable* nu
112  ,VectorMutable* mu, VectorMutable* Ed
113  ,VectorMutable* lambda, VectorMutable* Fd
114  );
115 
117 
118 private:
119 
120  // //////////////////////////////////////////////////////////////
121  // Private types
122 
126  typedef std::vector<f_int> IBND_t;
128  typedef std::vector<f_int> IACTSTORE_t;
130  typedef std::vector<f_int> IACT_t;
132  typedef std::vector<f_int> ISTATE_t;
133 
134  // //////////////////////////////////////////////////////////////
135  // Private Data Members.
136 
138 
139  // Inverse mapping for IBND_INV(j) == k <-> IBND(k) == j
141 
142  // Parameters to QPKWIK
143 
178 
179  // Input / Output
180 
189 
190  // Output
191 
206 
207  // Internal state
208 
211 
212  // Workspace
213 
218 
219 }; // end class QPSolverRelaxedQPKWIK
220 
221 } // end namespace ConstrainedOptimizationPackTypes
222 
223 #endif // QP_SOLVER_RELAXED_QPKWIK_H
Solves Quadratic Programming (QP) problem using the primal-dual active-set solver QPKWIK...
ERunTests
Enumeration for if to run internal tests or not.
void f()
FortranTypes::f_int f_int
Solves Quadratic Programs (QPs) of several different forms while allowing a relaxation of the constra...
QPSolverStats::ESolutionType imp_solve_qp(std::ostream *out, EOutputLevel olevel, ERunTests test_what, const Vector &g, const MatrixSymOp &G, value_type etaL, const Vector *dL, const Vector *dU, const MatrixOp *E, BLAS_Cpp::Transp trans_E, const Vector *b, const Vector *eL, const Vector *eU, const MatrixOp *F, BLAS_Cpp::Transp trans_F, const Vector *f, value_type *obj_d, value_type *eta, VectorMutable *d, VectorMutable *nu, VectorMutable *mu, VectorMutable *Ed, VectorMutable *lambda, VectorMutable *Fd)
STANDARD_MEMBER_COMPOSITION_MEMBERS(value_type, max_qp_iter_frac)
Set the maximum number of QP iterations as max_itr = max_qp_iter_frac * n.
std::ostream * out
void g()
Class for storing statistics about a run of a (active set?) QP solver.
QPSolverRelaxedQPKWIK(value_type max_qp_iter_frac=10.0, value_type infinite_bound=1e+20)
EOutputLevel
Enumeration for the amount of output to create from solve_qp().
AbstractLinAlgPack::value_type value_type
Transp
TRANS.
ESolutionType
Enumeration for the type of point returned from solve_qp(...).