Algorithm for a Large-Scale Energy Management Problem.-On a Game-Method for Modelling