Skip to content

CRAN package NlcOptim query

2 messages · Hans W Borchers

#
To be corrected:
`Constr_new` with a capital letter;
`aeq2` is a list, should be a matrix.

As I said last month, you can yourself combine inequality constraints
with bounds constraints as follows:

    myA <- rbind(-Constr_new, diag(-1,numel), diag(1,numel))
    myB <- c(-x_than0, rep(0,numel), rep(1,numel))

and `solnl` will return a result like this:

    sol <- NlcOptim::solnl(X = c(InputTM), objfun = obj_F, A = myA, B = myB,
                           Aeq = as.matrix(aeq2), Beq = beq2)
    c(sol$par)
    [1] 0.8310997170, 0.0378150241, ..., 0.2463006547, 1.0000000000
    sol$fn
    [1] 0.00421616

I will write to the maintainer asking about why this example does not
work --  supplying functioning code, maybe that will trigger a
response.

Hans Werner

Please note: You are sending e-mail in HTML format which makes it
almost impossible to use as code in the R console.
On Wed, Dec 12, 2018 at 12:45 PM Hans W Borchers <hwborchers at gmail.com> wrote:
3 days later
#
The maintainer of the *NlcOptim* package told me that he has fixed the
problem and already submitted a new version to CRAN. Thanks, XianYan,
for this prompt reaction.