A method for controlling an energy terminal, comprises determining a metric indicating a future availability of an energy resource at an energy terminal based on usage data associated to use of the energy resource by the energy terminal, generating control data to control the distribution of the energy resource betw...