luca-scr / GA

An R package for optimization using genetic algorithms
http://luca-scr.github.io/GA/
91 stars 29 forks source link

GA Version 3.2 for Linux: gaIslands.R line 127 #51

Open kk-1 opened 3 years ago

kk-1 commented 3 years ago

Hello, I am trying to use 8 islands with the gaisl. It is not clear if we need to replicate the initial soln row according to the number of islands Maybe 8 islands need 8 rows?

I created a "suggestion" (initial solution) with the right number of columns (upper and lower interval) and 8 rows (per each island?) Rstudio gives error:

Error in suggestions[seq(popSize), , drop = FALSE] : subscript out of bounds

Why the line 127 in gIslands.R is like the following: suggestions <- suggestions[seq(popSize),,drop=FALSE]

Maybe there is a bug? How can we use the suggestion for let say n islands?

Thanks in advance...

luca-scr commented 3 years ago

You should provide a minimal reproducible example.