1. A method of developing controls for a microgrid system, including: developing a model of a physical form of the microgrid system; identifying a plurality of loads and sources in the modeled microgrid system; assigning one or more state variables to each of the loads and sources in the modeled microgrid system, wherein the state variables represent a plurality of possible states; implementing candidate control structures on the modeled microgrid system as state machine model elements that control the respective state variables of the loads and sources, wherein the state variables represent power routing of the microgrid system; simulating operation of the microgrid system according to the implemented candidate control structures; determining an overall power balance on the microgrid system based on individual states of aggregate system power sources and loads of the model, wherein the power balance is based on a value of each of the state variables of each of the loads and sources; and developing the microgrid controls based on the power balance.