Giter Site home page Giter Site logo

praveenmunagapati / numberjack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eomahony/numberjack

0.0 2.0 0.0 7.75 MB

Python Combinatorial Optimisation Platform

Home Page: http://numberjack.ucc.ie

License: GNU Lesser General Public License v2.1

Python 5.72% C++ 88.53% C 0.56% Makefile 3.36% HTML 0.68% Shell 0.95% M4 0.05% CSS 0.02% Awk 0.14%

numberjack's Introduction

Numberjack

A Python platform for Combinatorial Optimisation

What is Numberjack?

Numberjack is a modelling package written in Python for combinatorial optimisation. Python benefits from a large and active programming community, Numberjack is therefore a perfect tool to embed optimisation technology into larger applications. It is designed to support a number of underlying C/C++ solvers seamlessly and efficiently. There are a number of available back-ends: three mixed integer programming solvers (Gurobi, CPLEX, and SCIP), satisfiability solvers (MiniSat, Walksat, and many others), a constraint programming solver (Mistral), and a weighted constraint satisfaction solver (Toulbar2).

  • Numberjack offers a high level constraint programming language
  • Numberjack directly benefits from python's features and modules
  • Numberjack uses efficient underlying C/C++ solvers.

Installation

Numberjack offers the ability to use several high-performance solvers, some of which are required to be installed separately or have their own dependencies. The source-code for building Mistral, Toulbar2, Minisat, and Walksat is included in the Numberjack distribution and interfaces to additional solvers are available.

To install Numberjack from source simply run python setup.py build from the Numberjack directory, followed by python setup.py install. This requires the following to be installed:

  • python-dev
  • swig (3.X)
  • libxml2-dev
  • zlib1g-dev
  • libgmp-dev

Building the Solver Interfaces

The following solvers are entirely optional and are not required to use Numberjack however they can be a valuable tool to have. If any of the solvers cannot be found on the system, then their interface will be disabled within Numberjack.

Gurobi Optimizer

Numberjack provides an interface to the mathematical programming solver, Gurobi. To use it in Numberjack, Download and install Gurobi Optimizer from their website. Numberjack has been tested against Gurobi versions 5.1, 5.5, and 5.6.

Numberjack will try to automatically find the Gurobi install location by first checking the GUROBI_HOME environment variable which should be set according to the Gurobi install guide. If not, it will try to find the path based on the location of the gurobi_cl executable.

export GUROBI_HOME="/opt/gurobi550/linux64"    # Example Linux install dir
export GUROBI_HOME="/Library/gurobi550/mac64"  # Example Mac OS X install dir

CPLEX

Numberjack provides an interface to IBM ILOG CPLEX Optimizer and has been tested against CPLEX versions 12.5, and 12.5.1.

Numberjack will try to automatically find the CPLEX install location by first checking the environment variable CPLEXDIR. If this is not set it will try to find it based on the location of the cplex executable.

export CPLEXDIR="/opt/ibm/ILOG/CPLEX_Studio1251/cplex"
export CPLEXDIR="/Applications/IBM/ILOG/CPLEX_Studio1251/cplex"

SCIP

SCIP is an open-source MIP solver available from: http://scip.zib.de, please download version 3.1.0. The simplest way to install SCIP is to download the source code of SCIP Optimization Suite v3.1.0 and place scipoptsuite-3.1.0.tgz in the same folder as Numberjack, alongside this file, so that it can be compiled with the necessary flags.

If you would like to compile SCIP yourself from a different location, then please set the environment variable ZIBPATH to the scipoptsuite directory and compile the static library using the following options:

export ZIBPATH=path_to/scipoptsuite-3.1.0
make scipoptlib ZIMPL=false ZLIB=false READLINE=false GAMS=false GMP=false LEGACY=true SPX_LEGACY=true

Compiling Specific Solvers

If you add one of these solvers after already installing Numberjack, you can compile a subset of the solvers by specifying a comma separated list with the -solver argument, for example:

python setup.py build -solver Mistral,SCIP,MiniSat

OSI Solvers

The following OSI solvers have not been ported to the distutils build system yet.

Before you get started with the compiling Osi solvers for Numberjack you must first get the Osi module working.

Download Osi from: http://www.coin-or.org/download/source/Osi/

To do this you need to download Osi-???.tgz and extract it in the solvers/osi/ folder. The version that the Makefile presumes is Osi-0.105.2. If you download a different version the line OSIVER = 0.105.2 will have to be changed.

OsiClp

Download Clp from: http://www.coin-or.org/download/source/Clp/

The version that the Makefile presumes is Clp-1.14.5. If you download a different version the line CLPVER = 1.14.5 will have to be changed.

OsiCbc

Download Cbc from: http://www.coin-or.org/download/source/Cbc/

The version that the Makefile presumes is Cbc-2.7.5. If you download a different version the line CBCVER = 2.7.5 will have to be changed.

CBC Supports several different lp solver backends(e.g. glpk) but currently dynamically links Clp. There will be some work done on this, but as it stands you need to have Clp installed to the system for CBC to work.

OsiVol

Download Vol from: http://www.coin-or.org/download/source/Vol/

The version that the Makefile presumes is Vol-1.3.2. If you download a different version the line VOLVER = 1.3.2 will have to be changed.

OsiDylp

Download Dylp from: http://www.coin-or.org/download/source/Dylp/

The version that the Makefile presumes is DyLP-1.8.2. If you download a different version the line DYLPVER = 1.8.2 will have to be changed.

OsiSpx (soplex)

Download soplex from: http://soplex.zib.de/download.shtml

The version that the Makefile presumes is soplex-1.6.0. If you download a different version the line SPXVER = 1.6.0 will have to be changed.

OsiGlpk

Download Glpk from: http://ftp.gnu.org/gnu/glpk/

The version that the Makefile presumes is glpk-4.47. If you download a different version the line GLPKVER = 4.47 will have to be changed.

numberjack's People

Contributors

9thbit avatar ehebrard avatar lokdlok avatar alexander-schiendorfer avatar eomahony avatar rdeits avatar ppershing avatar jelchison avatar siala avatar rchikhi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.