rmpk is a lightweight package to model mixed integer linear programs. It is based on the API of the ompr package and is also inspired by the architecture of Julia JuMP.

The goal is to provide a modelling package that can both be used in packages and also in interactive analyses. It also has a different architecture as the modelling layer modifies a central solver. That solver could be an interface to ROI or a shared pointer to a specific solver. Thus giving the option to directly communicate with the solver while still using an algebraic modelling framework.

This is currently work in progress and experimental - but working. I might merge it with ompr but it could also become the successor of ompr … not sure yet.

If you want to see the package in action take a look at the articles in the docs.

Happy to receive feedback!

Still under development. Anything can change


You can install the released version of RMPK from CRAN with:


Supported types

  • Linear Programming (LP)
  • Mixed Integer Linear Programming (MILP)
  • Mixed Integer Quadratic Programming (MIQP)
  • Mixed Integer Quadratically Constrained Programming (MIQCP)


  • ✅ Algebraic modelling of mixed integer programming problems

  • ✅ Integer, binary and continious variables

  • ✅ Linear and quadratic constraints/objective

  • ✅ Bindings to most popular solvers through ROI

  • ✅ Support for character variable indexes

  • ✅ Access row/column duals of Linear Programs

  • ✅ Row generation through solver callbacks (e.g. for models with exponential many constraints)

  • 🚧 Variable and constraint names

  • 🚧 Initial feasible solutions

  • 🚧 Almost as fast as matrix code


The best way at the moment to contribute is to test the package, write documentation, propose features. Soon, code contributions are welcome as well.

Please note that the ‘rmpk’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



References and Inspiration

  • Dunning, Iain, Joey Huchette, and Miles Lubin. “JuMP: A modeling language for mathematical optimization.” SIAM Review 59.2 (2017): 295-320.
  • ompr
  • pulp