An Energy Management Script in Python for the Control of Battery Storage in a Grid-Connected Microgrid Using Mixed Integer Linear Programming