Genetic Optimization, Heuristic regarding choosing the number of generations and population size
Is there a heuristic formula or a study of some sort that can guide me regarding the best


Maybe, but I don't know any. My approach is to run a few experiments and observe the speed of convergence with different values for the size of the population, typically in the range 50 to 500. My experience is that usually this parameter doesn't have a big impact (especially compared to rate of mutation/crossover) so I tend to stay on the low side for efficiency reasons.

It's not technically required to specify the number of generations provided there is a criterion to check convergence, either manually or programmatically. I think it's more important to have such a criterion, because there's a always a risk that the predefined number of generations won't be sufficient.