The issue isn't that the Fortran code is too slow. The issue is that the problem description is super complicated, hard to measure and very hard to control is ways that noone really understands. However, you can just plug the measurement outputs and system inputs to some controller. This machine learning helps control by jointly modeling imperfections in the physical model, imperfections in the hardware that controls things, and imperfections in the measurements. That's something you just really don't want to even attempt writing by hand (in whatever programming language).