1. A method for controlling an energy system, comprising: providing an integrated parametric hybrid model of an energy system for optimizing the energy system and determining desired trajectories over a temporal control horizon as control objectives, wherein the integrated parametric hybrid model contains models for parameters of the energy system that correlate with, but are not the same as, inputs and outputs of the energy system; receiving operating information for the energy system; receiving constraint information for the energy system; receiving prediction information for the energy system; executing the integrated parametric hybrid model in accordance with the desired trajectories, the operating information, the constraint information, and the prediction information, thereby generating an updated instance of the integrated parametric hybrid model; determining target values and optimal trajectories for a plurality of manipulated variables for the energy system using the updated instance of the integrated parametric hybrid model; and controlling the energy system in accordance with the target values and the optimal trajectories.