postProc in calibMuso
This commit is contained in:
parent
cfd6a1f7be
commit
eb23330d13
@ -41,7 +41,8 @@ optiMuso <- function(measuredData, parameters = NULL, startDate,
|
||||
exp(-sqrt(mean((x-y)^2)))
|
||||
},
|
||||
continious,
|
||||
modelVar = 3009)
|
||||
modelVar = 3009,
|
||||
postProcString = NULL)
|
||||
{
|
||||
dataCol <- grep(dataVar, colnames(measuredData))
|
||||
|
||||
@ -112,11 +113,16 @@ optiMuso <- function(measuredData, parameters = NULL, startDate,
|
||||
write.csv(x=origModellOut, file=paste0(pretag,1,".csv"))
|
||||
modellOut[1] <- likelihood(measuredData,origModellOut[modIndex,colNumb])
|
||||
print("Running the model with the random epc values...", quote = FALSE)
|
||||
|
||||
if(!is.null(postProcString)){
|
||||
colNumb <- length(settings$dailyVarCodes) + 1
|
||||
}
|
||||
|
||||
for(i in 2:(iterations+1)){
|
||||
tmp <- tryCatch(calibMuso(settings = settings,
|
||||
parameters = randValues[(i-1),],
|
||||
silent= TRUE,
|
||||
skipSpinup = skipSpinup)[modIndex,colNumb], error = function (e) NA)
|
||||
skipSpinup = skipSpinup, postProcString = postProcString)[modIndex,colNumb], error = function (e) NA)
|
||||
|
||||
modellOut[i]<- likelihood(measuredData,tmp)
|
||||
rmse[i] <- sqrt(mean((measuredData-tmp)^2))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user