Modern building complexes have simultaneous heating and cooling demands. Therefore, integrated energy systems with heat pumps and long-term thermal storage are a promising solution. An integrated heating and cooling system for a building complex in Oslo, Norway was analyzed in this study. The main components of the system were heat pumps, solar thermal collectors, storage tanks, ice thermal energy storage, and borehole thermal energy storage. Dynamic simulation models were developed in Modelica with focus on the long-term thermal energy storage. One year measurement data was used to calibrate the system model and two COPs were defined to evaluate system performance. The simulation results showed that more heat had to be extracted from the long-term thermal storage during winter than could be injected during summer. This imbalance led to a decrease in ground temperature (3 °C after 5 years) and decreasing long-term performance of the system: both COPs decreased by 10 % within five years. This performance decrease could be avoided by increasing the number of solar collectors from 140 to 830 or by importing more heat from the local district heating system. Both measures led to sustainable operation with a balanced long-term thermal storage.