Displaying 20 results from an estimated 300 matches similar to: "minimizing a numerical integration"
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
Dear all,
I tried running the following syntax but it keeps running for about 4 hours
and then i got the following errors:
Error in if (is.na(f0$objective)) { : argument is of length zero
In addition: Warning message:
In is.na(f0$objective) :
is.na() applied to non-(list or vector) of type 'NULL'
Here is the syntax itself:
library('nloptr')
library('pracma')
#
2013 Feb 27
0
A program running for a too long time
Dear all,
The attached code is supposed to minimize a numerical integration subject
to a non linear constraint. The code runs for 2 days& more without giving
an output. Also, when i change the value of "m<-100" to "m<-1" it gives an
output in areasonable period but with a message " maximum number of
iterations in romberg has been reached". I need to :
1-
2025 Apr 30
1
Estimating regression with constraints in model coefficients
Hi Gregg,
Below I try to address
1) The sum constraint would apply for each set ?? and ?? i.e. sum(??)
= sum(??) = 1.60
2) Just like 1) the lower and upper bounds will be applied for
individual set i.e. individual elements of ?? are subject to lower =
c(1, -1, 0) and upper = c(2, 1, 1) and individual elements of ?? are
subject to lower = c(1, -1, 0) and upper = c(2, 1, 1)
I hope that I am
2023 Aug 13
4
Noisy objective functions
While working on 'random walk' applications, I got interested in
optimizing noisy objective functions. As an (artificial) example, the
following is the Rosenbrock function, where Gaussian noise of standard
deviation `sd = 0.01` is added to the function value.
fn <- function(x)
(1+rnorm(1, sd=0.01)) * adagio::fnRosenbrock(x)
To smooth out the noise, define another
2013 Jan 03
0
help with NLOPTR
I have a complex function that I want to maximize (I have multiplied this
function by -1 so that it becomes a minimization problem in the code below).
This function has two equality constraints.
I get the programs to run but the answer isn't correct because, when it
does converge, at least one of the constraints is violated.
Any suggestions?
Code below Violated constraint (an easy check):
2013 Jun 16
4
can't install rugarch and nloptr packages in R 3.01 opensuse linux
I can't install rugarch package because installation of nloptr package fails .
I use opensuse 12.3
# uname -a
Linux candide 3.7.10-1.11-desktop #1 SMP PREEMPT Thu May 16 20:27:27 UTC 2013 (adf31bb) x86_64 x86_64 x86_64 GNU/Linux
my gcc version is 4.8.1
I compiled and installed R 3.01 . then I tried to install rugarch package but it fails because it can't install depended package nloptr.
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hello:
The development version of Ecdat on R-Forge contains a vignette
in which optim(?, method=?L-BFGS-B?) stops with an error message while
violating the lower bound.
To see all the details, try the following:
install.packages("Ecdat", repos="http://R-Forge.R-project.org")
Then do "help(pac=Ecdat)" -> "User guides, package
2025 Feb 05
1
Error when loading optimx package and a solution
Dear R-help members
Since this morning (5/2/2025), I get an error when I try to load optimx
package. I solve it and I send my solution but if someone has a better
idea or understand what's happened, I will be most happy to know.
MacOSX 15.3
R 4.4.2
nlopt installed using
brew install nlopt
Here are the steps to produce the error and a solution to solve it. Some
parts are in French. I
2025 Feb 05
1
Error when loading optimx package and a solution
Hi,
That looks like the dependency on nlopt for nloptr (used by several of the
solvers) was somehow missing. There is SUPPOSED to be a check of what is installed
and a warning issued, but possibly one got missed. Even some base packages
do sometimes need the external libraries manually installed, and I find I'm
doing that after various OS updates or resets when the long term support
runs out.
2025 May 04
0
Estimating regression with constraints in model coefficients - Follow-up on Constrained Ordinal Model — Optimized via COBYLA
Hello Christofer,
Just writing with a detailed follow-up. Attached is a script I was able to get running with a bit of work. I did not include the script in the ext of this email. It is only attached.
Optimization Progress
We were initially aiming to solve the dual-slope constrained ordinal model using nloptr's SLSQP algorithm (NLOPT_LD_SLSQP), since it supports:
? Box constraints (per-?
2016 Oct 08
4
optim(…, method=‘L-BFGS-B’) stops with an error message while violating the lower bound
Hi, Mark et al.:
Thanks, Mark.
Three comments:
1. Rvmmin was one of the methods I tried after Ravi
directed me to optimx. It returned NAs for essentially everything. See
my email of this subject stamped 4:43 PM Central time = 21:43 UTC.
2. It would be interesting to know if the current
algorithm behind optim and optimx with
2016 Oct 09
1
optim(?, method=?L-BFGS-B?) stops with an error
I'll not copy all the previous material on this thread to avoid overload.
The summary is that all the methods Spencer has tried have some issues.
The bad news: This is not uncommon with optimization methods, in part because the problems are "hard",
in part because getting them implemented and linked to an interfacing approach like R is very tedious
and prone to omissions and
2017 Oct 20
1
error install package.
try to Rcmdr package install? but the last message show me error,
The downloaded source packages are in
??? ?/tmp/RtmpKic0qw/downloaded_packages?
Warning messages:
1: In install.packages() :
? installation of package ?nloptr? had non-zero exit status
2: In install.packages() :
? installation of package ?lme4? had non-zero exit status
3: In install.packages() :
? installation of package
2020 Nov 05
1
Some packages have non-POSIX-compliant shell scripts. Implement a CRAN check for bashisms?
Dear R-devel,
Recently I ran into trouble installing two separate packages, nloptr and ncdf4, both due to the same issue: they have scripts that have the shebang `#! /bin/sh', but have bashisms in them, i.e. non-POSIX-compliant bash scripts.
I use dash [1] as my shell environment, since it's about 4x as fast as bash. It looks like it's recently also become the default shell for
2016 May 06
2
Is it possible to increase MAX_NUM_DLLS in future R releases?
Thanks for all your great answers.
The app I?m working on is indeed an exploratory data analysis tool for gene expression, which requires a bunch of bioconductor packages.
I guess for now, my best solution is to divide my app into modules and load/unload packages as the user switch from one module to another.
This brought me another question: it seems that unload package with the
2013 Jul 02
0
Optimización MINLP
Muy buenas,
Tengo la siguiente duda/problema,
He optimizado con éxito un problema de este tipo:
\sum f(x_i)
donde f es una curva exponencial (función no lineal)
sujeto a:
a_i < x_i < b_i
y
\sum f(x_i) < Presupuesto
Vamos, es repartir un presupuesto forzando a que inviertas como poco a_i y
como mucho b_i para cada i
Esto lo hecho correctamente usando el paquete:
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-)
> On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> You can't -- at least as I read the docs for ?optim (but I'm pretty
> ignorant
2023 Jun 06
2
Fwd: package interflex
On 6 June 2023 at 23:33, Johan Andresen wrote:
| Cheers - my response mixes up the order of things:
|
| The suggested apt way INSTALLED INTERFLEX nicely. Lesson learned: install
| dependencies from apt if a package/library isn't in apt search.
|
| Yes I also tried install.packages('interflex'). RStudio console complained
| about the same packages like this:
| ERROR: dependency
2012 Oct 23
1
help using optim function
Hi, am very new to R and I've written an optim function, but can't get it to
work
least.squares.fitter<-function(start.params,gr,low.constraints,high.constraints,model.one.stepper,data,scale,ploton=F)
{
result<-optim(par=start.params,method=c('Nelder-Mead'),fn=least.squares.fit,lower=low.constraints,upper=high.constraints,data=data,scale=scale,ploton=ploton)
2012 Dec 07
1
Make scripts during package installation?
During installation of a package, Makevars/Makefile in src/ is
processed. I've always considered the purpose of this for compiling
native code. Is that it's solely purpose, or is it alright to use it
also for non-code compilation purposes, e.g. building inst/
subdirectories on the fly? If not, are there other means to create
non-static inst/ subdirectories during installation?
The