STOCHASTIC OPTIMIZATION OF COMBINED ENERGY AND COMPUTATION TASK