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:

[legend]
List of all members.

Public member functions

void bounds_tol (const value_type &bounds_tol)
 <<std comp="">> members for feasibility tolerance for the bound constriants.
const value_typebounds_tol () const
void inequality_tol (const value_type &inequality_tol)
 <<std comp="">> members for feasibility tolerance for the general inequality constraints.
const value_typeinequality_tol () const
void equality_tol (const value_type &equality_tol)
 <<std comp="">> members for feasibility tolerance for the general equality constriants.
const value_typeequality_tol () const
void inequality_pick_policy (const EInequalityPickPolicy &inequality_pick_policy)
 <<std comp="">> members for policy used to select a violated constraint.
const EInequalityPickPolicyinequality_pick_policy () const
 ConstraintsRelaxedStd ()
 Constructs to uninitialized.
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.
const MatrixConstraintsA_bar_relaxed () const
 
value_type bounds_tol_
value_type inequality_tol_
value_type equality_tol_
EInequalityPickPolicy inequality_pick_policy_

Overridden from Constraints

size_type n () const
 
size_type m_breve () const
 
const MatrixOp & A_bar () const
 Represents the constraints matrix.
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.
void ignore (size_type j)
 
value_type get_bnd (size_type j, EBounds bnd) const
 

Public Types

enum  EInequalityPickPolicy { ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY, ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY, ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY }
  More...

Private Types

typedef std::list< size_typepassed_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_

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 76 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.


Member Typedef Documentation

typedef std::list<size_type> ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::passed_over_equalities_t [private]
 

Definition at line 385 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.


Member Enumeration Documentation

enum ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::EInequalityPickPolicy
 

Enumeration values:
ADD_BOUNDS_THEN_MOST_VIOLATED_INEQUALITY 
ADD_BOUNDS_THEN_FIRST_VIOLATED_INEQUALITY 
ADD_MOST_VIOLATED_BOUNDS_AND_INEQUALITY 

Definition at line 211 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.


Constructor & Destructor Documentation

ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::ConstraintsRelaxedStd  ) 
 

Constructs to uninitialized.

Definition at line 89 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.


Member Function Documentation

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::bounds_tol const value_type bounds_tol  )  [inline]
 

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

Definition at line 222 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const value_type& ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::bounds_tol  )  const [inline]
 

Definition at line 222 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_tol const value_type inequality_tol  )  [inline]
 

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

Definition at line 226 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const value_type& ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_tol  )  const [inline]
 

Definition at line 226 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::equality_tol const value_type equality_tol  )  [inline]
 

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

Definition at line 230 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const value_type& ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::equality_tol  )  const [inline]
 

Definition at line 230 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_pick_policy const EInequalityPickPolicy inequality_pick_policy  )  [inline]
 

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

Definition at line 234 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const EInequalityPickPolicy& ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_pick_policy  )  const [inline]
 

Definition at line 234 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

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 103 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

const ConstraintsRelaxedStd::MatrixConstraints & ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::A_bar_relaxed  )  const
 

Definition at line 225 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::n  )  const [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 232 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::m_breve  )  const [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 237 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

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 242 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::pick_violated_policy EPickPolicy  pick_policy  )  [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 247 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

Constraints::EPickPolicy ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::pick_violated_policy  )  const [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 262 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

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 277 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::ignore size_type  j  )  [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 493 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::get_bnd size_type  j,
EBounds  bnd
const [virtual]
 

Implements ConstrainedOptPack::QPSchurPack::Constraints.

Definition at line 501 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.

void ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::cache_last_added size_type  last_added_j,
value_type  last_added_bound,
EBounds  last_added_bound_type
const [private]
 

Definition at line 569 of file ConstrainedOptPack_ConstraintsRelaxedStd.cpp.


Member Data Documentation

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::bounds_tol_ [private]
 

Definition at line 222 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_tol_ [private]
 

Definition at line 226 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::equality_tol_ [private]
 

Definition at line 230 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

EInequalityPickPolicy ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::inequality_pick_policy_ [private]
 

Definition at line 234 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

MatrixConstraints ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::A_bar_ [private]
 

Definition at line 390 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::etaL_ [private]
 

Definition at line 391 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::dL_ [private]
 

Definition at line 392 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::dU_ [private]
 

Definition at line 393 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::eL_ [private]
 

Definition at line 394 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

const Vector* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::eU_ [private]
 

Definition at line 395 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

VectorMutable* ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::Ed_ [private]
 

Definition at line 396 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

bool ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::check_F_ [private]
 

Definition at line 397 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_j_ [mutable, private]
 

Definition at line 398 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

value_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_bound_ [mutable, private]
 

Definition at line 399 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

EBounds ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::last_added_bound_type_ [mutable, private]
 

Definition at line 400 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

size_type ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::next_undecomp_f_k_ [mutable, private]
 

Definition at line 401 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.

passed_over_equalities_t ConstrainedOptPack::QPSchurPack::ConstraintsRelaxedStd::passed_over_equalities_ [mutable, private]
 

Definition at line 405 of file ConstrainedOptPack_ConstraintsRelaxedStd.hpp.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:36:16 2008 for MOOCHO (Single Doxygen Collection) by doxygen 1.3.9.1