Hi everyone,
I'm currently implenting a MPC + multiple shooting approach for an active SLAM system.
I optimize only over the mean state (i.e. 9x1) and construct the Covariance (9x9) for my objective function via belief propagation. Creating the objective function and constraint functions works fine and within a matter of seconds although they are quite large, whereas creating an instance of the solver takes a few minutes to complete.......
Here is my setup procedure:
#create solver / planner
OPT_variables = vertcat(X.reshape((nx*(N+1),1)), U.reshape((2*N,1)))
nlp_prob = {'f' : obj, 'x' : OPT_variables, 'g' : g, 'p' : P}
#optimization Options
opts = {}
opts['print_time'] = 1
#ipopt options
opts['ipopt'] = {}
opts['ipopt']['max_iter'] = 1500
opts['ipopt']['acceptable_tol'] = 1e-8
opts['ipopt']['acceptable_obj_change_tol'] = 1e-8
print('create solver')
solver = nlpsol('solver', 'ipopt', nlp_prob, opts)
The optimization itself is much faster, then the creation of the solver object. Given that I need to reconstruct the solver multiple times during my MPC approach...What could be the bottleneck of my code or is it simply the size of my problem? I'm happy to share specific lines of code if needed.
Best,
Fabian