nloptr

nloptr provides an R interface to NLopt, a free/open-source library for nonlinear optimization providing a common interface to a number of different optimization routines which can handle nonlinear constraints and lower and upper bounds for the controls.

https://github.com/astamm/nloptr

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    3 of 14 committers (21.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (20.3%) to scientific vocabulary

Keywords from Contributors

geos
Last synced: 10 months ago · JSON representation

Repository

nloptr provides an R interface to NLopt, a free/open-source library for nonlinear optimization providing a common interface to a number of different optimization routines which can handle nonlinear constraints and lower and upper bounds for the controls.

Basic Info
Statistics
  • Stars: 110
  • Watchers: 11
  • Forks: 34
  • Open Issues: 9
  • Releases: 8
Created about 12 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# [**nloptr**](https://astamm.github.io/nloptr/) 


[![R-CMD-check](https://github.com/astamm/nloptr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/astamm/nloptr/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/astamm/nloptr/graph/badge.svg)](https://app.codecov.io/gh/astamm/nloptr)
[![pkgdown](https://github.com/astamm/nloptr/workflows/pkgdown/badge.svg)](https://github.com/astamm/nloptr/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/nloptr)](https://CRAN.R-project.org/package=nloptr)


[**nloptr**](https://astamm.github.io/nloptr/) is an R interface to [NLopt](https://nlopt.readthedocs.io/en/latest/), a free/open-source library for nonlinear optimization started by Steven G. Johnson, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms. It can be used to solve general nonlinear programming problems with nonlinear constraints and lower and upper bounds for the controls, such as

$$ \min_{x \in \mathbb{R}^n} \quad f(x), $$

s.t. $g(x) \le 0$, $h(x) = 0$ and $\ell \le x \le u$.

The [NLopt](https://nlopt.readthedocs.io/en/latest/) library is available under the GNU Lesser General Public License (LGPL), and the copyrights are owned by a variety of authors. See the [website](https://nlopt.readthedocs.io/en/latest/Citing_NLopt/) for information on how to cite NLopt and the algorithms you use.

## Installation

### Windows

On Windows, for old versions of R (`R <= 4.1.x`), the *nlopt* `v2.7.1` from [rwinlib](https://github.com/rwinlib/nlopt) is used. For newer versions of R (`R >= 4.2.0`), the *nlopt* version from the corresponding `RTools` toolchain is used.

### Linux and macOS

On Unix-like platforms, we use `pkg-config` to find a suitable system build of [NLopt](https://nlopt.readthedocs.io/en/latest/) (i.e. with version `>= 2.7.0`).

- If it is found it is used.
- Otherwise, [NLopt](https://nlopt.readthedocs.io/en/latest/) 2.10.0 is built from included sources using [CMake](https://cmake.org). In this case, a binary  of [CMake](https://cmake.org) stored in environment variable `CMAKE_BIN` is searched on the `PATH` and, alternatively, on a macOS-specific location. If that variable cannot be set, install will abort suggesting ways of installing [CMake](https://cmake.org). The minimal version requirement on `cmake` is `>= 3.15.0`.

### Installing [CMake](https://cmake.org) (macOS and Linux only)

Minimal version requirement for `cmake` is `3.15.0`.

You can install [CMake](https://cmake.org) by following [CMake installation instructions](https://cmake.org/resources/). The important thing is that you add the [CMake](https://cmake.org) binary to your `PATH`:

- On macOS, you can install [CMake](https://cmake.org) and then run it. In the menu bar, there is an item *How to Install For Command Line Use* which you can click on to have proper instructions on how to update your `PATH`. Note that the location of the [CMake](https://cmake.org) binary is always `/Applications/CMake.app/Contents/bin/cmake`. Hence, [**nloptr**](https://astamm.github.io/nloptr/) knows where to find it even if you do not update your `PATH`.
- On Linux, it will be automatically added unless you specifically change the default installation directory before building [CMake](https://cmake.org).

Alternatively, you can set an environment variable `CMAKE_BIN` pointing to a [CMake](https://cmake.org) binary of your liking on your computer for [**nloptr**](https://astamm.github.io/nloptr/) to use.

### Installing [**nloptr**](https://astamm.github.io/nloptr/)

You can install [**nloptr**](https://astamm.github.io/nloptr/) from CRAN using:

```r
install.packages("nloptr")
```

Alternatively, you can install the development version from GitHub:

```r
# install.packages("remotes")
remotes::install_github("astamm/nloptr")
```

## Acknowledgments

I would like to express my sincere gratitude to [Avraham Adler](https://github.com/aadler), [Dirk Eddelbuettel](https://github.com/eddelbuettel), [Mikael Jagan](https://github.com/jaganmn), [Tomas Kalibera](https://github.com/kalibera), [Jeroen Ooms](https://github.com/jeroen) and [Jelmer Ypma](https://github.com/jyypma) for their contributions and the very instructive discussions about the pros and cons of various build strategies in R packages.

## Reference

Steven G. Johnson, The NLopt nonlinear-optimization package, [https://nlopt.readthedocs.io/en/latest/](https://nlopt.readthedocs.io/en/latest/)

Owner

  • Name: Aymeric Stamm
  • Login: astamm
  • Kind: user
  • Location: 2 Chemin de la Houssinière, 44322 Nantes, France
  • Company: Laboratoire de Mathématiques Jean Leray - UMR CNRS 6629

GitHub Events

Total
  • Create event: 11
  • Release event: 2
  • Issues event: 33
  • Watch event: 5
  • Delete event: 8
  • Issue comment event: 213
  • Push event: 70
  • Pull request review comment event: 6
  • Pull request review event: 11
  • Pull request event: 28
  • Fork event: 1
Last Year
  • Create event: 11
  • Release event: 2
  • Issues event: 33
  • Watch event: 5
  • Delete event: 8
  • Issue comment event: 213
  • Push event: 70
  • Pull request review comment event: 6
  • Pull request review event: 11
  • Pull request event: 28
  • Fork event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 647
  • Total Committers: 14
  • Avg Commits per committer: 46.214
  • Development Distribution Score (DDS): 0.663
Past Year
  • Commits: 43
  • Committers: 3
  • Avg Commits per committer: 14.333
  • Development Distribution Score (DDS): 0.047
Top Committers
Name Email Commits
Avraham Adler a****r@g****m 218
jyypma j****a 206
Aymeric Stamm a****m@m****r 161
Dirk Eddelbuettel e****d@d****g 28
Jelmer Ypma u****y@u****k 20
Roland Stevenson r****d@r****m 3
Jeroen Ooms j****s@g****m 3
Ondrej Zacha z****j@g****m 2
ras44 9****4 1
Mikael Jagan j****n@m****a 1
Léo Belzile b****l@g****m 1
Konstantin Dietrich K****h@g****m 1
Julien Chiquet j****t@g****m 1
Dai x****i@i****u 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 115
  • Total pull requests: 70
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 5 months
  • Total issue authors: 84
  • Total pull request authors: 15
  • Average comments per issue: 7.7
  • Average comments per pull request: 3.43
  • Merged pull requests: 51
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 21
  • Pull requests: 26
  • Average time to close issues: 11 days
  • Average time to close pull requests: 3 days
  • Issue authors: 11
  • Pull request authors: 5
  • Average comments per issue: 5.48
  • Average comments per pull request: 3.23
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • astamm (15)
  • eddelbuettel (7)
  • bbolker (5)
  • aadler (3)
  • ProxyCausal (2)
  • lawbaker (2)
  • Tom-python0121 (2)
  • bruc (1)
  • byrongibby (1)
  • jaganmn (1)
  • tvatter (1)
  • gittybobomber (1)
  • otavares93 (1)
  • paulmueller (1)
  • lsaverbio (1)
Pull Request Authors
  • astamm (25)
  • aadler (22)
  • eddelbuettel (10)
  • jeroen (7)
  • bbolker (2)
  • jar1karp (2)
  • jaganmn (2)
  • RaulGDiaz (2)
  • tuxmaster5000 (1)
  • simonsays1980 (1)
  • dvdesolve (1)
  • ras44 (1)
  • konsdt (1)
  • jchiquet (1)
  • gkane26 (1)
Top Labels
Issue Labels
enhancement (3) wontfix (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 337,788 last-month
  • Total docker downloads: 969,388
  • Total dependent packages: 162
  • Total dependent repositories: 244
  • Total versions: 28
  • Total maintainers: 1
cran.r-project.org: nloptr

R Interface to NLopt

  • Versions: 28
  • Dependent Packages: 162
  • Dependent Repositories: 244
  • Downloads: 337,788 Last month
  • Docker Downloads: 969,388
Rankings
Downloads: 0.6%
Dependent packages count: 0.6%
Dependent repos count: 1.1%
Forks count: 1.9%
Stargazers count: 3.9%
Average: 4.2%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/check-rtools43.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • covr * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests
  • xml2 * suggests
.github/workflows/check-standard.yaml actions
  • actions/checkout v2 composite
  • jwlawson/actions-setup-cmake v1.12 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action 4.1.4 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/system-nlopt.yaml actions
  • actions/checkout v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v2 composite
  • jwlawson/actions-setup-cmake v1.12 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/rhub.yaml actions
  • r-hub/actions/checkout v1 composite
  • r-hub/actions/platform-info v1 composite
  • r-hub/actions/run-check v1 composite
  • r-hub/actions/setup v1 composite
  • r-hub/actions/setup-deps v1 composite
  • r-hub/actions/setup-r v1 composite