A modelling framework for energy system planning: Application to CHP plants participating in the electricity market. (1st January 2021)