Some airlines have their own flight planning computer time,others use bought in service.Normal parameters for a route being chosen include winds,airspace closures,overflight charges,insurance and crew costs,aircraft weight and a number of other factors.The numbers are crunched by high speed computers and usually 2 or 3 options are added with costs and fuel burn.For a B747 fuel burn is worked to the nearest 50 or 100 Kgs out of a possible 160 tonnes or so.
Like most things in aviation it is worked to minimum cost.