Energy accounting and planning