Researching MPC methods we have used a combination of Matlab for imitating the controller and TRNSYS for imitating the energy system. This is also the most widely used approach as far as I know in scientific literature. But maybe someone has developed some form of predictive control within TRNSYS?
Case example - using future metrological data (radiation, temperature), to change settings for thermal storage days before - allows using less auxiliary energy if we can predict that in the next few days there should be a lot of "free" solar energy.