Skip to content

A workout plan generator trying to optimize a set of critriea, namely TSS overall, TSS per sport, high/low split duration, and duration per sport.

Notifications You must be signed in to change notification settings

driscoll42/triathlon_planning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Triathlon Workout Planner

WARNING: Any workout plans generated by this are for your own use and does not constitute advice from a professional coach or medical professional.

With any workout plan generated, consider how your body feels, this is just a tool to help select workouts and you should exercise your own judgment for what makes the most sense for you.


This repo is designed to add some variety to triathlon workouts by creating a set of workouts one could follow which fit certain user defined criteria and scores each workout plan based on how closely it matches the criteria.

The software currently only allows for biking and running workouts (as currently I don't have a pool to swim in). There are several criteria you can set:

  • Total TSS for week
  • Running/Biking Split
  • Low/High Intensity of workouts

For instance my original use case was to aim for 20% high intensity/80% low intensity, 67% Biking/33% Running, and changing the TSS based on the week.

The software will output a dataframe looking like below:

                                       Workouts  Score  Total Duration   Total TSS  % Bike Dur  % Run Dur  % High Dur  % Low Dur  % Run TSS  % Bike TSS  % High Run Dur  % Low Run Dur  % High Bike Dur  % Low Bike Dur
0        [RCI1, CT25, RAn5, RHR5, CFo23, CFo21]  98.33           417.0  491.667002        0.66       0.34        0.19       0.81       0.33        0.67            0.20           0.80             0.19            0.81
1      [CFo11, RFF6, CT12, RSP16, RSP19, CFF14]  98.27           443.0  517.212522        0.67       0.33        0.20       0.80       0.33        0.67            0.18           0.81             0.20            0.80
2      [CCI5, RAn4, RAe22, CFF12, CFo14, RLI12]  98.21           424.0  485.460210        0.68       0.32        0.20       0.80       0.33        0.67            0.19           0.81             0.20            0.80
3       [RT12, CCI2, RT19, CSP14, CSP10, CFF15]  98.06           461.0  510.143744        0.69       0.31        0.20       0.80       0.34        0.66            0.21           0.79             0.19            0.81
4          [RLI4, CFF10, RLI2, RF8, CT12, CAn5]  97.85           435.0  490.597103        0.70       0.30        0.20       0.80       0.33        0.67            0.21           0.79             0.20            0.80
...

This requires a predefined list of works in a Run.xlsx and Bike.xlsx file to pull workouts from. I used the workouts from 8020endurance Workout Library. I believe that it would not be proper for me to share the raw data files so I have not uploaded them, but have added a sample of some random workouts to give an idea of what they should look like.

Process to use:

TBD

Runtime Basic Analysis

If one were to generate every combination of workouts using 8020endurance's workouts, assuming six workouts that week, there are 71 Swim, 218 Bike, 190 Runn workouts, resulting in 12,078,502,137,213,100 possible combinations, which on my computer would take 11,490,020 years (given 10000 combos in 30 seconds). Clearly that is too long.

To make a "good enough" solution, the software will compute a random set of workout plans, and for each one will try up to 25 times to replace workouts to get within the 5% of the TSS limit and 25% of the upper high intensity limit, a sort of guided greedy method. Running this on a 5950X on 30 threads, it takes one minute to test 10,000 workout plans resulting in ~700 plans which score over 90. Quite a few over 97.

Is this the most efficient way to determine workouts? Probably not. It'd likely be easier to build a program giving it the constraints and design workouts which fulfill the criteria rather than from a selected list, but this makes for an interesting optimization problem. I would like to try some other optimizaiton algorithims after this for fun (Simulated Annealing, Genetic Algorithms, Linear Programming, tec...)

https://www.8020endurance.com/what-gets-measured-gets-overemphasized/

Of the 20% high, splitting between Zone 3, 4, 5, by default I made it 10%, 6.7%, 3.3%, but in the 80/20 Triathlon book it recommends that for Sprint/Olympic distances you should favor more Zone 4/5, HIM and IMs should favor more Zone 3, though neither being an all or none situation. Further the closer to the race day the ratio should trend toward moderate (again not all or none)

For how to pick the Zone 3/4/5 allocations, I generally subscribe to a Pyramidal Training Intensity Distribution (https://triq.ai/triathlon-knowledge/triathlon-theory-training-intensity-distribution). However it depends on your race, Sprints you'll focus more on Zones 4/5, Ironmans more Zone 3, but the closer to the race you are the more your workout plan should reflect the race. https://www.sportsperformancebulletin.com/endurance-training/training-structure-and-planning/polarized-training-really-work-recreational-athletes/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6873141/ https://www.researchgate.net/publication/321340517_The_Effect_of_Periodisation_and_Training_Intensity_Distribution_on_Middle-_and_Long-Distance_Running_Performance_A_Systematic_Review

https://www.8020endurance.com/goal-directed-principle-guided-experimentation/

Start where you are: The initial training load must be equal to or slightly greater than the athlete’s recent training load.

Purpose-structured workouts: Endurance fitness has multiple components that (for the most part) must be developed individually by workouts of different types that are structured specifically to fulfill a given purpose.

The 80/20 rule: Except in the early base (90/10) and taper (70/30) periods of training, the athlete must spend about 80 percent of their weekly training time at low intensity and 20 percent at moderate to high intensity.

Step cycles: The training process should be broken into three-week step cycles, in which the Week 1 training load is slightly higher than that of any preceding week, the Week 2 training load is slightly higher than that of Week 1, and Week 3 is a recovery week, where the training load is 10-20 percent lower than in Week 1.

The hard/easy rule: The more challenging a workout is, the more time should be allowed before the next challenging workout.

PMC: https://www.8020endurance.com/performance-management-chart-is-lying-to-you/

Execution Time: 1974.86  Num Cores  1
Execution Time:  983.99  Num Cores  2
Execution Time:  658.14  Num Cores  3
Execution Time:  500.07  Num Cores  4
Execution Time:  400.98  Num Cores  5
Execution Time:  339.40  Num Cores  6
Execution Time:  292.16  Num Cores  7
Execution Time:  256.12  Num Cores  8
Execution Time:  228.72  Num Cores  9
Execution Time:  211.73  Num Cores 10
Execution Time:  195.13  Num Cores 11
Execution Time:  180.85  Num Cores 12
Execution Time:  171.04  Num Cores 13
Execution Time:  162.29  Num Cores 14
Execution Time:  157.02  Num Cores 15
Execution Time:  153.47  Num Cores 16
Execution Time:  146.01  Num Cores 17
Execution Time:  145.44  Num Cores 18
Execution Time:  142.66  Num Cores 19
Execution Time:  138.52  Num Cores 20
Execution Time:  135.17  Num Cores 21
Execution Time:  129.97  Num Cores 22
Execution Time:  129.02  Num Cores 23
Execution Time:  125.32  Num Cores 24
Execution Time:  124.15  Num Cores 25
Execution Time:  121.91  Num Cores 26
Execution Time:  119.49  Num Cores 27
Execution Time:  118.80  Num Cores 28
Execution Time:  117.86  Num Cores 29
Execution Time:  114.17  Num Cores 30
Execution Time:  113.56  Num Cores 31
Execution Time:  115.40  Num Cores 32

About

A workout plan generator trying to optimize a set of critriea, namely TSS overall, TSS per sport, high/low split duration, and duration per sport.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages