spring traj opt problem