Skip to content

Model and Solve Mixed Integer Linear Programs

4packages dependsuggested by 2
25Kdownloads / year
96.5%test coverage
13/13flavors OK

Overview

About

Model mixed integer linear programs in an algebraic way directly in R. The model is solver-independent and thus offers the possibility to solve a model with different solvers. It currently only supports linear constraints and objective functions. See the 'ompr' website https://dirkschumacher.github.io/ompr/ for more information, documentation and examples.

Changes in 1.0.4
  • Improves the package documentation to use the correct alias.
  • Ompr now requires R 3.5.0 because some dependencies require that now.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-08
  • ERROR12 OK, 1 ERROR2026-06-07
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.0.4
READMEYes · 508 wordsVignettes· In the repository, left out of the releaseNEWSYes · 100% structured · mentions 1.0.4Citation fileNo
Help pages
26 (2 internal)includes a package overview page
Examples that run
71%12 run in a plain check · 5 never run
Exported functions with examples
67%
Documented parameters
100%
Return-value docs
71%
Help pages citing references
0%

Downloads

25K
CRAN downloads in the past year
Rank #2,842 · ~68/day · ~2.1K/mo
Daily download trend is not available in this view yet.
1.6K30 days
5K90 days
25K1 year
Compare downloads with other packages →
Also on6.4K r2u3 autocran151 c2d4u

Repository

281Stars
33Forks
30Open issues
0Open PRs
9Releases
585Commits
4Commit identities
integer-programminglinear-programmingrmipmilpoptimization
585 commits · Last activity 2023-09-09 · 0% stars, 30d · Default branch at 1.0.4.9000, ahead of CRAN 1.0.4 (checked 2026-10-18) · Discussions: 31 posts
Responsiveness
How these are sampled
PRs merged (all time)
88%
Median days to close, 50 most recently updated closed issues
267
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-29 · 2732026-07-07 · 281
PracticesBeta

12 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/dirkschumacher/ompr on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conduct

The repository owner accepts GitHub Sponsors

Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2023-09-09 · The repository has a site deploy workflow

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 3 practices
CRAN release process (1)
cran-comments.md
Research and citation (1)
CITATION.cff
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)

Installing ompr adds 5 packages (4 with compiled code, 6.6 MB of source tarballs). Heaviest: data.table 5.7 MB, rlang 766 KB, lazyeval 127 KB.

Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
4direct
0indirect
Imports 4
Suggested by 2
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (1)
Author, Maintainer since 0.6.0 (2017)
Releases (9)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.4Latest
    record
    2023-09-09 · current release · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.3
    record
    2022-09-11 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 1.0.2
    record
    2022-01-31 · diff ↗
  • 1.0.1
    record
    2022-01-26 · diff ↗ ·
    added 1 export
    additional_solver_output
  • 1.0.0
    record
    2022-01-26 · diff ↗ ·
    added 1 export
    sum_over
  • R
    R 4.1.0 released · 2021-05-18
  • 0.8.1
    record
    2020-12-04 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 0.8.0
    record
    2018-06-11 · diff ↗ ·
    added 6 exports
    MILPModel, as_colwise, colwise, get_column_duals, get_row_duals, nconstraints
  • R
    R 3.5.0 released · 2018-04-23
Show 4 earlier eventsHide 4 earlier events
  • 0.7.0
    record
    2017-11-18 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • 0.6.0
    record
    2017-04-17
  • R
    R 3.3.0 released · 2016-05-03

Package metadata

First published
2017-04-17
Total releases
9 / 9 yrs
License
MIT + file LICENSE OSI · relicensed from GPL-3 in 1.0.0
Minimum R
≥ 3.5.0
Download size
46 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ompr")
Schumacher, D. (2023). ompr: Model and Solve Mixed Integer Linear Programs (Version 1.0.4) [Computer software]. https://doi.org/10.32614/CRAN.package.ompr

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

The repository also keeps a CITATION.cff.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ompr version 1.0.4 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy