[Ipopt-tickets] [Ipopt] #223: interface to R

Ipopt coin-trac at coin-or.org
Wed Oct 30 15:40:42 EDT 2013


#223: interface to R
--------------------------+------------------------
Reporter:  hans123        |      Owner:  ipopt-team
    Type:  clarification  |     Status:  new
Priority:  normal         |  Component:  Ipopt
 Version:  trunk          |   Severity:  normal
Keywords:                 |
--------------------------+------------------------
 Hi,
 I have a problem with the interface to R.
 When calling ipoptr, I get the following.

 {{{
 Error in ipoptr(x0 = x0, eval_f = eval_f, eval_grad_f = eval_grad_f) :
   'rho' must be an environment not NULL: detected in C-level eval
 }}}

 I use the R build from the Debian project, R version 3.0.2 (2013-09-25).
 Ipopt is from trunk (October 27th).
 I've used the following example.

 {{{
 library(ipoptr)
 eval_f <- function(x) { return( 100 * (x[2] - x[1] * x[1])^2 + (1 -
 x[1])^2 ) }
 eval_grad_f <- function(x) {
    return( c( -400 * x[1] * (x[2] - x[1] * x[1]) - 2 * (1 - x[1]),
                200 * (x[2] - x[1] * x[1]) ) )
 }
 x0 <- c( -1.2, 1 )
 res <- ipoptr( x0=x0, eval_f=eval_f, eval_grad_f=eval_grad_f )
 }}}

 Best regards,
 Hans

--
Ticket URL: <https://projects.coin-or.org/Ipopt/ticket/223>
Ipopt <http://projects.coin-or.org/Ipopt>
Interior-point optimizer for nonlinear programs.



More information about the Ipopt-tickets mailing list