cgal/QP_solver/examples/QP_solver
Bernd Gärtner 929d936ce5 made data_to_mps.C in /examples symbolic link to the one in /test 2006-03-30 07:33:19 +00:00
..
README added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
data_to_mps.C made data_to_mps.C in /examples symbolic link to the one in /test 2006-03-30 07:33:19 +00:00
data_to_mps.cin added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
double_qp_solver.C added new examples that allow the solver to be used as standalone application 2006-03-27 15:47:36 +00:00
double_qp_solver.cin added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
double_qp_solver.data added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
integer_qp_solver.C added new examples that allow the solver to be used as standalone application 2006-03-27 15:47:36 +00:00
integer_qp_solver.cin added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
integer_qp_solver.data added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
qp_solver1.C - beautified output of test_MPS 2006-03-16 11:44:46 +00:00
qp_solver2.C
rational_qp_solver.C added new examples that allow the solver to be used as standalone application 2006-03-27 15:47:36 +00:00
rational_qp_solver.cin added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00
rational_qp_solver.data added cin-files to allow execution of examples in testsuite 2006-03-28 15:38:11 +00:00

README

What's in this directory?
-------------------------
This directory contains 
- a number of small C++ programs named qp_solver*.C that show 
  how to call the qp_solver from a C++ program, and
- three application programs that can be used as standalone solvers 
  for linear and quadratic programs. In the following we describe how
  to use the standalone solvers.

Using the standalone solvers
----------------------------  
There are three applications:
- integer_qp_solver.C:    for input with integer coefficients
- rational_qp_solver.C:   for input with rational coefficients
- double_qp_solver.C:     for input with floating-point (double) coefficients

All three applications accept MPS-files as input, but the easier way to
go if you don't know about the MPS format is to use the conversion program
- data_to_mps.C:          for converting a simple input format into MPS

There are three files named *.data that contain quadratic and linear
programs in the simple input format, and this straightforward format 
is explained in any of these files. (The corresponding MPS-files are
available as well, under *.cin.)

You may copy the four C-files mentioned above and the *.data files
to your working directory. After having compiled the four C-files
mentioned above (you may use the makefile created with create_makefile
-d from CGAL's /scripts subdirectory, after setting CGAL_MAKEFILE
appropriately), you can type

./data_to_mps < rational_qp_solver.data | ./rational_qp_solver 0, or
./data_to_mps < double_qp_solver.data | ./double_qp_solver 0, or
./data_to_mps < integer_qp_solver.data | ./integer_qp_solver 0, 

and get the solution written to standard output. Replacing the
verbosity parameter 0 with any value between 1 and 5 prints 
information about the internal computations (1 is the default
and gives a short summary of every iteration of the solver).
Regardless of the input type, the computations are exact and the
results (objective function and variable values) are output as 
rational numbers. This looks as follows:
- for "integer":     a/b 
	where a and b are (multiprecision) integers
- for "rational":    a/b/c/d (meaning (a/b)/(c/d)
	where a, b, c, and d are (multiprecision) integers
- for "double":      (a,b)/(c,d) (meaning a*2^b / c*2^d)
	where a, b, c, and d are (multiprecision) integers