Optimization of crop losses by finite element simulation of slab edging