Code Monkey home page Code Monkey logo

Comments (4)

jyypma avatar jyypma commented on August 30, 2024

This might be an algorithm that has been added at a later stage to NLopt.

Could you try running

# Hack to prevent checking on R side before sending to C.
R.utils::reassignInPackage("is.nloptr", pkgName="nloptr", function(x) { return(TRUE) })

before

# solve Rosenbrock Banana function
res <- nloptr( x0=x0, 
               eval_f=eval_f, 
               eval_grad_f=eval_grad_f,
               opts=opts)

and see what the output is?

On Windows, I get

Error: unknown algorithm NLOPT_LD_CCSAQ.

suggesting that the algorithm is not included in the NLopt version that is included in the Windows version of nloptr. This may be different on other operating systems.

from nloptr.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

Good point. On Ubuntu with the distribution version 2.4.2 I see

edd@rob:~$ grep 'NLOPT_.._' /usr/include/nlopt.h
     NLOPT_GN_DIRECT = 0,
     NLOPT_GN_DIRECT_L,
     NLOPT_GN_DIRECT_L_RAND,
     NLOPT_GN_DIRECT_NOSCAL,
     NLOPT_GN_DIRECT_L_NOSCAL,
     NLOPT_GN_DIRECT_L_RAND_NOSCAL,
     NLOPT_GN_ORIG_DIRECT,
     NLOPT_GN_ORIG_DIRECT_L,
     NLOPT_GD_STOGO,
     NLOPT_GD_STOGO_RAND,
     NLOPT_LD_LBFGS_NOCEDAL,
     NLOPT_LD_LBFGS,
     NLOPT_LN_PRAXIS,
     NLOPT_LD_VAR1,
     NLOPT_LD_VAR2,
     NLOPT_LD_TNEWTON,
     NLOPT_LD_TNEWTON_RESTART,
     NLOPT_LD_TNEWTON_PRECOND,
     NLOPT_LD_TNEWTON_PRECOND_RESTART,
     NLOPT_GN_CRS2_LM,
     NLOPT_GN_MLSL,
     NLOPT_GD_MLSL,
     NLOPT_GN_MLSL_LDS,
     NLOPT_GD_MLSL_LDS,
     NLOPT_LD_MMA,
     NLOPT_LN_COBYLA,
     NLOPT_LN_NEWUOA,
     NLOPT_LN_NEWUOA_BOUND,
     NLOPT_LN_NELDERMEAD,
     NLOPT_LN_SBPLX,
     NLOPT_LN_AUGLAG,
     NLOPT_LD_AUGLAG,
     NLOPT_LN_AUGLAG_EQ,
     NLOPT_LD_AUGLAG_EQ,
     NLOPT_LN_BOBYQA,
     NLOPT_GN_ISRES,
     NLOPT_LD_SLSQP,
     NLOPT_LD_CCSAQ,
     NLOPT_GN_ESCH,
edd@rob:~$

from nloptr.

jchiquet avatar jchiquet commented on August 30, 2024

@jyypma

Could you try running

# Hack to prevent checking on R side before sending to C.
R.utils::reassignInPackage("is.nloptr", pkgName="nloptr", function(x) { return(TRUE) })

before

# solve Rosenbrock Banana function
res <- nloptr( x0=x0, 
               eval_f=eval_f, 
               eval_grad_f=eval_grad_f,
               opts=opts)

and see what the output is?

On Windows, I get

Error: unknown algorithm NLOPT_LD_CCSAQ.

suggesting that the algorithm is not included in the NLopt version that is included in the Windows version of nloptr. This may be different on other operating systems.

Got the same error on Ubuntu 18.04 : I also had to modify src/nlopt.c to make things work. I sent you a PR #52 if you want to consider my solution.

from nloptr.

jyypma avatar jyypma commented on August 30, 2024

Closed by 507c262

from nloptr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.