The future development of electric and thermal energy generation, transp= ort and distribution relies on the exploitation of both conventional and re= newable energy sources via a wide variety of energy conversion technologies= ; on the top of that electric and thermal energy storage could be utilized = in order to match the demand with response exploiting more effectively the = possible synergies between the installed units.

In this context Combined Heat and Power (hereafter CHP) power plants and= engines are particularly attractive due to the higher efficiency when comp= ared to conventional units generating only one energy commodity. CHP units = can be classified into two main categories:

- one-degree-of-freedom units feature a single independent operating vari= able, the load (defined as the current fuel input rate divided by the maxim= um one), which controls the two energy outputs (e.g., electric and thermal = power). As a result, for a certain power plant or engine load, it is not po= ssible to vary the share of the two energy outputs according to customer ne= eds. Examples of one-degree-of-freedom CHP units are internal combustion en= gines and gas turbines with waste heat boiler, backpressure steam cycles, a= nd combined cycles with back-pressure steam turbine.
- Two-degree-of-freedom units feature two independent operating variables= , the load and another one (such as a steam extraction valve) adjusting the= share of the two energy outputs. Although these systems are more complex a= nd typically more costly, the second control variable increase the operatio= nal flexibility of the unit. Examples are steam cycles with extraction cond= ensing steam turbine (a steam extraction valve controls the steam bled from= the turbine and used to provide heat to the customer).

It is worth noting that also more sophisticated units featuring three in= dependent variables exist (e.g. CHP natural gas combined cycle with post fi= ring and extraction-condensing steam turbine). Moreover, looking at the ene= rgy outputs, some units can be configured so as to cogenerate cooling power= in addition to electricity and heat. Such units are called Combined, Cooli= ng, Heat and Power (CCHP). Examples are units made by an internal combustio= n engine, a waste heat boiler and an absorption chiller (converting heat in= to chilling power).

Systems featuring several CCHP or CHP units may be integrated with other= units such as boilers, heat pumps, and energy storage systems within so-ca= lled Energy Hubs. The sizes may range from few hundreds of kW for buildings= to hundreds of MW for industrial users and or district heating networks.

Three main types of challenging optimization problems arise when dealing= with such integrated systems:

- short-term scheduling, also called unit commitment,
- long-term operation planning,
- design or retrofit of the energy hub (see Section 3.1.1.5).

The short-term unit commitment problem can be stated as follows:

Given:

- the considered time horizon (e.g., one day, two days, one week) and an = appropriate discretization into time periods (e.g., 1 h, 15 min),
- forecast of electricity demand profile,
- forecast of heating and cooling demand profile,
- forecast of ambient temperature,
- forecast of time-dependent price of electricity (sold and purchased),
- performance maps of the installed units,
- operational limitations (start-up rate, ramp-up, etc.) of units,
- efficiency and Maximum capacity of storage systems;

optimize the following independent variables:

- on/off of units,
- load of units,
- share among heat and power (only for two-degree-of-freedom units),
- energy storage level (hence charge/discharge rate) in each time period = (for each energy storage system);

so as to minimize the operating costs (fuel + operation and maintenance = + electricity purchase) minus the revenues from electricity sale for the gi= ven time horizon while fulfilling the following constraints:

- energy balance constraints for each time interval, e.g. electric energy= , thermal energy, etc.,
- start-up constraints for each time unit, for each unit,
- ramp-up constraints for each time unit, for each unit,
- performance maps relating the independent control variables of the unit= s with their energy outputs (e.g. output thermal power as a function of the= load),
- a number of case-specific side constraints, e.g. maximum number of dail= y turns-on/off, for each unit; precedence constraints between units; minimu= m time unit permanence in on/off states, for each unit etc.

All constraints, except the performance maps of the units, can be easily= formulated as linear equalities or inequalities. Performance maps of units= are generally nonlinear and often not convex functions yielding to a nonco= nvex Mixed Integer NonLinear Program.

