mirror of https://github.com/CGAL/cgal
88 lines
3.5 KiB
TeX
88 lines
3.5 KiB
TeX
\ccRefChapter{Linear and Quadratic Programming Solver}
|
|
\label{chapter:QPSolver}
|
|
\ccChapterAuthor{Kaspar Fischer \and Bernd G{\"a}rtner \and Sven Sch{\"o}nherr
|
|
\and Frans Wessendorp}
|
|
|
|
\section{Classified Reference Pages}
|
|
|
|
\ccHeading{Concepts}
|
|
\ccRefConceptPage{QuadraticProgramInterface}\\
|
|
$\quad$ (for quadratic programs with variable bounds $l\leq x \leq u$) \\
|
|
\ccRefConceptPage{LinearProgramInterface} \\
|
|
$\quad$(for linear programs with variable bounds $l\leq x \leq u$)\\
|
|
\ccRefConceptPage{NonnegativeQuadraticProgramInterface}\\
|
|
$\quad$ (for quadratic programs with variable bounds $x\geq 0$) \\
|
|
\ccRefConceptPage{NonnegativeLinearProgramInterface}\\
|
|
$\quad$ (for linear programs with variable bounds $x\geq 0$)
|
|
|
|
\ccRefConceptPage{MPSFormat}\\
|
|
$\quad$ (the format used for reading and writing linear and quadratic
|
|
programs)
|
|
|
|
\ccHeading{Classes}
|
|
|
|
There is a class that represents the solution of a linear
|
|
or quadratic program. An instance of this class is returned by any of
|
|
the solution functions below.
|
|
|
|
\ccRefIdfierPage{Quadratic_program_solution}
|
|
|
|
We offer a number of predefined models for the above program concepts.
|
|
The following two are simultaneously models for all four concepts and
|
|
are probably the most convenient models; they allow you to construct
|
|
linear or quadratic programs entry by entry, or from streams in
|
|
\ccc{MPSFormat}. At any time, you can query these programs for
|
|
linearity and nonnegativity and thus select the appropriate
|
|
solution function.
|
|
|
|
\ccRefIdfierPage{Quadratic_program}\\
|
|
$\quad$ (for linear and quadratic programs that own their
|
|
data and are built entry-wise)\\
|
|
\ccRefIdfierPage{Quadratic_program_from_mps}\\
|
|
$\quad$ (for linear and quadratic programs read from an input stream in
|
|
\ccc{MPSFormat}; the constructed program can also be manipulate entry-wise)
|
|
|
|
Then there are specific models for any of the four program concepts above;
|
|
these are useful if you want to maintain the program data yourself, since
|
|
they simply wrap random access iterators over the program data and involve
|
|
no further copying of data.
|
|
|
|
\ccRefIdfierPage{Quadratic_program_from_iterators}\\
|
|
$\quad$ (for quadratic programs that wrap given iterators, without copying
|
|
data)
|
|
|
|
\ccRefIdfierPage{Linear_program_from_iterators}\\
|
|
$\quad$ (for linear programs wrapping given iterators)
|
|
|
|
\ccRefIdfierPage{Nonnegative_quadratic_program_from_iterators}\\
|
|
$\quad$ (for nonnegative quadratic programs, wrapping given iterators)
|
|
|
|
\ccRefIdfierPage{Nonnegative_linear_program_from_iterators}\\
|
|
$\quad$ (for nonnegative linear programs, wrapping given iterators)
|
|
\ccHeading{Functions}
|
|
|
|
In case you want to construct a program from complicated iterators
|
|
(whose types you don't know, or simply don't want to bother with),
|
|
we provide four makers.
|
|
|
|
\ccRefIdfierPage{make_quadratic_program_from_iterators}\\
|
|
\ccRefIdfierPage{make_linear_program_from_iterators}\\
|
|
\ccRefIdfierPage{make_nonnegative_quadratic_program_from_iterators}\\
|
|
\ccRefIdfierPage{make_nonnegative_linear_program_from_iterators}
|
|
|
|
There are four functions to solve a program, one for each program
|
|
concept.
|
|
|
|
\ccRefIdfierPage{solve_quadratic_program}\\
|
|
\ccRefIdfierPage{solve_linear_program}\\
|
|
\ccRefIdfierPage{solve_nonnegative_quadratic_program}\\
|
|
\ccRefIdfierPage{solve_nonnegative_linear_program}
|
|
|
|
Programs can be written to an output stream in \ccc{MPSFormat}, using
|
|
one of the following four functions.
|
|
|
|
\ccRefIdfierPage{print_quadratic_program}\\
|
|
\ccRefIdfierPage{print_linear_program}\\
|
|
\ccRefIdfierPage{print_nonnegative_quadratic_program}\\
|
|
\ccRefIdfierPage{print_nonnegative_linear_program}
|