Introduction to lp_solve 184.108.40.206
What is lp_solve and what is it not? The simple answer is, lp_solve is a Mixed Integer Linear Programming (MILP) solver.
And what is Linear Programming? See "What is Linear Programming?" and "Oh, and we also want to solve it as an integer program." for a brief description. Also see Formulation of an lp problem in lpsolve.
lp_solve is a free (see LGPL for the GNU lesser general public license)
linear (integer) programming solver based on the revised simplex method and the Branch-and-bound method
for the integers.
lp_solve has its own community via the Yahoo group http://groups.yahoo.com/group/lp_solve/. There you can find the latest sources, executables for the common platforms, examples, manuals and a message board where people can share their thoughts on lp_solve.
lp_solve was originally developed by Michel Berkelaar at Eindhoven University of Technology.
The work of Jeroen Dirks made the transition from the basic version 1.5 to the full version 2.0 possible.
He contributed the procedural interface, a built-in MPS reader, and many fixes and enhancements to the code.
At that point there was also a Java port of lp_solve 2.0. This was not a Java native interface (JNI) to the C
library, but rather a translation of the algorithm (ver 2.0) from C into Java. It was also very limited
This meant that it did not keep up with lp_solve as it evolved.
Starting at version 3.0, lp_solve is released under the LGPL license. Before the code could only be used for
non-commercial purposes. Many other people also contributed to lp_solve, but there was no track of them. Sorry
if you are not mentioned.
Development was stagnated for some time at version 3.2, but now it is again alive and well via the new
developers Kjell Eikland and Peter Notebaert.
But also other people help to improve the product.
For example the new Java interface to lp_solve was made by Juergen Ebert.
It is a JNI interface that supports the full functionality of lp_solve. He did a great job. We encourage other people to participate in the development of lp_solve.
Basically, lp_solve is a library, a set of routines, called the API that can be called from almost any programming language to solve MILP problems. There are several ways to pass the data to the library:
Via the APIThe API is a set of routines that can be called from a programming language to build the model in memory, solve it and return the results. There are many API routines to perform many possible tasks and set several options. See lp_solve API reference for an overview.
Via input files
Standard, lp_solve supports several input files types.
The common known MPS format (see mps-format) is supported by most solvers, but
it is not very readable for humans. Another format is the lp format (see lp-format)
that is more readable. lp_solve has the unique ability to use user-written routines to input the model
(see External Language Interface).
See read_mps, read_freemps, read_MPS, read_freeMPS and read_lp, read_LP for
the API calls to read the model from file.
Via an IDE
Thanks to Henri Gourvest, there is now also an IDE program called LPSolve IDE that uses the API to provide a Windows application to solve models. See LPSolve IDE for its usage. With this program you don't have to know anything of API or computer programming languages. You can just provide your model to the program and it will solve the model and give you the result.
As already stated, lp_solve can be called from many programming language. Among them are C, C++, Pascal, Delphi, Java, VB, C#, VB.NET, Excel. But let this list not be a limitation. Any programming language capable of calling external libraries (DLLs under Windows, Shared libraries (.so) under Unix/Linux) can call lp_solve.
Here is a list of some key features of lp_solve: