Dear Joris,
the solver did not finish so I don't have the full printout.
The GPFlow only occurs in the cost function, not in the constrains. It depends on 4 controls (which are all I have) and 1 state (I have 3 states in total).
Within GPFlow, it needs to calculate a 1 x n vector, each entry needs to be calculated (exp(x_i * x_new) ) and then multiplied with nx1 constant vector. Since n = 700.000 I totally understand it takes its time. All this happens within the GPFlow function, so is kind of blackbox and I cannot actively manipulate there. GPFlow is designed for high data dimensions though. I know that reducing n would be the first idea but due to the modeling approach I have had earlier I'd prefer not to do so and pay this by having longer calculation times.
If I solve the OCP having a cost function without GP it works perfectly fine and doesn't take more than a few seconds. So I don't think the botteleneck comes from the ODE System but from calling GP.
Using another cost function given by an API function with a counter showed that during the optimization process it called the function 200.000 times, so everytime evaluating GP sums up I guess.
I dont really understand "a method with an exact Hessian or limited memory approximation". I am using multiple shooting which seems to be the most robust method but I am open to other methods. I don't need the Hessian I basically just care about the optimal state and control trajectory.
Thank you very much,
Jonas