This paper presents the development of a new advanced control method suitable for variable temperature District Heating Systems (DHS). The proposed controller determines optimal planning for the on/off status and power of the heat generators as well as for the supply temperature and differential pressure at the production plant level. Compared to existing methods, the original features of the developed solution are to fully exploit the thermal storage capacity of the network and to determine the best compromise between pumping costs and heat losses. A numerical case study based on a representative DHS is used to evaluate the method over a heating season (5 months). Results show that our method reduces production costs up to 8.3 % when compared to a more classical controller. Moreover, the observed computing time is compatible with the requirements of the receding time horizon principle, ensuring that the method is tractable on real DHS.