Renewable energy sources, distributed generation, multi-energy carriers, distributed storage, and low-temperature district heating systems, among others, are demanding a change in the way thermal networks are conceived, understood, and operated. Governments around the world are moving to increase the renewable share in energy distribution networks through legislation like the European Directive 2012/27 in Europe, and solar energy integration into district heating systems is arising as an interesting option to reduce operation costs and carbon footprint. This conveys an important investment that adds complexity to the management of thermal networks and often delays the return on investment due to the unpredictability of renewable energy sources, like solar radiation. To this end, this paper presents an optimisation methodology to aid in the operative control of an existing solar district heating system located in the northwest of France. The modelling of the system, which includes a large-scale solar field, a biomass boiler, a gas boiler, and thermal energy storage, was previously built in Dymola. The optimisation of this network was performed using MATLAB’s genetic algorithm (GA) and running the Dymola model as functional mock-up units, FMUs, using Simulink’s FMI Kit. The results show that the methodology presented here can reduce the current operation costs and improve the use of the daily storage of the DH system by a combination of mass flow control and the implementation of a flexibility function for the end-users. The cost-per-kWh was reduced by as much as 16% in a single day, and the share of heat supplied by the solar field on this day was increased by 5.22%.