Skip to content
Prev 378184 / 398502 Next

CRAN package NlcOptim query

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: