Method for controlling a heating/refrigerating system comprising at least one source (9, 10, 11) for providing a cooling and/or heating output for at least one heat sink (2, 3, 4, 5, 6, 7), in particular a room of a building, wherein, in a first step, a request of the at least one heat sink (2, 3, 4, 5, 6, 7) for a heating output or refrigerating output is detected, wherein, in a second step, at least one boundary condition of the at least one source (9, 10, 11) is detected, wherein the boundary condition for the sources (9, 10, 11) that is used is a characteristic curve, a characteristic diagram or a formula for providing the refrigerating and/or heating output on the basis of at least one parameter, the parameter being from the following group: cost, efficiency, exhaust gas generation, outside temperature, time of day, time of year, an average outside temperature, promptness of the provision, comfort, wherein, during the second step, at least for one source (9, 10, 11) as operating state it is detected whether the source is in heating mode or in cooling mode, and wherein, in a third step, a strategy is taken as a basis to define an operating state of at least one source (9, 10, 11), wherein, during the third step, the at least one boundary condition of the at least one source (9, 10, 11), the operating state of the at least one source (9, 10, 11) and the strategy are taken as a basis to make a decision as to whether the operating state of the source (9, 10, 11) is changed, wherein the specified strategy consists in providing the heating and/or refrigerating output inexpensively and/or efficiently and/or with low exhaust gas values and/or with high comfort and/or as quickly as possible. wherein, in a first step, a request of the at least one heat sink (2, 3, 4, 5, 6, 7) for a heating output or refrigerating output is detected, wherein, in a second step, at least one boundary condition of the at least one source (9, 10, 11) is detected, wherein the boundary condition for the sources (9, 10, 11) that is used is a characteristic curve, a characteristic diagram or a formula for providing the refrigerating and/or heating output on the basis of at least one parameter, the parameter being from the following group: cost, efficiency, exhaust gas generation, outside temperature, time of day, time of year, an average outside temperature, promptness of the provision, comfort, wherein, during the second step, at least for one source (9, 10, 11) as operating state it is detected whether the source is in heating mode or in cooling mode, and wherein, in a third step, a strategy is taken as a basis to define an operating state of at least one source (9, 10, 11), wherein, during the third step, the at least one boundary condition of the at least one source (9, 10, 11), the operating state of the at least one source (9, 10, 11) and the strategy are taken as a basis to make a decision as to whether the operating state of the source (9, 10, 11) is changed, wherein the specified strategy consists in providing the heating and/or refrigerating output inexpensively and/or efficiently and/or with low exhaust gas values and/or with high comfort and/or as quickly as possible.