as I have mentioned a few times, I'm thinking to do a major redesign of the race calculation. To get it started and to get you involved, I first collected a list (pretty much unsorted) of all the issues we have with the race calculation currently. Then I have yet another list with ideas how to improve that, and an idea on how to approach that whole redesign.
Current Situation, unsorted list of general issues (numbered, so it's easier to reference it):
- bad code quality
- one big method spread over multiple files
- inconsistent and confusing naming of variables
- use of variables with different types in different contexts
- complex calculations without explanation
- high impact of downhill skill on % where it doesn't matter at all. In reality, no downhill skills are needed for *1%
- downhill riding
- road layout doesn't influence tempo in downhill (narrow and winding roads in reality strongly affect speed)
- downhill attacks too hard as all roads are considered wide and straight
- very steep downhill with rain has unrealistic tempo / attack behaviour
- climbing
- tempo a lot less selective than attacks
- attacks very effective, but easier for weaker guys to follow
- many followers makes attacker slower, esp compared to other attacking groups
- calculation is based on some internal speed and multiple artificial factors, but not transparently
- gaps are not calculated based on pure speed, but also with some artificial factors
- every rider rides the same sector simultaneously
- no positioning of racers within their groups
- too low energy consumption while not riding in a fast group
- too high energy consumption for attacks (basically attacking is not much more than riding fast + surprise element)
- one-legged climbers / sprinters (flat skill too important or too low)
- no Windkante / bordure due to missing positioning
- all roads are the same (all straight and wide)
- no impact of altitude, only weather, i.e. riding on 4000m should be a lot tougher than on sea level
- pave behaviour
- tough pave not very selective compared to real life
- soft pave sometimes too selective, e.g. 3% with *, where climbers are dropped
- hilly pave is way too soft, gaps too small
- downhill pave very buggy
- gaps on pave TTT are huge
- various sprint issues (see other forum threads)
- dependency on actions of others (when without a train)
- ass covering (follow others and help an own guy getting a bonus and pushing stronger guys away)
- trick sprint (release one part of the train)
Step 0 (community helping with research and finetuning)
- tools for supporting development for interested users
- base model for speed calculation (showing speed, energy consumption, etc.)
- speed calculated based on skills, energy, form, road surface, draft, road width, curvyness
- transparent calculation based on actual speed rather than some virtual values with bonus / malus
- simulating simple race situations
- races continue with old race engine
- test races (maybe special races with retired or youth riders) in parallel possible for new race calculation
- new base model for speed calculation using all the parameters (skill, energy, form, surface, incline, etc)
- more realistic energy consumption
- basic race calculation implemented (tempo, attacks, following, dropping, merging / splitting groups etc.)
- final sprint probably still unchanged
- no realistic positioning yet (i.e. everybody shares the same position within a group)
- different sector lengths, surfaces (gravel), bonifications on all sector types
- extending race editor to support new features
- real positioning in groups
- new features related to positioning (bordure, real gaps between groups, realistic following)
- final sprint based on real positioning