MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Private Types | Private Member Functions | Private Attributes | List of all members
ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd Class Reference

Constraints subclass that is used to represent generic varaible bounds, and general inequality and equality constraints. More...

#include <ConstrainedOptPack_ConstraintsRelaxedStd.hpp>

Inheritance diagram for ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd:
Inheritance graph
[legend]

Classes

class  MatrixConstraints
 Matrix type for A_bar. More...
 

Public Types

enum  EInequalityPickPolicy { ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY, ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY, ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY }
 
- Public Types inherited from ConstrainedOptPack::QPSchurPack::Constraints
enum  EPickPolicy { ANY_VIOLATED, MOST_VIOLATED }
 

Private Types

typedef std::list< size_type > passed_over_equalities_t
 

Private Member Functions

void cache_last_added (size_type last_added_j, value_type last_added_bound, EBounds last_added_bound_type) const
 

Private Attributes

MatrixConstraints A_bar_
 
value_type etaL_
 
const Vector * dL_
 
const Vector * dU_
 
const Vector * eL_
 
const Vector * eU_
 
VectorMutable * Ed_
 
bool check_F_
 
size_type last_added_j_
 
value_type last_added_bound_
 
EBounds last_added_bound_type_
 
size_type next_undecomp_f_k_
 
passed_over_equalities_t passed_over_equalities_
 

Public member functions

 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, bounds_tol)
 <<std comp>="">> members for feasibility tolerance for the bound constriants. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, inequality_tol)
 <<std comp>="">> members for feasibility tolerance for the general inequality constraints. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, equality_tol)
 <<std comp>="">> members for feasibility tolerance for the general equality constriants. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (EInequalityPickPolicy, inequality_pick_policy)
 <<std comp>="">> members for policy used to select a violated constraint. More...
 
 ConstraintsRelaxedStd ()
 Constructs to uninitialized. More...
 
void initialize (const VectorSpace::space_ptr_t &space_d_eta, 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, size_type m_undecomp, const size_type j_f_undecomp[], VectorMutable *Ed, bool check_F=true, value_type bounds_tol=1e-10, value_type inequality_tol=1e-10, value_type equality_tol=1e-10)
 Initialize constriants. More...
 
const MatrixConstraintsA_bar_relaxed () const
 

Overridden from Constraints

size_type n () const
 
size_type m_breve () const
 
const MatrixOp & A_bar () const
 Represents the constraints matrix. More...
 
void pick_violated_policy (EPickPolicy pick_policy)
 
EPickPolicy pick_violated_policy () const
 
void pick_violated (const DVectorSlice &x, size_type *j_viol, value_type *constr_val, value_type *viol_bnd_val, value_type *norm_2_constr, EBounds *bnd, bool *can_ignore) const
 Here the next violated constraint to add to the active set is selected. More...
 
void ignore (size_type j)
 
value_type get_bnd (size_type j, EBounds bnd) const
 

Additional Inherited Members

- Public Member Functions inherited from ConstrainedOptPack::QPSchurPack::Constraints
virtual ~Constraints ()
 

Detailed Description

Constraints subclass that is used to represent generic varaible bounds, and general inequality and equality constraints.

The generic constraints represented by this class are those of the QPSolverRelaxed interface which are:

 (1.2)               etaL <=  eta
 (1.3)               dL   <=  d                                 <= dU
 (1.4)               eL   <=  op(E)*d - b*eta                   <= eU
 (1.5)                        P_u'*op(F)*d + (1 - eta) * P_u'*f  = 0

These constraints are converted into the form:

      [   dL    ]     [ I                    ]              [   dU    ]
      [   etaL  ] <=  [                   1  ] * [  d  ] <= [   inf   ]
 (2)  [   eL    ]     [ op(E)            -b  ]   [ eta ]    [   eU    ]
      [ -P_u'*f ]     [ P_u'*op(F)   -P_u'*f ]              [ -P_u'*f ]
      \_________/     \______________________/   \_____/    \_________/
        cL_bar                 A_bar'               x          cU_bar

      =>

 (3)   [     xl     ]    [  I        ]          [     xu     ]
       [  cl_breve  ] <= [  A_breve' ] * x  <=  [  cu_breve  ]

      =>

 (4)  cl_bar <= A_bar'*x <= cu_bar

The main responsibilities of this class are to expose a MatrixOp object for A_bar shown in (2) and to pick violated constraints.

Definition at line 89 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY 
ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY 
ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY 

Definition at line 224 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

Constructor & Destructor Documentation

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::ConstraintsRelaxedStd ( )

Constructs to uninitialized.

Definition at line 102 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

Member Function Documentation

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
bounds_tol   
)

<<std comp>="">> members for feasibility tolerance for the bound constriants.

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
inequality_tol   
)

<<std comp>="">> members for feasibility tolerance for the general inequality constraints.

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::STANDARD_MEMBER_COMPOSITION_MEMBERS ( value_type  ,
equality_tol   
)

