spotAlgStartOnePlusOneEsJava <- function(io.apdFileName, io.desFileName, io.resFileName){ ## read default problem design source(io.apdFileName,local=TRUE) ## read doe/dace etc settings: print(io.desFileName) des <- read.table(io.desFileName , sep=" " , header = TRUE ); config<-nrow(des); attach(des) for (k in 1:config){ if(des$REPEATS[k]>=1){ for (i in 1:des$REPEATS[k]){ ### 1. Add user defined parameters here: if (exists("SIGMANULL")){ sigma0 <- des$SIGMANULL[k] } if (exists("VARA")){ a <- des$VARA[k] } if (exists("VARG")){ g <- round(des$VARG[k]) } ### End of user defined section. conf <- k if (exists("CONFIG")){ conf <- des$CONFIG[k] } spotStep<-NA if (exists("STEP")){ spotStep <- des$STEP[k] } seed <- des$SEED[k]+i ### 2. The call string has to be modified by the user: callString <- paste("java -jar bin/simpleOnePlusOneES.jar", seed, steps, target, f, n, xp0, sigma0, a, g, px, py, sep = " ") ### End of user defined call string. y <-system(callString, intern= TRUE) res <- NULL res <- list(Y=y, ### 3. User specific parameter values have to be added to the list: SIGMANULL=sigma0, VARA=a, VARG=g, ### End of user specific parameter values. Function=f, MAXITER=steps, DIM=n, TARGET=target, SEED=seed, CONFIG=conf ) if (exists("STEP")){ res=c(res,STEP=spotStep) } res <-data.frame(res) colNames = TRUE if (file.exists(io.resFileName)){ colNames = FALSE } ## quote = false is required for JAVA write.table(res , file = io.resFileName , row.names = FALSE , col.names = colNames , sep = " " , append = !colNames , quote = FALSE ); colNames = FALSE } # end for i } # end if(des$REPEATS[k]>=1) } #end for k detach(des) }