cgal/QP_solver/examples/QP_solver
Sylvain Pion 05840a8f17 Cleanup of white spaces and empty lines also under examples/*/*.h. 2007-03-10 16:45:36 +00:00
..
README
convex_hull_containment.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
convex_hull_containment2.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
double_qp_solver.cin
double_qp_solver.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
double_qp_solver.data
first_lp.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
first_nonnegative_lp.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
first_nonnegative_qp.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
first_qp.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
important_variables.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
integer_qp_solver.cin
integer_qp_solver.data
qp_solver1.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
qp_solver2.cpp Remove trailing white spaces and end of lines. 2007-03-10 14:59:41 +00:00
rational_qp_solver.cin
rational_qp_solver.data
shortest_vector.cpp.draft examples cleaned up and fixed 2007-02-08 17:57:45 +00:00
solve_convex_hull_containment_lp.h Cleanup of white spaces and empty lines also under examples/*/*.h. 2007-03-10 16:45:36 +00:00
solve_convex_hull_containment_lp2.h Cleanup of white spaces and empty lines also under examples/*/*.h. 2007-03-10 16:45:36 +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.

PLEASE NOTE: the API of the QP-solver has been submitted 
to the CGAL editorial board and is currently under revision. IT IS
NOT GUARANTEED (ACTUALLY UNLIKELY) THAT THE CODE AS GIVEN WILL STILL
WORK IN FUTURE RELEASES. It will have to be adpated according to the
final API of the package. Please contact Bernd Gaertner 
(gaertner at inf.ethz.ch) in case of problems or feedback. 

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 
   "cgal_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