Expected revenue is dim NP x length (top). Yours upperis length1. You can try to set dim NP to 1 with control. For instance...
DEoptim(fn=fn, lower=lower, upper=upper, fnMap=fnm,control=DEoptim.control(NP=1))
...
Warning in DEoptim(fn = fn, lower = lower, upper = upper, fnMap = fnm, control = DEoptim.control(NP = 1)) :
'NP' < 4; set to default value 10*length(lower)
, NP 10 * length(lower), .
fnm <- function(x) matrix(round(x, 2), nrow=10, ncol=1,byrow=TRUE)
, length 1. , , -
fnm <- function(x, Len) matrix(round(x, 2), nrow=10*Len, ncol=Len,byrow=TRUE)
DEoptim
DEoptim(fn=fn, lower=lower, upper=upper, fnMap=function(x) fnm(x,length(upper)))