1. A method of distributing energy for a building, the method comprising the steps of: A. generating energy including electrical energy, generated heat, and byproduct heat from energy sources selected from the group consisting of natural gas, solar energy assemblies, and an electric grid; B. recovering at least a portion of the byproduct heat; C. modeling a total energy profile for the building, the total energy profile including a thermal energy requirement and an electrical energy requirement; D. assessing a total available heat stream, the total available heat stream including a stream of the generated heat and a stream of the byproduct heat; E. routing the electrical energy and the streams of generated heat and byproduct heat to the building for use; F. establishing a target total energy cost for a discrete time interval; G. calculating an index of performance indicative of an actual total energy cost for the discrete time interval; and H. optimizing the usage of the electrical energy and the streams of generated heat and byproduct heat over the discrete time interval through an optimizing scheme to thereby maintain a desired building environment at a minimum total energy cost, wherein the optimizing scheme comprises the steps of: a. calculating a minimum electrical energy requirement; b. setting an electrical energy output to meet the calculated minimum electrical energy requirement; c. comparing the total available heat stream to the thermal requirement for the building; d. if the total available heat stream exceeds the thermal requirement for the building, then one of: i) storing an excess portion of the total available heat stream in a storage device; ii) dumping the excess portion to the atmosphere; or iii) decreasing the total available heat stream; e. if the total available heat stream is less than the thermal requirement for the building, then at least one of: i) extracting the stored excess portion from the storage device; and ii) increasing the generated heat stream; and f. optimizing the system by comparing the actual total energy cost to the target total energy cost and adjusting the usage of the electrical energy and the total available heat stream to thereby provide the minimum actual total energy cost.