R Interface to the 'Uno' Nonlinear Optimization Solver

Bindings to 'Uno' (Unifying Nonlinear Optimization), a C++ solver for smooth nonlinearly constrained optimization. 'Uno' unifies Lagrange-Newton methods, including sequential quadratic programming and interior-point methods, by decomposing them into interacting building blocks (constraint-relaxation, inequality-handling, Hessian, and globalization strategies) that can be freely combined, either through options or through presets that reproduce established solvers such as 'filterSQP' and 'IPOPT'. The framework is described in Vanaret and Leyffer (2026) .


Uno Uno logo

CRAN status R-universe version R-CMD-check

We provide R bindings to Uno (Unifying Nonlinear Optimization), a C++ solver for nonlinearly constrained optimization, via Uno's C API. The interface allows you to describe a nonlinear program with R callbacks for objective, gradient, constraints, Jacobian and Lagrangian Hessian and Uno solves it. This is the R analog of the unopy Python binding, intended as the nonlinear (DNLP) solver backend for CVXR.

Two solver paths are provided:

  • the filtersqp SQP preset, whose QP subproblems are solved by HiGHS (built from source with the package), and
  • the ipopt interior-point preset, whose KKT systems are solved by MUMPS, reached at run time through the rmumps package (uno_mumps_version() tells which MUMPS that is).

Installation

Install from CRAN as usual or from the repo via:

# install.packages("remotes")
remotes::install_github("bnaras/Uno")

A C++17 compiler and CMake (>= 3.16) are required for source builds as the package builds the underlying Uno and HiGHS from source. MUMPS comes from the rmumps dependency, so there is no separate MUMPS installation. A source build binds to the rmumps installed at the time: rmumps 5.2.1-44 or later through its versioned C interface (rmumps 5.9.1-1 brings MUMPS 5.9.1), rmumps 5.2.1-43 through the legacy dmumps_c entry point.

Quick example

Hock--Schittkowski problem 15 (x* = (0.5, 2), f* = 306.5), solved with the interior-point preset. Derivatives are supplied in COO form (0-based indices); the Hessian is the lower triangle of the Lagrangian.

library(Uno)

objective   <- function(x) 100 * (x[2] - x[1]^2)^2 + (1 - x[1])^2
gradient    <- function(x) c(400 * x[1]^3 - 400 * x[1] * x[2] + 2 * x[1] - 2,
                             200 * (x[2] - x[1]^2))
constraints <- function(x) c(x[1] * x[2], x[1] + x[2]^2)
jacobian    <- function(x) c(x[2], 1, x[1], 2 * x[2])
hessian     <- function(x, sigma, lambda)
  c(sigma * (1200 * x[1]^2 - 400 * x[2] + 2),
    -400 * sigma * x[1] - lambda[1],
    200 * sigma - 2 * lambda[2])

res <- uno_solve(
  n = 2L, lb = c(-Inf, -Inf), ub = c(0.5, Inf), sense = "minimize",
  obj = objective, grad = gradient,
  m = 2L, cl = c(1, 0), cu = c(Inf, Inf), cons = constraints,
  jac_rows = c(0L, 1L, 0L, 1L), jac_cols = c(0L, 0L, 1L, 1L), jac = jacobian,
  hess_rows = c(0L, 1L, 1L), hess_cols = c(0L, 0L, 1L), hess = hessian,
  x0 = c(-2, 1), preset = "ipopt", base_indexing = 0L, verbose = FALSE,
  options = list(logger = "SILENT")
)

res$objective   # 306.5
res$primal      # 0.5 2

Any Uno solver option can be passed through options as a named list (applied after the preset). See vignette("Uno") for the full walk-through.

Citation

To cite the R package, run citation("Uno"), or:

Narasimhan B (2026). Uno: R Interface to the Uno Nonlinear Optimization Solver. R package. https://github.com/bnaras/Uno.

To cite the Uno solver itself, use the references its authors maintain under "Cite Uno": the theory paper (Vanaret and Leyffer, 2026, Mathematical Programming Computation, https://doi.org/10.1007/s12532-026-00310-9) and the software paper (Vanaret and Montoison, 2026, Journal of Open Source Software, https://doi.org/10.21105/joss.10229).

License

MIT. The bundled Uno solver is Copyright Charlie Vanaret and contributors, and the bundled HiGHS solver Copyright the HiGHS authors, both MIT; see inst/COPYRIGHTS for every copyright holder of bundled code.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("Uno")

2.9.2-1 by Balasubramanian Narasimhan, 4 days ago


https://bnaras.github.io/Uno/, https://github.com/bnaras/Uno


Report a bug at https://github.com/bnaras/Uno/issues


Browse source code at https://github.com/cran/Uno


Authors: Balasubramanian Narasimhan [aut, cre, cph] (R package: R/ , src/uno_binding.cpp , src/dmumps_shim.c , build scripts) , Charlie Vanaret [aut, cph] (Bundled Uno C++ solver (inst/uno , MIT); designed and implemented Uno) , Alexis Montoison [ctb, cph] (Uno C API (inst/uno/interfaces/C) and Fortran interface , MA86 interface) , Joris Gillis [ctb, cph] (Uno dynamic loader (inst/uno/uno/tools/DynamicLoader.*)) , David Kiessling [ctb, cph] (Uno funnel globalization method (inst/uno/uno/ingredients/glob/switching/funnel_methods)) , Manuel Schaich [ctb, cph] (Uno MA27 interface (inst/uno/uno/ingredients/subproblem_solvers/MA27); compiled only when HSL is found) , HiGHS development team [cph] (Bundled HiGHS LP/QP/MIP solver (MIT); see inst/COPYRIGHTS)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports rmumps

Suggests cpp11, tinytest, knitr, rmarkdown

Linking to cpp11, rmumps

System requirements: CMake (>= 3.16), C++17, GNU make


Enhanced by CVXR.


See at CRAN