fixing undefined future return
This commit is contained in:
parent
ef782cd21a
commit
1e771fa52e
@ -168,10 +168,11 @@ multiSiteCalib <- function(measurements,
|
|||||||
tryCatch(
|
tryCatch(
|
||||||
|
|
||||||
{
|
{
|
||||||
multiSiteThread(measuredData = measurements, parameters = parameters, calTable=calTable,
|
result <- multiSiteThread(measuredData = measurements, parameters = parameters, calTable=calTable,
|
||||||
dataVar = dataVar, iterations = threadCount[i],
|
dataVar = dataVar, iterations = threadCount[i],
|
||||||
likelihood = likelihood, threadNumber= i, constraints=constraints, th=th)
|
likelihood = likelihood, threadNumber= i, constraints=constraints, th=th)
|
||||||
setwd("../../")
|
setwd("../../")
|
||||||
|
return(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
, error = function(e){
|
, error = function(e){
|
||||||
@ -256,7 +257,7 @@ multiSiteCalib <- function(measurements,
|
|||||||
dev.off()
|
dev.off()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
origModOut <- future::value(fut[[1]], stdout = FALSE, signal=FALSE)[["origModOut"]]
|
origModOut <- future::value(fut[[1]], stdout = FALSE, signal=FALSE)[["origModOut"]]
|
||||||
# Just single objective version TODO:Multiobjective
|
# Just single objective version TODO:Multiobjective
|
||||||
results <- results[results[,"Const"] == 1,]
|
results <- results[results[,"Const"] == 1,]
|
||||||
if(nrow(results)==0){
|
if(nrow(results)==0){
|
||||||
@ -479,9 +480,12 @@ multiSiteThread <- function(measuredData, parameters = NULL, startDate = NULL,
|
|||||||
writeLines(as.character(i-1),"progress.txt") #UNCOMMENT IMPORTANT
|
writeLines(as.character(i-1),"progress.txt") #UNCOMMENT IMPORTANT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(threadNumber == 1){
|
if(threadNumber == 1){
|
||||||
return(originalRun)
|
return(originalRun)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return(0)
|
||||||
}
|
}
|
||||||
distributeCores <- function(iterations, numCores){
|
distributeCores <- function(iterations, numCores){
|
||||||
perProcess<- iterations %/% numCores
|
perProcess<- iterations %/% numCores
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user