Pātuhitia tēnei: Mixed Integer Nonlinear Programming for Energy Storage