knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
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:
✅ Row generation through solver callbacks (e.g. for models with exponential many constraints)
🚧 Variable and constraint names
library(rmpk) library(ROI.plugin.glpk) set.seed(42) solver <- ROI_solver("glpk") v <- rnorm(10) w <- rnorm(10) model <- MIPModel(solver) x <- model$add_variable(type = "binary", i = 1:10) model$set_objective(sum_expr(v[i] * x[i], i = 1:10), sense = "max") model$add_constraint(sum_expr(w[i] * x[i], i = 1:10) <= 10) model$optimize() model$get_variable_value(x[i])
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.