Skip to content

Repository files navigation

linProgCompare

Side-by-side comparison of linear programming (LP) and mixed-integer programming (MIP) in Python (PuLP) and R (lpSolve / ompr).

The same problems are solved in both languages. Because LP is mathematically well-defined, every paired example produces the same answer — the comparison is about how each ecosystem gets there.


Quick Start

Python

pip install pulp pandas
python py_code/glasses.py

R

install.packages(c("lpSolve", "linprog", "ompr", "ompr.roi", "ROI.plugin.glpk", "Rsymphony"))
source("Rcode/glasses.R")

Docs

  • Getting Started — new to LP or to this project, start here
  • Examples — all 11 problems explained with the key LP concept each one demonstrates
  • Python vs R Comparison — ergonomics, syntax, solver ecosystem, and when each shines
  • Credits — original sources this project is based on

Structure

py_code/    # Python (PuLP)
Rcode/      # R (lpSolve / ompr / Rsymphony)
data/       # shared CSV inputs
docs/       # extended documentation

About

Comparison of linear programming optimization between Python and R

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages