Need help or advice ? Come to the Icy club ! - Every Wenesday morning from 9h30 to 12h30 - Francois Jacob Building - Main hall - Pasteur

User reviews

This plugin is not rated yet

Please log-in to post a review

Linear Programming

by Nicolas Chenouard

A open-source utility library for linear programming in Java with the simplex algorithm.
Problems are of the type:
min/max c*x
st. Ax <= b
x >= 0

The primal problem is solved using Gauss-Jordan elimination and the lexicographic rule for pivoting is used.


- maximization and minimization problems

- equality and inequality constraints

- negative and positive constraint values.

The library can be used by other ICY plugins or called as a standalone Java software for custom problems:
java -jar linearProgrammingICY.jar -help
for the manual.
Sources files are provided in the jar file.

Publication Id
See technical details
View complete changelog


The java library features an open-source linear programming solver using the Simplex algorithm.

By default the primal problem is solved using Gauss-Jordan elimination and the lexicographic order pivoting rule.

By definition, the optimization problem is of the form:

min_x c'*x or max_x c'*x
A*x <= b
with x >=0

where x, b, c are column vectors and c' is the transpose of c. * stands for the matrix multiplication.

Here each constraint A[i]*x can be either "equal" or "lower than or equal" constraints
based on the boolean value in the equalityConstraints vector:
A[i]*x == b if equalityConstraints[i]
A[i]*x <= b if equalityConstraints[i]

The library is part of the java Linear Programming plugin for ICY but can also be used as a stand-alone Java library.
The library can run user-defined linear programming problems defined in text files

Run java -jar linearProgrammingICY.jar -help
for the details about use and input options.

The software is open-source. Just unzip the .jar file to access source files. Most useful function have public access for a call within a Java program. The main class of access is

Author Nicolas Chenouard (
Version 1.0
Date 2014-04-21
License gpl v3.0

Content of help for stand-alone call:
Empty arguments to use the default example.
Enter an integer from 0 to 3 for different example scenarios.
Enter -1 for a user-defined scenario through text files.

For custom scenarios, enter filenames (text files) for different parameters of the problem preceded by the appropriate prefix:
-c for the objective function file.
-A for constraint matrix file.
-b for the constraint value file.
-e for the equality constraint file.
-max or -min to indicate a maximization or minimization problem, respectively. Default in minimization.
Example arguments: java -jar linearProgrammingICY.jar -c c.txt -A A.txt -b b.txt -e eq.txt -max -o solution.txt
Each text file must contain a series of double values separated by ',' in a single line, except for the constraint file which contains one line per constraint.
For the equality file '0' stands for 'false' and '1' for true.

NB: the tooltip image is from wikimedia commons: