Real-time emulation and simulation of energy resources