mirror of https://github.com/CGAL/cgal
first doc version
This commit is contained in:
parent
4b42790dbd
commit
968b8cc6f2
|
|
@ -1,9 +1,4 @@
|
||||||
=============================================================================
|
=============================================================================
|
||||||
% The CGAL Reference Manual
|
|
||||||
% Chapter: Geometric Optimisation
|
|
||||||
% Section: Smallest Enclosing Sphere
|
|
||||||
% =============================================================================
|
|
||||||
|
|
||||||
\begin{ccRefClass}{QP_solver<Traits>}
|
\begin{ccRefClass}{QP_solver<Traits>}
|
||||||
|
|
||||||
% -----------------------------------------------------------------------------
|
% -----------------------------------------------------------------------------
|
||||||
|
|
@ -11,19 +6,19 @@
|
||||||
that represents a point $\tilde{x}$ attaining the minimum of a convex
|
that represents a point $\tilde{x}$ attaining the minimum of a convex
|
||||||
quadratic objective function $f(x)=c^{T}x+x^{T}Dx$ on
|
quadratic objective function $f(x)=c^{T}x+x^{T}Dx$ on
|
||||||
a domain $R \subseteq \R^{n}$ given as the intersection $R=\{ x\in\R^n
|
a domain $R \subseteq \R^{n}$ given as the intersection $R=\{ x\in\R^n
|
||||||
\mid \mbox{$Ax\gtreqless b$, $l \le x \le u$}\}$ of halfspaces and
|
\mid \mbox{$Ax\ccTexHtml{\gtreqless}{<=,=,>=} b$, $l \le x \le u$}\}$ of halfspaces and
|
||||||
hyperplanes. In other words, an object of class \ccRefName\ represents
|
hyperplanes. In other words, an object of class \ccRefName\ represents
|
||||||
a solution to the convex mathematical program
|
a solution to the convex mathematical program
|
||||||
\begin{eqnarray*}
|
\begin{eqnarray*}
|
||||||
\mbox{(QP)}&\mbox{minimize} & c^{T}x+x^{T}Dx \\
|
\mbox{(QP)}&\mbox{minimize} & c^{T}x+x^{T}Dx \\
|
||||||
&\mbox{subject to} & Ax \gtreqless b, \\
|
&\mbox{subject to} & Ax\ccTexHtml{\gtreqless}{<=,=,>=} b, \\
|
||||||
&& l \leq x \leq u,
|
&& l \leq x \leq u,
|
||||||
\end{eqnarray*}
|
\end{eqnarray*}
|
||||||
over the $n$ variables $x=(x_0,\ldots,x_{n-1})$.
|
over the $n$ variables $x=(x_0,\ldots,x_{n-1})$.
|
||||||
|
|
||||||
Here, $A \in \R^{m \times n}$, $b \in \R^{m}$, $c \in \R^{n}$, and in
|
Here, $A \in \R^{m \times n}$, $b \in \R^{m}$, $c \in \R^{n}$, and in
|
||||||
addition, the matrix $D \in \R^{n \times n}$ is positive-semidefinite.
|
addition, the matrix $D \in \R^{n \times n}$ is positive-semidefinite.
|
||||||
The symbol ``$\gtreqless$'' in the program's constraint $Ax \gtreqless
|
The symbol ``$\ccTexHtml{\gtreqless}{<=,=,>=}$'' in the program's constraint $Ax \ccTexHtml{\gtreqless}{<=,=,>=}
|
||||||
b$ means that any row of this may either be an inequality $(Ax)_i \leq b_i$ or
|
b$ means that any row of this may either be an inequality $(Ax)_i \leq b_i$ or
|
||||||
$(Ax)_i \geq b_i$, or an equality $(Ax)_i = b_i$. Furthermore, $l\in
|
$(Ax)_i \geq b_i$, or an equality $(Ax)_i = b_i$. Furthermore, $l\in
|
||||||
(\R\cup\{-\infty\})^n$ and $r\in (\R\cup\{\infty\})^n$, so that each
|
(\R\cup\{-\infty\})^n$ and $r\in (\R\cup\{\infty\})^n$, so that each
|
||||||
|
|
@ -66,7 +61,7 @@ variables are zero (and therefore need not be queried).
|
||||||
|
|
||||||
\paragraph{Usage.}
|
\paragraph{Usage.}
|
||||||
An object of class \ccRefName\ is constructed by specifing $A, b, c,
|
An object of class \ccRefName\ is constructed by specifing $A, b, c,
|
||||||
D, l, u$, and for each constraint from $Ax \gtreqless b$ whether it
|
D, l, u$, and for each constraint from $Ax \ccTexHtml{\gtreqless}{<=,=,>=} b$ whether it
|
||||||
needs to hold with inequality ($\leq$ or $\geq$) or with equality.
|
needs to hold with inequality ($\leq$ or $\geq$) or with equality.
|
||||||
The algorithm then determines the object's \emph{status}, which
|
The algorithm then determines the object's \emph{status}, which
|
||||||
reflects whether the quadratic program (QP) is infeasible, unbounded,
|
reflects whether the quadratic program (QP) is infeasible, unbounded,
|
||||||
|
|
@ -119,7 +114,7 @@ In order to improve performance, the algorithm can be tailored to
|
||||||
specific variants of the quadratic program. In particular, if the
|
specific variants of the quadratic program. In particular, if the
|
||||||
program is (at compile time) known to be linear (i.e., $D=0$), or in
|
program is (at compile time) known to be linear (i.e., $D=0$), or in
|
||||||
standard form, or symmetric (meaning $D^{T}=D$), or if the constraint
|
standard form, or symmetric (meaning $D^{T}=D$), or if the constraint
|
||||||
matrix $A$ is known to have full row rank and $Ax \gtreqless b$
|
matrix $A$ is known to have full row rank and $Ax \ccTexHtml{\gtreqless}{<=,=,>=} b$
|
||||||
consists of equalities only then compile-time flags in the traits
|
consists of equalities only then compile-time flags in the traits
|
||||||
class \ccc{Traits} can be used to specialize the algorithm. The
|
class \ccc{Traits} can be used to specialize the algorithm. The
|
||||||
resulting code will take advantage of the given additional knowledge
|
resulting code will take advantage of the given additional knowledge
|
||||||
|
|
@ -292,7 +287,7 @@ all entries of $u$ are $\infty$ (i.e., (QP) is assumed to be in
|
||||||
standard form). The matrix $A$ of (QP) is given by \ccc{a_it}, which
|
standard form). The matrix $A$ of (QP) is given by \ccc{a_it}, which
|
||||||
is an iterator over the columns of $A$. Similarly, \ccc{d_it}
|
is an iterator over the columns of $A$. Similarly, \ccc{d_it}
|
||||||
iterates over the rows of $D$. The iterator \ccc{r_it} specifies for
|
iterates over the rows of $D$. The iterator \ccc{r_it} specifies for
|
||||||
each row of $Ax \gtreqless b$ whether it is an inequality ($\leq$ or
|
each row of $Ax \ccTexHtml{\gtreqless}{<=,=,>=} b$ whether it is an inequality ($\leq$ or
|
||||||
$\geq$) or an equality constraint. \ccRequire
|
$\geq$) or an equality constraint. \ccRequire
|
||||||
\ccc{a_it} iterates over $n$ columns each of which has $m$ elements,
|
\ccc{a_it} iterates over $n$ columns each of which has $m$ elements,
|
||||||
\ccc{d_it} iterates over $n$ rows each of which having $n$ elements,
|
\ccc{d_it} iterates over $n$ rows each of which having $n$ elements,
|
||||||
|
|
@ -309,7 +304,7 @@ strategy = FULL_EXACT_PRICING)}
|
||||||
program (QP). The matrix $A$ of (QP) is given by \ccc{a_it}, which is
|
program (QP). The matrix $A$ of (QP) is given by \ccc{a_it}, which is
|
||||||
an iterator over the columns of $A$. Similarly, \ccc{d_it} iterates
|
an iterator over the columns of $A$. Similarly, \ccc{d_it} iterates
|
||||||
over the rows of $D$. The iterator \ccc{r_it} specifies for each row
|
over the rows of $D$. The iterator \ccc{r_it} specifies for each row
|
||||||
of $Ax \gtreqless b$ whether it is an inequality ($\leq$ or $\geq$) or
|
of $Ax \ccTexHtml{\gtreqless}{<=,=,>=} b$ whether it is an inequality ($\leq$ or $\geq$) or
|
||||||
an equality constraint. \ccc{fl_it} iterates over $n$ Boolean values,
|
an equality constraint. \ccc{fl_it} iterates over $n$ Boolean values,
|
||||||
one for each variable $x_i$, $i\in\{0,\ldots,n-1\}$, and specifies
|
one for each variable $x_i$, $i\in\{0,\ldots,n-1\}$, and specifies
|
||||||
whether $l_i>-\infty$. If so, the corresponding entry from the
|
whether $l_i>-\infty$. If so, the corresponding entry from the
|
||||||
|
|
@ -541,7 +536,7 @@ The following example solves the quadratic programming problem
|
||||||
&& 0 \le x_1 \le 1.
|
&& 0 \le x_1 \le 1.
|
||||||
\end{eqnarray*}
|
\end{eqnarray*}
|
||||||
|
|
||||||
\ccIncludeExampleCode{QP_solver/small_example.cpp}
|
\ccIncludeExampleCode{QP_solver/qp_solver1.cpp}
|
||||||
|
|
||||||
Please refer also to the documentation of class
|
Please refer also to the documentation of class
|
||||||
\ccc{CGAL::QP_MPS_instance<IT,ET>}; using it, you can read programs of
|
\ccc{CGAL::QP_MPS_instance<IT,ET>}; using it, you can read programs of
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,25 @@
|
||||||
% Chapter: Geometric Optimisation
|
% Chapter: Geometric Optimisation
|
||||||
% Section: QP solver
|
% Section: QP solver
|
||||||
% =============================================================================
|
% =============================================================================
|
||||||
|
\newcommand{\qprel}{\ccTexHtml{\gtreqless}{ ~ }}
|
||||||
|
|
||||||
\input{Optimisation_ref/QP_solver}
|
\input{QP_solver_ref/QuadraticProgramInterface}
|
||||||
\input{Optimisation_ref/Traits}
|
\input{QP_solver_ref/NonnegativeQuadraticProgramInterface}
|
||||||
\input{Optimisation_ref/MPS}
|
\input{QP_solver_ref/LinearProgramInterface}
|
||||||
\input{Optimisation_ref/QP_solver_MPS_traits_d}
|
\input{QP_solver_ref/NonnegativeLinearProgramInterface}
|
||||||
%\input{Optimisation_ref/QP_pricing_strategy}
|
|
||||||
%\input{Optimisation_ref/QP__filtered_base}
|
\input{QP_solver_ref/Quadratic_program_from_iterators}
|
||||||
%\input{Optimisation_ref/QP_full_exact_pricing}
|
%\input{QP_solver_ref/QP_solver}
|
||||||
%\input{Optimisation_ref/QP_full_filtered_pricing}
|
%\input{QP_solver_ref/Traits}
|
||||||
%\input{Optimisation_ref/QP_partial_exact_pricing}
|
%\input{QP_solver_ref/MPS}
|
||||||
%\input{Optimisation_ref/QP_partial_filtered_pricing}
|
%\input{QP_solver_ref/QP_solver_MPS_traits_d}
|
||||||
|
%\input{QP_solver_ref/QP_pricing_strategy}
|
||||||
|
%\input{QP_solver_ref/QP__filtered_base}
|
||||||
|
%\input{QP_solver_ref/QP_full_exact_pricing}
|
||||||
|
%\input{QP_solver_ref/QP_full_filtered_pricing}
|
||||||
|
%\input{QP_solver_ref/QP_partial_exact_pricing}
|
||||||
|
%\input{QP_solver_ref/QP_partial_filtered_pricing}
|
||||||
% If you have models for your concepts, include them here:
|
% If you have models for your concepts, include them here:
|
||||||
%\input{Optimisation_ref/Traits_model_2}
|
%\input{QP_solver_ref/Traits_model_2}
|
||||||
%\input{Optimisation_ref/Traits_model_3}
|
%\input{QP_solver_ref/Traits_model_3}
|
||||||
%\input{Optimisation_ref/Traits_model_d}
|
%\input{QP_solver_ref/Traits_model_d}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue