This is a patch (pre) release. It includes
test-global-wrapper
.This is a patch release to work around a bug in the CRAN checks. Specifically,
one of the unit tests for the isres()
algorithm was failing on some CRAN
builds because convergence is stochastic with slightly different results even
with the same fixed seed prior to calling the function.
This release deprecates the default behavior of the inequality equations in any
wrapper function which uses them. Currently, they are calibrated to be >= 0.
This version allows for the equations to be consistent with the main nloptr
function, which requires <= 0. In a future release, the default behavior will
switch to assuming the calibration is <= 0, and eventually, the >= 0 behavior
will be removed. It also includes a large number of safety and efficiency
changes, and an expansion of the unit tests to 100% coverage for all files but
one. The major changes include:
hin
and hinjac
in the
wrapper functions which use them, bringing them into compliance with the main
nloptr
call. This addresses
Issue #148;parallel::detectCores()
(contributed by @jeroen in
PR #150);testthat
with tinytest
(See
Issue #136);is.nloptr
to 100%. The only file not completely covered
by unit tests is nloptr.c
. The uncovered calls are error messages which get
trapped by tests in R before the call gets to C;C++11
;isres
or the warning in nl.grad
).Please see the commit logs for more detailed descriptions of the changes.
cmake3
binary
on the PATH
(#104).cmake
(#119).This is a patch version in which:
nlopt
library via nlopt/lib/libnlopt.a
instead of
-Lnlopt/lib -lnlopt
when building nlopt
from included sources to avoid
potential mess where -lnlopt
could look for the nlopt
library in other
places and possibly link with an existing too old system build of nlopt
.Additionally, we contacted Simon Urbanek for updating
the nlopt
recipe for macOS users so that it does now match the latest
v2.7.1
, which should avoid nlopt
to be built on the fly on CRAN machines.
This is a release mainly for increasing direct compatibility with most user cases. In details, here is the list of changes that have been made:
SystemRequirements
description to make it clearer which minimal
versions of cmake
(>= 3.15.0
) and nlopt
(>= 2.7.0
) are required
(#100,
@HenrikBengtsson).cmake
is missing when needed with
clearer message (#103,
@eddelbuettel).cmake
in the list of suggestions to
install it when missing.4.0
(#111).cmake3
binary in the current path before cmake
for increasing
compatibility with most RHEL/CentOS users
(#104,
@bhogan-mitre,
@HenrikBengtsson).nlopt
from included sources on macOS
and on Linux if no system build of NLopt (>= 2.7.0) is found.rwinlib
on Windows current release (contributed
by Jeroen Ooms,
#92), or NLopt from Rtools42
on Windows devel (contributed by
Tomas Kalibera).NEWS.md
file to track changes to the package.#include <nloptrAPI.h>
in several source files.hs071
(#81,
@Tom-python0121).NLOPT_GN_ESCH
available from R interface
(contributed by Xiongtao Dai).NLOPT_MAXTIME_REACHED
) and
maxtime
was not set to a positive number in the options, then nloptr tries a
couple more times to solve the problem. This is a new approach that should
solve the bug that NLopt sometimes exits a problem stating the maximum
available time has been reached, even when no limit on the time has been set.auglag
, cobyla
,
isres
, mma
, and slsqp
will be switched from >= to <= in a future nloptr
version.donttest
around example in mma
documentation.auglag
, cobyla
, isres
, mma
, and slsqp
will be switched
from >= to <= in the next nloptr version. The current version of nloptr shows
a warning when using these functions with inequality constraints. This warning
can be turned off with options('nloptr.show.inequality.warning' = FALSE)
.configure
and configure.ac
.nloptr.default.options
from a data.frame
to a function returning
the data.frame
.install.packages
to install the tests. The tests can be run after
installation with test_package('nloptr'). The testthat package needs to be
installed and loaded to be able to run the tests.NLOPT_MAXTIME_REACHED
without running any iterations with
the default setting. This change solves this.suppressMessages
.Makevars
to replace some code in NLopt to fix compilation on
Solaris as requested by Brian Ripley.INSTALL.windows
.Makevars
that replaces some code related to type-casting in
NLopt-2.4/isres/isres.c
.src/nloptr.c
from CP1252 to UTF-8.-lstdc++
from linker statement.
A file dummy.cpp
(with C++ extension) is added to the source directory to
ensure linking with C++. Thanks to Brian Ripley for bringing this up.)check.derivatives
examples in two
lines to comply with new package rules.inst/doc
to vignettes
to comply with new package
rules.apacite
in vignette as an update of apacite
on CRAN
resulted in errors.CFLAGS
, CXXFLAGS
from Makevars
.print_level = 3
. Shows values of controls
(16 April 2012 on R-Forge).Makevars
and Makevars.win
to link to version 2.3 of NLopt compiled
with --with-cxx
option. This makes the StoGo algorithm available.
(31 April 2013 on R-Forge).src/Makevars
to LF line endings to
remove a warning from R CMD check.src/Makevars.win
in order
for nloptr to work with his new toolchain.src/Makevars
to compile on Solaris.src/Makevars
to compile on Solaris.src/Makevars
to compile on Solaris.src/Makevars
to compile a working binary for MacOS.added new options:
nloptr.print.options(option="maxeval")
.
nloptr.print.options()
shows a description of all options if called
without arguments.print_options_doc
= TRUE/FALSE).population
= 1000).ranseed
= 3141). A value of 0 uses a random seed generated by system time.tol_constraints_eq
, tol_constraints_ineq
).tests/banana_global.R
: new test file that uses the algorithms
(CRS, ISRES, MLSL) and options ranseed
and population
.
src/nloptr.c
: capture error codes from setting options.R/nloptr.print.R
: output gives 'optimal value of controls' when status = -4
(some error code), this is changed to 'current value of controls'.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.