No it is not possible for acados to know beforehand how long an SQP iteration will take on a specific hardware and for a specific problem.
However, if one uses RTI, i.e. a single linearization and a single QP solve, the CPU time should be pretty deterministic.
You can additionally limit the number of QP solver iterations.
Those are definitely relevant questions for MPC practice that are not trivial to answer in general.
Does the solver_options.qp_solver_iter_max correspond to a limit set on the value returned by solver.get_stats("qp_iter") ? I would have expected it to, however in the tests I’m running, I see solver.get_stats("qp_iter") > solver_options.qp_solver_iter_max
Yes, it is the maximum number of QP solver iterations for each QP, so the array solver.get_stats("qp_iter") should contain values which are all smaller than solver_options.qp_solver_iter_max.
a solver timeout for SQP is implemented in this PR. Note that it uses a heuristic to estimate the time required for the next SQP iteration, which means you might still get some violations of the maximum time.