Commits
Comments (0)
Files changed (14)

+515 0COPYING

+500 0README.txt

+79 0c

+16 0lp_solve/cbcc32.bat

+41 0lp_solve/ccc

+36 0lp_solve/ccc.osx

+22 0lp_solve/cgcc.bat

+31 0lp_solve/cvc6.bat

+1 0lp_solve/cvc6d.bat

+24 0lp_solve/cvc8.bat

+1354 0lp_solve/lp_solve.c

+44 0lp_solve/lp_solve.sln

+1029 0lp_solve/lp_solve.vcproj

+6 0lp_solve/readme.txt
README.txt
+It is a free (see LGPL for the GNU lesser general public license) linear (integer) programming solver
+The solver engine was revised and optimised in such a way that performance has improved considerably.
+This robustness is for example proven by the fact that many more models can now be solved even without scaling.
+ * Fundamental internal change to the solver engine resulting in better performance and numerical stability.
+Start by taking a look at 'Changes compared to version 4', 'Changes from version 5.1 to version 5.5'
+not natively supported by lp_solve. Examples are CPLEX lp format, LINDO lp format, MathProg format,
+At this time, there are no Makefiles yet. However for the time being, there are batch files/scripts
+to build. For the Microsoft compiler under Windows, use cvc6.bat, for the gnu compiler under Windows,
+ Internal constant COMP_EQUAL renamed to COMP_PREFERNONE because this could interfere with a define
+ The lp parser had problems with variables starting with INF and there is a + or  sign just before it.
+ Updated documentation. put_bb_branchfunc, put_bb_nodefunc, set_epslevel, dualize_lp, set_basisvar
+ set_add_rowmode should not be called after a solve. There is now a test in this routine when this is
+ There was as problem with get_sensitivity_objex. Calling it (sometimes only after multiple times)
+ Added documentation on infeasible models, guess_basis, DIMACS models, CPLEX format, Zimpl, GNU Mathprog.
+ Sometimes models with semicont variables which are also integer and scaling is active, a solution
+ When presolve can solve the model on its own and objective direction is maximize then a wrong sign
+ write_lp writes constraint and bounds in the same way if a constraint is not named. If a constraint
+ only has one variable then it looks like a bound. This can give problems because when a constraint
+ get_objective, get_variables, get_ptr_variables, get_constraints, get_ptr_constraints, get_primal_solution
+ reported 'not a valid basis' when presolve is active and the model is entirely solved by presolve.
+ In some rare cases a memory overrun could occur when constraints are added after a previous solve.
+ Made the copy_lp routine work. Note that information about the optimisation of the original model
+ Modified LINDO XLI to read keywords also not at column 1 and to accept an empty objective function.
+ Fixed a problem with del_constraint. Constraints names were not shifted and reported variable result was incorrect.
+ Added options o0, o1 to lp_solve command driven program to specify if objective is in basis or not.
+ There was an error in the lpparser resulting is misreading the model in many cases. This was fixed in the existing release and an update of following files is posted:
+ When NODE_RCOSTFIXING (bound tightening during B&B) (enabled by default) was enabled some models were not solved
+  When the timeout occurs, the simplex algorithm is in phase 2 and has a feasible (but noninteger) solution, but not optimal yet.
+ B&B is stopped. However this resulted in a report of a SUBOPTIMAL solution while this is not true.
+ On 64bit Linux systems crashes occured when information is printed via variable argument routines.
+ On Windows the binaries are again compiled with compiler optimization /O2 for better performance.
+ The MPS reader could not handle negative lower bounds where the lower bound was specified after the upper bound.
+ The MPS write now writes the implicit lower bound of zero if the variable has no lower bound and it is integer.
+ This to make sure that other solvers (like CPLEX) interprete the variable as integer and not binary.
+ Added the option stat to the lp_solve driver program. It prints statistics of the model like number of
+ Added the option plp to the lp_solve driver program. It prints the model via the print_lp API function.
+ When in set_add_row mode, all API calls can now be used. For example printing or writing the model,
+ Changed the second parameter to read_mps, read_MPS, read_freemps and read_freeMPS from verbose to options.
+ This is also supported by the lp_solve command line program via the mps_ibm and mps_negobjconst options.
+ accessed by applications (except XLI and BFP drivers) this change should not give any (compatibility) problem at all.
+ on equal to one gave false, but the writing was a 1 because only 12 significant digits are written.
+ Revised the c# and vb.net lpsolve code to pass arrays back and forth to the dll to make it also work on 64 bit systems.
+ In some cases with a model with integer variables lp_solve did not find the most optimal solution. Fixed.
+ add_SOS did a wrong test when SOS type is bigger than 2 if this SOS is allowed in lp_solve. Fixed
+ xli_MathProg is now compiled against glpk 4.44 meaning that it now supports the MathProg Tables feature
+ Added MSF support. MSF (Microsoft Solver Foundation) is a microsoft .NET library to access solvers via an OO way
+ MSF has a default lpsolve driver, but the one on the sourceforge site is enhanced in functionality and performance.
c
lp_solve/cbcc32.bat
+REM This batch file compiles the lp_solve driver program with the Borland C++ 5.5 compiler for Windows
+set src=../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c ../lp_MDO.c ../colamd/colamd.c
+%c% I.. I../bfp I../bfp/bfp_LUSOL I../bfp/bfp_LUSOL/LUSOL I../colamd I../shared a8 DWIN32 DYY_NEVER_INTERACTIVE=1 DPARSER_LP DINVERSE_ACTIVE=INVERSE_LUSOL DRoleIsExternalInvEngine ebin\%PLATFORM%\lp_solve.exe %src%
lp_solve/ccc
+src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
lp_solve/ccc.osx
+src='../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
lp_solve/cgcc.bat
+set src=../lp_MDO.c ../shared/commonlib.c ../colamd/colamd.c ../shared/mmio.c ../shared/myblas.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c ..\ini.c ..\lp_params.c
+%c% DINLINE=static Wall I.. I../bfp I../bfp/bfp_LUSOL I../bfp/bfp_LUSOL/LUSOL I../colamd I../shared O3 DBFP_CALLMODEL=__stdcall DYY_NEVER_INTERACTIVE DPARSER_LP DINVERSE_ACTIVE=INVERSE_LUSOL DRoleIsExternalInvEngine %src% o bin\%PLATFORM%\lp_solve.exe
lp_solve/cvc6.bat
+REM This batch file compiles the lp_solve driver program with the Microsoft Visual C/C++ compiler under Windows
+set src=../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c ../lp_MDO.c ../colamd/colamd.c %1
+%c% I.. I../bfp I../bfp/bfp_LUSOL I../bfp/bfp_LUSOL/LUSOL I../colamd I../shared /O2 /Zp8 /Gd D"LP_MAXLINELEN=0" DNoParanoia DWIN32 D_CRT_SECURE_NO_DEPRECATE D_CRT_NONSTDC_NO_DEPRECATE DYY_NEVER_INTERACTIVE DPARSER_LP DINVERSE_ACTIVE=INVERSE_LUSOL DRoleIsExternalInvEngine Febin\%PLATFORM%\lp_solve.exe %src%
lp_solve/cvc8.bat
+REM This batch file compiles the lp_solve driver program with the Microsoft Visual C/C++ compiler under Windows
+set src=../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c lp_solve.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c ../lp_MDO.c ../colamd/colamd.c %1
+%c% I.. I../bfp I../bfp/bfp_LUSOL I../bfp/bfp_LUSOL/LUSOL I../colamd I../shared /O1 /Zp8 /Gd D"LP_MAXLINELEN=0" DNoParanoia DWIN32 D_CRT_SECURE_NO_DEPRECATE D_CRT_NONSTDC_NO_DEPRECATE DYY_NEVER_INTERACTIVE DPARSER_LP DINVERSE_ACTIVE=INVERSE_LUSOL DRoleIsExternalInvEngine Febin\%PLATFORM%\lp_solve.exe %src%
lp_solve/lp_solve.c
+ printf("Usage of %s version %d.%d.%d.%d:\n", argv[0], MAJORVERSION, MINORVERSION, RELEASE, BUILD);
+ printf("presolver\tIf the phase 1 solution process finds that a constraint is\n\t\tredundant then this constraint is deleted\n");
+ printf("presolvek\tSimplification of knapsacktype constraints through\n\t\taddition of an extra variable, which also helps bound the OF\n");
+ printf("presolveq\tDirect substitution of one variable in 2element equality\n\t\tconstraints; this requires changes to the constraint matrix\n");
+ printf("presolverowd\tIdenfify and delete qualifying constraints that\n\t\tare dominated by others, also fixes variables at a bound\n");
+ printf("presolvecold\tDeletes variables (mainly binary), that are dominated\n\t\tby others (only one can be nonzero)\n");
+ printf("degen\t\tuse perturbations to reduce degeneracy,\n\t\tcan increase numerical instability\n");
+ printf("epsp <epsp>\tset the value that is used as perturbation scalar for\n\t\tdegenerative problems\n");
+ printf("e <number>\tspecifies the tolerance which is used to determine whether a\n\t\tfloating point number is in fact an integer.\n\t\tShould be < 0.5\n");
+ printf("ga <number>\tspecifies the absolute MIP gap for branchandbound.\n\t\tThis specifies the absolute allowed tolerance\n\t\ton the object function. Can result in faster solving times.\n");
+ printf("gr <number>\tspecifies the relative MIP gap for branchandbound.\n\t\tThis specifies the relative allowed tolerance\n\t\ton the object function. Can result in faster solving times.\n");
+ printf("b <bound>\tspecify a lower bound for the objective function\n\t\tto the program. If close enough, may speed up the\n\t\tcalculations.\n");
+ printf("\t B5: This is an extended pseudocosting strategy based on minimizing\n\t the number of integer infeasibilities\n");
+ printf("\t B6: This is an extended pseudocosting strategy based on maximizing\n\t the normal pseudocost divided by the number of infeasibilities.\n\t Similar to (the reciprocal of) a cost/benefit ratio\n");
+ printf("d\t\tdebug mode, all intermediate results are printed,\n\t\tand the branchandbound decisions\n");
+ printf("Db <filename>\tDo a generic readable data dump of key lp_solve model variables\n\t\tbefore solve.\n\t\tPrincipally for run difference and debugging purposes\n");
+ printf("Da <filename>\tDo a generic readable data dump of key lp_solve model variables\n\t\tafter solve.\n\t\tPrincipally for run difference and debugging purposes\n");
+ printf("i\t\tprint all intermediate valid solutions.\n\t\tCan give you useful solutions even if the total run time\n\t\tis too long\n");
+ printf("ia\t\tprint all intermediate (only nonzero values) valid solutions.\n\t\tCan give you useful solutions even if the total run time\n\t\tis too long\n");
+void write_model(lprec *lp, char plp, char *wlp, char *wmps, char *wfmps, char *wxli, char *wxlisol, char *wxliname, char *wxlioptions)
+static void minmax1(REAL value0, REAL factor, REAL *minmax, int *nminmax, int row, int *rowminmax, int col, int *colminmax)
+static void minmax(REAL value, REAL *minima, REAL *maxima, int *nminima, int *nmaxima, int row, int *rowmin, int *rowmax, int col, int *colmin, int *colmax)
+static void printminmax1(lprec *lp, char *s, REAL *minmax, int nminmax, int *rowminmax, int *colminmax)
+static void printminmax(lprec *lp, char *s, REAL *minima, REAL *maxima, int nminima, int nmaxima, int *rowmin, int *rowmax, int *colmin, int *colmax)
+static void printminmax(lprec *lp, char *s, REAL *minima, REAL *maxima, int nminima, int nmaxima, int *rowmin, int *rowmax, int *colmin, int *colmax)
+ int *nz, ret, m, n, i, j, k, l, nRHSmin = 0, nRHSmax = 0, nOBJmin = 0, nOBJmax = 0, nMATmin = 0, nMATmax = 0, *rowRHSmin, *rowRHSmax, *colOBJmin, *colOBJmax, *rowMATmin, *rowMATmax, *colMATmin, *colMATmax;
+ minmax(2.0, MATmin, MATmax, &nMATmin, &nMATmax, 1, rowMATmin, rowMATmax, 8, colMATmin, colMATmax);
+ minmax(1.0, MATmin, MATmax, &nMATmin, &nMATmax, 2, rowMATmin, rowMATmax, 7, colMATmin, colMATmax);
+ minmax(1.5, MATmin, MATmax, &nMATmin, &nMATmax, 3, rowMATmin, rowMATmax, 6, colMATmin, colMATmax);
+ minmax(3.0, MATmin, MATmax, &nMATmin, &nMATmax, 4, rowMATmin, rowMATmax, 5, colMATmin, colMATmax);
+ minmax(4.0, MATmin, MATmax, &nMATmin, &nMATmax, 5, rowMATmin, rowMATmax, 4, colMATmin, colMATmax);
+ minmax(0.1, MATmin, MATmax, &nMATmin, &nMATmax, 6, rowMATmin, rowMATmax, 3, colMATmin, colMATmax);
+ minmax(5.0, MATmin, MATmax, &nMATmin, &nMATmax, 7, rowMATmin, rowMATmax, 2, colMATmin, colMATmax);
+ minmax(1.4, MATmin, MATmax, &nMATmin, &nMATmax, 8, rowMATmin, rowMATmax, 1, colMATmin, colMATmax);
+ minmax(get_rh(lp, i), RHSmin, RHSmax, &nRHSmin, &nRHSmax, i, rowRHSmin, rowRHSmax, 0, NULL, NULL);
+ minmax(col[i], MATmin, MATmax, &nMATmin, &nMATmax, nz[i], rowMATmin, rowMATmax, j, colMATmin, colMATmax);
+ printf("Nonzeros : %d\tdensity=%f%%\n", k, ((double) k) / (((double) m) * ((double) n)) * 100.0);
+ printminmax(lp, "A", MATmin, MATmax, nMATmin, nMATmax, rowMATmin, rowMATmax, colMATmin, colMATmax);
+ char *rxliname = NULL, *rxli = NULL, *rxlidata = NULL, *rxlioptions = NULL, *wxliname = NULL, *wxlisol = NULL, *wxli = NULL, *wxlioptions = NULL, *wxlisoloptions = NULL;
COPYING