CGAL::Quadratic_program_options

#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.

Creation

Quadratic_program_options options;
constructs an instance of Quadratic_program_options where all available options are at their defaults.

Operations

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

Verbosity

void 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.

int options.get_verbosity () returns the verbosity level of options.

Pricing strategy

void 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.

Quadratic_program_pricing_strategy
options.get_pricing_strategy () returns the pricing strategy of options.

Validation mode

void 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.

bool options.get_auto_validation () returns the validation mode of options.

Example

QP_solver/cycling.cpp

See Also

Quadratic_program_solution
solve_quadratic_program
solve_linear_program
solve_nonnegative_quadratic_program
solve_nonnegative_linear_program