Varies per rider and there are a lot of factors. Node to node costs probably need to be pre computed for speed for routes of any significant distance.
Yes, agreed but you could assume an average rider and replace the node to node distances by node to node calories or kJ. The computed number of calories wouldn't be very accurate but the routing use the data as a relative number and it would favour flat routes.
And you could indeed make it extremely complicated by integrating wind, road surface actual rider weight, Cx (even Cy for side winds)....
It's a good idea and intuitive for cyclists for 'cost' to be given by 'energy required', and for climbing, it's relatively easy to assume an average weight to give you the potential energy gained.
But if you're using energy for cost, then you have to work out the energy required to go along on the flat. This is what's less easy. Wind resistance is proportional to speed squared (I think?) so you could assume, measure or calculate this for an average rider. But there are several problems with this,
(a) it would have to be relatively accurate compared to the potential energy gained for climbing otherwise it would either place too much importance on climbing, or on distance, and
(b) for the 'flat' cost to be static (and thus for the router to return a route in an acceptable time), you would have to assume that the rider is always going at their average cruising speed. This assumption isn't always valid, for instance in town, having to re-accelerate again after stopping at traffic lights consumes more energy than when batting along a country lane.
Could you take account of this? Possibly, but it would involve each node traversal having a speed associated with it, which would be a function of the previous nodes, and then you get into what parameters of the previous nodes is it a function of, if not just the length ... and it becomes a bit of a nightmare.
Cut short, you don't want to make it too complicated otherwise it would be impossible to fathom why it had chosen a particular route.
What I was thinking of is a simple slider that relates importance of height gain on cost to that of distance. So for example, I might
like hills, so I could just move it and see how the route changes.