Conservation laws for optical solitons with polynomial and triple-power laws of refractive index