Simultaneous saccharification and fermentation (SSF) is one of the process options for production of bioethanol from lignocellulose in which the enzymatic hydrolysis takes place together with the fermentation of the formed sugars. In this way end-product inhibition of cellulases can be decreased and fewer reactors are also needed. However, the temperature in the process will have to be a compromise between the optimal temperature for the enzymatic hydrolysis and that of the fermentation. The authors have earlier demonstrated that non-isothermal SSF can give a higher ethanol concentration in comparison to the conventional isothermal SSF. In the present study, the authors developed a temperature-dependent mechanistic model for an SSF process with the material Arundo donax. This was used to calculate an optimal non-linear temperature profile using iterative dynamic programming, which was experimentally shown to give both a higher final ethanol concentration and improved productivity of the process.