**7. Conclusions**

In this Chapter we have shown that the role of Bayesian predictors may be critical in order to implement predictive control of buildings. This kind of control is one of the most effective ones currently being developed by researchers, because it is able to smooth control actions and to trigger them in advance. However, it cannot be applied without a reliable predictor of the expected state of the controlled domain. Such a predictor must be queried in real-time, which is feasible just in case a reasonable computational effort is required.

In other words, computationally demanding software programs cannot be used to produce predictions at run time, but they can be run to generate datasets and these datasets may be used to transfer knowledge into Bayesian Networks. At this juncture, Bayesian inference may be performed: in fact, inputs by the controller (i.e. input variables describing the current state of the domain plus candidate arrays of control values) are instantiated in Bayesian Networks in the form of a set of evidences; then, inference algorithms are propagated and expected future values describing the energy and thermal state of the domain might be estimated. This procedure can be repeated thousands of times at each control step and it makes the imple‐ mentation of MPC feasible.

When implemented in a real case, the results from inferences were shown to be very accurate with low deviations from the values estimated by means of more complex numerical models. In addition, our testing of the use predictive Bayesian Networks embedded in a wider MPC framework to support the ranking of concurrent control policies was successful, too. So Bayesian Networks proved to be able to solve the problem of reducing complex models into more manageable tools for performing cumbersome inferences through limited computational efforts, while getting highly accurate results.
