Generalized dilations and numerically solving discrete-time homogeneous optimization problems