Haar wavelet-based optimal control of time-varying state-delayed systems: a computational method