Due to the large number of variables, both integer and continuous, comme= rcially available global MINLP solvers are not capable of finding the globa= l optimum within reasonable time limits [1-Taccari 2015]. Besides genetic a= lgorithms [2-Kazarlis,1996] or Tabu search [3-Mantawy,1998] from late ninet= ies or other solutions going from Lagrangian relaxation [4-Borgetti et al 2= 003] to heuristic algorithms based on engineering practice for simple probl= ems [5-Bischi 2016], the most effective approaches are based on the lineari= zation of performance maps so as to obtain a Mixed Integer Linear Program (= MILP) [6-Mitra 2013]. This allows to use efficient MILP solvers, such as Cp= lex [7] and Gurobi [8], and have better guarantees on the quality of the re= turned solution [1-Taccari 2015]. The performance maps of the machines can = be linearized using either the convex hull representation [9-Ladhelma] or c= lassic piecewise linear approximations [10-D=E2=80=99Ambrosio 2010] of 1D [= 11-Zhou 2013] and 2D functions [12-Bischi 2014]; the latter kept into accou= nt also daily storage facing an large increase of computational effort, ran= ging from two to three orders of magnitude.

The so described problem assumes that forecasts of energy demands and pr= ices are accurate and their uncertainty is limited. If data uncertainty nee= ds to be considered, the short-term scheduling problem can be extended and = reformulated either as a two-stage stochastic program [13-Alipour 2014, 14-= Cardoso 2016] or a robust optimization problem with recourse [15-Zugno 2016= ].

As an additional challenge, when determining the optimal scheduling of C= HP units, it is necessary to take into account of the European Union regula= tion for high efficiency CHP units [16-EU regulation]. If a CHP unit achiev= es throughout the whole year a primary energy saving index above a threshol= d value, incentives are granted. Being a yearly-basis constraint, it poses = the need of considering the whole operating year as time horizon when deter= mining the optimal scheduling of CHP units. The same requirement concerns e= nergy hubs featuring seasonal storage systems [17-Gabrielli et al. 2017] ca= pable of efficiently storing energy for several months. Since tackling the = scheduling problem for the whole year as a single MILP is impracticable, me= taheuristics based on time decomposition to reach near optimal solutions in= a reasonable amount of time have been proposed. [18-Bischi et al. 2017] pr= oposed a rolling horizon algorithm in which the time horizon is partitioned= into weeks. The extension of the MILP model from one day to seven days may= imply an increase of computational time from few sec for a single day to t= ens of minutes for the week (with MILP gap below 0,1%) but it allows to bet= ter manage the thermal storage system accounting for the weekly periodicity= of the users=E2=80=99 demand. Within the rolling-horizon algorithm, the we= ekly MILP subproblems are solved in sequence from the current week till the= end of the year. The yearly-basis constraints related to the CHP incentive= s are included in each weekly MILP subproblem by estimating the energy cons= umption and production of the future weeks of the year with the correspondi= ng typical operating weeks (previously determined and optimized). If the ye= arly basis CHP incentive constraints are not met, the rolling horizon algor= ithm is repeated considering a higher (less optimistic) energy consumption = for the future weeks. Thanks to the decomposition of the operating year int= o weekly subproblems, the computational time required to optimize the whole= year of operation with a tight relative MILP gap (0.1%) ranges from 1 day = to 3 days, making the algorithm an effective scheduling and control tool fo= r energy hubs featuring CHP units.

Finally it is worth pointing out that, due to growing industrial interes= t in the optimal operation of complex energy systems for providing cooling,= heating and power (e.g., energy service companies, multi-utilities managin= g district heating networks as well as power plant operators), several tool= s are already available on the market [19-Bettinelli et al. 2016].

**References**

[1] Taccari L., Amaldi E., Martelli E., Bischi A., Short-Term Planning o= f Cogeneration Power Plants: A Comparison Between MINLP and Piecewise-Linea= r MILP Formulations, Computer Aided Chemical Engineering 2015, 37, 2429-243= 4, doi:10.1016/B978-0-444-63576-1.50099-6.

[2] Kazarlis S.A., Bakirtzis A.G., Petridis V., A genetic algorithm solu= tion to the unit commitment problem, IEEE Transactions on Power Systems 199= 6, 11 (1), 83-92, doi: 10.1109/59.485989.

[3] Mantawy A.H., Abdel-Magid Y.L., Selim S.Z., Unit commitment by tabu = search, IEE Proceedings - Generation, Transmission and Distribution 1998, 1= 45 (1), 56-64, doi: 10.1049/ip-gtd:19981681.

[4] Borghetti A., Frangioni A., Lacalandra F., Nucci C.A., Pelacchi P., = Using of a cost-based Unit Commitment algorithm to assist bidding strategy = decisions, 2003 IEEE Bologna PowerTech Conference, June 23-26, Bologna, Ita= ly, doi: 10.1109/PTC.2003.1304673.

