GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - astamm/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.

BranchesTags
Open more actions menu

Latest commit

 

History

736 Commits
736 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
R
R
 
 
inst
inst
 
 
man
man
 
 
revdep
revdep
 
 
src
src
 
 
tests
tests
 
 
tools
tools
 
 
vignettes
vignettes
 
 
.Rbuildignore
.Rbuildignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
DESCRIPTION
DESCRIPTION
 
 
LICENSE.md
LICENSE.md
 
 
NAMESPACE
NAMESPACE
 
 
NEWS.md
NEWS.md
 
 
README.Rmd
README.Rmd
 
 
README.md
README.md
 
 
_pkgdown.yml
_pkgdown.yml
 
 
air.toml
air.toml
 
 
cleanup
cleanup
 
 
cleanup.win
cleanup.win
 
 
codecov.yml
codecov.yml
 
 
configure
configure
 
 
configure.ac
configure.ac
 
 
cran-comments.md
cran-comments.md
 
 
nloptr.Rproj
nloptr.Rproj
 
 

Repository files navigation

nloptr

R-CMD-check Codecov test coverage pkgdown CRAN status

nloptr is an R interface to NLopt, 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 library is available under the GNU Lesser General Public License (LGPL), and the copyrights are owned by a variety of authors. See the website 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 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 (i.e. with version >= 2.7.0).

  • If it is found it is used.
  • Otherwise, NLopt 2.10.0 is built from included sources using CMake. In this case, a binary of CMake 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. The minimal version requirement on cmake is >= 3.15.0.

Installing CMake (macOS and Linux only)

Minimal version requirement for cmake is 3.15.0.

You can install CMake by following CMake installation instructions. The important thing is that you add the CMake binary to your PATH:

  • On macOS, you can install CMake 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 binary is always /Applications/CMake.app/Contents/bin/cmake. Hence, 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.

Alternatively, you can set an environment variable CMAKE_BIN pointing to a CMake binary of your liking on your computer for nloptr to use.

Installing nloptr

You can install nloptr from CRAN using:

install.packages("nloptr")

Alternatively, you can install the development version from GitHub:

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

Acknowledgments

I would like to express my sincere gratitude to Avraham Adler, Dirk Eddelbuettel, Mikael Jagan, Tomas Kalibera, Jeroen Ooms and Jelmer Ypma 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/

About

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.

astamm.github.io/nloptr/

Resources

Readme
License
Activity

Stars

117 stars

Watchers

11 watching

Forks

35 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.