Robust control of a cogeneration plant supplying a district heating system to enable grid flexibility