|
| 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 MatrixConstraints & | A_bar_relaxed () const |
|
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.
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.
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.