We propose a simulation-precision control algorithm that can be used with a family of derivative free optimization algorithms to solve optimization problems in which the cost function is defined through the solutions of a coupled system of differential algebraic equations (DAEs). Our optimization algorithms use coarse precision approximations to the solutions of the DAE system in the early iterations and progressively increase the precision as the optimization approaches a solution. Such schemes often yield a significant reduction in computation time. We assume that the cost function is smooth but that it can only be approximated numerically by approximating cost functions that are discontinuous in the design parameters. We show that this situation is typical for many building energy optimization problems. We present a new building energy and daylighting simulation program, which constructs approximations to the cost function that converge uniformly on bounded sets to a smooth function as precision is increased. We prove that for our simulation program, our optimization algorithms construct sequences of iterates with stationary accumulation points. We present numerical experiments in which we minimize the annual energy consumption of an office building for lighting, cooling and heating. In these examples, our precision control algorithm reduces the computation time up to a factor of four. (c) 2004 Elsevier B.V. All rights reserved.