From 09d8a89db7df88e8bfcd814d615c5e38a6268cb8 Mon Sep 17 00:00:00 2001 From: Mauricio Zambrano-Bigiarini <hzambran@users.noreply.github.com> Date: Wed, 13 Jun 2012 12:41:53 +0000 Subject: [PATCH] hydroPSO: removed 'last.best.fits' & 'last.gbest.fits' local variables --- R/PSO_v2012.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/PSO_v2012.R b/R/PSO_v2012.R index bd86f72..c5b5994 100755 --- a/R/PSO_v2012.R +++ b/R/PSO_v2012.R @@ -2002,9 +2002,9 @@ hydroPSO <- function( } # IF 'write2disk' end ######################################################################## - last.best.fits <- rep(fn.worst.value, RG.miniter) +# last.best.fits <- rep(fn.worst.value, RG.miniter) - last.gbest.fits <- rep(fn.worst.value, RG.miniter) +# last.gbest.fits <- rep(fn.worst.value, RG.miniter) GPbest.fit.rate <- Inf @@ -2164,9 +2164,9 @@ hydroPSO <- function( suppressWarnings(ifelse(MinMax=="max", pbest.fit.iter <- max( Xt.fitness[iter, ], na.rm=TRUE ), pbest.fit.iter <- min( Xt.fitness[iter, ], na.rm=TRUE) ) ) - last.best.fits <- roll.vector(last.best.fits, new.value= pbest.fit.iter) +# last.best.fits <- roll.vector(last.best.fits, new.value= pbest.fit.iter) - last.gbest.fits <- roll.vector(last.gbest.fits, new.value= gbest.fit) +# last.gbest.fits <- roll.vector(last.gbest.fits, new.value= gbest.fit) tmp <- UpdateLocalBest(pbest.fit=pbest.fit, localBest.pos=LocalBest.pos, -- GitLab