Note that in the lower-level problem, the time assignment \(T\)  is a parameter of the problem with a known value (obtained via solving (REF )). Hence, (REF ) reduces to the minimum-snap formulation in [1]} and turns into a quadratic program, which is convex and efficiently solvable. The challenges come from the upper-level optimization (REF ), which is non-convex. A typical approach in solving (REF ) is to use gradient descent, where the temporal assignment \(T\)  is iteratively updated. In [1]}, the descent direction is obtained by computing the directional derivative along unit vectors. In [3]}, the descent direction is the gradient of the optimal lower-level cost \(\nabla _{T}J^*(\sigma ^*(T),T)\) , which is computed as an analytical gradient by implicit differentiation of the KKT condition of the low-level problem (REF ).
