Mathematical formulation of the model. Deliverable 2.2. Integrated Planning of Multi-Energy Systems (PlaMES)