Energy consumption in buildings continues to rise with increased deployment of energy-consuming equipment such as Heating, Ventilation, and Air Conditioning (HVAC) amid a growing world economy. Renewable energy is projected to comprise a majority of the future electricity supply, but the intermittent nature of renewables means that consumption must respond to dynamic supply for optimal utilization. This paper proposes a novel HVAC control strategy for residential buildings using the adaptive comfort model, considering occupancy through probability and real-time information, and optimizing the HVAC schedule to reduce cost, maintain thermal comfort, and respond to the dynamic availability of renewable energy while being generalizable to different situations. To validate this approach, the Universal CPS Environment for Federation (UCEF) co-simulation platform is used to connect advanced building controls with the building energy simulation software EnergyPlus. Simulations are performed for a residential building in Sacramento, CA during a typical summer week. Economic impacts, energy consumption, and thermal comfort are analyzed for traditional, adaptive, and occupancy-based control strategies under demand-based, tiered, and fixed electric tariff systems. Simulation results show that occupancy consideration, adaptive thermal comfort, and optimization can reduce cost by 50.1 %, electricity consumption by 52.9 %, and discomfort by 56.2 % compared to traditional fixed setpoints. The ability of the proposed HVAC control strategy to shift energy consumption away from peak times under a demand-based tariff system is qualitatively analyzed and findings suggest that maximum load-shifting on a grid-scale is attained using occupancy consideration with optimized control and demand-based pricing. For individual residential buildings, similar economic benefits can be gained using the less-complex adaptive HVAC control strategy with existing tiered or simple electric tariff systems.