Agent based Energy Management Systems