Reputation: 51
Have a look at documentation of GA package in R
ftp://cran.r-project.org/pub/R/web/packages/GA/GA.pdf
Upvotes: 5
Views: 1071
Reputation: 41
The only solution I have found so far is to use a ceiling, floor, or round function in order to convert the decimal value to an integer within the fitness function--before passing it to the actual function being optimized.
This, however, slows down the GA function greatly.
There is another genetic algorithm that might be useful if you only wish to use integers. It is called GeneticAlg.int from the gramEvol package.
Upvotes: 4