Questions tagged [nlopt]

NLopt is a nonlinear optimization library written in C by Steven G. Johnson and licensed under the LGPL.

144 questions
3
votes
0 answers

GRG Non Linear Solver Equivalent in C#

I am looking to use Math.NET to implement the excel GRG Non Linear solver in C#. This seems to fall under the non linear optimization topic in Math.NET and I was able to find a few examples of optimization in…
Murali
  • 31
  • 1
3
votes
0 answers

Roundoff Limited Error for NLopt AUGLAG - How do I get reasonable values when this error happens and why does it happen?

I am using NLopt AUGLAG with COBYLA as the local minimizer function. Why am I getting Roundoff Limited Error? How do I fix this error? Here are the things I've tried: Removing all constraints, but it still returned the RoundoffLimited Error. Looking…
otterboy32
  • 31
  • 1
3
votes
2 answers

Travis-CI error: installing nloptr pkg (r pkg check)

I try to use travis-ci to check whether my r package is correct. My package should import r pkg nloptr. And travis-ci will give the error in "r": "oldrel" branch. I show error here: configure: Need to download and build NLopt trying URL…
Chaoran Hu
  • 103
  • 5
3
votes
0 answers

nloptr optimization stops before maxeval steps even when {x,f}tol_{rel,abs} are all set to 0

I am looking at the example given in the manual of nloptr. I replaced the last part of the code by local_opts <- list( "algorithm" = "NLOPT_LD_MMA", "xtol_rel" = 0.0, "ftol_rel" = 0.0, …
John Jiang
  • 827
  • 1
  • 9
  • 19
3
votes
0 answers

Fortran90 Segmentation Fault Using OpenMP and Outside Library

I've searched up and down looking for some help with this problem, tried various solutions, etc. but can't seem to trace the problem. I'm trying to parallelize a do loop that contains a call to an optimization routine in the NLopt library (for NLOpt…
3
votes
1 answer

Stop and resume optimisation

I am using nlopt's c++ interface to solve non-linear optimisation problems. nlopt::opt opt; opt.set_maxeval(10); opt.set_max_objective(foo); double result; std::vector params(10,0); opt.optimize(params, result); // later on in the…
quant
  • 21,507
  • 32
  • 115
  • 211
3
votes
0 answers

Multi-threading in NLOPTR (The R package interface to NLOPT)

I'm trying to run a set of fairly large non-linear optimizations through an R interface. (Yes, it must be R -- other languages don't work) I've been groveling around in the code, and I confess that I can't figure out whether NLOPT supports…
JWLM
  • 432
  • 2
  • 10
3
votes
1 answer

NLopt with univariate optimization

Anyone know if NLopt works with univariate optimization. Tried to run following code: using NLopt function myfunc(x, grad) x.^2 end opt = Opt(:LD_MMA, 1) min_objective!(opt, myfunc) (minf,minx,ret) = optimize(opt, [1.234]) println("got $minf…
3
votes
1 answer

trouble with Installing nloptr by locally on Ubuntu

I'm currently using open source (R and ubuntu) to work for my organization. The problem is that we could NOT use internet which means if I want to install some package or software, I have to download it from other pc and transfer it to the working…
Tay Shin
  • 528
  • 4
  • 17
3
votes
1 answer

Getting NLOpt results after optimization failure using Python API

I am running an optimization using NLOpt's Python interface. At a certain point, after a number of iterations, I get an nlopt.RoundoffLimited exception. According to the documentation…
Max
  • 1,670
  • 1
  • 12
  • 17
3
votes
1 answer

Pointer to function to member function

I want to use a library (nlopt) that has a function set_min_objective which takes a pointer to a numerical function myfunc and find its minimum. I would like to create a class that will contain a suitably initialized member function.…
vkubicki
  • 1,104
  • 1
  • 11
  • 26
2
votes
1 answer

How to use a older version of NLopt in R

I am trying to replicate a code that uses the nloptr function. The only difference is that I am using another version: As you can see here in my output I am using version 2.7.1 > # optimization result > opt_result Call: nloptr(x0 = theta_init,…
Jorge Paredes
  • 996
  • 7
  • 13
2
votes
1 answer

Passing void function as argument into double function in c++

I'm trying to use NLopt library for an optimization problem in c++. The docs indicate the input function to be optimized should look like this: double myfunc(const std::vector &x, std::vector &grad, void *my_func_data); I don't…
connor449
  • 1,549
  • 2
  • 18
  • 49
2
votes
1 answer

Cannot install nlopt python module

I am trying to install nlopt onto macOS 10.15.5. I downloaded the nlopt-2.6.2.tar.gz file from the NLopt docs and ran the following from the nlopt-2.6.2 directory: mkdir build cd build cmake -DNLOPT_OCTAVE=Off -DNLOPT_MATLAB=Off -DNLOPT_GUILE=Off…
2
votes
1 answer

Julia NLopt force stops before the first iteration

I'm using NLopt for a constrained maximization problem. Regardless of the algorithm or start values, the optimization program is force stopped even before the first iteration (or so I assume because it gives me the initial value). I've attached my…
1
2
3
9 10