<<std comp>="">> members for feasibility tolerance for the general equality constriants.

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::STANDARD_MEMBER_COMPOSITION_MEMBERS ( EInequalityPickPolicy  ,
inequality_pick_policy   
)

<<std comp>="">> members for policy used to select a violated constraint.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::initialize ( const VectorSpace::space_ptr_t &  space_d_eta,
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,
size_type  m_undecomp,
const size_type  j_f_undecomp[],
VectorMutable *  Ed,
bool  check_F = true,
value_type  bounds_tol = 1e-10,
value_type  inequality_tol = 1e-10,
value_type  equality_tol = 1e-10 
)

Initialize constriants.

If there are no variable bounds then set:
void(dL) == void(dU) == NULL

If there are no general inequality constraints then set:
void(E) == void(b) == void(eL) == void(eU) == NULL

If there are no general equality constraints then set:
void(F) = void(f) == NULL

If check_F == false, then the equality constriants in op(F) will not be checked as violated constriants. This is to facilitate the addition of the equality constraints to the initial schur complement and therefore these constraints should never be violated (except for illconditioning). The tolerances below which a constriant will not be considered violated are given by bounds_tol, inequality_tol and equality_tol.

Here, Ed is updated (if Ed != NULL) within the function this->pick_violated}(...). This saves some computational work of having to compute op(E)*d again. To skip computing this value, just set Ed == NULL.

ToDo: Specify more concretely exactly what the criteria is for considering that a constraint is violated or in picking the most violated constraint.

Parameters
m_undecomp[in] Number of undecomposed equality constraints.
j_f_undecomp[in] array (size m_undecomp) of indexes of constraints in op(F)*d + (1-eta)*f that are not decomposed and therefore should be considered when looking for violated constraints. This array is used to define the mapping matrix P_u. It is required that this be sorted and that: j_f_undecomp[k+1] >= j_f_undecomp[k], for k = 0...m_undecomp-2. If m_undecomp == f->size() then j_f_undecomp == NULL is allowed and the matrix P_u will be the identity matrix.

Definition at line 116 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

const ConstraintsRelaxedStd::MatrixConstraints & ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::A_bar_relaxed ( ) const
size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::n ( ) const
virtual
size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::m_breve ( ) const
virtual
const MatrixOp & ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::A_bar ( ) const
virtual

Represents the constraints matrix.

 A_bar = [  I   0  op(E')   op(F')*P_u  ]
         [  0   1   -b'       -f'*P_u   ]

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 255 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::pick_violated_policy ( EPickPolicy  pick_policy)
virtual
Constraints::EPickPolicy ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::pick_violated_policy ( ) const
virtual
void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::pick_violated ( const DVectorSlice &  x,
size_type *  j_viol,
value_type *  constr_val,
value_type *  viol_bnd_val,
value_type *  norm_2_constr,
EBounds bnd,
bool *  can_ignore 
) const
virtual

Here the next violated constraint to add to the active set is selected.

Violated constraints are selected to to add to the active set in the following order:

  • The equality constraints are added first, one at a time (if not already added as part of the warm start).
  • Add inequality constraints according according to the following options:
    • ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY Check the variable bounds first and add the most violated. If no variable bounds are violated by more than this->bounds_tol() then check for the most violated inequality constraint by computing r = op(E)*d+b*eta and add the most violated bound (eL, eU) if one exists.
    • ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY Check the variable bounds first and add the most violated. If no variable bounds are violated by more than this->bounds_tol() then check for the first violated inequality constraint by computing e(j)'*(op(E)*d+b*eta) one or more constraints at a time. This option may be better if the cost of computing op(E)*d is significant.
    • ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY Select the most violated constraint from the variable bounds and the general inequality constraints by computing r = op(E)*d+b*eta then add the most violated variable bound. This option is always the most expensive but may result in less QP iterations.

As a side effect, the vector pointed to by Ed which was passed to this->initialize(...) will be guarrenteed to be updated for the current op(E)*d, where d = x(1,nd), if any of the following is true:

If none of the above criteria applies then the client can not assume that Ed was updated and therefore the client must compute this value on its own.

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 290 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::ignore ( size_type  j)
virtual
value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::get_bnd ( size_type  j,
EBounds  bnd 
) const
virtual
void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::cache_last_added ( size_type  last_added_j,
value_type  last_added_bound,
EBounds  last_added_bound_type 
) const
private

Member Data Documentation

MatrixConstraints ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::A_bar_
private
value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::etaL_
private
const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::dL_
private
const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::dU_
private
const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::eL_
private
const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::eU_
private
VectorMutable* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::Ed_
private
bool ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::check_F_
private
size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_j_
mutableprivate
value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_bound_
mutableprivate
EBounds ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_bound_type_
mutableprivate
size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::next_undecomp_f_k_
mutableprivate
passed_over_equalities_t ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::passed_over_equalities_
mutableprivate

The documentation for this class was generated from the following files: