However, the optimization problem normally becomes non-convex when the time allocation is included as an optimization variable. Since time allocation can largely affect the quality of the planned trajectory, researchers are searching more efficient ways to optimize time allocation for trajectory planning. Early trials have used heuristics [1]} and decoupling methods [2]}, although they both can lead to inefficient trajectories and burdensome computation time. Mellinger et al. [3]} propose to solve this problem by gradient descent, which can be seen as the prototype of bilevel optimization method, though the finite difference is used to approximate the gradient. Sun et al. [4]} finalize the idea of using bilevel optimization to determine time allocation using analytical gradients. In their design, the lower-level problem optimizes the trajectory with fixed time allocation, which is generated by the upper-level problem that optimizes the time allocation using analytical gradients.
