A central plant configured to serve energy loads of a building or campus, the central plant comprising: - central plant equipment including sources of resources, subplants to consume or supply resources and sinks to consume the resources, the central plant equipment configured to consume resources from the sources and to supply the resources to the building or campus; and - a high level optimizer configured to determine an optimal allocation of the energy loads across the central plant equipment by: - identifying one or more sources configured to supply the resources, one or more subplants configured to convert consumed resources into supplied resources, and one or more sinks configured to consume the resources; - generating a cost function comprising a cost of purchasing the resources from the sources; - generating a resource balance constraint that requires balance between a first amount of each resource and a second amount of each resource, wherein the first amount of each resource consists of a sum of a total amount of the resource supplied by the sources and a total amount of the resource supplied by the subplants, and the second amount of each resource consists of a sum of a total amount of the resource consumed by the subplants and a total amount of the resource consumed by the sinks; and - solving an optimization problem to determine the optimal allocation of the energy loads across the central plant equipment, wherein solving the optimization problem comprises optimizing the cost function subject to the resource balance constraint; wherein the high level optimizer is configured to control the central plant equipment to achieve the optimal allocation of the energy loads. - central plant equipment including sources of resources, subplants to consume or supply resources and sinks to consume the resources, the central plant equipment configured to consume resources from the sources and to supply the resources to the building or campus; and - a high level optimizer configured to determine an optimal allocation of the energy loads across the central plant equipment by: - identifying one or more sources configured to supply the resources, one or more subplants configured to convert consumed resources into supplied resources, and one or more sinks configured to consume the resources; - generating a cost function comprising a cost of purchasing the resources from the sources; - generating a resource balance constraint that requires balance between a first amount of each resource and a second amount of each resource, wherein the first amount of each resource consists of a sum of a total amount of the resource supplied by the sources and a total amount of the resource supplied by the subplants, and the second amount of each resource consists of a sum of a total amount of the resource consumed by the subplants and a total amount of the resource consumed by the sinks; and - solving an optimization problem to determine the optimal allocation of the energy loads across the central plant equipment, wherein solving the optimization problem comprises optimizing the cost function subject to the resource balance constraint; - identifying one or more sources configured to supply the resources, one or more subplants configured to convert consumed resources into supplied resources, and one or more sinks configured to consume the resources; - generating a cost function comprising a cost of purchasing the resources from the sources; - generating a resource balance constraint that requires balance between a first amount of each resource and a second amount of each resource, wherein the first amount of each resource consists of a sum of a total amount of the resource supplied by the sources and a total amount of the resource supplied by the subplants, and the second amount of each resource consists of a sum of a total amount of the resource consumed by the subplants and a total amount of the resource consumed by the sinks; and - solving an optimization problem to determine the optimal allocation of the energy loads across the central plant equipment, wherein solving the optimization problem comprises optimizing the cost function subject to the resource balance constraint;