### A java simplex solver

SSC (Software for the Calculation of the Simplex) is a java library for solving linear programming problems. SSC uses the Simplex algorithm for solving this class of optimization problems normally indicated with the initials LP (Linear Programming).

In SSC you can solve problems with free variables, integer, binary and semi-continuous. This subclass of problems are usually named with the initials MILP (Mixed Integer Linear Programming). For MILP problems, which have all or part of integer or binary or semi-continuous variables, SSC uses the algorithm of Branch and Bound (B&B) for their resolution.

Starting from version 2.1. it is possible to perform an implementation of the parallel simplex. This option (see example 1.14) makes it possible to exploit multiple threads for the simulation of the simplex and is of significant advantage in the case of architectures with at least 4 or more physical cores. Starting from this version it is also possible to perform an implementation of the parallel Branch and Bound (see example 2.13). In this case, the duration advantages are also obtained starting from two physical cores.

### The problem

The shape of the problems that the API provided by SSC solve is the following:

```		max/min  cTx	It is the objective function (o.f.)
```
bound to
```		Ax (≤,=,≥) b
l ≤ x ≤ u or xᵢ=0
xᵢ∈ ℤ ∀i ∈ I
xᵢ∈ {0,1} ∀i ∈ B
xᵢ∈ ℝ ∀i∉ (I ∪ B);
```
where
```		x ∈ ℝn  	it is the vector of variables
A ∈ ℚmxn	it is the matrix of coefficients
c ∈ ℚn  	it is the vector of coefficients of the o.f.
b ∈ ℚm  	it is the vector of the coefficients RHS
l ∈ ℚn  	it is the vector of the lower bound
u ∈ ℚn  	it is the vector of the upper bound
I ∈ {1,...,n}   it is a subset of the indices
B ∈ {1,...,n} : (I ∩ B) = ∅
```

### Details

The simplex method can 'be divided into two phases. In phase 1 is identified a basic feasible solution, while in the phase 2 is identified an optimal solution. The procedure manages free variables, bounded variables bottom and top and the different ranges of constraints. If they are not explicitly specified lower limits, SSC considers the variables to be not negative.

In SSC when a variable is defined as an integer variable or binary, the procedure uses the algorithm of Branch and Bound for optimization. The Branch and Bound resolves a succession of relaxed problems (deprived of integer constraints); to solve these problems is used the Simplex algorithm.

### Size of problems and memory request

The simplex method implemented in SSC is very efficient because we tried to optimize all the steps of the algorithm itself. The problems that can be solved with SSC have no limits in the number of variables and constraints, the limits are given by the jvm memory availability. For example, if you tell the jvm to make available a maximum quantity of 4 Gigabytes of memory (using the -Xmx4g declaration) you can solve problems with tens of thousands of variables and thousands of constraints.

On the contrary, the Branch and Bound method is not very efficient; there are methods in the literature that are certainly much more efficient from the point of view of computational complexity and in the use of memory (for example Branch and Cut and Price). Consequently the size of the MILP problems it must be limited.

### Technical requirements

The requirement to perform the SSC program is to be able to have a JDK (or SDK) java version 8.x or higher. No other requirement is requested.