This problem would be much easier if it wasn't about optimation.
A path of a rocket has to be set trough an amount of moving checkpoints while each of them have a different maximum velocity of which the rocket can pass by (otherwise it misses it). The acceleration,initial velocity and position of each checkpoint is known(the acceleration is constant), and the rocket has a initial velocity and poision, known. The list of acceleration changes at certain time has to be calculated. And plus one thing, the length of the rockets acceleration vector can't pass a certain known value. I've done this but without the optimation: it has to be done as fast as possible (travel the path at shortest possible time)

Again, if it remained unclear. I want an algoritm to calculate the full route, which is a list of acceleration vectors and the time they will be active for the rocket. No mass/friction/gravity or other elements are involved.