COMET: Constrained Optimization of Multiple-Dimensions for Efficient Trajectories