Heating, cooling, and power needs of most process industries are satisfied by in-site utility plants supplying steam, electricity and rotational power. These systems are typically comprised of many units of various types that can be interconnected in different ways, offering a wide number of design and operational options. Although it is possible to achieve substantial savings by selecting the alternatives that minimize operating and/or capital costs, such procedure represents a large combinatorial problem that requires complex calculations involving the performance of all units. Moreover, the task becomes even larger when the plant operates under variable conditions since it is necessary to consider several scenarios at the same time and establish the appropriate equipment sizes and loads for a flexible operation of the system. Thus, the present work proposes a novel modelling framework for utility plants that allows structural and operational variables to be optimized simultaneously in order to fully exploit the flexibility of these systems when subject to fluctuating conditions. Furthermore, whenever failure and maintenance situations are evaluated, the procedure will determine the optimal equipment redundancy to ensure reliable operation under such circumstances. Finally, due to its inherent robustness, the suggested (MILP) formulation can tackle effectively real industry cases including operational optimisation, grassroots and retrofit designs.