Download

Java Solver is freely available under the terms of the Open Source GNU Lesser General Public License (LGPL).

You may  download the latest Java Solver from this zip-file:

com.javasolver.samples.zip

After unzip, you will be ready to execute all provided samples or create your own projects from the folder com.javasolver.samples. Java sources of sample problems  can be found in the sub-folder src/main/java. You may run these samples by double-clicking on  run<Name>.bat files. For instance, to run the introductory example “ProblemZoo” double-click on runZoo.bat. In the bat-file you may choose a SOLVER you want to be used to solver your optimization problem. You may similarly add your own optimization applications.

Install from GitHub Repository. Click on GitHub, then click on the button “Clone and download” and then select “Download ZIP”. When you download and unzip the downloaded file “javasolver_master.zip“, you will have the folder “javasolver_master” with two 2 sub-folders:

      1. com.javasolver with all JavaSolver sources and related jar-files
      2. com.javasolver.samples with various samples.

You may import the projects “com.javasolver” and “com.javasolver.samples” into your Eclipse IDE workspace, and run/debug the samples or your own applications using “Run/Debug As Java Application”. 

Install from Maven Repository. JavaSolver is also available from the Maven Repository. If you want to include JavaSolver into your Maven-based Java application, simply add the following dependency to your “pom.xml” file:

<dependency>
    <groupId>com.javasolver</groupId>
    <artifactId>javasolver-all</artifactId>
    <version>2.1.0</version>
</dependency>

Please note that javasolver-all includes all JSR331 dependencies including all underlying solvers. It allows you to chose which solver to run – see example in “runBlendingProblem.bat”, in which you may simply define the proper variable SOLVER.

Instead of “javasolver-all” you may chose your project to depend directly on “javasolver” and include only to JSR331 dependencies only to solvers you actually want to use.  

Using Linear Solvers. The majority of currently available linear solvers (open source or commercial) use the executable files of the corresponding solvers that cannot be included into the Maven Repository. It means that you need to install these solvers from their original repositories and make sure that your Environment variable PATH includes the path to their executables. Here are the names of the executable and links from where you may download linear solvers:
– COIN: clp.exe
– SCIP: scip.exe
– GLPK: glpsol.exe
– CPLEX: cplex.exe
– GUROBI: gurobi.exe

However, the linear solver CLP can be used without an additional installation thanks to the library clp-java. It can work only with real variables and doesn’t support MIP.

More details can be found in this README.md file.

If you have any questions and/or want to become a contributor, send a request to jacobfeldman@openrules.com.