[5] Bischi A., Perez-Iribarren E., Campanari S., Manzolini G., Martelli = E., Silva P., Macchi E., Sala-Lizarraga J.M., Cogeneration Systems Optimiza= tion: Comparison of Multi-Step and Mixed Integer Linear Programming Approac= hes, International Journal of Green Energy, 2017, 813, 37=E2=80=9341, doi:1= 0.1080/10447318.2014.986640.

[6] Mitra S., Sun L., Grossmann I.E., Optimal scheduling of industrial c= ombined heat and power plants under time-sensitive electricity prices, Ener= gy 2013, 54, 194-211, doi:10.1016/j.energy.2013.02.030.

[7] IBM ILOG CPLEX optimizer, http://www-01.ibm.com/software/integration/optimization/cplex-opti= mizer/.

[8] Gurobi optimizer 5.1, http://www.gurobi.com/.

[9] Lahdelma R., Hakonen H., An efficient linear programming algorithm f= or combined heat and power production. Eur J Oper Res 2003;148, 141-151, do= i: 10.1016/S0377-2217(02)00460-5.

[10] D=E2=80=99Ambrosio C., Lodi A., Martello S., Piecewise linear appro= ximation of functions of two variables in MILP models, Operations Research = Letters 2010, 38, 39=E2=80=9346, doi:10.1016/j.orl.2009.09.005.

[11] Zhou Z., Liu P., Li Z., Pistikopoulos E.N., Georgiadis M.C., Impact= s of equipment off-design characteristics on the optimal design and operati= on of combined cooling, heating and power systems. Comput Chem Eng 2013, 48= , 40-7, doi: 10.1016/j.compchemeng.2012.08.007.

[12] Bischi A., Taccari L., Martelli E., Amaldi E., Manzolini G., Silva = P., Campanari S., Macchi E., A detailed MILP optimization model for combine= d cooling, heat and power system operation planning, Energy 2014. 74, 12-26= , doi:10.1016/j.energy.2014.02.042.

[13] Alipour M., Mohammadi-Ivatloo B., Zare K., Stochastic risk-constrai= ned short-term scheduling of industrial cogeneration systems in the presenc= e of demand response programs, Applied Energy 2014, 136, pp 393-404, doi: 1= 0.1016/j.apenergy.2014.09.039.

[14] Cardoso G., Stadler M., Siddiqui A., Marnay C., DeForest, N., Barbo= sa-P=C3=B3voa A., Ferr=C3=A3o P., Microgrid reliability modeling and batter= y scheduling using stochastic linear programming, Electric Power Systems Re= search 2013, 103, 61=E2=80=93 69, doi:10.1016/j.epsr.2013.05.005.

[15] Zugno M., Morales J.M., Madsen H., Commitment and dispatch of heat = and power units via affinely adjustable robust optimization, Computers and = Operations Research 2016, 75, 191-201, doi:10.1016/j.cor.2016.06.002

[16] Directive 2012/27/EC of the European Parliament and of the Council = of 25 October 2012 on energy efficiency (substituting the previous Directiv= e 2004/8/EC on the promotion of cogeneration), Official Journal of the Euro= pean Union, L315/1, 2012.

[17] Gabrielli, G., Gazzani, M., Martelli, E., Mazzotti, M., 2017. Optim= al design of multi-energy systems with seasonal storage. Accepted for publi= cation on Applied Energy (Elsevier).

[18] Bischi A., Taccari L., Martelli E., Amaldi E., Manzolini G., Silva = P., Campanari S., Macchi E., A rolling-horizon optimization algorithm for t= he long term operational scheduling of cogeneration systems, Energy Submitt= ed (Minor review).

[19] Bettinelli A., Gordini A., Laghi A., Parriani T., Pozzi M., Vigo D.= , Decision Support Systems for Energy Production Optimization and Network D= esign in District Heating Applications, in Real-World Decision Support Syst= ems. Integrated Series in Information Systems, Integrated Series in Informa= tion Systems book series (ISIS, volume 37), Papathanasiou J., Ploskas N. Li= nden I. Editors, Springer 2016, 71-87.

**Contributors**:

Dr Aldo Bischi, Skolkovo Institute of Science an= d Technology

Dr Tiziano Parriani, Optit

Dr Emanuele Martelli, Politecnico di Milano