search for: eval_f0

Displaying 3 results from an estimated 3 matches for "eval_f0".

2013 Feb 15
1
minimizing a numerical integration
...ot working. I got an error: 'y' is missing library('nloptr') library('pracma') f <- function(x,y) {#here i should put the commands representing my function return( ) } #constraint function eval_g0 <- function(x) { return( ) } # objective function eval_f0 <- function(x) { romberg(f, 0.5, 0.5001)} ARL1 <- nloptr( x0=c(0.653), eval_f=eval_f0, lb = c(0), ub = c(6), eval_g_ineq = eval_g0, opts = list("algorithm"="NLOPT_LN_COBYLA", "maxeval&qu...
2013 Feb 18
2
error: Error in if (is.na(f0$objective)) { : argument is of length zero
...2])*z_i1)/x[2]) H1[i1,j1]<-pnorm(up1,mean=5,sd=1)-pnorm(down1,mean=5,sd=1)} } K1<-solve(I1-H1) one1 <- matrix(1,nrow=t1,ncol=1) u1 <- matrix(0,nrow=m1,ncol=1) y1<-c(u1, 1, u1) z1<-t(y1) ARLV1<-K1%*%one1 ARLV21<-t(ARLV1) return( abs((ARLV21%*%y1)-500)-1) } eval_f0 <- function(x) romberg(function(s) f(x, s), 0, 6) of <- nloptr( x0=c(0.653,0.09), eval_f=eval_f0, lb = c(0,0), ub = c(6,1), eval_g_ineq = eval_g0, opts = list("algorithm"="NLOPT_LN_COBYLA", &qu...
2013 Feb 27
0
A program running for a too long time
...mean=0,sd=1)-pnorm(down,mean=0,sd=1)} } K<-solve(I-H) one <- matrix(1,nrow=t,ncol=1) u <- matrix(0,nrow=m,ncol=1) y<-c(u, 1, u) z<-t(y) ARLV<-K%*%one ARLV2<-t(ARLV) return(ARLV2%*%y) } # constraint function eval_g0 <- function(x) abs(f(x,0)-500)-1 #objective function eval_f0 <- function(x) romberg(function(y) ((1+y*y)*f(x,y)/6),0,6, tol = .Machine$double.eps^(2/3))$value obj <- nloptr( x0=c(0.653,0.09), eval_f=eval_f0, lb = c(0,0), ub = c(6,1), eval_g_ineq = eval_g0, opts = list(&quo...