Git Product home page Git Product logo

integer-programming-with-python's Introduction

Python Integer Programming

An introduction to (mostly) linear programming and combinatorial optimization problems in python.

Charles (Chris) Ochoa

currently a work in progress

Who is this book for?

This book is for someone who already knows python, is not afraid of basic math (mostly math as a written language), and has the need to solve combinatorial problems. The book will cover linear programs both continuous and integer and some theory on the algorithms that solve these. It will also cover the PuLP open source linear modeling library, some convex optimization, and lots of case studies and examples along with discussions about improving performance. Also maybe some combinatorial game theory if I ever get the time and quadratic programming.

Sections

The basics of modeling and solving linear programs with python PuLP.

simple network flow done with pulp and networkx

Classic traveling salesman solved as an integer program

Simple generalization of the traveling salesman

Classic 0-1 Knapsack problem solved as an integer program

Minimize the number of bins needed to pack items

Model complex non-linear constraints and objectives via clever uses of binary variables.

Setup

''' conda env create -f environment.yml '''

for editing notes see setup-notes.txt

install PuLP

$ pip install pulp

optional for now,

install network x

$ pip install networkx

install the GNU Linear Programming Kit GLPK:

linux:

$ sudo apt-get install python-glpk sudo apt-get install glpk-utils

osx (via homebrew):

$ brew install glpk

windows: sorry :(

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.