A new optimization method for a class of time fractional convection-diffusion-wave equations with variable coefficients