Coder Social home page Coder Social logo

dhadfieldmenell / gurobimh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from supermihi/gurobimh

0.0 1.0 0.0 92 KB

Drop-in replacement for Gurobi's gurobipy python interface that supports Python3.4 and is much more efficient

Python 100.00%

gurobimh's Introduction

gurobimh: Unofficial Alternative Gurobi/Python Interface

Overview

gurobimh is a drop-in replacement for the gurobipy API bindings shipped with Gurobi. It offers several advantages:

  • gurobimh can be compiled for all current versions of Python; you do not need to rely on Gurobi officially supporting your desired Python version.
  • gurobimh's performance is much better, especially when modifying models a lot (like in a hand-written branch and bound solver).
  • gurobimh is free software an can be easily extended.
  • gurobimh ships a Cython pxd files, and the Model class has some fast-access cdef member methods for model modifications or queries than circumvent some of the slower API parts. This means that, if you are writing your algorithms in Cython, you can almost achieve the performance of the C interface, but using a much cleaner API.

Of course, there are also disatvantages:

  • Up to now, gurobimh supports only a subset of the official gurobipy API, in particular quadratic programming is not yet supported, and lots of parameters are missing. However these features are easy to implement once you look at how the others are, so you are welcome to contribute. Simply put, I have only implemented the features I am using myself.
  • Though I have successfully verified that gurobimh behaves like gurobipy for my programs, there are probably lots of bugs, and of course there's no commercial support. Don't use in productive environments!

News

  • June 2016: Large update contributed by mikenehme, many thanks for your help!!

Requirements

The API is written in Python. To compile it, you need Cython. Of course, you need to have Gurobi installed, and the GUROBI_HOME environment variable needs to be set correctly.

Installation

Install directly from the Python Package Index with

pip install gurobimh

Alternatively, download the package and type:

python setup.py install

Both commands can be appended by the --user option which locally installs gurobimh for the current user without needing root privileges.

Usage

Simply replace any gurobipy import statements with gurobimh. If anything goes wrong, file a bug!

Contact

Please contact me or use the GitHub features for PRs, comments, bugs etc.

gurobimh's People

Contributors

abremod avatar mikenehme avatar supermihi avatar

Watchers

 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.