![]() |
Prev | Next |
ok = qp_box(
level, a, b, c, C, g, G, epsilon, maxitr, xin, xout
)
template <class Vector> bool qp_box( size_t level , const Vector& a , const Vector& b , const Vector& c , const Vector& C , const Vector& g , const Vector& G , double epsilon , size_t maxitr , const Vector& xin , Vector& xout )
a
and
b
below.
Vector
is a
simple vector with elements of type double
.
level == 0
,
no tracing is printed.
If
level >= 1
,
a trace of the qp_box
operations is printed.
If
level == 2
,
a trace of the qp_interior
sub-problem is printed.
a[j]
is minus infinity, there is no lower limit
for @(@
x_j
@)@.
a[j]
is plus infinity, there is no upper limit
for @(@
x_j
@)@.
n
and is the initial point for the algorithm.
It must strictly satisfy the constraints; i.e.,
a < xin, xin < b, C * xin - c < 0
n
and
the input value of its elements does no matter.
Upon return it is the primal variables
@(@
x
@)@ corresponding to the problem solution.
ok
is true, convergence is obtained; i.e.,
@[@
| F ( x , y_a, s_a, y_b, s_b, y_c, s_c ) |_\infty < \varepsilon
@]@
where @(@
|v|_\infty
@)@ is the infinity norm of the vector @(@
v
@)@,
@(@
\varepsilon
@)@ is
epsilon
,
@(@
x
@)@ is equal to
xout
,
@(@
y_a, s_a \in \B{R}_+^n
@)@,
@(@
y_b, s_b \in \B{R}_+^n
@)@ and
@(@
y_c, s_c \in \B{R}_+^m
@)@.
qp_box
.
It returns true if the test passes and false otherwise.