104 namespace LinAlgOpPack {
113 namespace ConstrainedOptPack {
153 ,
const Vector& g,
const MatrixSymOp& G
155 ,
const Vector* dL,
const Vector* dU
157 ,
const Vector* eL,
const Vector* eU
162 ,VectorMutable* mu, VectorMutable* Ed
163 ,VectorMutable* lambda, VectorMutable* Fd
170 #ifdef PROFILE_HACK_ENABLED
193 VectorDenseEncap dL_de(*dL);
200 VectorDenseEncap dU_de(*dU);
209 E!=NULL, std::logic_error
210 ,
"Error, the QPOPT/QPSOL wrapper has not been updated for general inequalities yet!"
273 F!=NULL, std::logic_error
274 ,
"Error, the QPOPT/QPSOL wrapper has not been updated for general equalities yet!"
291 CVEC_(1,n) = VectorDenseEncap(g)();
304 X_(1,n) = VectorDenseEncap(*d)();
323 bool warm_start =
false;
324 if( (nu && nu->nz()) || (mu && mu->nz() ) ) {
327 VectorDenseEncap nu_de(*nu);
328 for(
int i = 1; i <= n; ++i ) {
329 if( nu_de()(i) < 0.0 )
331 else if( nu_de()(i) > 0.0 )
336 mu!=NULL, std::logic_error
337 ,
"Error, the QPOPT/QPSOL wrapper has not been updated for general inequalities yet!"
365 VectorDenseMutableEncap d_de(*d);
378 VectorDenseMutableEncap nu_de(*nu);
380 ISTATE_t::const_iterator
381 istate_itr = ISTATE_.begin();
382 DVector::const_iterator
384 for(
size_type i = 1; i <= n; ++i, ++istate_itr, ++clamda_itr ) {
385 const f_int state = *istate_itr;
396 nu_de()(i) = -(*clamda_itr);
410 ,
"Error, the QPOPT/QPSOL wrapper has not been updated for general inequalities yet!"
453 F!=NULL, std::logic_error
454 ,
"Error, the QPOPT/QPSOL wrapper has not been updated for general equalities yet!"
497 switch(inform_return) {
516 solution_type, convexity_type
518 ,warm_start, *eta > 0.0 );
void set_stats(ESolutionType solution_type, EConvexity convexity, int num_qp_iter, int num_adds, int num_drops, bool warm_start, bool infeasible_qp)
Initialize the statistics.
AbstractLinAlgPack::size_type size_type
virtual f_int lrwork(f_int N, f_int NCLIN) const =0
Length of real workspace.
ERunTests
Enumeration for if to run internal tests or not.
virtual const MatrixOp * G() const
Return a pointer to the matrix G to be used in the calculation of H*x by QPOPT and QPSOL...
virtual f_int liwork(f_int N, f_int NCLIN) const =0
Length of integer workspace.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
QPSolverRelaxedQPOPTSOL()
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const Vector &v_rhs)
v_lhs = alpha * v_rhs + v_lhs
EConvexity
Enumeration for the type of projected QP on output.
int resize(OrdinalType length_in)
Helper class that takes care of timing.
QPSolverStats get_qp_stats() const
virtual EInform call_qp_solver(bool warm_start)=0
Solve the QP defined in the protected input data members and set the solution in the protected output...
~QPSolverRelaxedQPOPTSOL()
Extract a constant DenseLinAlgPack::DVectorSlice view of a Vector object.
void Mp_StM(MatrixOp *mwo_lhs, value_type alpha, const MatrixOp &M_rhs, BLAS_Cpp::Transp trans_rhs)
void Vp_StMtV(VectorMutable *v_lhs, value_type alpha, const MatrixOp &M_rhs1, BLAS_Cpp::Transp trans_rhs1, const Vector &v_rhs2, value_type beta=1.0)
v_lhs = alpha * op(M_rhs1) * v_rhs2 + beta * v_lhs (BLAS xGEMV)
size_type num_bounded(const Vector &xl, const Vector &xu, value_type inf_bound)
Count the number of finitly bounded elements in xl <= x <= xu.
Class for storing statistics about a run of a (active set?) QP solver.
EOutputLevel
Enumeration for the amount of output to create from solve_qp().
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)
AbstractLinAlgPack::value_type value_type
virtual value_type use_as_bigM() const
Return the value of the "big M" used in the relaxation (called by QPHESS functions).
Extract a non-const DenseLinAlgPack::DVectorSlice view of a VectorMutable object. ...
FortranTypes::f_int f_int
ESolutionType
Enumeration for the type of point returned from solve_qp(...).
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
ESolutionType solution_type() const