Sunday, January 31, 2010

Next wind tunnel session 6 Mar; Pacing Optimisation

Yee ha - back to the tunnel - 6 Mar. Like a drug that thing.

Hot Gatorade race in Melburn today... 37 deg C and with a run time approaching my cycle time I still somehow managed 10th in my age group.

Also been working on a pacing optimisation calculator. Alex Simmons has a ripper one in Excel, but it's pretty slow (well Excel is pretty slow at the best of times) - it takes 20-30 min to optimise a course with 100 segments. The idea is that if the course is hilly (or there is a stinking headwind like today) you can actually be faster by applying more power on the uphill/headwind sections, and less on the downhill/tailwind sections, while still keeping the normalised power at the same level as if you rode the course at the same even power.

Executing such a pacing strategy is pretty simple if the course is hilly - add % grade to the screen of a Garmin 705 alongside power and ride X power for Y gradient.

So I figured I'd have a crack at the same problem, but using a different technique: genetic algorithms. A genetic algorithm is a way of finding solutions to maths problems, but without doing every possible calculation required with brute force. You come up with a way of encoding the problem as a gene (you set the power for each course segment), then determine how well the gene solves the problem (arrive at the end of the course with a specified Normalised Power and fastest time).

By creating a population of genomes, you can then calculate how good each gene is at the problem, and rank the results. Then comes the fun bit, you take the best genes, divide them into Mums and Dads and then start creating children by swapping some of the gene segments of the Mum and the Dad into the babies. You also get to mutate the gene pool randomly to keep things interesting.

Preliminary tests are that I can calculate a population of 1000 genomes on a 6 segment course and do a full generation every half second or so(each 1000 genomes calculate how good they are at the problem, have babies and die off, then a few might get mutated); so in a minute could calculate 120,000 attempts at solving the problem. Because the genes adapt to the problem, picking the better solutions each generation, this might be a lot faster than using Excel... time will tell.

I'm planning on factoring in bearing, wind bearing and wind speed as well as the course (elevation, CdA, Crr) etc. You'll be able to vary things per segment if you need to (like a really rough section of course, or an exposed windy section). If the thing is fast enough, you should be able to run it on the website from your mobile browser on the way to the race site. Under a minute good, longer than that not so flash. And it should be easy to use - upload a TCX/GPX file from a Garmin or exported from WKO and there's the course - tweak the input parameters and solve away!

3 weeks till Nationals - CTL 70.


  1. Who do I contact to come and test at the Monash wind tunnel?

  2. Check out Raoul Luescher