Most likely they are the visualisation of the AI lap (green = throttle, red = brakes, yellow = coast), in other words the contents of a .knw file. It's a development tool for Scawen, to check how his programming works out on the track.
That means that the lines are NOT the ideal line, because the AI lines
- vary per AI driver
- depend on the setup
- will change while the AI learns
- will change during the race (since the AI now takes fuel weight and tyre condition into account)
Scawen could re-use the line-drawing code for an "ideal line" feature, but he'd need much more than that. It's pure speculation whether this will be in LFS soon.