Application of genetic algorithm to determine optimal cropping pattern