The joint replenishment problem with time-varying costs and demands: Efficient, asymptotic and ε-optimal solutions