Integrable twofold hierarchy of perturbed equations and application to optical soliton dynamics