JOM (Java Optimization Modeler)

Installation

Installation of the library

To install the library follow the next steps:

  1. Download the JOM.jar file from the Download section, store it in your file system, and add the JAR file to the classpath as with any other Java library.
  2. [jna.jar - mirrored copy] JOM calls the Java libraries JNA (Java Native Access) for accessing the solver native code. The most recent JNA.jar file can be downloaded from here after some clicks. Alternatively, at the start of this paragraph there is a direct link to a mirrored copy of jna.jar file for JNA v-4.0.0. Store the jna.jar file in your file system, and add the JAR file to the classpath, so that JOM can find it.
  3. [parallelcolt-0.9.4.jar - mirrored copy] JOM calls the Java libraries Parallel COLT for efficient handling of matrices. Download the JAr file of the latest Parallel COLT version from here. Alternatively, at the start of this paragraph there is a direct link to a mirrored copy of parallelcolt-0.9.4.jar file. Store the file .JAR in your file system, and add the JAR file to the classpath, so that JOM can find it.

Installation of the solvers

JOM uses the Java Native Access (JNA) library to access the installed solvers. Then, installing a solver requires just obtaining the binary of the solver in the form of a dynamic library (.dll files in Windows, .so files in Linux). Solvers usually include pre-compiled binaries for common platforms. Then, it is enough to download the binary of the solver for our platform from the appropriate site, and store it in the file system.

Below we show the solvers currently supported by JOM, with links to the places where they can be obtained

 

MIPCL

MIPCL Solver is among the best free MIP solvers, exceeding GLPK performances significantly. MIPCL is under the LGPL license. To use MIPCL from JOM you need to:

  • Install the MIPCL solver in your machine using its installation instructions.
  • In running time, the solver name to use is mipcl when calling the solve method.

 

GLPK

GLPK stands for GNU Linear Programming Kit. It is a package for solving large-scale linear programming (LP), mixed integer programming (MIP), and other related problems. GLPK is under the GPL license.

The original GLPK version is composed of a set of routines written in ANSI C and organized in the form of a callable library. The binary of this distribution is what JOM directly access from Java, thanks to the JNA library. Please, note that GLPK has a version for Java BUT THIS IS NOT THE SOFTWARE JOM USES.

To install GLPK and make accessible to JOM, follow the next steps:

  1. Binaries for Windows: Dynamic libraries in Windows take the form of .dll files. Precompiled binaries cannot be found in the GLPK original web site, but are avaialble in the third-party winglpk project, which regularly releases pre-compiled Windows executables based on the official GLPK source files. To download the latest precompiled GLPK binaries for Windows go to this site. There you should download the latest GLPK compressed file (winglpk-4.48.1 at the time of writing this). Decompress the zip file in your file system. The dynamic link libraries for 32 bit Windows can be found in directory w32, those for 64 bit Windows can be found in directory w64, both with the name glpk_4_48.dll. This is the DLL file you need (the one suitable for your platform).
  2. Binaries for Linux: In some Linux distibutions, GLPK is automatically installed. Check if you can find the file libglpk.so in your system, usually in /usr/local/lib/libglpk.so. If so, you already have what you need.
  3. Binaries for Linux: You can install GLPK in a packaged software, which avoids manual compilation and installation. Check this page to see a list of GLPK packages for different Linux distributions. Again, these packages usually install the file libglpk.so in the /usr/local/lib/ or /usr/lib folders. This is the file you will need.
  4. Linux, Windows, other platforms: Naturally, you can also obtain the dynamic library for GLPK compiling yourself the GLPK source code in your platform. To do so, download the latest source files of GLPK from here and follow the instructions there.

Windows users: To obtain a mirrored copy of GLPK .DLL file (i.e. to copy it into the \Windows\System32 folder) click here: WINDOWS 32 / WINDOWS 64.

IPOPT

IPOPT stands for Interior Point OPTimizer. It is a software package for large-scale ​nonlinear optimization, where functions are differentiable (and thus, integer variables are not allowed). Ipopt is written in C++ and is released as open source code under the Eclipse Public License (EPL). It is available from the ​COIN-OR initiative.

The binary of IPOPT distribution is what JOM directly access from Java, thanks to the JNA library. Please, note that IPOPT has a version for Java called JIpopt BUT THIS IS NOT THE SOFTWARE JOM USES.

To install IPOPT and make accessible to JOM, follow the next steps:

  1. Binaries for Windows: Precompiled versions for Windows and Linux can be obtained clicking here. Several versions exist there. We have tested JOM with the IPOPT release found downloading the file Ipopt-3.8.2-win32-win64-dll.zip. After decompressing the previous file, Win32 users should use the file lib/win32/release/Ipopt38.dll and Win64 users should use the file: lib/x64/release/Ipopt38.dll.
  2. IPOPT packages for Linux: There are installable packages of IPOPT software, at least for Ubuntu distribution, in package repositories (for instance here you can find the package coinor-libipopt1 ) . However I could not find complete packages (for instance, the package coinor-libipopt1 in here does not include the -needed- MUMPS module).
  3. Compile IPOPT: If none of the previous options work, you are forced to download the IPOPT source and compile it. To do so, just follow the instructions here.

Windows users: To obtain a mirrored copy of IPOPT .DLL file (i.e. to copy it into the \Windows\System32 folder) click here: WINDOWS 32 / WINDOWS 64.

CPLEX

IBM ILOG CPLEX Optimizer is one of the best solvers for large-scale linear and mixed integer linear programming. It is a commercial solver, so you have to pay for using it. For academic users, free and full-featured licenses are available. To install CPLEX in your machine just follow the instructions in the web site.

After CPLEX is installed, for making it accessible to JOM you just have to know the location of the .DLL or .so file. As an example, for an installation of the CPLEX 12.2 version in a Win64 machine, in the directory ILOG/CPLEX_Studio122, the DLL file JOM needs to access is C:\ILOG\CPLEX_Studio122\cplex\bin\x64_win64\cplex122.dll

 

XPRESS

XPRESS Solver is other top solver for large-scale linear and mixed integer linear programming. It is also a commercial solver. For academic users, free and full-featured licenses are available. To use XPRESS from JOM you need to:

  • Install the XPRESS solver in your machine using its installation instructions.
  • In running time, you will need to have the file xprs.jar available in the classpath, since JOM dynamically accesses the classes there. This JAr file is typically in the directory lib of the solver installation folder.
    • For Net2Plan users: This can be done adding the xprs.jar file to the Net2Plan class path using the option Classpath editor in the menu File. By doing so, the classes in the JAR file are accessible to all the algorithms run in Net2Plan. This needs to be done only once, since these options are remembered for subsequent Net2Plan executions.
  • In running time, you will have to tell JOM using the solverLibraryName parameter, where the license file is (e.g. typically named xpauth.xpr, and in the bin directory of the solver installation folder.