Advanced simulations of building energy and control systems with an example of chilled water plant modeling