Need for reduction of energy use in greenhouse production has increased. First objective was to develop and validate a dynamic air temperature model. Second objective was to minimize total energy input to the greenhouse, for pre-set temperature boundaries. Optimal control techniques were used to minimize total energy input (cooling and heating). Results confirm that air temperature is on the upper boundary when cooling is applied and on the lower boundary when heating is applied. This work is a first step toward optimal deployment of a large array of possible options for the grower to optimally satisfy heat or cooling.