cgal/QP_solver/examples/QP_solver
Bernd Gärtner 0a4fa9fa15 examples cleaned up and fixed 2007-02-08 17:57:45 +00:00
..
README README now also contains disclaimer 2006-05-12 13:21:36 +00:00
convex_hull_containment.cpp switched to Kernel_traits<Point_d> to find out the ring type 2006-10-24 09:57:02 +00:00
convex_hull_containment2.cpp switched to Kernel_traits<Point_d> to find out the ring type 2006-10-24 09:57:02 +00:00
double_qp_solver.cin
double_qp_solver.cpp examples cleaned up and fixed 2007-02-08 17:57:45 +00:00
double_qp_solver.data
first_lp.cpp next user manual round 2006-10-19 20:07:04 +00:00
first_nonnegative_lp.cpp next user manual round 2006-10-19 20:07:04 +00:00
first_nonnegative_qp.cpp next user manual round 2006-10-19 20:07:04 +00:00
first_qp.cpp first part of usr manual; renamed functionality (QP->Quadratic_program...) 2006-10-19 17:47:58 +00:00
important_variables.cpp examples cleaned up and fixed 2007-02-08 17:57:45 +00:00
integer_qp_solver.cin
integer_qp_solver.data
qp_solver1.cpp examples cleaned up and fixed 2007-02-08 17:57:45 +00:00
qp_solver2.cpp examples cleaned up and fixed 2007-02-08 17:57:45 +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 introduced cast of qp_A[j] to A_column for cases where we get a proxy only 2006-11-01 11:57:09 +00:00
solve_convex_hull_containment_lp2.h switched to Kernel_traits<Point_d> to find out the ring type 2006-10-24 09:57:02 +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