mirror of https://github.com/CGAL/cgal
- NAMEs with spaces - RANGES - RHS entry for objective row (means: constant term in obj func) enhanced QP_solver. It can now handle a constant term in obj func |
||
|---|---|---|
| .. | ||
| README | ||
| data_to_mps.cin | ||
| data_to_mps.cpp | ||
| double_qp_solver.cin | ||
| double_qp_solver.cpp | ||
| double_qp_solver.data | ||
| integer_qp_solver.cin | ||
| integer_qp_solver.cpp | ||
| integer_qp_solver.data | ||
| qp_solver1.cpp | ||
| qp_solver2.cpp | ||
| rational_qp_solver.cin | ||
| rational_qp_solver.cpp | ||
| rational_qp_solver.data | ||
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