CGAL 6.1.2 - Linear and Quadratic Programming Solver

Loading...
Searching...
No Matches
List of all members
CGAL::Quadratic_program_options Class Reference
Reference Manual » Functions

`#include <CGAL/QP_options.h>`

## Definition

This is a class used for passing options to the linear and quadratic programming solvers.

Currently, we support only options referring to

1. the verbosity,
2. the pricing strategy (see `Quadratic_program_pricing_strategy`),
3. the validation mode (see the Validity section of `Quadratic_program_solution`)

The idea is that this list grows in the future.

Operations

Here we just have set/get pairs for any option type.

See also
  `Quadratic_program_solution`
  `solve_quadratic_program`
  `solve_linear_program`
  `solve_nonnegative_quadratic_program`
  `solve_nonnegative_linear_program`

Examples
  QP_solver/convex_hull_containment_benchmarks.cpp, QP_solver/cycling.cpp, and QP_solver/solve_convex_hull_containment_lp3.h.

## Creation
| Quadratic_program_options ()
| constructs an instance of `Quadratic_program_options` where all available options are at their defaults.

## Verbosity
void | set_verbosity (int verbosity)
| sets the verbosity of the solver to the value `verbosity` when `options` is passed to any of the four solution functions.
int | get_verbosity () const
| returns the verbosity level of `options`.

## Pricing strategy
void | set_pricing_strategy (Quadratic_program_pricing_strategy pricing_strategy)
| sets the pricing strategy of the solver to the value `pricing_strategy` when `options` is passed to any of the four solution functions.
Quadratic_program_pricing_strategy | get_pricing_strategy () const
| returns the pricing strategy of `options`.

## Validation mode
void | set_auto_validation (bool validate)
| sets the automatic validation mode of the solver to the value `validate`.
bool | get_auto_validation () const
| returns the validation mode of `options`.

## Member Function Documentation

## ◆ set_auto_validation()

void CGAL::Quadratic_program_options::set_auto_validation | ( | bool | validate | ) |

sets the automatic validation mode of the solver to the value `validate`.

The default is `false`. By providing value `true` you can tell the solver to automatically check whether the program has correctly been solved, see the Validity section of the class `Quadratic_program_solution`.

Examples
  QP_solver/cycling.cpp.

## ◆ set_pricing_strategy()

void CGAL::Quadratic_program_options::set_pricing_strategy | ( | Quadratic_program_pricing_strategy | pricing_strategy | ) |

sets the pricing strategy of the solver to the value `pricing_strategy` when `options` is passed to any of the four solution functions.

The pricing strategy controls how the solver proceeds from any intermediate solution. For the available strategies and their behavior, see the documentation of the class `Quadratic_program_pricing_strategy`.

Examples
  QP_solver/convex_hull_containment_benchmarks.cpp, and QP_solver/cycling.cpp.

## ◆ set_verbosity()

void CGAL::Quadratic_program_options::set_verbosity | ( | int | verbosity | ) |

sets the verbosity of the solver to the value `verbosity` when `options` is passed to any of the four solution functions.

The provided value must be a number between \( 0\) and \( 5\). Verbosity \( 0\) is the default and results in the solver running silently. Verbosity \( 1\) prints a short summary of every iteration. Higher verbosity values print more information about the solution process, but these are mainly for debugging purposes and have no effect if you compile with `CGAL_QP_NO_ASSERTIONS` or `NDEBUG`.

Examples
  QP_solver/cycling.cpp.