AbstractThe present paper deals with the optimization of a multi-energy district boiler (La Rochelle, France) which supplies domestic hot water and heats residential and public buildings, using renewable and fossil resources. First, a combination of white, grey and black boxes was used to model the plant, thanks to a modular approach. Next, a stratified thermal storage tank was modelled and completed the just-mentioned plant model. Using these models and forecasted sequences about outdoor temperature and thermal power consumption, a model predictive controller allows optimizing the use of both the tank and the wood boiler. As a result, fossil energy consumption and CO2 emissions are minimized. Energy is stored during low-demand periods and used when demand is high, instead of consuming gas and fuel oil.