Model-based control approaches the problem of optimal supervisory control for complex building systems by using discrete timesteps and searching for an optimal control configuration at each timestep, using a detailed building model and an optimization algorithm. Although the approach itself is not new (it was proposed at least as early as 1988), it is only during the past five to ten years that readily-available computation power has allowed researchers to consider this approach with complex system models. Recent research has developed and tested this approach for active solar shading systems, thermal storage systems, and for a number of HVAC control problems. However, little cross-pollination between research fields has occurred, and although some researchers have pointed at the possible benefits of using this approach for more complex systems, this area remains open for much more exploration. Our current research focuses on the development a software framework to facilitate further research in model-based control. The beta version of the framework uses GenOpt for the optimizer (since this allows for a variety of building simulation tools to be used, and facilitates the use and development of various optimization algorithms), with another layer to organize the process at each timestep. This organizational layer can eventually incorporate a number of useful attributes, including the allowance of user over-rides, automated periodic model calibration, and various ways of increasing the effectiveness of the optimization process. The framework is currently undergoing further development after an initial feasibility test, and will then be tested with studies of more complex building systems. It will be tested in two different roles: to optimize system control for energy efficiency; and to determine the least disruptive demand-trimming actions when cutting back loads at times of peak grid stress.